Presentation is loading. Please wait.

Presentation is loading. Please wait.

15-744: Computer Networking L-5 Intra-Domain Routing.

Similar presentations


Presentation on theme: "15-744: Computer Networking L-5 Intra-Domain Routing."— Presentation transcript:

1 15-744: Computer Networking L-5 Intra-Domain Routing

2 L -5; 1-30-02© Srinivasan Seshan, 20022 Routers & Routing High-speed router architecture Intro to routing protocols Assigned reading [P+98] C. Partridge et al., A 50 Gb/s IP Router

3 L -5; 1-30-02© Srinivasan Seshan, 20023 Outline IP router design Routing protocols – distance vector Distance vector routing – challenges Routing protocols – link state

4 L -5; 1-30-02© Srinivasan Seshan, 20024 What Does a Router Look Like? Line cards Network interface cards Forwarding engine Fast path routing (hardware vs. software) Backplane Switch or bus interconnect Network controller Handles routing protocols, error conditions

5 L -5; 1-30-02© Srinivasan Seshan, 20025 Router Processing (P+88) Packet arrives arrives at inbound line card Header transferred to forwarding engine 24/56 bytes of packet + link layer info Forwarding engine transmits result to line card Packet copied to outbound line card

6 L -5; 1-30-02© Srinivasan Seshan, 20026 Forwarding Engine (P+88) General purpose processor + software 8KB L1 Icache Holds full forwarding code 96KB L2 cache Forwarding table cache 16MB L3 cache Full forwarding table x 2 - double buffered for updates

7 L -5; 1-30-02© Srinivasan Seshan, 20027 Forwarding Engine (P+88) Checksum updated but not checked Options handled by network proc Fragmentation handed by network processor Multicast packets are copied on input line card Packet trains help route hit rate Packet train = sequence of packets for same/similar flows

8 L -5; 1-30-02© Srinivasan Seshan, 20028 Network Processor Runs routing protocol and downloads forwarding table to forwarding engines Two forwarding tables per engine to allow easy switchover Performs “slow” path processing Handles ICMP error messages Handles IP option processing

9 L -5; 1-30-02© Srinivasan Seshan, 20029 Switch Design Issues Have N inputs and M outputs Multiple packets for same output – output contention Switch contention – switch cannot support arbitrary set of transfers Crossbar Bus High clock/transfer rate needed for bus Banyan net Complex scheduling needed to avoid switch contention Solution – buffer packets where needed

10 L -5; 1-30-02© Srinivasan Seshan, 200210 Switch Buffering Input buffering Which inputs are processed each slot – schedule? Head of line packets destined for busy output blocks other packets Output buffering Output may receive multiple packets per slot Need speedup proportional to # inputs Internal buffering Head of line blocking Amount of buffering needed

11 L -5; 1-30-02© Srinivasan Seshan, 200211 Line Card Interconnect (P+88) Virtual output buffering Maintain per output buffer at input Solves head of line blocking problem Each of MxN input buffer places bid for output Crossbar connect Challenge: map of bids to schedule for crossbar

12 L -5; 1-30-02© Srinivasan Seshan, 200212 Switch Scheduling (P+88) Schedule for 128 byte slots Greedy mapping of inputs to outputs Fairness Order of greedy matching permuted randomly Priority given to forwarding engine in schedule (why?) Parallelized Check independent paths simultaneously

13 L -5; 1-30-02© Srinivasan Seshan, 200213 Outline IP router design Routing protocols – distance vector Distance vector routing – challenges Routing protocols – link state

14 L -5; 1-30-02© Srinivasan Seshan, 200214 Factors Affecting Routing 4 3 6 2 1 9 1 1 Routing algorithms view the network as a graph Problem: find lowest cost path between two nodes Factors Static topology Dynamic load Policy D A F E B C

15 L -5; 1-30-02© Srinivasan Seshan, 200215 Two Main Approaches Distance-vector (DV) protocols Link state (LS) protocols

16 L -5; 1-30-02© Srinivasan Seshan, 200216 Distance Vector Protocols Employed in the early Arpanet Distributed next hop computation Unit of information exchange Vector of distances to destinations Distributed Bellman-Ford Algorithm

17 L -5; 1-30-02© Srinivasan Seshan, 200217 Distributed Bellman-Ford Start Conditions: Each router starts with a vector of (zero) distances to all directly attached networks Send step: Each router advertises its current vector to all neighboring routers Receive step: Upon receiving vectors from each of its neighbors, router computes its own distance to each neighbor Then, for every network X, router finds that neighbor who is closer to X than any other neighbor Router updates its cost to X After doing this for all X, router goes to send step

