Presentation is loading. Please wait.

Presentation is loading. Please wait.

Network Layer6-1 2011 session 1 TELE3118: Network Technologies Week 6: Network Layer Intra-Domain Routing Protocols Some slides have been taken from: r.

Similar presentations


Presentation on theme: "Network Layer6-1 2011 session 1 TELE3118: Network Technologies Week 6: Network Layer Intra-Domain Routing Protocols Some slides have been taken from: r."— Presentation transcript:

1 Network Layer6-1 2011 session 1 TELE3118: Network Technologies Week 6: Network Layer Intra-Domain Routing Protocols Some slides have been taken from: r Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross. Addison-Wesley, July 2004. All material copyright 1996-2004. J.F Kurose and K.W. Ross, All Rights Reserved.

2 Network Layer6-2 IP routing 0.0.0.00192.168.1.1 10.0.0.08172.20.4.1 200.23.16.020199.31.18.4 200.23.18.023172.20.4.1 10.20.0.024199.31.18.4 192.168.1.024L192.168.1.18 172.20.4.024L172.20.4.253 199.31.18.024L199.31.18.52 destination mask local next-hop LAN interfaces 172.20.4.253/24 192.168.1.18/24 199.31.18.52/24 How is the routing table constructed? r Static (manual) r Dynamic (routing protocol)

3 Network Layer6-3 The Internet Network layer Note on terminology: r “routing” vs. “forwarding” r “routing table” vs. “forwarding table” forwarding table Routing protocols path selection RIP, OSPF, BGP IP protocol addressing conventions datagram format packet handling conventions ICMP protocol error reporting router “signaling” Transport layer: TCP, UDP Link layer physical layer Network layer

4 Network Layer6-4 1 2 3 0111 value in arriving packet’s header routing algorithm local forwarding table header value output link 0100 0101 0111 1001 32213221 “routing” and “forwarding” tables

5 Network Layer6-5 Routing: abstract model Graph abstraction for routing algorithms: r graph nodes are routers r graph edges are physical links m link cost: delay, $ cost, or congestion level Goal: determine “good” path (sequence of routers) thru network from source to dest. Routing protocol A E D CB F 2 2 1 3 1 1 2 5 3 5 r “good” path: m typically means minimum cost path m other def’s possible

6 Network Layer6-6 Routing algorithm classification Distance-vector algorithm r Local information: m router knows physically- connected neighbors, link costs to neighbors r 2 components: m Neighbor routing-table exchange m Bellman-Ford (also called Ford-Fulkerson) computation r E.g.: RIP Link-state algorithm r Global information: m router knows complete topology and link cost info of entire network r 2 components: m Reliable flooding m Dijkstra shortest-path tree (SPT) computation r E.g.: OSPF, IS-IS

7 Network Layer6-7 Distance vector - RIP r Each node maintains a table of triples. DestinationCostNext-hop A1A C1C D2C E2A F2A G3A table at B:

8 Network Layer6-8 RIP: overview  Iterative, asynchronous, distributed r Directly connected neighbors exchange updates m periodically (on the order of several seconds) m whenever table changes (called triggered update) r Each update is a vector of distances: m ( Destination, Cost) r Update local table if receive a “better” route m smaller cost m came from next-hop r Refresh existing routes; delete if they time out

9 Network Layer6-9 RIP: example DestinationCostNext-hop B1B C1C D∞- E1E F1F G∞- DestinationCostNext-hop B1B C1C D2C E1E F1F G∞- DestinationCostNext-hop B1B C1C D2C E1E F1F G2F Initial table at A: After receiving update from C: After receiving update from F:

10 Network Layer6-10 RIP: recovering from link failure DestCostNh A1A B2A C2A D∞- E2A G∞- DestCostNh B1B C1C D2C E1E F1F G∞- DestCostNh B1B C1C D2C E1E F1F G3C At F: At A: A receives update from C: DestCostNh A1A B2A C2A D3A E2A G4A F receives update from A:

11 Network Layer6-11 RIP: link cost decreases X Z 1 4 12 Y 1 X4X Z1Z X5Y Y1Y X1X Z1Z X5Y Y1Y X1X Z1Z X2Y Y1Y At Y: At Z: r Good news travels fast

12 Network Layer6-12 RIP: link cost increases X Z 1 4 12 Y 14 X4X Z1Z X5Y Y1Y X6Z Z1Z X5Y Y1Y X6Z Z1Z X7Y Y1Y At Y: At Z: X8Z Z1Z X7Y Y1Y and so on r Bad news travels slow r “count to infinity” problem  loops!

13 Network Layer6-13 Breaking the loop … X Z 1 4 12 Y 14 X4X Z1Z X5Y Y1Y X X Z1Z X5Y Y1Y X X Z1Z X12X Y1Y At Y: At Z: X13Z Z1Z X12X Y1Y r Does this solve the “count to infinity” problem? r If next-hop to D is R: m Split Horizon: do not include D in update to R m Split Horizon with Poison Reverse: include D, but with metric = ∞

14 Network Layer6-14 … is not always easy DestCostNh B1B C1C D2C E∞- F1F G2F DestCostNh A1A C1C D2C E3C F2A G3A DestCostNh B1B C1C D2C E4B F1F G2F At A: B receives update from C: A receives update from B: DestCostNh A1A B1C D1D E5A F2A G2D C receives update from A:

15 Network Layer6-15 RIPv2 (RFC 2453) details r Included in BSD-UNIX Distribution in 1982 r Distance metric: # of hops (∞ = 16): why? r Distance vectors only exchanged among neighbors r Up to 25 destinations per RIP update message r Update-interval is 30 sec: m If too large, convergence is slow m If too small, too much traffic r Triggered update whenever change in routing table r Split horizon mandatory, poison reverse optional

