Network Layer Network Layer RIP ( Routing Information Protocol) RIP advertisements distance vectors: exchanged among distance vector algorithm neighbors every 30 sec via Response included in BSD-UNIX Distribution in 1982 Message (also called advertisement) distance metric: # of hops (max = 15 hops) each advertisement: list of up to 25 From router A to subnets: destination subnets within AS destination hops u v u 1 w A B v 2 w 2 x x 3 C D z y 3 y z 2 Network Layer Network Layer 37 38 Network Layer Network Layer RIP: Example RIP: Example Dest Next hops Advertisement w - 1 D from A to D z x - 1 z C 4 w …. … ... x y z A B w x y A D B C Destination Network Next Router Num. of hops to dest. C w A 2 Destination Network Next Router Num. of hops to dest. y B 2 w A 2 z B 7 y B 2 x -- 1 z B A 7 5 …. …. .... x -- 1 …. …. Routing/Forwarding table in D .... Routing/Forwarding table in D Network Layer Network Layer 39 40 Network Layer Network Layer RIP: Link Failure and Recovery RIP Table processing If no advertisement heard after 180 sec --> RIP routing tables managed by application-level neighbor/link declared dead process called route-d (daemon) routes via neighbor invalidated advertisements sent in UDP packets, periodically repeated new advertisements sent to neighbors neighbors in turn send out new advertisements (if routed routed tables changed) link failure info quickly (?) propagates to Transprt Transprt (UDP) (UDP) entire net network forwarding forwarding network poison reverse used to prevent ping-pong loops (IP) table (IP) table (infinite distance = 16 hops) link link physical physical Network Layer Network Layer 41 42 7
Network Layer Network Layer BGP basics Internet inter-AS routing: BGP when AS2 advertises a prefix (subnet) to AS1: AS2 promises it will forward datagrams BGP (Border Gateway Protocol): the de towards that prefix. facto standard BGP provides each AS a means to: AS2 can aggregate prefixes in its advertisement 1. Obtain subnet reachability information from neighboring ASs. 2. Propagate reachability information to all AS- Reachability info internal routers. 3. Determine “good” routes to subnets based on eBGP session reachability information and policy. 3c iBGP session allows subnet to advertise its existence to 2c 3a 3b 2a rest of Internet: “I am here” AS3 2b 1c AS2 1a 1b 1d AS1 Network Layer Network Layer 49 50 Network Layer Network Layer Distributing reachability info Path attributes & BGP routes using eBGP session between 3a and 1c, AS3 sends prefix reachability info to AS1. advertised prefix includes BGP attributes. 1c can then use iBGP to distribute new prefix prefix + attributes = “route” info to all routers in AS1 two important attributes: 1b can then re-advertise new reachability info to AS2 over 1b-to-2a eBGP session AS-PATH: contains ASs through which prefix advertisement has passed: e.g, AS 67, AS 17 when router learns of new prefix, it creates entry for prefix in its forwarding table. NEXT-HOP: indicates specific internal-AS router to next-hop AS. (may be multiple links from current AS to next-hop-AS) eBGP session 3c when gateway router receives route iBGP session 2c 3a advertisement, uses import policy to 3b 2a AS3 2b accept/decline. 1c AS2 1a 1b 1d AS1 Reachability info Network Layer Network Layer 51 52 Network Layer Network Layer More than 1 route possible! BGP route selection A router may learn about more than 1 route ELIMINATION RULES to some prefix. Router must select route. are used to select a route from multiple possible routes 1. local preference value attribute: policy AS5 has two routes to AS1 reach AS1 decision 2. shortest AS-PATH AS2 AS3 AS4 3. closest NEXT-HOP router: hot potato routing 4. additional criteria AS5 Network Layer Network Layer 53 54 9
Network Layer Network Layer BGP routing policy BGP routing policy (2) legend : legend : provider provider B network B network X X W W A A ? customer customer network: network: C C Y Y A advertises path Aw to B A,B,C are provider networks B advertises path BAw to X X,W,Y are customer (of provider networks) Should B advertise path BAw to C? X is dual-homed: attached to two networks No way! B gets no “revenue” for routing CBAw since X does not want to route from B via X to C neither W nor C are B’s customers .. so X will not advertise to B a route to C B wants to force C to route to w via A B wants to route only to/from its customers! Network Layer Network Layer 55 56 Network Layer Network Layer BGP messages Why different Intra- and Inter-AS routing ? Policy: BGP messages exchanged using TCP. Inter-AS: admin wants control over how its traffic routed, who routes through its net. BGP messages: Intra-AS: single admin, so no policy decisions needed OPEN: opens TCP connection to peer and Scale: authenticates sender UPDATE: advertises new path (or withdraws old) hierarchical routing saves table size, reduced update traffic KEEPALIVE keeps connection alive in absence of UPDATES; also ACKs OPEN request Performance: NOTIFICATION: reports errors in previous msg; Intra-AS: can focus on performance also used to close connection Inter-AS: policy may dominate over performance Network Layer Network Layer 57 58 Network Layer Network Layer summary Assignment #3 pp. 445 1 Introduction 5 Routing algorithms 2 Virtual circuit and Link state datagram networks Distance Vector 5, 8, 11, 14, 19 Hierarchical routing 3 What’s inside a 6 Routing in the router Internet No submission required. 4 IP: Internet RIP Protocol OSPF Datagram format BGP IPv4 addressing ICMP IPv6 Network Layer Network Layer 59 60 10
Recommend
More recommend