0% found this document useful (0 votes)
23 views118 pages

Overview of Networking

Uploaded by

bholasaxena277
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views118 pages

Overview of Networking

Uploaded by

bholasaxena277
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 118

Overview of Computer

Networks (Class #18


contd.)

P. Krishna Reddy, IIIT Hyderabad


Topics completed: Operating
system
• Input: hardware

• Output is system calls
to develop
applications

• Objectives: to improve
throughput and
response time,
deadlines, waiting
time
Outline
• Introduction
• Data link layer: An overview
• Medium Access layer: An overview
• Network layer: An overview
• Transport layer: An overview
Networking
• Input: thousands of
computers connected
through communication Networking Applications
channels (http, sendmail,…)
Networking Protocols to
implement system calls with code
• Output is primitives to (Interface)
develop applications Tens of thousands of computers
and devices connected through
communication channels
• Objectives: to improve distributed across the world
throughput, reliability, (thousands of kilometers
and response time,
deadlines, waiting time
How it is different from producer and
consumer problem?
• Producer places an item and consumer consumes an item from the buffer.
• Normally in the same computer
• Producer waits if the buffer is full, consumer waits if buffer is empty.
• How to enable producer and consumer to exchange data, suppose a video if
• Producer is in one computer
• Consumer is another computer

• Connected through long communication channel (thousands of kilometers) with


intermediate links and junctions

• Issues
• Links might not be reliable
• All the data may not be delivered
• So, more mechanisms are needed.
• Requires
• Error control mechanisms
• Flow control mechanisms
Introduction

• 18th century is dominated by mechanical systems


• 19th century is the age of steam engine
• 20th century- Information Technology
• Information gathering processing and distribution
• Others: radio, television, telephones, communication
satellites and Internet
• Computer network
• Large number of separate but interconnected computers.
• Distributed system: A collection of independent computers
which appears to users as single coherent system. Another
layer such as world wide web is presented on the top of
computer network
• In computer network, users are exposed to machines.
Users of computer networks

• Business applications
• Resource sharing
• To make programs,
equipment, and
data available to
anyone on the
network without
regard to the
location of the
user.
• Almost every
office requires
computer networks
Home
Applications
• Homes contain many networked
devices, e.g., computers, TVs,
connected to the Internet by cable,
DSL, wireless, etc.
• Home users communicate, e.g., social
networks, consume content, e.g.,
video, and transact, e.g., auctions
• Wikipedia, facebook, twitter, sms,
IP television
• Some application use the peer-to-
peer model in which there are no
fixed clients and servers:
In a peer-to-peer system there are no fixed
clients and servers.
Tag Full name Example

B2C Business-to-consumer Ordering books online

Car manufacturer ordering tires from


B2B Business-to-business
supplier

Government distributing tax forms


G2C Government-to-consumer
electronically

C2C Consumer-to-consumer Auctioning second-hand products online

P2P Peer-to-peer Music sharing

Some forms of e-commerce.


Mobile Users
• Tablets, laptops, and smart phones are popular
devices; WiFi hotspots and 3G cellular provide
wireless connectivity.
• Mobile users communicate, e.g., voice and
texts, consume content, e.g., video and Web,
and use sensors, e.g., GPS.
• Sensor networks
• Wireless and mobile are related but different:
Social Issues

• Network neutrality – no network restrictions


• Content ownership, e.g., DMCA (Digital Millennium
Copy right Act) takedowns
• Anonymity and censorship
• Privacy, e.g., Web tracking and profiling
• Theft, e.g., botnets and phishing
Network
Hardware

Scale Networks Type


can be classified by their scale:
Vicinity PAN (Personal Area Network) »
Building LAN (Local Area Network) »
City MAN (Metropolitan Area Network) »
Country WAN (Wide Area Network) »
Planet The Internet (network of all networks)
About networking technology

• Two dimensions
• Transmission technology
• Scale
• Two types of transmission technology
• Broadcast links
• Point to point links
• Point-to-Point links
• One sender and one receiver
• Connect individual pairs of links
• They may have to visit some intermediate machines.
• Broadcast link
• Communication link is shared by several machines
• A packet is received by all machines. The address in the packet
specified intended recipient.
• Broadcasting: message is sent to all machines
• Multicasting: message is sent to a subset of nodes.
Layered model
• Layered model
• Divide the roles/issues among
layers
• Develop each layer
• Lower layer provides services to
higher layer.
Protocol Layers
Protocol layering is the main structuring method used to
divide up network functionality.

• Each protocol instance


talks virtually to its peer
• Each layer communicates
only by using the one below
• Lower layer services are
accessed by an interface
•At bottom, messages are
carried by the medium
Protocol Layers (2)
Example: the philosopher-translator-secretary architecture
Each protocol at different layers serves a different purpose
Protocol Layers
Each lower layer adds its own header (with control inform-
ation) to the message to transmit and removes it on receive

Layers may also split and join messages, etc.


Connection-Oriented vs.
Connectionless
Service provided by a layer may be kinds of either:
• Connection-oriented, must be set up for ongoing use
(and torn down after use), e.g., phone call
• Connectionless, messages are handled separately,
e.g., postal delivery
Service Primitives (or system
calls)
A service is provided to the layer above as primitives
Hypothetical example of service primitives that may provide
a reliable byte stream (connection-oriented) service:
Service Primitives
Hypothetical example of how these primitives may be used
for a client-server interaction

Client Server

Connect request LISTEN (0)


CONNECT (1)
ACCEPT (2)
RECEIVE
Accept
response
SEND
RECEIVE (3) Request for data SEND (4)
Reply
DISCONNECT (5) Disconnect
DISCONNECT (6)
Disconnect
Relationship of Services to
Protocols

Recap:
• A layer provides a service to the one above
[vertical]
• A layer talks to its peer using a protocol
[horizontal]
Reference
Models
Reference models describe the layers in a network
architecture

• OSI reference model »

• TCP/IP reference model »

• Model used for this text »

• Critique of OSI and TCP/IP »


OSI (Open Systems
Interconnection) Reference Model
A principled, international standard, seven layer model to
connect different systems

– Provides functions needed by users

Converts different representations


– Manages task dialogs
– Provides end-to-end delivery
– Sends packets over multiple links
– Sends frames of information
– Sends bits as signals

ISO OSI: International Standards Organization Open Systems Interconnection


About Layers
• The Physical layer
• Transmitting raw bits over a communication channel
• One side sends 1/0 and the other side receives 1/0
• Issue: What electrical signals should be used?
• Design issues
• Mechanical, electrical and timing interfaces
• The Data Link Layer
• Transform a raw transmission facility into a like that appears free of
undetected transmission errors.
• Data frame and ack. Frame
• Interface between fast transmitter and slow receiver
• Broadcast networks: How to control access to shared channel?
• LAN
• The network layer
• Controls the operation of the subnet.
• Issue: how packets are routed from source to destination?
• Resolving bottlenecks; concession control
• In broadcast networks, network layer is absent
About Layers
• The Session Layer
• The Transport layer • Helps to establish sessions
• Accept data split into small • Dialog control, token
units, if required, and pass it management, synchronization
to network layer.
• It isolates upper layer with the •
The presentation layer
possible changes in the
• Syntax and semantics of the
hardware technology.
information
• It also determines the type of
• It allows computers with
service: connection oriented
or connectionless. different data representations to
• It is an end to end layer communicate
• One computer talks with other
• The application layer
computer
• Set of protocols
• In the lower layers the
• Popular one is HTTP (Hypertext
communication is between the
source and intermediate transfer protocol)
computer. • File transfer
• Electronic mail
• Network news
The OSI reference model.
TCP/IP Reference
Model
A four layer model derived from experimentation; omits some OSI layers
and uses the IP as the network layer.

TCP/IP stands for Transmission Control Protocol/Internet Protocol and is a suite of


communication protocols used to interconnect network devices on the internet.

• ICMP: Internet Control


Message Protocol
• UDP: User Datagram
Protocol
•“ DSL: Digital subscriber
” line
• SONET: Synchronous
Optical Network
• SMTP: Simple Mail
Transfer Protocol
• RTP: Realtime transport
protocol
• DNS: Domain name system

The TCP/IP model with some protocols we will study.


The TCP/IP reference model.
TCP/IP model
It is based on the TCP/IP model but we call out the
physical layer and look beyond Internet protocols.
Internet
The modern Internet is more complex:
• ISP networks serve as the Internet backbone
• ISPs connect or peer to exchange traffic at IXPs
• Within each network routers switch packets
• Between networks, traffic exchange is set by business
agreements
• Customers connect at the edge by many means
− Cable, DSL, Fiber-to-the-Home, 3G/4G wireless, dialup
• Data centers concentrate many servers (“the cloud”)
• Most traffic is content from data centers (esp. video)
• The architecture continues to evolve
Internet

Architecture of the Internet


• DSLAM (Digital Subscriber Line Access Multiplexer)
• Fiber to the home (FTTH)
• A cable modem termination system (CMTS)
• Internet eXchange Point (IXP) : Internet Exchange Point (IXP) can earn
money by charging each ISP that connects to it. The IXP charges each ISP
based on the amount of traffic sent to or received from the IXP.
Outline (Class #19)
• Introduction
• Data link layer: An overview
• Medium Access layer: An overview
• Network layer: An overview
• Transport layer: An overview
The Datalink
Layer

• How to transmit information between two adjacent


machines in a reliable and efficient manner?
• Conceptually two machines are connected like a wire
(coaxial cable, telephone line, or wireless channel)
• There is a non-zero propagation delay
• Communication channel makes errors
The Data Link Layer
Responsible for delivering frames of information over a single link
• Handles transmission errors and regulates the flow of data
• Provides well-defined service to network layer
• Dealing with transmission errors
• Regulates data between high-speed sender and slow speed
receiver
Application
Transport
Network
Link
Physical
Frames
• Link layer accepts packets from the network layer, and
encapsulates them into frames that it sends using the
physical layer; reception is the opposite process

Network

Link
Virtual data path

Physical Actual data path


Possible Services
Unacknowledged connectionless service
• Frame is sent with no connection / error recovery
• Ethernet is an example

Acknowledged connectionless service


• Frame is sent with retransmissions if needed
• Example is 802.11 (WiFi)

Acknowledged connection-oriented service


• First phase: Connection is set-up
• Second phase: Frames are transmitted
• Third phase: connection is released.
Link layer environment
(1)
Commonly implemented as NICs (Network Interface Cards)
and OS drivers; network layer (IP) is often OS software
Link layer environment
(2)
Link layer protocol implementations use library functions
• See code (protocol.h) for more details

Group Library Function Description


from_network_layer(&packet) Take a packet from network layer to send
Network to_network_layer(&packet) Deliver a received packet to network layer
layer enable_network_layer() Let network cause “ready” events
disable_network_layer() Prevent network “ready” events

Physical from_physical_layer(&frame) Get an incoming frame from physical layer


layer to_physical_layer(&frame) Pass an outgoing frame to physical layer
wait_for_event(&event) Wait for a packet / frame / timer event
start_timer(seq_nr) Start a countdown timer running
Events & stop_timer(seq_nr) Stop a countdown timer from running
timers start_ack_timer() Start the ACK countdown timer
stop_ack_timer() Stop the ACK countdown timer
Algorithms
• Framing method
• Bit stuffing
• Error control
• Error detection and correction
• Checksum-based protocols
• Flow control
• Sliding window protocols.
About Error
Control
• Issue: How to make sure all frames are eventually delivered to
the network layer in order?
• For connectionless service, it is OK if the sender keeps sending
the frames continuously
• However, for reliable, connection-oriented service, it would not be
fine at all.
• Approach
• Error control repairs frames that are received in error
• Requires errors to be detected at the receiver
• Feedback in terms of positive and negative acks.
• Timer protects against lost acknowledgements
• Typically retransmit the unacknowledged frames
• When frames are transmitted multiple times, there is an issue
• Assign sequence numbers
Design Issue: Flow
Control
How to prevent a fast sender from out-pacing a slow receiver?
• Feedback based flow control
• Receiver sends back information to the sender giving it
the permission to send the data
• Rate-based flow control
• Built-in mechanism that limits the rate.
• Overall, a set of well-defined rules are formed
• Receiver gives feedback on the data it can accept

Flow control is a topic in the Link and Transport layers.


Error Detection and
Correction
Error codes add structured redundancy to data so errors can
be either detected, or corrected.
Error correction codes:
• Hamming codes »
• Binary convolutional codes »
• Reed-Solomon and Low-Density Parity Check codes
− Mathematically complex, widely used in real systems

Error detection codes:


• Parity »
• Checksums »
• Cyclic redundancy codes »
Utopian Simplex
Protocol
An optimistic protocol (p1) to get us started
• Assumes no errors, and receiver as fast as sender
• Considers one-way data transfer

Sender loops blasting frames Receiver loops eating


frames

• That’s it, no error or flow control …


Stop-and-Wait – Error-free
channel
Protocol (p2) ensures sender can’t outpace receiver:
• Receiver returns a dummy frame (ack) when ready
• Only one frame out at a time – called stop-and-wait
• We added flow control!

Sender waits to for ack Receiver sends ack after


passing
after frame to physical frame to network layer
passing
layer
Stop-and-Wait – Noisy
channel (1)
ARQ (Automatic Repeat reQuest) adds error control
• Receiver acks frames that are correctly delivered
• Sender sets timer and resends frame if no ack.

For correctness, frames and acks must be numbered


• Else receiver can’ t tell retransmission (due to lost
ack or early timer) from new frame
• For stop-and-wait, 2 numbers (1 bit) are
sufficient
Sliding Window

Protocols
In the previous protocols, data frames are transmitted in one direction only
• In most practical situations, data frames have to be transmitted in both
directions.
• Each link has a forward channel and reverse channel. The capacity of reverse
channel is wasted.
• Alternative
• Use the same link in both directions.
• Data frames of A and B are intermixed with ack frames of A and B.
• Piggybacking
• Temporarily delaying ack so that they can be hooked into the next
outgoing frame.
• However, piggybacking increases the delay.
• Use hybrid
• If possible use piggybacking otherwise send a separate ack frame.
Sliding Window concept
(2)
A sliding window advancing at the sender and receiver
• Ex: window size is 1, with a 3-bit sequence number.

Sender

Receiver

At the start First frame First frame Sender gets


is sent is first ack
received
Sliding Window concept
(3)
Larger windows enable pipelining for efficient link use
• Stop-and-wait (w=1) is inefficient for long links
• Best window (w) depends on bandwidth-delay (BD)
• Want w ≥ 2BD+1 to ensure high link utilization

Pipelining leads to differentchoices for errors/buffering


• Go-Back-N and Selective Repeat
Sliding Window Protocols: Summary

• Summary of sliding window protocols


• Sender maintains a sequence numbers for frames
(sending window)
• Receiver also maintains a receiving window.
• Whenever a packet is received from network layer, it
gives a highest sequence number and the upper
edge of the window is advanced by one.
• When ack, arrives lower edge of the window is
advanced by one.
• Sender needs n buffers to hold unack frames
Outline
• Introduction
• Data link layer: An overview
• Medium Access layer: An overview
• Network layer: An overview
• Transport layer: An overview
The Medium Access Control
Sublayer
• Networks links can be divided into two categories:
• Point-to-point connections
• WAN is point-to-point links
• Broadcast channels/multiaccess channels or random access
channels
• For fixed channel and traffic from N users
• Wireless is a broadcast channel
• Analogy
• Conference call with six people with different telephones
• Medium access control sublayer is a sublayer in data link layer
• Multi-access channels and LANs are closely related
• MAC sublayer is the bottom of the datalink layer
The MAC
Sublayer
Responsible for deciding who sends
Application
next on a multi-access link
Transport
• An important part of the link
Network
layer, especially for LANs
Link
Physical

MAC is in here!
Classic Ethernet (1) –
Physical Layer
One shared coaxial cable to which all hosts attached
• Up to 10 Mbps, with Manchester encoding
• Hosts ran the classic Ethernet protocol for access
Carrier Sense Multiple
Access (CSMA)
• CSMA (Carrier Sense Multiple Access) improves on ALOHA
by sensing the channel!
• User doesn’t send if it senses someone else

Variations on what to do if the channel is busy:


• 1-persistent (greedy) sends as soon as idle
• Nonpersistent waits a random time then tries again
• p-persistent sends with probability p when idle
1-Persistent CSMA
Protocol
• When a station has data to send, it listens to the channel
• If the channel is idle, the station sends the data
• If the channel is busy, the station waits until it becomes idle.
• If the collision occurs, the station waits for random amount
of time and starts over again.
• It is called 1-persistent, because, the station transmits with
a probability of 1 when it finds the channel idle.
• Issues: when two stations ready, collisions occur, if they are
not so impatient.
CSMA/CD: CSMA with
Collision Detection
• In CSMA, if two stations sense a channel to be idle and
begin transmitting, the signals will collide.
• Alternative: Stations quickly detect collision and abruptly
stop transmitting.
• It saves time and bandwidth
• If a station detects collision, it aborts its transmission, waits a random
period of time and tries again.
• CSMA/CD consists of alternating contention and transmission periods
and idle periods (when all stations are quiet).
• If the channel transmits 2*t, whether t is the signal propagation time
between the two farthest stations. (for 1KM co-axial cable, t=5 µsec).
• Performance is greatly improved if frame time is much larger than the
propagation time.
Classic Ethernet (2) –
MAC
MAC protocol is 1-persistent CSMA/CD (earlier)
• Random delay (backoff) after collision is computed
with BEB (Binary Exponential Backoff)
• Frame format is still used with modern Ethernet.

Ethernet
(DIX)

IEEE

802.3
Data Link Layer
Switching
Repeater, Hub, Bridge and switch
• Repeaters • Bridge
• They amplify signals • Connects two or more LANs
• A software in the bridge examines the
• Hub: It has several input lines and joins
electrically destination address and decides
where to send the frame
• Frames arriving on any of the line are
• With a bridge each line is a Collison
sent to all other lines
domain
• Two frames which arrive same time
• Switches
collide
• Similar to bridges
• Entire hub forms a single Collison
• Used to connect several individual
domain
computers
Uses of Bridges
Common setup is a building with centralized wiring
• Bridges (switches) are placed in or near wiring closets
Learning Bridges
A bridge operates as a switched LAN (not a hub)
• Computers, bridges, and hubs connect to its ports
Learning Bridges
(2)
Backward learning algorithm picks the output port:
• Associates source address on frame with input port
• Frame with destination address sent to learned port
• Unlearned destinations are sent to all other ports

Needs no configuration
• Forget unused addresses to allow changes
• Bandwidth efficient for two-way traffic
Learning Bridges
(3)
Bridges extend the Link layer:
• Use but don’t remove Ethernet header/addresses
• Do not inspect Network header
Repeaters, Hubs, Bridges, Switches,
Routers, & Gateways

Devices are named according to the layer they process


• A bridge or LAN switch operates in the Link layer
Virtual
LANs
VLANs (Virtual LANs) splits one physical LAN into
multiple logical LANs to ease management tasks
• Ports are “colored” according to their VLAN
Outline
• Introduction
• Data link layer: An overview
• Medium Access layer: An overview
• Network layer: An overview
• Transport layer: An overview
Network Layer
• Responsible for getting packets from the source to destination
through INTERMEDIATE HOPS

• Data link layer: only between two points

• The network layer deals with end to end transmission


• Should know the topology of the network
• Should not overload some routes and underload other
routes.
• Should deal with different networks
The OSI reference model.
Design Issues
• Store-and-forward packet switching
• Connectionless service – datagrams
• Connection-oriented service – virtual
circuits
Store-and-Forward Packet
Switching
• Components of the network layer • Host sends the
• ISP equipment (routers connected by packet to the
transmission lines) nearest router,
• Host H1 is directly connected to one of the router which will be
• Home computer plugged into MODEM forwarded to the
• H2 is a LAN, with an office Internet with a router, F, next router along
owned and operated by the customer. the path until it
• The router has a leased line to the ISP’s reaches the
equipment. destination.
• F is not part of ISP, but it runs the same algorithms
as the ISP’s routers.

The environment of the network layer protocols.


Services Provided to the

Transport Layer
Properties of services
• The services should be independent of router technology
• Transport layer should be shielded from the number, type, and topology of the
routers present.
• The network addresses made available to transport layer should use a uniform
numbering plan across LANs and WANs.

• The freedom resulted into two thoughts


• First: Network service should be connectionless with SEND PACKET and
RECEIVE PACKET and little more.
• No ordering and flow control should be done.
• Each packet should carry a destination address.
• Second: network should be reliable and connection-oriented service based on
the experience of telephone service.
• Without connections, quality of service is difficult to achieve especially for
real-time traffic.

• First, connectionless service has dominated.


• Later, connection-orient service dominated
• Currently, both are widely used.
Connectionless service:
datagrams
• Packets are injected as datagrams (analogy is telegram).
• No advance setup is needed
• Network is called datagram network.
• H1 handovers long message to transport layer which instructs to
deliver packet to P2 on H2. The transport layer runs in H1 (in the
operating system). It prepends transport header and handover it to
network layer (another procedure)

• Network layer breaks it into packets and sends each of them to router A
using point-to-point protocol, PPP.
• ISP decides where to send packets. It has to take routing decisions.

• The algorithm which does routing decisions are called routing algorithm.

• Internet protocol (IP) is the basis of the Internet, individually forwards


each packet. 32 bits in IPv4 and 128 bits in IPv6.
Connectionless Service –
Datagrams
Packet is forwarded using destination address inside it
• Different packets may take different paths

Routing within a datagram network.


Connection-oriented: Virtual
Circuits
• Idea: Avoid having a new route for every packet.
• Establish a connection. When a connection is established, the connection
set-up is stored in tables.
• The route is used for all traffic flowing over the connection.

• H1 established connection 1 with host H2. The first line of A’s table says
that if a pack arrives with connection 1 it should be forwarded to C and
given connection id as 1.
• If H3 also wants to establish a connection to H2, it choses a connection
identifier 1 and tells the network to establish a connection.

• There is a conflict as A has already used id 1. So, A assigns a different


identifier. This process is called label switching. An example of the
protocol is MPLS (MultiProtocol label Switching). It wraps packets with
20-bit connection identifier or label.
Connection-Oriented – Virtual
Circuits
Packet is forwarded along a virtual circuit using tag inside it
• Virtual circuit (VC) is set up ahead of time

Routing within a virtual-circuit network.


Comparison of Virtual-Circuits &
Datagrams
Routing Algorithms
• The decision has to be made for every packet as best route may be
changed over last time.
• Network layer design
• Algorithms and data structures
• Routing and forwarding
• Forwarding: a process which takes each packet and forwards it to
outgoing line.
• Routing: A process which updates the routing tables.
• Routing algorithms play a major role.
• Properties of routing algorithm
• Correctness, simplicity:
• Robustness: it should run for years; hosts fail, routers crash, software
fails
• Stability: Routing algorithm should converge and reach equilibrium.
• fairness, efficiency
Routing Algorithms
• Shorted Path Routing
• Flooding
• Distance vector routing
• Link state routing
• Hierarchical routing
• Broadcast routing
• Multicast routing
Flooding
• A simple method to send a packet to all network nodes
• Each node floods a new packet received on an incoming
link by sending it out all of the other links
• Generates vast numbers of duplicate packets.
• Method 1:
• Flooding with an hop count: Put hop counter and decrement
hop counter for each node.
• -ve: generates exponential number of duplicate pockets
• Method 2
• Track the packets. Stop, if it is already flooded, i.e., avoid
sending second time.
• Put a sequence number for each source in the packet.
Maintain the list at each node.
Flooding
• Flooding is not practical, but has several
advantages
• It ensures that packet reaches every node.
• Flooding is tremendously robust.
• Even if large number of routers are
damaged, the packet reaches the
destination.
• Flooding produces shorter delay

• Flooding can be used to compare other


algorithms.
Distance Vector Routing
(1)
• Dynamic
• Distance vector is a distributed routing algorithm
• Shortest path computation is split across nodes
• Each router maintains the table giving the best
known distance to each destination

Bellman-Ford Algorithm (followed in ARPANET):


• Each node knows the distance of links to its
neighbors
• Each node advertises vector of lowest known
distances to all neighbors
• Each node uses received vectors to update its
own
Distance Vector
Routing (1)
• Once every T sec, each router sends to each neighbor a list of
estimated delays to the destination. It also receives similar list
from its neighbors and calculated the new routing table.
• Example
• Four columns show the delay vectors received from
neighbors. A claims to have a 12 msec delay to B, 25msec
delay to C, and 40 sec delay to D and so on.
• Suppose, J has measured or estimated its delay to its
neighbors A, I,H, and K as 8, 10, 12, and 6 respectively.
• J computes time delay to G as follows.
• One route: J,A,..G = 8 (JA) +18 (AG)=26
• Second route: J I ..G=41(31+10)
• Third route: J H..G= 18(6+12)
• Fourth route: JK..G=37 (31+6)
• The best route is 18.
Distance Vector
Routing (2)

(a)A network. (b)Input from A, I, H, K, and the new routing table for J.
Link State Routing
(1)
• Distance vector routing is replaced by link state routing.
• More computation but simpler dynamics
• Widely used in the Internet

Algorithm: Each router


1. Discovers its neighbors and learn their network addresses.
• After booting, node sends HELLO packet to each point-
to-point line.
2. Set the distance or cost metric to each of its neighbors
3. Construct a packet with the learning.
4. Send this packet and receive packet from all other routers.
5. Compute the shortest path to every other router
Hierarchical

Routing
As network grows, the router tables grow proportionately.
• More memory and CPU time
• More bandwidth
• After certain limit, it is not possible to send routing table to
every other router.
• Hierarchical routing
• Routers are divided into regions.
• Each router knows how to route packets to other routers
within the region.
• Hierarchy may consists of multiple levels.
Hierarchical
Routing
Hierarchical routing reduces the work of route computation
but may result in slightly longer paths than flat routing

Hierarchical routing.
Congestion Control
(1)
• Congestion is a situation: Too many packets present in the network
causes network delay and loss
• Both network and transport layers share the responsibility to control
congestion.
• Effective way is to reduce the load at the transport layer.
• Goodput (=useful packets) trails offered load
Congestion Control
(2)
• Network experiences a congestion collapse
• If routers will have infinite memory, congestion
gets worse
• Packets gets timed out.
• Difference between congestion control and flow
control
• Congestion control is related to whole network.
Involves the behavior of all the hosts and routers.
• Flow control relates to the traffic between a
particular sender and a particular receiver.
• Best method is to get host a “slow down”.
Congestion Control (3) –
Approaches
Network must do its best with the offered load
• Different approaches at different timescales
• Nodes should also reduce offered load (Transport)
Traffic-Aware

Routing
Choose routes depending on traffic, not just topology
• Link weight is a function of the link bandwidth, propagation delay,
measured load (average queuing delay)
• Routing tables are updated accordingly.
• E.g., use EI for West-to-East traffic if CF is loaded
• -ve: routing tables may oscillate wildly leading to erratic routing
and other problems
Admission
Control
• Idea: do not set up a new virtual circuit unless the
network can carry the added traffic without becoming
congested.
• Attempt to set up a virtual circuit may fail.
• Example: telephone system
• Issue is handling bursty traffic
• Video is easy to handle
• Traffic due to web browsing is very bursty
• Admission control can be combined with traffic ware
routing
• Redraw the network topology based on information
about congested routers.
• For example, normally connection between router A and B
passes through one of the congested routers. Based on the
information, we can redraw the network.
Traffic
• Throttling
When the congestion is imminent, network should tell the
senders to throttle back their transmissions and slow down.
• Congestion avoidance
• Congested routers signal hosts to slow down traffic for
Datagram networks and virtual circuit networks.
• Two problems have to be solved for each approach
• First: router must determine when congestion is
approaching, before it has arrived.
• Queuing delay captures congestion experienced by
packets
• Second: routers must send timely feedback to the senders
that are causing congestion.
• ECN (Explicit Congestion Notification) marks packets and
receiver returns signal to sender
Traffic Throttling: feedback
mechanisms
• Choke packets
• Router selects the congested packet and sends the choked packet back
to source host.
• When a source gets the choked packet, it is supposed to reduce the 50%
of traffic.
• Explicit congestion notification (ECN)
• The router can tag any packet it forwards to signal that it is experiencing a
congestion.
• When a network delivers a packet, the received can inform the sender
about congestion through ack. message. The design is called Explicit
Congestion Notification (ECN).
Load Shedding

(1)
When all else fails, network will drop packets
(shed load)
• When routers are being inundated by packets that
they can not handle, they just throw them away.
• Key question
• Which packets to drop?
• File transfer: old packet is important
• WINE policy
• Realtime traffic: new packet is important
• MILK policy
• Application must mark the importance on the
packets.
Load Shedding
(2)
• Random Early Detection
• Routers maintain a running average of queue length

• When an average queue length exceeds, router


starts dropping the packets at random.
• Fast senders will have more packet drop

• Sender will notice the loss as there are no


ack. and slow down
• Better performance.
Quality of Service
• So far, we have made effort to • Issues
improve network performance • What applications need
• from the network?
However, some applications require
• How to regulate the traffic
stronger performance guarantees.
that enters the network?
• Example: Multimedia • How to reserve the
applications: resources at routers to
• We will focus of providing network guarantee performance?
performance with a sharp focus on • Whether the network can
safely accept more traffic
providing quality of service.
• One solution is overprovisioning • No single technique deals
• More money is required efficiently all these issues..
• With quality of service mechanisms,
the network can honor performance
guarantees at the cost of turning
down some requests.
Parameters Defining QoS

• Throughput/bandwidth - the total amount of work completed


during a specific time interval.

• Delay - the elapsed time from when a request is first submitted to


and when the desired result is produced.

• Jitter – Variation in packet arrival times


• Due to lost frames.
• Not acceptable for continuous media applications
• Random variation of transmission time
• Different packets will have different delay
• Disturbs realtime audio and video applications

• Reliability/loss - how errors are handled during transmission and


processing of continuous media.
Application
Requirements (1)
Different applications care about different properties
• We want all applications to get what they need

. Application Bandwidth Delay Jitter Loss


Email Low Low Low Medium
File sharing High Low Low Medium
Web access Medium Medium Low Medium
Remote login Low Medium Medium Medium
Audio on demand Low Low High Low
Video on demand High Low High Low
Telephony Low High High Low
Videoconferencing High High High Low

Stringency of applications' quality-of-service requirements.


Application
• Requirements
Bandwidth: (2)
• Jitter
• E-mail, audio, remote login not
• E-mail, file sharing and web
need much bandwidth. But file
access not sensitive to irregular
sharing and video in all forms
arrival of packets.
need high bandwidth.
• Remote login is sensitive
• Delay:
• Video and audio are extremely
. transfer, email, audio, and
• File
sensitive to Jitter
video are not delay sensitive. That
is if the packets are delayed • Loss:
uniformly across all by a few • E-mail, file sharing, web access
seconds, no harm is done. So, and remote login have more
playing audio or video files from a stringent requirements on loss and
server does not require low delay. bits should be delivered correctly.
• But, interactive applications, web • Audio and video applications
access surfing and remote login tolerate lost packets.
are more delay sensitive. • People do not notice short
Telephony, and video conferencing pauses or skipped frames.
are strictly delay sensitive

Application Requirements
• (3) of QoS
Network support different categories
• Constant bit rate (telephony)
• Simulate a wire by providing uniform bandwidth and a
uniform delay
• Real-time variable bit rate (e.g., compressed video
.
conferencing)
• Sending a complex frame requires many bits, where a
shot of white ball requires less bits.
• Non-real-time variable bit rate (e.g., watching a movie on
demand)
• Buffering can be used
• Available bit rate (e.g., file transfer)
-Use the available bandwidth.
Application Requirements
(2)
Network provides service with different kinds of QoS
(Quality of Service) to meet application
requirements
Network Service Application
Constant bit rate Telephony
Real-time variable bit rate Videoconferencing
Non-real-time variable bit rate Streaming a movie
Available bit rate File transfer

Example of QoS categories from ATM


networks
Network Layer in
the Internet (1)
• IP Version 4 »
• IP Addresses »
• IP Version 6 »
• Internet Control Protocols »
• Label Switching and MPLS »
• OSPF—An Interior Gateway Routing Protocol »
• BGP—The Exterior Gateway Routing Protocol »
• Internet Multicasting »
• Mobile IP »
Network Layer in the
Internet (2)
IP has been shaped by guiding principles:
− Make sure it works
− Keep it simple
− Make clear choices
− Exploit modularity
− Expect heterogeneity
− Avoid static options and parameters
− Look for good design (not perfect)
− Strict sending, tolerant receiving
− Think about scalability
− Consider performance and cost
Network Layer in the Internet (3)
Internet is an interconnected collection of many networks
that is held together by the IP protocol
IP Version 4 Protocol (1)
IPv4 (Internet Protocol) header is carried on all packets
and has fields for the key parts of the protocol:
IP Version 4 Protocol (1)
• Version filed • Fragment offset
• IHL: header length • Where in the current packet this
• Differentiated services: type of packet belongs
service • TtL: Time to live
• Total length: every thing in the • To limit packet life time
• Decremented after each hop
datagram
• Protocol: UDP or TCP
• Identification field: which packet • Header checksum
the newly arrived fragment belong • Source and destination address indicate
to the IP address of source and destination
• All the fragments of the same • Options field
packet have the same • For other ideas
• Security
identification code. • Strict route
• Next field: not defined • Set of routes
• DF: do not fragment • Lose routes
• MF more fragments • Set of routes
• It is set to know whether all the
fragments of datagram have
arrived.
IP Addresses (1) –
Prefixes
Addresses are allocated in blocks called prefixes
• Prefix is determined by the network portion
• Has 2L addresses aligned on 2L boundary
• Written address/length, e.g., 18.0.31.0/24
IP Addresses (2) –

Subnets
Subnetting splits up IP prefix to help with management
• Looks like a single prefix outside the network
• Network address <Network bits, subnet bits, host bits>

ISP gives
network a
single prefix
Network divides it into subnets
internally
IP Addresses (3) –
Aggregation
Aggregation joins multiple IP prefixes into a single
larger prefix to reduce routing table size

ISP advertises
a single prefix

ISP customers have different


prefixes
IP Addresses (5) – Classful
Addresing
Old addresses came in blocks of fixed size (A, B, C)
• Carries size as part of address, but lacks flexibility
• Called classful (vs. classless) addressin
• https://en.wikipedia.org/wiki/Subnetg
IP Addresses (6) –
NAT
NAT (Network Address Translation) box maps one
external IP address to many internal IP addresses
• Uses TCP/UDP port to tell connections apart
• Violates layering; very common in homes, etc.
Internet Control Protocols
(1)
IP works with the help of several control protocols:
• ICMP (Internet Control Message Protocol ) is a
companion to IP that returns error info
− Required, and used in many ways, e.g., for traceroute
• ARP (Address Resolution Protocol) finds
Ethernet address of a local IP address
− Glue that is needed to send any IP packets
− Host queries an address and the owner replies
• DHCP (Dynamic Host Configuration Protocol)
assigns a local IP address to a host
− Gets host started by automatically configuring it
− Host sends request to server, which grants a lease
Internet Control Protocols (2)

Main ICMP (Internet Control Message Protocol) types:


Internet Control Protocols (3)
ARP (Address Resolution Protocol) lets nodes find target
Ethernet addresses [pink] from their IP addresses
Label Switching and
MPLS (1)
MPLS (Multi-Protocol Label Switching) sends packets
along established paths; ISPs can use for QoS
• Path indicated with label below the IP layer
About IPv6
• Support billions of hosts, even with inefficient address space allocation.
• Address contains 16 bytes
• Notation:
• Written as eight groups of four hexadecimal digits with colons between the
groups
• Example: 8000:0000:0000:0000:0123:4567:89AB:CDEF

• Optimizations:
• First, leading zeros within a group can be omitted, so 0123 can be written as 123.
• Second, one or more groups of 16 zero bits can be replaced by a pair of colons.
• The above address now becomes 8000::123:4567:89AB:CDEF
• IPv4 addresses can be written as a pair of colons and an old dotted decimal
number
• Example
::192.31.20.46

You might also like