290 likes | 414 Views
CIS 725. Network Layer. Network Layer. This layer provides communication between any two nodes Uniform addressing scheme independent of the network technology. Network layer. Data Link layer. Problems to be addressed. Routing Congestion control. Routing. Processing nodes
E N D
CIS 725 Network Layer
Network Layer • This layer provides communication between any two nodes • Uniform addressing scheme independent of the network technology Network layer Data Link layer
Problems to be addressed • Routing • Congestion control
Routing • Processing nodes • Switches/routers • Communication links
Datagram routing • Each packet is routed independently • Unordered • Unreliable
Virtual Circuit routing • Set up a path for each connection • All messages are sent over this path • Ordered • Reliable
Routing Table • Routing table contains the next hop information • At each node i, for each destination j, what is the next hop
Distance Vector Algorithms Bellman-Ford Algorithm • Distance table: • Routing table distance from i to j via k
Routing table • Protocol at node i: On receiving routing table from k update column k of the distance table as follows For each destination j, if k reports its distance to j as d then update Dj,k = d + weight(i,k)
Recompute the routing table as follows: For each destination k, update next hop to j, where Dj,k = min(Dx,k: for all x)
Periodically or whenever the routing table changes, send routing table to all neighbors
Bellman-Ford Algorithm b c a c d a b e b c d e 2 a c d e 2 a b d e 4 4 1 1 b 2 d 2 2 2 a 1 1 b c d e b 2 a c d e a 2 a b d e 4 a 4 c 4 2 c e c 1 b 1 d 2 e 2
Bellman-Ford Algorithm b c a c d a b e b c d e 2 a c d e 2 a b d e 4 3 4 1 3 5 1 b 2 d 4 6 2 3 2 2 a 1 1 b c d e b 2 a c d e a 2 a b d e b 3 4 b 3 2 c e c 1 b 1 b 4 b 3 d 2 e 2
Bellman-Ford Algorithm • Distance vector algorithm • Best path criteria • Latency • Jitter • bandwidth
Counting to infinity a 1 101 100 c b 1 a a c c a a a b b b a a a a c c a a a a a a a b b 100 100 4 2 4 2 101 101 1 5 3 3 1 5 3 b b b b b b b b b 3 3 3 1 1 1 1 1 1
< a,b,c,d,e,f> 5 1 1 c 1 d 1 e 1 f a b 4 3 2 1 5 20 dest next dist path
5 1 1 c 1 d 1 e 1 f a b 4 3 2 1 5 b c d e dest next dist Next to last hop b d e c f b b b b b 5 3 4 1 2 a c e d b
Link State Routing • Each node maintains the state of every link • State of the link may contain several types of information
Learning local information • Exchange hello packets periodically • Measure the cost of adjacent links
Distributed link state information • Link state packet: * source id * cost of incident edges * sequence numbers
Building Link State Packets (a) A subnet. (b) The link state packets for this subnet.
Distribution Algorithm • Controlled flooding - hop count - sequence numbers - age
Receive LSP from nbr j - compare sequence numbers - update topology table - propagate LSP to all nbrs except j
Hierarchical Routing • Divide area into regions • Maintain accurate information about nodes in the same region
Hierarchical Routing Hierarchical routing.
Source-routing • Message contains the entire path • Routing table lookup is avoided at each node
Broadcasting/Multicasting • To send a message to all nodes: - make a separate message to each destination - route each message independently
Multi-destination routing • Include all destination address in message • Each node decides which links to forward so that it reaches all destinations
Multicast trees • Create a spanning tree • Prune the spanning tree: Steiner tree