Presentation is loading. Please wait.

Presentation is loading. Please wait.

THE NETWORK LAYER.

Similar presentations


Presentation on theme: "THE NETWORK LAYER."— Presentation transcript:

1 THE NETWORK LAYER

2 Connections services connectionless service : packets are injected into the network individually and routed independently of each other. the network that uses this service is called a datagram network connection-oriented service: a path from the source router all the way to the destination router must be established before any data packets can be sent. the network that uses this service is called a virtual-circuit network

3 5.1.3 Implementation of Connectionless Service
Figure 5-2. Routing within a datagram network.

4 5.1.4 Implementation of Connection-Oriented Service
Figure 5-3. Routing within a virtual-circuit network.

5 5.1.5 Comparison of Virtual-Circuit and Datagram Networks

6 5.2 ROUTING ALGORITHMS The routing algorithm is that part of the network layer software responsible for deciding which output line an incoming packet should be transmitted on. Some of the ways of measuring path length: the number of hops: number of routers from the source to the destination the geographic distance in kilometers. The propagation delay; so the shortest path is the fastest path (the least propagation delay). the router can measure it directly by sending over the line special ECHO packets (timestamp packet) that the other side just timestamps it and sends back as fast as it can.

7 5.2.3 Flooding Flooding : A simple local technique , in which every incoming packet is sent out on every outgoing line except the one it arrived on. Flooding generates vast numbers of duplicate packets some measures are taken to solve this problem: to have a hop counter contained in the header of each packet that is decremented at each hop, with the packet being discarded when the counter reaches zero. Ideally, the hop counter should be initialized to the length of the path from source to destination. to have a sequence number in the header of each packet to avoid sending that packet out a second time.

8 5.2.4 Distance Vector Routing
Discover its neighbors and learn their network addresses. Set the distance or cost metric to each of its neighbors. Update routing table by exchanging information (routing tables) with the neighbors. a routing table indexed by, and containing one entry for each router in the network. This entry has two parts: the preferred outgoing line to use to get that destination and an estimate of the best known distance to that destination.

9 5.2.4 Distance Vector Routing
Figure 5-9. (a) A network. (b) Input from A, I, H, K, and the new routing table for J.

10 The Count-to-Infinity Problem

11 5.2.5 Link State Routing Each router must do the following things to make it work: Discover its neighbors and learn their network addresses. by sending a special HELLO packet, the other end is expected to send back a reply giving its IP address. Set the distance or cost metric to each of its neighbors. by sending over the line special ECHO packets (timestamp packet) that the other side just timestamps it and sends back as fast as it can. Construct a packet telling all it has just learned. Send this packet to and receive packets from all other routers. Compute the shortest path to every other router.

12 5.2.5 Link State Routing Building Link State Packets
Figure (a) A network. (b) The link state packets for this network.

13 5.2.2 Shortest Path Algorithm
Figure 5-7. The first six steps used in computing the shortest path from A to D. The arrows indicate the working node.

14 5.2.6 Hierarchical Routing Each router knows all the details about how to route packets to destinations within its own region but knows nothing about the internal structure of other regions. Advantage: reducing the routing tables size

15 Figure 5-14. Hierarchical routing.

16 5.2.7 Broadcast Routing broadcasting is Sending a packet to all destinations simultaneously. Example on broadcasting Routing: flooding reverse path forwarding

17 5.2.7 Broadcast Routing Figure Reverse path forwarding. (a) A network. (b) A sink tree. (c) The tree built by reverse path forwarding.

18 5.2.8 Multicast Routing Figure (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.


Download ppt "THE NETWORK LAYER."

Similar presentations


Ads by Google