Download presentation
1
2011 session 1 TELE3118: Network Technologies Week 7: Network Layer Inter-Domain Routing Protocols
Some slides have been taken from: Computer Networking: A Top Down Approach Featuring the Internet, 3rd edition. Jim Kurose, Keith Ross. Addison-Wesley, July All material copyright J.F Kurose and K.W. Ross, All Rights Reserved. Network Layer
2
Hierarchical Routing Our routing study thus far - idealization
all routers identical network “flat” … not true in practice scale: with 200 million destinations: can’t store all dest’s in routing tables! routing table exchange would swamp links! administrative autonomy internet = network of networks each network admin may want to control routing in its own network Network Layer
3
Hierarchical Routing in the Internet
Internet is organized as Autonomous Systems (AS) Each AS is an independent administrative domain (e.g. ISP) Intra-AS routing protocol All routers in an AS run same intra-AS routing protocol Routers in different AS can run different intra-AS routing protocol Inter-AS routing protocol Between routers in different AS Gateway routers: run both intra-AS and inter-AS routing protocols Network Layer
4
Intra-AS and Inter-AS routing
C.b Gateways: perform inter-AS routing amongst themselves perform intra-AS routing with other routers in their AS B.a A.a b A.c c a a C b a B d c A b network layer inter-AS, intra-AS routing in gateway A.c link layer physical layer Network Layer
5
IGP vs. EGP Intra-area routing protocol also called Interior Gateway Protocol (IGP) Administrator can choose any: RIP, OSPF, ISIS, … Inter-area routing protocol also called Exterior Gateway Protocol (EGP) Unique: Border Gateway Protocol (BGP) Network Layer
6
Internet inter-AS routing: BGP
BGP (Border Gateway Protocol): the de facto standard BGP provides each AS a means to: Obtain subnet reachability information from neighboring ASs. Propagate the reachability information to all routers internal to the AS. Determine “good” routes to subnets based on reachability information and policy. Allows a subnet to advertise its existence to rest of the Internet: “I am here” Network Layer
7
BGP basics Pairs of routers (BGP peers) exchange routing info over semi-permanent TCP conctns: BGP sessions Note that BGP sessions do not correspond to physical links. When AS2 advertises a prefix to AS1, AS2 is promising it will forward any datagrams destined to that prefix towards the prefix. AS2 can aggregate prefixes in its advertisement 3b 1d 3a 1c 2a AS3 AS1 AS2 1a 2c 2b 1b 3c eBGP session iBGP session Network Layer
8
Path attributes & BGP routes
When advertising a prefix, advert includes BGP attributes. prefix + attributes = “route” Path Vector protocol: similar to Distance Vector protocol each Border Gateway broadcast to neighbors (peers) entire path (i.e., sequence of AS’s) to destination E.g., Gateway X may send its path to dest. Z: Path (X,Z) = X,Y1,Y2,Y3,…,Z when gateway router receives route advert, uses import policy to accept/decline. Network Layer
9
BGP operation Point-to-point peering BGP peers explicitly configured
Lack of trust no auto-discovery! BGP session runs over TCP Reliable Can detect neighbor/link down 4 types of 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 Network Layer
10
BGP operation (contd.) BGP peers exchange route prefixes
AS-path Route attributes No cost included! Route prefixes received from peer are filtered and selected (based on AS-path and route attributes) for installation in RIB Route prefixes from RIB are sent to peer after filtering and selection All the complexity is in the use of policies for filtering and selection Network Layer
11
BGP attribute: AS-path
Prevents looping! Prefix /16, AS1 AS2: AS-path = AS1 AS2 AS3: AS-path = AS2-AS1 AS3 AS1: AS-path = AS3-AS2-AS1 AS1 detects loop, and can reject the route Partition healing: rare case where AS1 may accept “loop” route: AS 3 AS 1 AS 3 (b) AS 1 AS 2 (a) AS 2 /16 /16 Network Layer
12
BGP attribute: Multi-Exit-Discriminator
Used when two AS connect to each other in more than one place Used by AS to advertise degree of preference of each link to reach a particular prefix Example: AS1 and AS2 have 2 BGP sessions: one on each link AS2 advertises prefixes of AS3 to AS1 on both links MED advertised on link A better than MED advertised on link B AS 1 Link A AS 2 AS 3 AS 4 Link B Network Layer
13
MED (contd.) ISP-1 and ISP-2 connect in New York and San Francisco
ISP-1 has customer-1 in San Francisco ISP-2 has customer-2 in New York What happens if: Case A: Both ISPs set and accept MED? Case B: Both ISP-1 and ISP-2 ignore MED? Case C: ISP-1 accepts MED but ISP-2 ignores MED? Cust 2 Case A: ISP 2 ISP 1 Cust 1 Network Layer
14
BGP attribute: Local-Pref
Most commonly used attribute Determines local (i.e. within AS) preference of use of received route E.g.: say AS3 provides better service than AS2 to AS4 AS4 can configure local-pref of routes from AS3 to be higher (better) than those heard from AS2 AS1 advertises prefix to AS2 and AS3 AS4 receives the prefix from both, but chooses the AS3-AS1 path since it has better local-pref AS 3 AS 1 AS 4 AS 2 /16 Network Layer
15
BGP policies Can be complex, yet are key to flexibility and control of inter-AS routing Examples: Avoid using competitor’s network avoid routes with AS-n in AS-Path Avoid transit service, i.e. do not carry any traffic that does not have source or destination within AS Do not advertise any non-local routes to peers Let another ISP carry most cross-country load Use of MED was shown earlier More examples in subscriber-ISP connection next Network Layer
16
Subscriber connection: singly-homed
Easy case! Possible options: Static configuration: easiest Customer has default route via R2 ISP configures static route to customer’s prefix Include customer in ISP’s IGP (too risky!) Run a small IGP (say RIP) on R1-R2 link, leak that into BGP Run a single BGP session customer will still likely use a default route or a small set of filtered routes and not absorb the entire Internet routing table AS2 BGP session ISP AS1 customer R1 R2 /23 Network Layer
17
Multi-homed subscriber
Multiple customer links to one or more ISPs Why? Reliability (redundancy) Performance (load-sharing) Challenging Static routing often doesn’t suffice (why?) Want to minimize routing prefixes injected into customer network BGP configuration requires thought and planning, taking into account both traffic directions (to and from the customer) ISP-1 ISP-2 customer Network Layer
18
Multi-homing to a single provider
Example 1: same router in ISP, different routers in customer ISP to customer traffic: customer sets MED Customer to ISP traffic: 2 default routes! Example 2: different routers in ISP, same router in customer ISP to customer traffic: as before Customer to ISP traffic: customer may have to get BGP prefixes from ISP ISP R1 R2 R3 customer 138.39/16 204.70/16 ISP R1 R2 R3 customer 138.39/16 204.70/16 Network Layer
19
Multi-homing to multiple providers
ISP3 ISP1 ISP2 138.39/16 204.70/16 customer Options for customer address space: Exclusively from ISP1 (or from ISP2) E.g.: customer uses /24 and advertises this prefix to ISP2 ISP3 gets prefixes /16 from ISP1 and from ISP2 ISP3 traffic to customer will go via ISP2 (longest prefix match) Aggregation is pushing traffic away?! From both ISP1 and ISP2 E.g.: customer uses /24 and /24 Good load-sharing if traffic to these prefixes is about the same Independently from address registry Can manipulate load-sharing better, but bad for aggregation! Bottom line: it all depends on the traffic patterns! Network Layer
20
Interaction among routing protocols
Every routing protocol is computing its own routes: how does it all fit? Question: do they interact with each other? Yes! Question: which route is inserted in the forwarding tables? If conflict, priority mechanism is used Question: how does IGP fill its routing table? Direct routes: directly-connected interfaces Static routes: user configured Question: How does BGP fill it routing table? Learns AS local networks from IGP Network Layer
21
E-BGP vs. I-BGP Question: How do BGP routes get propagated within AS?
E.g.: how does B.b learn about routes from AS-A and AS-B? Inject BGP routes into IGP? bad idea – IGPs don’t scale Preferred way of distributing externally learnt prefixes within an AS: Internal-BGP (I-BGP): full-mesh within AS Our earlier discussion on BGP peering between different AS Technically correct to call it External-BGP (E-BGP) C.b B.a A.a b A.c c a a C b a B d c A b Network Layer
22
Configuring routing In your organization you have to install a new PC in a server-farm. The PC is multi-homed on two LANs. What static routes do you need to configure on the PC for shortest-path routing to all destinations? Assume: The PC is not routing between LANs The PC is not running any routing protocols Pick any IP addresses for the router interfaces consistent with the LAN subnets LAN /28 R1 R2 ISP LAN /28 LAN /24 LAN /28 server farm Network Layer new PC
23
Configuring routing (contd.)
Now suppose your organization gets a second link to the ISP via a new router R3. Your PC now has 3 LAN interfaces, and your organization has two links to the Internet. Can you suggest ways of load-balancing traffic to/from your organization? LAN /28 R1 R2 ISP LAN /28 LAN /24 LAN /28 server farm R3 LAN /24 new PC Network Layer
24
Summary Policy: Scale: Performance:
Hierarchical routing: intra-AS versus inter-AS Policy: Inter-AS: admin wants control over how its traffic routed, who routes through its net. Intra-AS: single admin, so no policy decisions needed Scale: hierarchical routing saves table size, reduced update traffic Performance: Intra-AS: can focus on performance Inter-AS: policy dominates over performance Network Layer
25
Summary (contd.) Principles of BGP operation
Path-vector Configuration driven Route attributes (AS-Path, MED, Local-Pref, …) Policies dictate everything! How does a customer connect to ISP? Examples of single and multi-homing Interaction between routing protocols How does it all fit? Design examples Finished with IP routing - whew! Network Layer
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.