IPv6 Initial motivation: 3-bit address space soon to be completel allocated. Additional motivation: Header format helps speed processing/forwarding Header changes to facilitate QoS (service classes) Reduction of routing table sie Multicast support Support for mobile hosts Support coeistence with other protos, e.g., IPv4 IPv6 datagram format: Fied-length 40 bte 7 element header No fragmentation allowed IPv6 Header Version: IPv4 or IPv6 Priorit: Identif priorit among datagrams in flow Flow Label: Identif datagrams in same flow. (concept of flow not well defined). Net header: Identif upper laer protocol for data
Other Changes From IPv4 Checksum: Removed entirel to reduce processing time at each hop Options: Allowed, but outside of header, indicated b Net Header field ICMPv6: New version of ICMP Additional message tpes, e.g. Packet Too Big Multicast group management functions Etension header eamples: Routing, fragmentation, authentication, encrpted securit paload, destination options 3 Transition From IPv4 To IPv6 Not all routers can be upgraded simultaneous No flag das How will the network operate with mied IPv4 and IPv6 routers? Tunneling: IPv6 carried as paload in IPv4 datagram among IPv4 routers Logical view: A B tunnel E F IPv6 IPv6 IPv6 IPv6 Phsical view: A B E F IPv6 IPv6 IPv4 IPv4 IPv6 IPv6 4
Network laer: Status Network laer functions IP Routing and forwarding NAT ARP IPv6 Routing 5 Internet routing Our routing stud thus far idealiation Scale: With 00 million destinations: Can t store all dest s in routing All routers identical tables! Network flat no true in practice Routing table echange would swamp links! Administrative autonom Internet = network of networks Each network admin ma want to control routing in its own network Aggregate routers into regions, autonomous sstems (AS) Routers in same AS run same routing protocol Inter-AS routing protocol Routers in different AS can run different inter-as routing protocol 6 3
Interconnected ASes 3c 3a 3b AS3 a c d b Intra-AS Routing algorithm AS Forwarding table Inter-AS Routing algorithm a c AS b Forwarding table is configured b both intraand inter-as routing algorithm Intra-AS sets entries for internal dests Inter-AS & Intra-As sets entries for eternal dests 7 Inter-AS Tasks Suppose router in AS receives datagram for dest outside of AS Router should forward packet towards an ASborder router, but which one? AS needs. to learn which dests are reachable through AS and which through AS3. to propagate this reachabilit info to all routers in AS Job of inter-as routing! 3c 3a 3b AS3 a c d b AS a c AS b 8 4
Intra-AS routing Also known as Interior Gatewa Protocols (IGP) Most common Intra-AS routing protocols: RIP: Routing Information Protocol Distance vector protocol (based on Bellman-Ford) Routers periodicall echange reachabilit info with their neighbors Distance metric: hop count Advantage: simple, minimal communication overhead Disadvantage: long convergence times, loop detection 9 Intra-AS routing protocols OSPF: Open Shortest Path First Link state protocol (based on Dijkstra) Routers periodicall flood immediate reachabilit information to all other routers Distance metric: administrative weight Advantage: fast convergence Disadvantage: compleit and communication overhead ISIS: Intermediate-Sstem-to-Intermediate-Sstem (ISO 0589) (link state) IGRP: Interior Gatewa Routing Protocol (Cisco proprietar) (distance vector) EIGRP: Enhanced Interior Gatewa Routing Protocol (Cisco proprietar) (enhanced distance vector) 0 5
Interpla between routing and forwarding routing algorithm local forwarding table header value output link 000 00 0 00 3 value in arriving packet s header 0 3 Graph abstraction 5 u Graph: G = (N,E) N = set of routers = { u, v, w,,, } E = set of links ={ (u,v), (u,), (v,), (v,w), (,w), (,), (w,), (w,), (,) } v 3 3 w 5 Path: Sequence of edges (routers) Remark: Graph abstr. is useful in other network contets Eample: PP, where N is set of peers and E is set of TCP connections 6
Graph abstraction: Costs u 5 v 3 3 w 5 c(, ) = cost of link (, ) - e.g., c(w,) = 5 Cost can be alwas, or inversel related to bandwidth, or inversel related to congestion Cost of path (,, 3,, p ) = c(, )+c(, 3 )+ +c( p, p ) Question: What s the least-cost path between u and? Routing algorithm: alg. that finds good path (tpicall: least cost path) 3 Routing algorithm classification Global or decentralied information? Global: All routers have complete topolog, link cost info Link state algorithms Decentralied: Router knows phsicallconnected neighbors, link costs to neighbors Iterative process of computation, echange of info with neighbors Distance vector algorithms Static or dnamic? Static: Routes change slowl over time Dnamic: Routes change more quickl periodic update in response to link cost changes 4 7
A link-state routing algorithm Dijkstra s algorithm Net topolog, link costs known to all nodes Accomplished via link state broadcast All nodes have same info Computes least cost paths one node ( source ) to all other nodes Gives routing table for that node Iterative: after k iterations, know least cost path to k dest. s Notation: c(i,j): Link cost node i to j. Cost infinite if not direct neighbors D(v): Current value of cost of path source to dest. v p(v): Predecessor node along path source to v N : Set of nodes whose least cost path definitivel known 5 Dijsktra s algorithm Initialiation for A: N = {A} 3 for all nodes v 4 if v adjacent to A 5 then D(v) = c(a,v) 6 else D(v) = 7 8 Loop 9 find w not in N such that D(w) is a minimum 0 add w to N update D(v) for all v adjacent to w and not in N : D(v) = min( D(v), D(w) + c(w,v) ) 3 /* new v is either old v or known 4 shortest path w plus cost w to v */ 5 until all nodes in N 6 8
Dijkstra s algorithm: Eample Step 0 3 4 5 start N A AD ADE ADEB ADEBC ADEBCF D(B),p(B),A,A,A D(C),p(C) 5,A 4,D 3,E 3,E D(D),p(D),A D(E),p(E) infinit,d D(F),p(F) infinit infinit 4,E 4,E 4,E 5 A B D 3 3 C E 5 F 7 Dijkstra s algorithm: Eample () Resulting shortest-path tree u: B C A F D E Resulting forwarding table in u: destination B D E C F link (A,B) (A,D) (A,D) (A,D) (A,D) 8 9
Dijkstra s algorithm: Discussion Algorithm compleit: n nodes Each iteration: need to check all nodes, w, not in N n (n+)/ comparisons: O(n ) More efficient implementations possible: O(n log n) Oscillations possible: E.g., link cost = amount of carried traffic A +e D 0 0 B 0 e C e initiall A +e 0 D B 0 +e 0 C recompute routing 0 A +e D 0 B 0 +e C recompute +e A 0 D B 0 +e e C recompute 9 Distance vector algorithm Bellman-Ford Equation (dnamic programming) Define d () := cost of least-cost path to Then d () = min {c (,v) + d v () } v where min is taken over all neighbors v of 0 0
Bellman-Ford: Eample u 5 v 3 3 w 5 Clearl, d v () = 5, d () = 3, d w () = 3 Bellman-Ford equation sas: d u () = min { c(u,v) + d v (), c(u,) + d (), c(u,w) + d w () } = min { + 5, + 3, 5 + 3} = 4 Node that ields minimum is net hop in shortest path forwarding table Distance vector algorithm () D () = estimate of least cost to Distance vector: D = [D (): є N ] Node knows each neighbor v: c(,v) Node maintains D = [D (): є N ] Node also maintains its neighbors distance vectors For each neighbor v, maintains D v = [D v (): є N ]
Distance vector algorithm (3) Basic idea: Each node periodicall sends its own distance vector estimate to neighbors When a node receives new DV estimate neighbor, it updates its own DV using B-F equation: D () min v {c(,v) + D v ()} for each node N Under natural conditions the estimates of D () converge to the actual least cost d () 3 Distance vector algorithm (4) Iterative, asnchronous: Each local iteration caused b: Local link cost change DV update message neighbor Distributed: Each node notifies neighbors onl when its Distance Vector changes Neighbors then notif their neighbors if necessar Each node: wait for (change in local link cost of msg neighbor) recompute estimates if Distance Vector to an dest has changed, notif neighbors 4
node table 0 7 node table 0 node table 7 0 D () = min{c(,) + D (), c(,) + D ()} = min{+0, 7+} = 0 3 0 7 0 0 7 0 7 0 0 7 0 3 0 0 3 0 3 0 0 3 0 3 0 0 3 0 3 0 time D () = min{c(,) + D (), c(,) + D ()} = min{+, 7+0} = 3 7 5 Distance vector routing: Overview Iterative, asnchronous: each local iteration caused b: Local link cost change Message neighbor: its least cost path change neighbor Distributed: Each node notifies neighbors onl when its least cost path to an destination changes Neighbors then notif their neighbors if necessar Each node: wait for (change in local link cost of msg neighbor) recompute distance table if least cost path to an dest has changed, notif neighbors 6 3
Distance vector algorithm At each node, : Initialiation: for all destinations in N: 3 D () = if is not a neighbor 4 D () = c(,) if is a neighbor 5 for each neighbor w 6 D w () = for all destinations in N 7 for each neighbor w 8 send distance vector D = [D (): in N] to w 7 Distance vector algorithm (.): 9 loop 0 wait (until I see a link cost change to neighbor w or until I receive update neighbor w) 3 for each in N: 4 D () = min v {c(, v) + D v ()} 5 6 if D () changed for an destination 7 send DV D = [D ()]: in N] to all neighbors 8 9 forever 8 4
Distance vector (DV): Link cost changes Link cost changes: Node detects local link cost change Updates routing info, recalculates distance vector If DV changes, notif neighbors Good news travels fast At time t 0, detects the link-cost change, updates its DV, and informs its neighbors. At time t, receives the update and updates its table. It computes a new least and sends its neighbors its DV. At time t, receives s update and updates its distance table. s least costs do not change and hence does not send an message to. 4 50 9 4 50 node table 4 0 5 0 0 5 0 0 0 node table 4 0 5 0 0 5 0 0 0 time 30 5
Distance vector: Link cost changes (.) Link cost changes: Good news travels fast Bad news travels slow 60 4 50 3 60 4 50 D () = min{c(,) + D (), c(,) + D ()} = min{60 + 0, + 5} = 6 D () = min{c(,) + D (), c(,) + D ()} = min{60 + 0, + 7} = 8 node table 4 6 0 5 0 6 0 5 0 6 8 0 7 0 node table 4 0 5 0 6 0 5 7 0 6 0 7 0 time 3 6
Distance vector: Link cost changes (3.) Link cost changes: Good news travels fast Bad news travels slow - count to infinit problem! 44 iterations before algorithm stabilies: see tet What happens here? Poissoned reverse: If Z routes through Y to get to X : Z tells Y its (Z s) distance to X is infinite (so Y won t route to X via Z) Will this completel solve count to infinit problem? a 60 4 50 33 Comparison of LS and DV algorithms Message compleit LS: with n nodes, E links, O(nE) msgs sent each DV: O(d) messages, man times d is node degree Speed of Convergence LS: O(n log n) algorithm requires O(nE) msgs Ma have oscillations DV: Convergence time varies Ma be routing loops Count-to-infinit problem Robustness: What happens if router malfunctions? LS: Node can advertise incorrect link cost Each node computes onl its own table DV: Node can advertise incorrect path cost Each node s table used b others: error propagate through network 34 7
Internet Inter-AS routing: BGP The de facto standard: Border Gatewa Protocol (BGP) BGP provides each AS a means to:. Obtain subnet reachabilit information neighboring ASs. Propagate reachabilit information to all routers in the AS 3. Determine good routes to subnets based on reachabilit information and routing polic. Allows a subnet to advertise its eistence to rest of the Internet: I am here Issues: Which routing algorithm? How are routes advertised? How to implement routing policies? 35 BGP Basics Pairs of routers (BGP peers) echange routing info over semi-permanent TCP connections: BGP sessions Note that BGP sessions do not correspond to phsical links. When AS advertises a prefi to AS, AS is promising it will forward an datagrams destined to that prefi towards the prefi. AS can aggregate prefies in its advertisement 3c 3a 3b AS3 a AS c d b a c b AS ebgp session ibgp session 36 8
BGP is a path vector protocol Distance vector algorithm with etra information Two important attributes: AS-PATH: contains all ASs along the wa: AS 67 AS 7 NEXT-HOP: Indicates the specific internal-as router to net-hop AS. Path can be used to make routing decisions, e.g., to avoid loops Pure distance vector does not enable policies Link state does not scale and eposes policies When advertising a prefi, advert includes BGP attributes Prefi + other attributes = route When gatewa router receives route advertisement, uses ingress filters to accept/decline Can make decision based on ASes on path, e.g., to avoid loops 37 BGP messages Peers echange BGP messages using TCP OPEN: Opens TCP conn. to peer Authenticates sender UPDATE: Advertises new routes (or withdraws old) KEEPALIVE: Keeps conn alive in absence of UPDATES, ACKs OPEN request NOTIFICATION: Reports errors in previous msg; closes a connection Process: Initialiation: Open Updates for all routes Ongoing: Updates for changed routes 38 9
BGP route processing Receive BGP Updates Appl Polic = filter routes & tweak attributes Based on Attribute Values Best and Alternate Routes Appl policies to Best Routes! Transmit BGP Updates Appl Import Policies (ingress filter) Best Route Selection BGP Route Table Appl Eport Policies (egress filter) Install Best Routes IP Forwarding Table 39 Routing polic Reflects goals of network provider Which routes to accept other ASes How to manipulate the accepted routes How to propagate routes through network How to manipulate routes before the leave the AS Which routes to send to another AS 40 0
Routing polic: Eamples Honor business relationships (E.g., customers get full-table; peers onl customer prefies) (E.g., prefer customer routes over peer routes over upstream routes) Allow customers a choice of route (E.g., on customer request do not eport prefi to AS, etc.) Enable customer traffic engineering (E.g., prepend times to all peers or to specified AS) Enable DDoS defense for customers (E.g., blackholing b rewriting the net hop) 4 BGP routing polic W A B C X legend: provider network customer network: Y A,B,C are provider networks X,W,Y are customer (of provider networks) X is dual-homed: attached to two networks X does not want to route B via X to C.. so X will not advertise to B a route to C 4
BGP routing polic (.) W A B C X legend: provider network customer network: Y A advertises to B the path AW B advertises to X the path BAW Should B advertise to C the path BAW? No wa! B gets no revenue for routing CBAW since neither W nor C are B s customers B wants to force C to route to w via A B wants to route onl to/ its customers! 43 Local preference attribute AS 00 60.0.0.0/6 AS 00 AS 300 D 500 800 E 60.0.0.0/6 500 > 60.0.0.0/6 800 A AS 400 B Path with highest local preference wins Allows providers to prefer routes C
BGP route selection Router learn > route to some prefi Router must select best route. Elimination rules:. Local preference value attribute: polic decision. Shortest AS-PATH 3. Best MED (multi-eit-discriminator) 4. Closest NEXT-HOP router: hot potato routing 5. Additional criteria 6. IP address of peer 45 Different tpes of ASes Providers: Offer connectivit to direct customer offer transit to other ISPs Customers: Bu connectivit providers Peers: Echange customers traffic at no cost Siblings: others Eporting to a Provider Eporting to a Customer Eporting to a Peer Own Routes Customer s Routes Sibling s Route Provider s Route Peer s Route 46 3
OSPF (Open Shortest Path First) Open : Specification publicl available Uses the Link State algorithm State: per router info about itself and attached networks OSPF advertisements: propagates state Link state database: state of all routers Topolog map: derived link state database 47 OSPFv: Components Who is m neighbor? Hello Protocol With whom I want to talk? (LAN!!!) Designated router/backup designated router concept What info am I missing? Database snchroniation How do I distribute info? Advertisements disseminated to entire Autonomous Sstem (via reliable flooding) OSPF messages directl over IP (rather than TCP or UDP) Route computation From link state database with Dijkstra s algorithm Supports equal-cost path routing 48 4
OSPF advanced features Securit: All OSPF messages are authenticated (to prevent malicious intrusion) Multiple same-cost paths allowed For each link, multiple cost metrics for different TOS (eg, satellite link cost set low for best effort; high for real time) Integrated uni- and multicast support: Multicast OSPF (MOSPF) uses same topolog data base as OSPF Hierarchical OSPF in large domains 49 Hierarchical OSPF 50 5
Hierarchical OSPF (.) Two-level hierarch: Local area and backbone. Link-state advertisements onl in respective areas. Nodes in each area have detailed area topolog; onl know direction (shortest path) to networks in other areas. Area Border routers summarie distances to networks in the area and advertise them to other Area Border routers. Backbone routers: Run an OSPF routing algorithm limited to the backbone. Boundar routers: Connect to other ASs. 5 Wh different Intra- and Inter-AS routing? Polic: Inter-AS: Admin wants control over how its traffic routed, who routes through its net. Intra-AS: Single admin, so no polic decisions needed Scale: Hierarchical routing saves table sie, reduced update traffic Performance: Intra-AS: Can focus on performance Inter-AS: Polic ma dominate over performance We need BOTH! 5 6