18 L -5; 1-30-02© Srinivasan Seshan, 200218 Example - Initial Distances A B E C D Info at Node A B C D ABC 07~ 701 ~10 ~~2 7 1 1 2 28 Distance to Node D ~ ~ 2 0 E18~2 1 8 ~ 2 0 E

19 L -5; 1-30-02© Srinivasan Seshan, 200219 E Receives D’s Routes; Updates Cost Info at Node A B C D ABC 07~ 701 ~10 ~~2 Distance to Node D ~ ~ 2 0 E1842 1 8 ~ 2 0 E A B E C D 7 1 1 2 28

20 L -5; 1-30-02© Srinivasan Seshan, 200220 A receives B’s; Updates Cost Info at Node A B C D ABC 078 701 ~10 ~~2 Distance to Node D ~ ~ 2 0 E1842 1 8 ~ 2 0 E A B E C D 7 1 1 2 28

21 L -5; 1-30-02© Srinivasan Seshan, 200221 A receives E’s routes; Updates Costs Info at Node A B C D ABC 075 701 ~10 ~~2 Distance to Node D 3 ~ 2 0 E1842 1 8 ~ 2 0 E A B E C D 7 1 1 2 28

22 L -5; 1-30-02© Srinivasan Seshan, 200222 Final Distances Info at Node A B C D ABC 065 601 510 332 Distance to Node D 3 3 2 0 E1542 1 5 4 2 0 E A B E C D 7 1 1 2 28

23 L -5; 1-30-02© Srinivasan Seshan, 200223 View From a Node dest A B C D ABD 1145 785 694 4112 Next hop E’s routing table A B E C D 7 1 1 2 28

24 L -5; 1-30-02© Srinivasan Seshan, 200224 Final Distances After Link Failure Info at Node A B C D ABC 078 701 810 1032 Distance to Node D 10 3 2 0 E18911 1 8 9 0 E A B E C D 7 1 1 2 28 X

25 L -5; 1-30-02© Srinivasan Seshan, 200225 Outline IP router design Routing protocols – distance vector Distance vector routing – challenges Routing protocols – link state

26 L -5; 1-30-02© Srinivasan Seshan, 200226 The Bouncing Effect A 25 1 1 B C B C2 1 destcost A C1 1 destcost A B1 2 destcost X

27 L -5; 1-30-02© Srinivasan Seshan, 200227 C Sends Routes to B A 25 1 B C B C2 1 destcost A C1 ~ destcost A B1 2 destcost

28 L -5; 1-30-02© Srinivasan Seshan, 200228 B Updates Distance to A A 25 1 B C B C2 1 destcost A C1 3 destcost A B1 2 destcost

29 L -5; 1-30-02© Srinivasan Seshan, 200229 B Sends Routes to C A 25 1 B C B C2 1 destcost A C1 3 destcost A B1 4 destcost

30 L -5; 1-30-02© Srinivasan Seshan, 200230 C Sends Routes to B A 25 1 B C B C2 1 destcost A C1 5 destcost A B1 4 destcost

31 L -5; 1-30-02© Srinivasan Seshan, 200231 How are These Loops Caused? Observation 1: B’s metric increases Observation 2: C picks B as next hop to A But, the implicit path from C to A includes itself!

32 L -5; 1-30-02© Srinivasan Seshan, 200232 Solution 1: Holddowns If metric increases, delay propagating information In our example, B delays advertising route C eventually thinks B’s route is gone, picks its own route B then selects C as next hop Adversely affects convergence

33 L -5; 1-30-02© Srinivasan Seshan, 200233 Other “Solutions” Split horizon C does not advertise route to B Poisoned reverse C advertises route to B with infinite distance Works for two node loops Does not work for loops with more nodes

34 L -5; 1-30-02© Srinivasan Seshan, 200234 Example Where Split Horizon Fails 1 1 1 1 A When link breaks, C marks D as unreachable and reports that to A and B Suppose A learns it first A now thinks best path to D is through B A reports D unreachable to B and a route of cost=3 to C C thinks D is reachable through A at cost 4 and reports that to B B reports a cost 5 to A who reports new cost to C etc... X B C D

35 L -5; 1-30-02© Srinivasan Seshan, 200235 Avoiding the Bouncing Effect Select loop-free paths One way of doing this: Each route advertisement carries entire path If a router sees itself in path, it rejects the route BGP does it this way Space proportional to diameter

36 L -5; 1-30-02© Srinivasan Seshan, 200236 Loop Freedom at Every Instant Does bouncing effect avoid loops? No! Transient loops are still possible Why? Because implicit path information may be stale See this in BGP convergence Only way to fix this Ensure that you have up-to-date information by explicitly querying

