CMPE 252A: Computer Networks Set 9b: IP Int nter ernet networ orking king 1 Sending Datagrams from Source to Destination IP datagram: remains unchanged, as it travels from source to destination misc source dest data IP addr fields IP addr A 223.1.1.1 Forwarding table at A: 223.1.2.1 223.1.1.2 Dest. Net. next router Nhops 223.1.1.4 223.1.2.9 223.1.2 B 223.1.1 1 223.1.2.2 223.1.2 223.1.1.4 2 E 223.1.1.3 223.1.3.27 223.1.1 223.1.3 223.1.1.4 2 223.1.3.2 223.1.3.1 223.1.3 2 Sending Datagrams from Source to Destination misc Forwarding table at A: fields 223.1.1.1 223.1.2.2 data Dest. Net. next router Nhops Starting at A, dest. E: 223.1.1 1 223.1.2 223.1.1.4 2 Look up network address of E 223.1.3 223.1.1.4 2 in forwarding table A 223.1.1.1 E is on a different network A, E not directly attached 223.1.2.1 223.1.1.2 Routing table: next hop router 223.1.1.4 223.1.2.9 223.1.2 to E is 223.1.1.4 B 223.1.2.2 Link layer sends datagram to E 223.1.1.3 223.1.3.27 router 223.1.1.4 inside link- 223.1.1 223.1.3.2 223.1.3.1 layer frame Datagram arrives at 223.1.1.4 223.1.3 3 1
Sending Datagrams from Source to Destination misc Forwarding table at router 223.1.1.1 223.1.2.2 data fields Dest. Net router Nhops interface Arriving at 223.1.4, destined 223.1.1 - 1 223.1.1.4 for 223.1.2.2 223.1.2 - 1 223.1.2.9 223.1.3 - 1 223.1.3.27 Look up network address of E in router ’ s forwarding table A 223.1.1.1 E on same network as router ’ s 223.1.2.1 interface 223.1.2.9 223.1.1.2 223.1.1.4 223.1.2.9 223.1.2 Router and E are directly B attached 223.1.2.2 223.1.1.3 223.1.3.27 E Link layer sends datagram to 223.1.1 223.1.2.2 inside link-layer frame 223.1.3.2 223.1.3.1 via interface 223.1.2.9 Datagram arrives at 223.1.2.2 223.1.3 4 Differences between Intra- and Inter-AS Routing Policy: Inter-AS: admin wants control over how its traffic is routed, and who routes through its net. Intra-AS: single administration, so no policy decisions needed (usually; changing with traffic engineering) Scale: Hierarchical routing saves table size, reduced update traffic Performance : Intra-AS: can focus on performance Inter-AS: policy dominates over performance 5 Customers and Providers in The Internet pr provider ider IP traf affic ic provider pr ider customer cus omer cus customer omer Cus ustomer omer pay pays pr provider ider for or acces access to o the he Int nter ernet net 2
“ Peering ” Relationships Peer eers peer peer peer peer a) a) Ena nable ble trans ansit it among among provider pr ider customer cus omer their heir res espect pectiv ive e cus customer omers b) b) Prohibit ohibit trans ansit it bet between een peer peers traf affic ic traf affic ic NO NOT Peer eers (of often) en) do do not not exchange hange allo allowed ed allo allowed ed payment pay ments Peering Provides Shortcuts Peer eering ing als also o allo allows connect connectiv ivit ity bet between een peer peer peer peer the he cus customer omers of of “ Tier ier 1 ” pr provider iders. . pr provider ider cus customer omer ARD != AS ASNs are 16-bit values; more than 11,000 in use. Most ARDs have no ASN (statically routed at Internet edge) Some unrelated ARDs share the same ASN (RFC 2270) Some ARDs are implemented with multiple ASNs (example: Worldcom) ASes es ar are e an an implement implementation ion det detail ail of of Int nter erdomain domain rout outing ing ICNP 2002 3
BGP BGP = B order G ateway P rotocol Is a Policy-Based routing protocol Is the de facto EGP of today ’ s global Internet Relatively simple, path-vector based, but configuration is complex and many mistakes are made. • 1989 1989 : : BGP GP-1 -1 [RFC FC 1105] 1105] 904) – Replacement eplacement for or EGP GP (1984, 1984, RFC FC 904) • 1990 1990 : : BGP GP-2 -2 [RFC FC 1163] 1163] • 1991 1991 : : BGP GP-3 -3 [RFC FC 1267] 1267] • 1995 1995 : : BGP GP-4 -4 [RFC FC 1771] 1771] – Suppor upport for or Clas lassles less Int nter erdomain domain Rout outing ing (CIDR) 10 BGP BGP (Border Gateway Protocol): the de facto standard for Internet inter-AS routing. Path Vector protocol: Similar to Distance Vector protocol Each Border Gateway broadcast to neighbors (peers) entire path (i.e., sequence of ASes) to destination BGP routes to networks (ASes), not individual hosts e.g., Gateway X may send its path to dest. Z: Path (X,Z) = X,Y1,Y2,Y3,…,Z 11 BGP GP Oper Operat ation ion (Simplif implified) ied) Establish session on AS1 TCP port 179 BGP session Exchange all active routes AS2 While connection Exchange incremental is ALIVE exchange updates route UPDATE messages 12 4
BGP Messages BGP messages exchanged using TCP. BGP messages: OPEN opens TCP connection to peer and authenticates sender UPDATE advertises new path (or withdraws old) KEEPALIVE keeps connection alive in absence of UPDATES; also ACKs OPEN request NOTIFICATION reports errors in previous msg; also used to close connection Announcement = prefix + attributes 13 Two o Types pes of of BGP GP Neighbor Neighbor Relat elations ionships hips • External Neighbor (eBGP) in a different AS. • Internal Neighbor (iBGP) in the same AS1 AS. iBGP iB GP is is rout outed ed us using ing IGP GP eBGP iBGP AS2 14 Problem: oblem: iB iBGP GP Mes esh h Does oes Not Not Scale cale eBGP update • N N bor border der rout outer ers means means N( N(N-1) N-1)/2 2 peer peering ing ses essions ions • Eac ach h rout outer er mus must ha have e N-1 N-1 iB iBGP GP ses essions ions conf configur igured ed iBGP updates • The he ad addit dition ion a a sing ingle le iB iBGP GP speak peaker er requir equires es conf configur iguration ion changes hanges to o all all other ot her iB iBGP GP speak peaker ers • Siz ize e of of iB iBGP GP rout outing ing table ble can can be be or order der N N lar larger ger than han number number of of bes best Cur urrent ently four our solut olutions ions: : rout outes es (remember emember alt alter erna nate e rout outes es!) !) (0) 0) Buy uy big bigger ger rout outer ers! ! • Eac ach h rout outer er has has to o lis listen en to o upda update e (1) 1) Break eak AS int into o smaller maller ASes es nois noise e from om eac each h neighbor neighbor (2) 2) BGP GP Rout oute e ref eflect lector ors (3) 3) BGP GP conf confeder ederations ions 15 5
Rout oute e Ref eflect lector ors • Rout oute e ref eflect lector ors can can pass on pas on iB iBGP GP upda updates es to o client lients RR RR • Eac ach h RR pas passes es along ONL along ONLY bes best RR RR RR RR rout outes es • OR ORIGI GINATOR OR_I _ID and and CLUS USTER_LI _LIST attribut ibutes es ar are e needed to needed o avoid oid loops loops 16 BGP Confederations From om the he out outside, ide, this his looks looks lik like e AS 1 1 AS 65502 65502 AS 65504 65504 AS 65503 65503 AS 65500 65500 AS 1 1 AS 65501 65501 iB iBGP GP us used ed by by speak peaker ers in in conf confeder ederation ion Problem: oblem: BGP GP Rout oute e Proces ocessing ing Open ended programming. Constrained only by vendor configuration language Apply Policy = Apply Policy = Receive Based on Best Transmit filter routes & filter routes & BGP Attribute Routes BGP tweak attributes tweak attributes Updates Values Updates Apply Import Best Route Best Route Apply Export Policies Selection Table Policies Install forwarding Instability due Entries for best Routes. to ad hoc filtering rules IP Forwarding Table 18 6
Problem: Active BGP Entries Approaching 500K! Plot Range : 30-Jun-1988 (1430) to 07-Nov-2013 19 Additional Control More than just route computation and forwarding is needed for the Internet to work! Errors happen! Different transmission media and networks can tolerate different maximum packet sizes Hosts need to have IP addresses 20 Internet Control Protocols In addition to packet forwarding and keeping routing tables correct, sending IP packets requires a number of control protocols: Host must be given an IP address (DHCP) Application in host has the name of an intended destination, and an IP address has to be found for that name. The application calls a resolver in the Domain Name System (DNS) or uses a static hosts file (e.g., /etc/hosts) Host determines if destination IP address is the same or different. If different, packet is sent to an attached (default) IP router. If same, the IP address must be converted to a MAC address (ARP). Destination router must also map IP address to MAC address (ARP). Errors may have to be reported to the source of an IP packet using a protocol (ICMP). 21 7
Recommend
More recommend