1.08k likes | 1.09k Views
This chapter discusses the design issues in the network layer, including store-and-forward packet switching, services provided to the transport layer, and the implementation of connectionless and connection-oriented services. It also covers various routing algorithms such as shortest path, flooding, distance vector, link state, hierarchical, broadcast, multicast, routing for mobile hosts, and routing in ad hoc networks.
E N D
The Network Layer Chapter 5
Network Layer Design Isues • Store-and-Forward Packet Switching • Services Provided to the Transport Layer • Implementation of Connectionless Service • Implementation of Connection-Oriented Service • Comparison of Virtual-Circuit and Datagram Subnets
Store-and-Forward Packet Switching fig 5-1 The environment of the network layer protocols.
Services Provided to the Transport Layer • The services should be independent of the router technology • The transport layer should be shielded from the number, type and topology of the routers present • The network addresses made available to the transport layer should use a uniform numbering plan, even across LANs and WANs Internet – Connection Less ATM – Connection-oriented.
Implementation of Connectionless Service Routing within a diagram subnet.
Implementation of Connection-Oriented Service Routing within a virtual-circuit subnet.
Routing Algorithms • The Optimality Principle • Shortest Path Routing • Flooding • Distance Vector Routing • Link State Routing • Hierarchical Routing • Broadcast Routing • Multicast Routing • Routing for Mobile Hosts • Routing in Ad Hoc Networks
Routing Algorithms (2) A – A’, B – B’, C – C’, can fill the channel, then X-X’ doesn’t get a chance Conflict between fairness and optimality.
The Optimality Principle Optimality Principle – If router J is on the optimal path from router I to router K then the optimal path from J to K also falls along the same route. (a) A subnet. (b) A sink tree for router B.
Shortest Path Routing The first 5 steps used in computing the shortest path from A to D. The arrows indicate the working node.
Dijkstra 5-8 top Dijkstra's algorithm to compute the shortest path through a graph.
Dijkstra 5-8 bottom Dijkstra's algorithm to compute the shortest path through a graph.
Flooding Robust but costly. • Used military application • Wireless Networks • Distributed Database • Metrics against which other routing algorithms are compared.
Distance Vector Routing (a) A subnet. (b) Input from A, I, H, K, and the new routing table for J.
Distance Vector Routing (2) The count-to-infinity problem.
Hierarchical Routing Hierarchical routing. Problems – optimal paths are sacrificed
Hierarchical Routing How many levels of hierarchy 720 routers 720 routers in 24 regions Three levels of hierarchy – 8 clusters each containing 9 regions of 10 clusters
Link State Routing Each router must do the following: • Discover its neighbors, learn their network address. • Measure the delay or cost to each of its neighbors. • Construct a packet telling all it has just learned. • Send this packet to all other routers. • Compute the shortest path to every other router.
Learning about the Neighbors (a) Nine routers and a LAN. (b) A graph model of (a).
Setting Link Cost • Bandwidth • Delay – measured by sending special ECHO
Measuring Line Cost A subnet in which the East and West parts are connected by two lines. Including queueing delay may lead to a lot of oscillation Load spread over both lines
Building Link State Packets (a) A subnet. (b) The link state packets for this subnet.
Few Problems Algorithm – Sequence number less means obsolete • If sequence numbers wrap around, confusion will reign • Router crashes, sequence number is lost • Sequence number gets corrupted Aging and then dropping the packet When a link-state packet comes in to router it is not queued immediately rather wait if any other packets arrive
Distributing the Link State Packets The packet buffer for router B in the previous slide (Fig. 5-13). E has arrived twice. Cs copy arrive from F, then F will be ack not send
OSPF (Open Shortest Path First) • Refreshed every 60 seconds. • Hardware Problem router getting corrupt etc.
Broadcast Routing Reverse path forwarding. (a) A subnet. (b) a Sink tree. (c) The tree built by reverse path forwarding.
Broadcast Routing Multidimensional Routing – each packet contains either a list of destinations. When the packet comes, checks the set of destinations needed Spanning Tree – Reverse Path Forwarding – Broadcast. Checks if the packet has arrived following the correct hop or not. If correct hop then rebroadcast.
Multicast Routing (a) A network. (b) A spanning tree for the leftmost router. (c) A multicast tree for group 1. (d) A multicast tree for group 2. Typically done in Multi-state routing
Routing for Mobile Hosts A WAN to which LANs, MANs, and wireless cells are attached.
Routing for Mobile Hosts (2) 0. Register care of address Packet routing for mobile users.
Routing in Ad Hoc Networks Possibilities when the routers are mobile: • Military vehicles on battlefield. • No infrastructure. • A fleet of ships at sea. • All moving all the time • Emergency works at earthquake . • The infrastructure destroyed. • A gathering of people with notebook computers. • In an area lacking 802.11.
Route Discovery • (a) Range of A's broadcast. • (b) After B and D have received A's broadcast. • (c) After C, F, and G have received A's broadcast. • (d) After E, H, and I have received A's broadcast. Shaded nodes are new recipients. Arrows show possible reverse routes.
Route Discovery (2) Format of a ROUTE REQUEST packet.
Route Discovery (2) The (Source Address, Request ID) pair is looked up in a local history table Receiver looks up the destination in its route table. If a fresh route is known, then a ROUTE REPLY is sent. Destination sequence number is higher than the Destination sequence in the Route Discovery Packet Increments Hop count and rebroadcasts ROUTE REPLY Stores the data in a new entry in its reverse route table.
Route Discovery (3) Format of a ROUTE REPLY packet.
Route Discovery (3) • IN response – Source addr, destination addr and Hop Count copied but Dest seq number taken from its counter • Hopcount is set to 0, Lifetime field controls how long the route is valid. • At each intermediate node • No route to I is known, • Sequence number of I in the ROUTE REPLY packet is greater than the value in the routing table • The sequence numbers are equal but the new route is shorter • Hop Count incremented • In large network Discovery increases with Time to Live incrementally being increased from 1, 2, 3
Route Maintenance Active Neigbors that have fed in those destinations to A in last t seconds (a) D's routing table before G goes down. (b) The graph after G has gone down.
Node Lookup in Peer-to-Peer Networks (a) A set of 32 node identifiers arranged in a circle. The shaded ones correspond to actual machines. The arcs show the fingers from nodes 1, 4, and 12. The labels on the arcs are the table indices. (b) Examples of the finger tables.
Congestion Control Algorithms • General Principles of Congestion Control • Congestion Prevention Policies • Congestion Control in Virtual-Circuit Subnets • Congestion Control in Datagram Subnets • Load Shedding • Jitter Control
Congestion When too much traffic is offered, congestion sets in and performance degrades sharply.
General Principles of Congestion Control • Monitor the system . • detect when and where congestion occurs. • Pass information to where action can be taken. • Adjust system operation to correct the problem.
Congestion Prevention Policies 5-26 Policies that affect congestion.
Congestion Control in Virtual-Circuit Subnets • A congested subnet. (b) A redrawn subnet, eliminates congestion and a virtual circuit from A to B. • Problem is in virtual circuits there may be provisioning but not real usage.
Congestion Control in Datagram Subnets u_new = au_old + (1 – a)f – instant line utilization where the constant a determines how fast the router forgets the history. If u_new is above a threshold action is taken. Warning Bit Went to destination and then source Every router along the path set the warning bit, traffic increased only when no router is in trouble.
Congestion Control in Datagram Subnets Choke Packets In this approach the router sends a choke packet back to the source The source on receiving the choke packets, reduce the traffic by X% Wait for the next choke packet
Hop-by-Hop Choke Packets (a) A choke packet that affects only the source. (b) A choke packet that affects each hop it passes through. Sending choke packets to the source may be costly.
Load Shedding/ Random Early Detection • Which packets to discard may depend on application Multimedia – old packets Text – Recent Packets Packets importance can be marked in the beginning (application layer), then which packets to discard can be taken. RED ---- Discard selected packets and not report, source knows when not getting acknowledgement and reduces the
Jitter Control Schedule Delay according to Deadline Miss (a) High jitter. (b) Low jitter.