37 L -5; 1-30-02© Srinivasan Seshan, 200237 Distance Vector in Practice RIP and RIP2 Uses split-horizon/poison reverse BGP Propagates entire path Path also used for effecting policies

38 L -5; 1-30-02© Srinivasan Seshan, 200238 Outline IP router design Routing protocols – distance vector Distance vector routing – challenges Routing protocols – link state

39 L -5; 1-30-02© Srinivasan Seshan, 200239 Basic Steps Start condition Each node assumed to know state of links to its neighbors Step 1 Each node broadcasts its state to all other nodes Reliable flooding mechanism Step 2 Each node locally computes shortest paths to all other nodes from global state Dijkstra’s shortest path tree (SPT) algorithm

40 L -5; 1-30-02© Srinivasan Seshan, 200240 Link State Packets (LSPs) Periodically, each node creates a link state packet containing: Node ID List of neighbors and link cost Sequence number Needed to avoid stale information from flood Time to live (TTL) Node outputs LSP on all its links

41 L -5; 1-30-02© Srinivasan Seshan, 200241 Reliable Flooding When node J receives LSP from node K If LSP is the most recent LSP from K that J has seen so far, J saves it in database and forwards a copy on all links except link LSP was received on Otherwise, discard LSP How to tell more recent Use sequence numbers Same method as sliding window protocols

42 L -5; 1-30-02© Srinivasan Seshan, 200242 SPT Algorithm (Dijkstra) SPT = {a} for all nodes v if v adjacent to a then D(v) = cost (a, v) else D(v) = infinity Loop find w not in SPT, where D(w) is min add w in SPT for all v adjacent to w and not in SPT D(v) = min (D(v), D(w) + C(w, v)) until all nodes are in SPT

43 L -5; 1-30-02© Srinivasan Seshan, 200243 Example AF B DE C 2 2 2 3 1 1 1 3 5 5 B CDEF

44 L -5; 1-30-02© Srinivasan Seshan, 200244 Example AF B DE C 2 2 2 3 1 1 1 3 5 5 B CDEF

45 L -5; 1-30-02© Srinivasan Seshan, 200245 Example AF B DE C 2 2 2 3 1 1 1 3 5 5 B CDEF

46 L -5; 1-30-02© Srinivasan Seshan, 200246 Example AF B DE C 2 2 2 3 1 1 1 3 5 5 B CDEF

47 L -5; 1-30-02© Srinivasan Seshan, 200247 Example AF B DE C 2 2 2 3 1 1 1 3 5 5 B CDEF

48 L -5; 1-30-02© Srinivasan Seshan, 200248 Example AF B DE C 2 2 2 3 1 1 1 3 5 5 B CDEF

49 L -5; 1-30-02© Srinivasan Seshan, 200249 Link State Characteristics With consistent LSDBs, all nodes compute consistent loop-free paths Limited by Dijkstra computation overhead, space requirements Can still have transient loops A B C D 1 3 52 1 Packet from C  A may loop around BDC if B knows about failure and C & D do not X

50 L -5; 1-30-02© Srinivasan Seshan, 200250 Summary - IP router design Different architectures for different types of routers High speed routers incorporate large number of processors Common case is optimized carefully

51 L -5; 1-30-02© Srinivasan Seshan, 200251 Summary: LS vs. DV In DV send everything you know to your neighbors In LS send info about your neighbors to everyone Msg size: small with LS, potentially large with DV Msg exchange: LS: O(nE), DV: only to neighbors

52 L -5; 1-30-02© Srinivasan Seshan, 200252 Summary: LS vs. DV Convergence speed: LS: faster – don’t need to process LSPs before forwarding DV: fast with triggered updates Space requirements: LS maintains entire topology DV maintains only neighbor state

53 L -5; 1-30-02© Srinivasan Seshan, 200253 Summary: LS vs. DV Robustness: LS can broadcast incorrect/corrupted LSP Can be made robust since sources are aware of alternate paths DV can advertise incorrect paths to all destinations Incorrect calculation can spread to entire network

54 L -5; 1-30-02© Srinivasan Seshan, 200254 Summary: LS vs. DV In LS nodes must compute consistent routes independently - must protect against LSDB corruption In DV routes are computed relative to other nodes Bottom line: no clear winner, but we see more frequent use of LS in the Internet

55 L -5; 1-30-02© Srinivasan Seshan, 200255 Next Lecture: Inter-Domain Routing Border Gateway Protocol (BGP) Assigned reading [LAB00] Delayed Internet Routing Convergence [Nor00] Internet Service Providers and Peering


Download ppt "15-744: Computer Networking L-5 Intra-Domain Routing."

Similar presentations


Ads by Google