Network Layer7-1 2012 session 1 TELE3118: Network Technologies Week 7: Network Layer Inter-Domain...
-
Upload
hugo-malcolm-farmer -
Category
Documents
-
view
216 -
download
1
Transcript of Network Layer7-1 2012 session 1 TELE3118: Network Technologies Week 7: Network Layer Inter-Domain...
Network Layer 7-1
2012 session 1TELE3118: Network
Technologies
Week 7: Network LayerInter-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 2004. All material copyright 1997-2004. J.F Kurose and K.W. Ross, All Rights Reserved.
Network Layer 7-2
Hierarchical Routing
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
Our routing study thus far - idealization all routers identical network “flat”… not true in practice
Network Layer 7-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 7-4
Intra-AS and Inter-AS routing
Gateways:•perform inter-AS routing amongst themselves•perform intra-AS routing with other routers in their AS
inter-AS, intra-AS routing in
gateway A.c
network layer
link layer
physical layer
a
b
b
aaC
A
Bd
A.a
A.c
C.bB.a
cb
c
Network Layer 7-5
IGP vs. EGP
Figure 4.5.2-new2: BGP use for inter-domain routing
AS2 (OSPF
intra-AS routing)
AS1 (RI P intra-AS
routing) BGP
AS3 (OSPF intra-AS
routing)
BGP
R1 R2
R3
R4
R5
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 7-6
Internet inter-AS routing: BGP
BGP (Border Gateway Protocol): the de facto standard
BGP provides each AS a means to:1. Obtain subnet reachability information from
neighboring ASs.2. Propagate the reachability information to all
routers internal to the AS.3. 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-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
1c2aAS3
AS1
AS21a
2c
2b
1b
3c
eBGP session
iBGP session
Network Layer 7-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 7-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 7-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 7-11
BGP attribute: AS-path Prevents looping!
Prefix 138.39.0.0/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
AS 1
AS 2
AS 3
138.39.0.0/16
(a)
AS 2
AS 3
138.39.0.0/16
(b)AS 1
Partition healing:rare case where AS1 mayaccept “loop” route:
Network Layer 7-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 AS 2
AS 3
AS 4
Link A
Link B
Network Layer 7-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?
ISP 1
ISP 2
Cust 2
Cust 1
Case A:
Network Layer 7-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 138.39.0.0.16 to AS2 and AS3 AS4 receives the prefix from both, but chooses the AS3-
AS1 path since it has better local-pref
AS 1
AS 2
AS 3
138.39.0.0/16
AS 4
Network Layer 7-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 7-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
customer ISPR1 R2
AS1
AS2
138.39.2.0/23
BGP session
Network Layer 7-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)
customer
ISP-2ISP-1
Network Layer 7-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
138.39/16
R1ISP
R3
customerR2
204.70/16
138.39/16
R1ISP
R3
customer
R2
204.70/16
Network Layer 7-19
Multi-homing to multiple providers
Options for customer address space: Exclusively from ISP1 (or from ISP2)
• E.g.: customer uses 138.39.1/24 and advertises this prefix to ISP2• ISP3 gets prefixes 138.39/16 from ISP1 and 138.39.1.24 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 138.39.1/24 and 204.70.1/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!
ISP1
customer
ISP3
ISP2138.39/16 204.70/16
Network Layer 7-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 7-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)
a
b
b
aaC
A
Bd
A.a
A.c
C.bB.a
cb
c
Network Layer 7-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
LAN193.1.1.32/28
LAN202.1.1/24
LAN193.1.1.0/28
LAN193.1.1.16/28
ISPR1 R2
serverfarm
new PC
Network Layer 7-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?
LAN193.1.1.32/28
LAN202.1.1/24
LAN202.1.2/24
LAN193.1.1.0/28
LAN193.1.1.16/28
ISPR1 R2
R3
serverfarm
new PC
Network Layer 7-24
Summary 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 7-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!