16 Network Layer6-16 RIPv2 details (contd.) r Updates sent every 30 (+/- 5) seconds r Route not refreshed for 180 sec is timed-out m Still included in update messages r Timed-out route is deleted (garbage-collected) after 120 sec r Triggered update timer set for 1-5 sec m Includes only changed routes m Suppressed if regular update due Address of net 2 Distance to net 2 CommandMust be zero Family of net 2Must be zero Family of net 1 Must be zero Address of net 1 Distance to net 1 Version 081631 subnet mask of net 1 subnet mask of net 2 next hop of net 1 next hop of net 2

17 Network Layer6-17 RIP: where does it run? r RIP runs as application-level process (route-d) r Updates sent as UDP message (port 520) r Multicast IP address 224.0.0.9 (with TTL=1) physical link network forwarding (IP) table Transprt (UDP) routed physical link network (IP) Transprt (UDP) routed forwarding table

18 Network Layer6-18 Link State - OSPF r Strategy: each node learns complete topology m send information about directly connected links (not entire routing table) to entire network (not just neighbors) r Link State Advertisement (LSA) include m Nodes (routers) and links (networks) m Sequence number and age r Reliable flooding m Store most recent LSA for each node m Send LSA to all nodes except one that sent it m Generate LSA periodically (with higher sequence number) m Age out each stored LSA

19 Network Layer6-19 A Link-State Routing Algorithm Notation:  c(x,y): link cost from node x to y; = ∞ if not direct neighbors  D(v): current value of cost of path from source to dest. v  p(v): predecessor node along path from source to v  N': set of nodes whose least cost path definitively known Dijkstra’s algorithm r Given: all nodes know full topology and link costs r Objective: compute least cost paths from self to all other nodes  routing table r iterative: after k iterations, know least cost path to k destinations r distributed: each node computes shortest-path tree from itself

20 Network Layer6-20 Dijsktra’s Algorithm 1 Initialization: 2 N' = {u} 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(u,v) 6 else D(v) = ∞ 7 8 Loop 9 find w not in N' such that D(w) is a minimum 10 add w to N' 11 update D(v) for all v adjacent to w and not in N' : 12 D(v) = min( D(v), D(w) + c(w,v) ) 13 /* new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v */ 15 until all nodes in N'

21 Network Layer6-21 Dijkstra’s algorithm: example Step 0 1 2 3 4 5 N' u ux uxy uxyv uxyvw uxyvwz D(v),p(v) 2,u D(w),p(w) 5,u 4,x 3,y D(x),p(x) 1,u D(y),p(y) ∞ 2,x D(z),p(z) ∞ 4,y u y x wv z 2 2 1 3 1 1 2 5 3 5

22 Network Layer6-22 Dijkstra’s algorithm, discussion Algorithm complexity: n nodes r each iteration: need to check all nodes, w, not in N r n(n+1)/2 comparisons: O(n 2 ) r more efficient implementations possible: O(nlogn) Link Metric r Static: link latency, link capacity, … r Dynamic: based on load? m e.g.: link cost = amount of carried traffic  oscillations! A D C B 1 1+e e 0 e 1 1 0 0 A D C B 2+e 0 0 0 1+e 1 A D C B 0 2+e 1+e 1 0 0 A D C B 2+e 0 e 0 1+e 1 initially … recompute routing … recompute

23 Network Layer6-23 OSPF details r RFC 2328 (244 pages long!) r Neighbor up/down detected using “hello” packets r LSA reliable flooding over entire AS m LSA includes sequence number and age m LSA integrity using checksum (excludes age) r OSPF messages directly over IP (no UDP or TCP) r Hierarchical OSPF: allow scaling to larger networks r 5 types of LSAs: 1. Router LSA: set of nodes 2. Network LSA: set of links 3. Summary LSA: inter-area networks 4. Summary LSA: area-border-routers 5. External LSA: external to AS

24 Network Layer6-24 Hierarchical OSPF

25 Network Layer6-25 Hierarchical OSPF r Two-level hierarchy: local area, backbone. m Link-state advertisements only in area m each nodes has detailed area topology; only know direction (shortest path) to nets in other areas. r Area border routers: “summarize” distances to nets in own area, advertise to other Area Border routers. r Backbone routers: run OSPF routing limited to backbone. r Boundary routers: connect to other AS’s.

26 Network Layer6-26 OSPF “advanced” features (not in RIP) r Authentication: prevents malicious intrusion r Hierarchy: allows larger domains r Load balancing: equal-cost multi-path (ECMP) r Extensions to support: m Multicast: MOSPF m Traffic-engineering: OSPF-TE

27 Network Layer6-27 Comparison of LS and DV algorithms Messaging r DV: entire routing table, but only exchanged between neighbors r LS: small messages, but flooded in whole network Speed of Convergence r DV: multiple iterations, each requires recompute and transmit m count-to-infinity problem r LS: flood and recalculate, one shot, faster Robustness: both LS and DV can be wrecked by one bad router. r In 1997 a bad router in a small ISP advertised a false cost, became flooded with traffic, disconnecting ISPs from most U.S. backbone providers for ~3 hours Bottom line: r No clear winner in terms of complexity, robustness, etc r LS often favored due to faster convergence


Download ppt "Network Layer6-1 2011 session 1 TELE3118: Network Technologies Week 6: Network Layer Intra-Domain Routing Protocols Some slides have been taken from: r."

Similar presentations


Ads by Google