Unit 3 - Netwok and Internetworking
Unit 3 - Netwok and Internetworking
A host with a packet to send transmits it to the nearest router, either on its own
LAN or over a point-to-point link to the ISP.
The packet is stored there until it has fully arrived and the link has finished its
processing by verifying the checksum.
Then it is forwarded to the next router along the path until it reaches the
destination host, where it is delivered.
This mechanism is store-and-forward packet switching,
Services Provided to the Transport Layer
The network layer provides services to the transport layer at
the network layer/transport layer interface.
An important question is what kind of services the network
layer provides to the transport layer.
The network layer services have been designed with the
following goals in mind:
1. The services should be independent of the router
technology.
2. The transport layer should be shielded from the number,
type, and topology of the routers present.
3. The network addresses made available to the transport
layer should use a uniform numbering plan, even across
LANs and WANs.
Services Provided to the Transport Layer
Network
A connectionless
packet-swtiched network
R1 R2
4 3 2 1 2
Sender 1
Network
4
2
3
R4 1
3 3
4 1 3 4 2
R3 R5 Out of order Receiver
Implementation of Connection-Oriented Service
Path from source to destination must be established
before any data can be sent
Connection is called a VC (virtual circuit) – network
is called virtual circuit network
Avoid choosing new route for each packet
Same route used for all packets in connection
Each packet has ID for which VC it belongs to
This process is called label switching.
An example of a connection-oriented network service
is MPLS (MultiProtocol Label Switching).
Implementation of Connection-Oriented Service
18.11
Connection‐Oriented or Connectionless?
Two competing camps
5-4
Routing Algorithms
• The main function of the network layer is routing packets
from the source machine to the destination machine.
Dijkstra’s Algorithm
Finds shortest paths from given source node to all other
nodes
Develops paths in order of increasing path length
Runs in stages, each time adding node with next shortest
path
Algorithm terminates when all nodes processed by
algorithm (in set T-tentitive)
Shortest Path Routing - Dijkstra’s Algorithm
Shortest Path Routing - Dijkstra’s Algorithm
Distance can be any metric: delay, hop count, queue length, etc.
Distance Vector Routing – Bellman Ford
Routing Algorithm
As an example, assume that delay is used as a metric and that the
router knows the delay to each of its neighbors.
Once every T msec each router sends to each neighbor a list of its
estimated delays to each destination.
It also receives a similar list from each neighbor.
The routing tables are updated by exchanging information with the
neighbors.
Router X estimates delay to router Z
• Router Y is a neighbor to router X
• D(X,Z) =D(X,Y)+ D(Y,Z)
(a) A subnet. (b) Input from A, I, H, K, and the new routing table for J.
Distance Vector Routing – Bellman Ford
Routing Algorithm
The count-to-infinity problem.
Distance Vector Routing – Bellman Ford
Routing Algorithm
The count-to-infinity problem.
After A Failure
Before A Failure
Distance Vector Routing – Bellman Ford
Routing Algorithm
Solutions for the count-to-infinity problem.
Split horizon and poison reverse: Node B can still advertise the
value for X, but if the source of information is A, it can replace the
distance with infinity as a warning: “Do not use this value, what I know
about this route comes from you.”
Distance Vector Routing – Bellman Ford
Routing Algorithm
Two primary problems caused distance vector routing’s
demise.
1. First, since the delay metric was queue length, it did not take
line bandwidth into account when choosing routes.
2. Second, the algorithm often took too long to converge (the
count-to-infinity problem)
(a) A subnet. (b) The link state packets for this subnet.
Link State Routing
Distributing the Link State Packets
Use flooding
Packet contains sequence number
When packet is received
– If new, forward to all except coming from
– If duplicate, discard
– If old, rejected
Link State Routing
Distributing the Link State Packets
The packet buffer for router B in the previous slide (Fig. 5-13).
Link State Routing
Computing the New Routes
Once a router has accumulated a full set of link state packets, it can
construct the entire network graph because every link is represented.
Every link is, in fact, represented twice, once for each direction.
The shortest-path computations may then find different paths from router
A to B than from router B to A.
Now Dijkstra’s algorithm can be run locally to construct the
hortest paths to all possible destinations.
Link State Routing
Link state routing is widely used in actual networks.
OSPF (Open Shortest Path First) is the other main link state
protocol.
Hierarchical Routing
Problems in DVR and LINK State Routing
Routing tables grow with network size
More router memory
More CPU time to scan them
More bandwidth to send updates
For large networks, better to do routing hierarchically
Hierarchy can be in multiple levels
– Regions into
– Clusters into
– Zones into
– groups … follows upto final aggregation then construct
the routing tables.
Hierarchical Routing
Flooding
generates too many packets, waste bandwidth
Broadcast Routing - Reverse Path Forwarding
Solution :
Reverse Path Forwarding - (Dalal and Metcalfe, 1978).
Idea
When a broadcast packet arrives at a router, the router checks to see if the packet
arrived on the link that is normally used for sending packets toward the source
of the broadcast.
If so, there is an excellent chance that the broadcast packet itself followed the best
route from the router and is therefore the first copy to arrive at the router.
This being the case, the router forwards copies of it onto all links except the one it
arrived on.
If, however, the broadcast packet arrived on a link other than the preferred one for
reaching the source, the packet is discarded as a likely duplicate.
Broadcast Routing - Reverse path forwarding
Reverse path forwarding. (a) A subnet. (b) a Sink tree. (c) The
tree built by reverse path forwarding.
Broadcast Routing - Reverse path forwarding
Broadcast Routing - Reverse path forwarding
Reverse path forwarding. (a) A subnet. (b) a Sink tree. (c) The
tree built by reverse path forwarding.
Broadcast Routing - Reverse path forwarding
First hop: I sends 4 packets to F, H, J, and N
•each of these arrives on the preferred path to I
•so, indicated by circle; forwarded
Second hop: 8 packets are generated
•all 8 arrive at previously unvisited routers
•5 of these arrive along preferred line
Third hop: 6 packets generated
•only 3 arrive at preferred path (C, E, K)
•others are duplicates (copies); discarded
Fourth hop: 4 packets generated
•2 arrive at preferred lines (B, L); forwarded
•2 are duplicates; discarded
Fifth hop: 2 packets generated
•2 are duplicates; discarded
•no more forwarded packets
Total: 24 packets, 5 hops
Broadcast Routing – Spanning Tree
The Broadcast algorithm improves on the behavior of reverse path
forwarding is sink tree or spanning tree.
It makes explicit use of the sink tree—or any other convenient
spanning tree—for the router initiating the broadcast.
A spanning tree is a subset of the network that includes all the routers
but contains no loops.
Sink trees are spanning trees.
If each router knows which of its lines belong to the spanning tree, it
can copy an incoming broadcast packet onto all the spanning tree
lines except the one it arrived on.
This method makes excellent use of bandwidth, generating the
absolute minimum number of packets necessary to do the job.
when the sink tree of part (b) is used as the spanning tree, the
broadcast packet is sent with the minimum 14 packets.
Multicast Routing
Multicasting
sending message to a group of nodes
routing algorithm called multicast routing
Why multicasting?
distributed processing
broadcasting is inefficient, sometimes insecure
Multicasting Require group management
create, destroy groups
processes to join, leave groups
Multicast Routing
Multicast Routing
Multicast Routing
Multicast Routing
Multicast Routing
Challenge:
To route a packet to a mobile host, the network first has to find it.
i. The basic idea used for mobile routing in the Internet and cellular
networks is for the mobile host to tell a host at the home location
where it is now.
ii. This host, which acts on behalf of the mobile host, is called the
home agent.
iii. Once it knows where the mobile host is currently located, it can
forward packets so that they are delivered.
Routing for Mobile Hosts - Triangle Routing
Step 3:
The home agent intercepts this packet because the mobile host is away
from home. It then wraps or encapsulates the packet with a new
header and sends this bundle to the care of address . This
mechanism is called tunneling.
Routing for Mobile Hosts - Triangle Routing
Step 4:
When the encapsulated packet arrives at the care of address, the mobile
host unwraps it and retrieves the packet from the sender. The
mobile host then sends its reply packet directly to the sender .
Step 5:
As part of step 4, the sender may learn the current care of address.
Subsequent packets can be routed directly to the mobile host by
tunneling them to the care of address, bypassing the home location
entirely.
Routing for Mobile Hosts – Mobile sender
1. Route Discovery
2. Route Maintenance
The network and transport layers share the responsibility for handling
congestion.
the most effective way to control congestion is to reduce the load that
the transport layer is placing on the network.
Identify hotspots.
Internet routing protocols do not generally adjust their routes depending on the
load. Instead, adjustments are made outside the routing protocol by slowly
changing its inputs. This is called traffic engineering.
Congestion Control Algorithms
Admission Control: Prevention
The idea is simple: do not set up a new virtual circuit unless
the network can carry the added traffic without becoming
congested.
Congestion Control Algorithms
Traffic Throttling: Congestion Avoidance
When congestion is imminent, it must tell the senders to throttle
back their transmissions and slow down.
where the constant α determines how fast the router forgets recent
history. This is called an EWMA (Exponentially Weighted
Moving Average).
They support:
Traffic Profiles
a)Constant-bit-rate (CBR)
b)Variable-bit-rate (VBR)
c)Bursty –
arrives at nonuniform rates
QUALITY OF SERVICE
2.Traffic Shaping
Traffic shaping is a technique for regulating the average rate and
burstiness of a flow of data that enters the network.
When a flow is set up, the user and the network (i.e., the customer and
the provider) agree on a certain traffic pattern (i.e., shape) for that
flow, this agreement is called an SLA (Service Level Agreement).
Traffic shaping reduces congestion and thus helps the network live up
to its promise.
Monitoring a traffic flow is called traffic policing.
Shaping and policing are not so important for peer-to-peer transfers,
but they are of great importance for real-time data, such as audio and
video connections, which have stringent quality-of-service
requirements.
QUALITY OF SERVICE
2. Traffic Shaping
Techniques:
Algorithms that allocate router resources among the packets of a flow and
between competing flows are called packet scheduling algorithms.
• FIFO queuing
QUALITY OF SERVICE
Priority Queuing
• Packets are first assigned to priority class. Each priority class has
its own queue
• The packets in the highest-priority queue are processed first
QUALITY OF SERVICE
Weighted Fair Queuing
a) The queues are weighted based on the priority of the queues
b) The system processes packets in each queue in a round-robin
fashion with the number of packets selected from each queue based
on the weight.
QUALITY OF SERVICE
4. Whether the network can safely accept more traffic
Admission Control
1. Integrated Services
2. Differentiated Services
Reservation Merging
RSVP-The ReSerVation Protocol
1. Scalability
2. Service-type limitation
Differentiated Service (Diffserv)
a) Differentiated Services is a class-based QoS model designed for IP.
b) Diffserv handles the shortcomings of IntServ
c) Main differences between Diffserv and Intserv
– Main processing is moved from the core to the edge (scalability)
– The per-flow is changed to per-class flow service (service-type limitation)
d) DS field
– DSCP (DS Code Point) is a 6-bit field that define per-hop behavior (PHB)
– CU (currently unused) is 2-bit
Per-hop Behavior (PHB)
Diffserv defines three PHBs
a) DE PHB (default PHB) is the same as best-effort delivery
b) EF PHB (expedited forwarding PHB) provides the following
services:
– Low loss, low latency, ensured bandwidth
c) AF PHB (assured forwarding PHB) delivers the packet with a high
assurance as long as the class traffic does not exceed the traffic
profile of the node
Expedited Forwarding
5-43
A connectionless internet.
Tunneling
• The IP Protocol
• IP Addresses
• Internet Control Protocols
• OSPF – The Interior Gateway Routing Protocol
• BGP – The Exterior Gateway Routing Protocol
• Internet Multicasting
• Mobile IP
• IPv6
Design Principles for Internet
1. Make sure it works.
2. Keep it simple.
3. Make clear choices.
4. Exploit modularity.
5. Expect heterogeneity.
6. Avoid static options and parameters.
7. Look for a good design; it need not be perfect.
8. Be strict when sending and tolerant when receiving.
9. Think about scalability.
10. Consider performance and cost.
Collection of Subnetworks
5-54
IP address formats.
IP Addresses (2)
Special IP addresses.
Subnets
5-59
5-61
Operation of DHCP.
OSPF – The Interior Gateway Routing
Protocol
5-66
5-69