Upload
heather-clemans
View
220
Download
1
Tags:
Embed Size (px)
Citation preview
Courtesy: Nick McKeown, StanfordUmar Kalim, NIIT
1
Border Gateway Protocol
Tahir Azim
Courtesy: Nick McKeown, StanfordUmar Kalim, NIIT
2
Outline
Techniques Flooding Distributed Bellman Ford Algorithm Dijkstra’s Shortest Path First Algorithm
Routing in the Internet Hierarchy and Autonomous Systems Interior Routing Protocols: RIP, OSPF Exterior Routing Protocol: BGP
Multicast Routing
Courtesy: Nick McKeown, StanfordUmar Kalim, NIIT
3
Routing in the Internet
The Internet uses hierarchical routing The Internet is split into Autonomous Systems
(AS’s) Examples of AS’s: PTCL (17557), HP (71), MCI Worldcom (17373),
Sprint (1239) Try: whois –h whois.arin.net “MCI Worldcom”
Within an AS, the administrator chooses an Interior Gateway Protocol (IGP) Examples of IGPs: RIP (rfc 1058), OSPF (rfc 1247).
Between AS’s, the Internet uses an Exterior Gateway Protocol AS’s today use the Border Gateway Protocol, BGP-4 (rfc 1771)
Courtesy: Nick McKeown, StanfordUmar Kalim, NIIT
4
Routing in the Internet
Routing in the Internet Autonomous System ‘A’AS ‘B’AS ‘C’Stub NetworkTransit NetworkStub NetworkInterior Gateway Exterior GatewayProtocolProtocolInterior Gateway ProtocolInterior Gateway Protocol
Stub AS Transit ASe.g. backbone service provider
Stub AS
AS ‘A’ AS ‘B’ AS ‘C’
Interior GatewayProtocol
Interior GatewayProtocol
Interior GatewayProtocol
BGP BGP
Courtesy: Nick McKeown, StanfordUmar Kalim, NIIT
5
Routing within a Stub AS
There is only one exit point, so routers within the AS can use default routing. Each router knows all Network IDs within AS. Packets destined to another AS are sent to the
default router. Default router is the border gateway to the next AS.
Routing tables in Stub AS’s tend to be small.
Courtesy: Nick McKeown, StanfordUmar Kalim, NIIT
6
Interior Routing Protocols RIP
Uses distance vector (distributed Bellman-Ford algorithm). Updates sent every 30 seconds. No authentication. Originally in BSD UNIX. Widely used for many years; not used much anymore.
OSPF Link-state updates sent (using flooding) as and when
required. Every router runs Dijkstra’s algorithm. Authenticated updates. Autonomous system may be partitioned into “areas”
corresponding to internal networks. Widely used.
Courtesy: Nick McKeown, StanfordUmar Kalim, NIIT
7
Exterior Routing Protocols
Problems: Topology: The Internet is a complex mesh of different
AS’s with very little structure. Autonomy of AS’s: Each AS defines link costs in
different ways, so not possible to find lowest cost paths.
Trust: Some AS’s can’t trust others to advertise good routes (e.g. two competing backbone providers), or to protect the privacy of their traffic (e.g. two warring nations).
Policies: Different AS’s have different objectives (e.g. route over fewest hops; use one provider rather than another).
Courtesy: Nick McKeown, StanfordUmar Kalim, NIIT
8
Border Gateway Protocol (BGP-4)
BGP is not a link-state or distance-vector routing protocol. Instead, BGP uses “Path vector”
BGP advertises complete paths (a list of AS’s). Also called AS_PATH (this is the path vector) Example of path advertisement:“The network 171.64/16 can be reached via the path {AS1, AS5, AS13}”.
Paths with loops are detected locally and ignored. Local policies pick the preferred path among
options. When a link/router fails, the path is “withdrawn”.
Courtesy: Nick McKeown, StanfordUmar Kalim, NIIT
9
Customers and Providers
Customer pays provider for access to the InternetCustomer may not always need BGP
provider
customer
IP trafficprovider customer
Courtesy: Nick McKeown, StanfordUmar Kalim, NIIT
10
Customer-Provider Hierarchy
IP trafficprovider customer
Courtesy: Nick McKeown, StanfordUmar Kalim, NIIT
11
The Peering Relationship
peer peer
customerprovider
Peers provide transit between their respective customers
Peers generally do not provide transit between peers A->C routing must occur through a provider
Peers (often) do not exchange $$$
trafficallowed
traffic NOTallowed
A B C
Courtesy: Nick McKeown, StanfordUmar Kalim, NIIT
12
Courtesy: Nick McKeown, StanfordUmar Kalim, NIIT
13
14
Open : Establish a BGP session.
Keep Alive : Handshake at regular intervals.
Notification : Shuts down a peering session.
Update : Announcing new routes or withdrawing previously announced routes.
Attributes include: Next hop, AS Path, local preference, Multi-exit discriminator (MED), … Used to select among multiple options for paths
BGP messages exchanged using TCP
BGP announcement = network prefix + path attributes
BGP Messages
Courtesy: Nick McKeown, StanfordUmar Kalim, NIIT
15
BGP Route Selection Summary
Highest Local Preference
Shortest ASPATH
Lowest MED
Lowest IGP cost to BGP egress
Lowest router ID
traffic engineering
Enforce relationshipsE.g. prefer customer routes over peer routes
Throw up hands andbreak ties
16
ASPATH Attribute
AS 7018135.207.0.0/16AS Path = 6341
AS 1239Sprint
AS 1755Ebone
AT&T
AS 3549Global Crossing
135.207.0.0/16AS Path = 7018 6341
135.207.0.0/16AS Path = 3549 7018 6341
AS 6341
135.207.0.0/16
AT&T Research
Prefix Originated
AS 12654RIPE NCCRIS project
AS 1129Global Access
135.207.0.0/16AS Path = 7018 6341
135.207.0.0/16AS Path = 1239 7018 6341
135.207.0.0/16AS Path = 1755 1239 7018 6341
135.207.0.0/16AS Path = 1129 1755 1239 7018 6341
Pick shorter AS path
17
Which route shouldFrank pick to 13.13.0.0./16?
AS 1
AS 2
AS 4
AS 3
13.13.0.0/16
Frank’s Internet Barn
peer peer
customerprovider
So Many Choices…
18
AS 1AS 2
AS 4
AS 3
13.13.0.0/16
local pref = 80
local pref = 100
local pref = 90
Set appropriate “local pref”to reflect preferences:Higher Local preference valuesare preferred
Frank’s Choices…
peer peer
customerprovider
Route learned from customer preferred over route learned from peer, preferred over route learned from provider
Courtesy: Nick McKeown, StanfordUmar Kalim, NIIT
19
Prompt> whois -h whois.apnic.net AS17577
as-block: AS17408 - AS18409 descr: APNIC ASN block remarks: These AS numbers are further assigned by
APNIC remarks: to APNIC members and end-users in the APNIC
region admin-c: HM20-AP tech-c: HM20-AP mnt-by: APNIC-HM mnt-lower: APNIC-HM changed: [email protected] 20060517 changed: [email protected] 20071219 source: APNIC
aut-num: AS17557 as-name: PKTELECOM-AS-AP descr: Pakistan Telecom descr: ITI Region PTCL country: PK import: from AS5400 action pref=185; accept ANY import: from AS1239 action pref=185; accept ANY export: to AS5400 announce AS-SETPTCL export: to AS1239 announce AS-SETPTCL admin-c: MH49-AP tech-c: AB242-AP mnt-by: MAINT-PK-ARSHAD mnt-routes: MAINT-PK-ARSHAD changed: [email protected] 20060805 source: APNIC
person: Mansoor ul Hassannic-hdl: MH49-APe-mail: [email protected]: 2nd Floor, International Gateway Exchange Building,address: PTCL Complex, 7th Road, Satellite Town Rawalpindiaddress: Pakistanphone: +92-51-4434470fax-no: +92-51-45-0647country: PKchanged: [email protected] 20060806mnt-by: MAINT-PK-ARSHADsource: APNIC
person: Arshad Buttnic-hdl: AB242-APe-mail: [email protected]: ITI Hall ,Telcom Complexaddress: S/Town Exchange,7th roadaddress: Rawalpindi.phone: +92-51-4455467fax-no: +92-51-4456747country: PKmnt-by: MAINT-PK-ARSHADchanged: [email protected] 20060805source: APNIC
Courtesy: Nick McKeown, StanfordUmar Kalim, NIIT
20
Who owns an address block?prompt> whois 216.35.221.77
OrgName: SavvisOrgID: SAVVI-2Address: 3300 Regency
ParkwayCity: CaryStateProv: NCPostalCode: 27511Country: US
ReferralServer: rwhois://rwhois.exodus.net:4321/
NetRange: 216.32.0.0 - 216.35.255.255
CIDR: 216.32.0.0/14NetName: SAVVISNetHandle: NET-216-32-0-0-1Parent: NET-216-0-0-0-0NetType: Direct AllocationNameServer: DNS01.SAVVIS.NETNameServer: DNS02.SAVVIS.NETNameServer: DNS03.SAVVIS.NETNameServer: DNS04.SAVVIS.NETComment:RegDate: 1998-07-30Updated: 2004-10-07
# ARIN WHOIS database, last updated 2005-01-17 19:10
# Enter ? for additional hints on searching ARIN's WHOIS database.
Courtesy: Nick McKeown, StanfordUmar Kalim, NIIT
21