Interplay between routing and forwarding routing algorithm determines
Interplay between routing and forwarding routing algorithm determines end-path through network routing algorithm Να θυμάσαι!!! local forwarding table Header value output link 0100 0101 0111 1001 forwarding table determines local forwarding at this router 3 2 2 1 value in arriving packet’s header 0111 1 3 2 Network Layer 4 -2
Datagram forwarding table routing algorithm local forwarding table dest address output link address-range 1 address-range 2 address-range 3 address-range 4 3 2 2 1 4 billion IP addresses, so rather than list individual destination address list range of addresses (aggregate table entries) Prefix - CIDR Longest Prefix Matching IP destination address in arriving packet’s header 1 3 2 Network Layer 4 -3
ICMP: Internet Control Message Protocol Upper layer Protol Number = 1 r used by hosts, routers, gateways to communication network-level information m error reporting: unreachable host, network, port, protocol m echo request/reply (used by ping) r network-layer “above” IP: m ICMP msgs carried in IP datagrams r ICMP message: type, code plus first 8 bytes of IP datagram causing error Type 0 3 3 3 4 Code 0 0 1 2 3 6 7 0 8 9 10 11 12 0 0 0 description echo reply (ping) dest. network unreachable dest host unreachable dest protocol unreachable dest port unreachable dest network unknown dest host unknown source quench (congestion control - not used) echo request (ping) route advertisement router discovery TTL expired bad IP header 4: Network Layer 4 b-4
Routing in the Internet r The Global Internet consists of Autonomous Systems (AS) interconnected with each other: m m m Stub AS: small corporation Multihomed AS: large corporation (no transit) Transit AS: provider r Two-level routing: m Intra-AS: administrator is responsible for choice m Inter-AS: unique standard 4: Network Layer 4 b-6
Internet AS Hierarchy Intra-AS border (exterior gateway) routers Inter-AS interior (gateway) routers 4: Network Layer 4 b-7
Intra-AS Routing Συνώνυμο: Interior Gateway Protocols (IGP) Τα πιο γνωστά IGPs: RIP: Routing Information Protocol (Distance Vector algorithm) OSPF: Open Shortest Path First (Link State algorithm) IGRP: Interior Gateway Routing Protocol (Distance Vector algorithm) Ø Cisco proprietary protocol Ø Όμοιο με RIP Ø Σε αντίθεση προς το RIP χρησιμοποιεί το TCP για routing updates 4: Network Layer 4 b-8
RIP ( Routing Information Protocol) r Distance vector algorithm r Included in BSD-UNIX Distribution in 1982 r Distance metric: # of hops (max = 15 hops) (δηλαδή θεωρείται ότι κάθε ζεύξη έχει κόστος 1) m Can you guess why? r Distance vectors: exchanged every 30 sec via Response Message (also called advertisement) r Each advertisement: route to up to 25 destination nets 4: Network Layer 4 b-9
RIP (Routing Information Protocol) z w A x Routing table in D Destination Network w y z x …. D B y C Next Router Num. of hops to dest. …. . . A B B -- 2 2 7 1 4: Network Layer 4 b-10
RIP: Link Failure and Recovery If no advertisement heard after 180 sec --> neighbor/link declared dead m routes m new via neighbor invalidated advertisements sent to neighbors m neighbors in turn send out new advertisements (if tables changed) m link failure info quickly propagates to entire net m poison reverse (αθώα ψέματα) used to prevent pingpong loops (infinite distance = 16 hops) 4: Network Layer 4 b-12
RIP Table processing r RIP routing tables managed by application-level process called route-d (daemon) r advertisements sent in UDP packets, periodically repeated 4: Network Layer 4 b-13
RIP Table example (continued) Router: giroflee. eurocom. fr Destination ----------127. 0. 0. 1 192. 168. 2. 193. 55. 114. 192. 168. 3. 224. 0. 0. 0 default Gateway Flags Ref Use Interface ---------- --------127. 0. 0. 1 UH 0 26492 lo 0 192. 168. 2. 5 U 2 13 fa 0 193. 55. 114. 6 U 3 58503 le 0 192. 168. 3. 5 U 2 25 qaa 0 193. 55. 114. 6 U 3 0 le 0 193. 55. 114. 129 UG 0 143454 r Three attached class C networks (LANs) r Router only knows routes to attached LANs r Default router used to “go up” r Route multicast address: 224. 0. 0. 0 (class D) r Loopback interface (for debugging) – 127. 0. 0. 1 4: Network Layer 4 b-14
OSPF (Open Shortest Path First) r “open”: publicly available r Uses Link State algorithm m LS packet dissemination m Topology map at each node m Route computation using Dijkstra’s algorithm v Hello messages every 30 min. r Advertisements disseminated to entire AS (via flooding - πλημμύρας) (Δημοσιοποίηση διαδρομών προς όλους τους άλλους Routers). r Η δημοσιοποίηση του OSPF μεταφέρεται μέσω του IP (upper layer 89). 4: Network Layer 4 b-15
OSPF “advanced” features (not in RIP) r Security: all OSPF messages authenticated (to prevent malicious intrusion); TCP connections used r Multiple same-cost paths allowed (only one path in RIP) r For each link, multiple cost metrics for different TOS (eg, satellite link cost set “low” for best effort; high for real time) r Hierarchical OSPF in large domains (large AS). 4: Network Layer 4 b-16
Hierarchical OSPF 4: Network Layer 4 b-17
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 ASs. 4: Network Layer 4 b-18
IGRP (Interior Gateway Routing Protocol) r CISCO proprietary; successor of RIP (mid 80 s) r Distance Vector, like RIP r several cost metrics (delay, bandwidth, reliability, load etc) r uses TCP to exchange routing updates r Loop-free routing via Distributed Updating Alg. (DUAL) based on diffused computation 4: Network Layer 4 b-19
Inter-AS routing 4: Network Layer 4 b-20
Internet inter-AS routing: BGP r BGP (Border Gateway Protocol): the de facto standard r Path Vector protocol: m similar to Distance Vector protocol m each Border Gateway broadcast to neighbors (peers) entire path (i. e. , sequence of ASs) to destination m E. g. , Gateway X may send its path to dest. Z: Path (X, Z) = X, Y 1, Y 2, Y 3, …, Z 4: Network Layer 4 b-21
Internet inter-AS routing: BGP Suppose: gateway X send its path to peer gateway W r W may or may not select path offered by X m cost, policy (don’t route via competitors AS), loop prevention reasons. r If W selects path advertised by X, then: Path (W, Z) = w, Path (X, Z) r Note: X can control incoming traffic by controling it route advertisements to peers: m e. g. , don’t want to route traffic to Z -> don’t advertise any routes to Z 4: Network Layer 4 b-22
Inter-AS (BGP) tasks v suppose router (e. g. 1 d) in AS 1 receives datagram destined outside of AS 1: § router should forward packet to gateway router, but which one? (1 c or 1 d? ) 3 b other networks e. BGP session 3 a AS 3 AS 1 must: 1. learn which dests are reachable through AS 2, which through AS 3 (e. BGP) 2. propagate this reachability info to all routers in AS 1 (i. BGP) job of BGP routing! i. BGP session 1 c 1 a AS 1 1 d 2 a 1 b 2 c 2 b other networks AS 2 Network Layer 4 -24
Example: choosing among multiple ASes r now suppose AS 1 learns from inter-AS protocol that subnet x is reachable from AS 3 and from AS 2. r to configure forwarding table, router 1 d must determine towards which gateway it should forward packets for dest x r hot potato routing: αποστολή στον πλησιέστερον Router ώστε να βγει γρήγορα εκτός AS 1 … 3 c 3 b other networks learn from inter-AS protocol that subnet x is reachable via multiple gateways x … … 3 a AS 3 1 c 1 a AS 1 1 d 2 a 1 b 2 c 2 b other networks AS 2 ? use routing info from intra-AS protocol to determine costs of least-cost paths to each of the gateways hot potato routing: choose the gateway that has the smallest least cost determine from forwarding table the interface I that leads to least-cost gateway. Enter (x, I) in forwarding table Network Layer 4 -25
Internet inter-AS routing: BGP r BGP messages exchanged using TCP. r BGP messages: m OPEN: opens TCP connection to peer and authenticates sender m UPDATE: advertises new path (or withdraws old) m KEEPALIVE keeps connection alive in absence of UPDATES; also ACKs OPEN request m NOTIFICATION: reports errors in previous msg; also used to close connection 4: Network Layer 4 b-26
Why different Intra- and Inter-AS routing ? Policy: r Inter-AS: admin wants control over how its traffic routed, who routes through its net. r Intra-AS: single admin, so no policy decisions needed Scale: r hierarchical routing saves table size, reduced update traffic Performance: r Intra-AS: can focus on performance r Inter-AS: policy may dominate over performance 4: Network Layer 4 b-27
- Slides: 27