Network Layer
Download
Report
Transcript Network Layer
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 2004. All
material copyright 1997-2004. J.F Kurose and K.W. Ross, All Rights
Reserved.
Network Layer
7-1
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
7-2
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-3
Intra-AS and Inter-AS routing
C.b
a
C
Gateways:
B.a
A.a
b
A.c
d
A
a
b
c
a
c
B
b
•perform inter-AS
routing amongst
themselves
•perform intra-AS
routing with other
routers in their
AS
network layer
inter-AS, intra-AS
routing in
gateway A.c
link layer
physical layer
Network Layer
7-4
IGP vs. EGP
R4
R5
R3
BGP
AS1
AS2
(RIP intra-AS
routing)
(OSPF
intra-AS
routing)
BGP
R1
R2
AS3
(OSPF intra-AS
routing)
Intra-area
routing protocol
also
called Interior
Figure 4.5.2-new2:
BGP use for
inter-domain
routing 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-5
Internet inter-AS routing: BGP
BGP (Border Gateway Protocol): the de
facto standard
BGP provides each AS a means to:
1.
2.
3.
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-6
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
3c
3a
3b
AS3
1a
AS1
2a
1c
1d
1b
2c
AS2
2b
eBGP session
iBGP session
Network Layer
7-7
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-8
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-9
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-10
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 3
AS 1
Partition healing:
rare case where AS1 may
accept “loop” route:
AS 1
AS 2
(b)
AS 3
(a)
138.39.0.0/16
AS 2
138.39.0.0/16
Network Layer
7-11
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
Link A
AS 1
AS 3
AS 2
Link B
AS 4
Network Layer
7-12
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
7-13
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 3
AS 1
AS 4
AS 2
138.39.0.0/16
Network Layer
7-14
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-15
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
AS1
customer
R1
R2
ISP
138.39.2.0/23
Network Layer
7-16
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
7-17
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!
R2
138.39/16
204.70/16
R1
ISP, same router in customer
ISP to customer traffic: as
before
Customer to ISP traffic:
customer may have to get BGP
prefixes from ISP
R3
customer
Example 2: different routers in
ISP
R1
R2
ISP
R3
customer
138.39/16
204.70/16
Network Layer
7-18
Multi-homing to multiple providers
ISP3
138.39/16
ISP1
ISP2
204.70/16
customer
Options for customer address space:
Exclusively from ISP1 (or from ISP2)
From both ISP1 and ISP2
Independently from address registry
•
•
•
•
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?!
• 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
• Can manipulate load-sharing better, but bad for aggregation!
Bottom line: it all depends on the traffic patterns!
Network Layer
7-19
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-20
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
a
C
B.a
A.a
b
A.c
d
A
a
b
a
c
B
b
c
Network Layer
7-21
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:
LAN
193.1.1.0/28
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
R2
R1
ISP
LAN
193.1.1.16/28
server
farm
LAN
193.1.1.32/28
new PC
LAN
202.1.1/24
Network Layer
7-22
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
193.1.1.0/28
R2
R1
ISP
LAN
193.1.1.16/28
server
farm
LAN
193.1.1.32/28
LAN
202.1.1/24
R3
LAN
202.1.2/24
new PC
Network Layer
7-23
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-24
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
7-25