Interdomain Routing and The Border Gateway Protocol (BGP) - PowerPoint PPT Presentation

About This Presentation
Title:

Interdomain Routing and The Border Gateway Protocol (BGP)

Description:

Set Local Pref = 50. for all routes from AS 1. 36. Multihomed Backups (Outbound Traffic) ... pref is 100, peer local pref is 90. What the heck is going on? ... – PowerPoint PPT presentation

Number of Views:58
Avg rating:3.0/5.0
Slides: 42
Provided by: Grif181
Category:

less

Transcript and Presenter's Notes

Title: Interdomain Routing and The Border Gateway Protocol (BGP)


1
Interdomain Routing and The Border Gateway
Protocol (BGP)
  • Courtesy of Timothy G. Griffin
  • Intel Research,
  • Cambridge UK
  • tim.griffin_at_intel.com

2
How do you connect to the Internet?
Physical connectivity is just the beginning of
the story.
3
Partial View of www.cl.cam.ac.uk (128.232.0.20)
Neighborhood
AS 20757 Hanse
AS 5089 NTL Group
AS 3356 Level 3
AS 1239 Sprint
AS 6461 AboveNet
AS 3257 Tiscali
AS 702 UUNET
AS 13127 Versatel
AS 4637 REACH
AS 20965 GEANT
AS 786 ja.net (UKERNA)
AS 5459 LINX
AS 1213 HEAnet (Irish academic and
research)
Originates gt 180 prefixes, Including
128.232.0.0/16
AS 4373 Online Computer Library
Center
AS 7 UK Defense Research Agency
4
Architecture of Dynamic Routing
IGP
EGP ( BGP)
AS 1
IGP
IGP Interior Gateway Protocol
Metric based OSPF, IS-IS, RIP,
EIGRP (cisco)
AS 2
EGP Exterior Gateway Protocol
Policy based BGP
The Routing Domain of BGP is the entire Internet
5
Technology of Distributed Routing
Link State
Vectoring
  • Topology information is flooded within the
    routing domain
  • Best end-to-end paths are computed locally at
    each router.
  • Best end-to-end paths determine next-hops.
  • Based on minimizing some notion of distance
  • Works only if policy is shared and uniform
  • Examples OSPF, IS-IS
  • Each router knows little about network topology
  • Only best next-hops are chosen by each router for
    each destination network.
  • Best end-to-end paths result from composition of
    all next-hop choices
  • Does not require any notion of distance
  • Does not require uniform policies at all routers
  • Examples RIP, BGP

6
The Gang of Four
7
AS Numbers (ASNs)
ASNs are 16 bit values.
64512 through 65535 are private
  • Genuity 1
  • MIT 3
  • JANET 786
  • UC San Diego 7377
  • ATT 7018, 6341, 5074,
  • UUNET 701, 702, 284, 12199,
  • Sprint 1239, 1240, 6211, 6242,

ASNs represent units of routing policy
8
BGP Routing Tables
show ip bgp BGP table version is 111849680, local
router ID is 203.62.248.4 Status codes s
suppressed, d damped, h history, valid, gt best,
i - internal Origin codes i - IGP, e - EGP, ? -
incomplete Network Next Hop
Metric LocPrf Weight Path . . . gti192.35.25.0
134.159.0.1 50 0
16779 1 701 703 i gti192.35.29.0
166.49.251.25 50 0 5727
7018 14541 i gti192.35.35.0 134.159.0.1
50 0 16779 1 701 1744
i gti192.35.37.0 134.159.0.1
50 0 16779 1 3561 i gti192.35.39.0
134.159.0.3 50 0 16779 1
701 80 i gti192.35.44.0 166.49.251.25
50 0 5727 7018 1785
i gti192.35.48.0 203.62.248.34
55 0 16779 209 7843 225 225 225 225 225
i gti192.35.49.0 203.62.248.34
55 0 16779 209 7843 225 225 225 225 225
i gti192.35.50.0 203.62.248.34
55 0 16779 3549 714 714 714
i gti192.35.51.0/25 203.62.248.34
55 0 16779 3549 14744 14744 14744 14744
14744 14744 14744 14744 i . . .
Thanks to Geoff Huston. http//www.telstra.net/ops
on July 6, 2001
  • Use whois queries to associate an ASN with
    owner (for example, http//www.arin.net/whois/ar
    inwhois.html)
  • 7018 ATT Worldnet, 701 Uunet, 3561 Cable
    Wireless,

9
AS Graphs Can Be Fun
The subgraph showing all ASes that have more than
100 neighbors in full graph of 11,158 nodes. July
6, 2001. Point of view ATT route-server
10
AS Graphs Do Not Show Topology!
BGP was designed to throw away information!
11
How Many ASNs are there today?
15,981
Thanks to Geoff Huston. http//bgp.potaroo.net on
October 24, 2003
12
How Many ASNs are there today?
18,217
Thanks to Geoff Huston. http//bgp.potaroo.net on
October 26, 2004
13
How many prefixes today?
Note numbers actually depends point of view
Thanks to Geoff Huston. http//bgp.potaroo.net on
October 24, 2003
14
How many prefixes today?
Note numbers actually depends point of view
Thanks to Geoff Huston. http//bgp.potaroo.net on
October 26, 2004
15
BGP-4
  • BGP Border Gateway Protocol
  • Is a Policy-Based routing protocol
  • Is the de facto EGP of todays global Internet
  • Relatively simple protocol, but configuration is
    complex and the entire world can see, and be
    impacted by, your mistakes.

16
BGP Operations (Simplified)
Establish session on TCP port 179
AS1
BGP session
Exchange all active routes
AS2
While connection is ALIVE exchange route UPDATE
messages
Exchange incremental updates
17
Four Types of BGP Messages
  • Open Establish a peering session.
  • Keep Alive Handshake at regular intervals.
  • Notification Shuts down a peering session.
  • Update Announcing new routes or withdrawing
    previously announced routes.

announcement
prefix attributes values
18
Attributes are Used to Select Best Routes
192.0.2.0/24 pick me!
192.0.2.0/24 pick me!
192.0.2.0/24 pick me!
Given multiple routes to the same prefix, a BGP
speaker must pick at most one best route (Note
it could reject them all!)
192.0.2.0/24 pick me!
19
ASPATH Attribute
AS 1129
135.207.0.0/16 AS Path 1755 1239 7018 6341
Global Access
AS 1755
135.207.0.0/16 AS Path 1239 7018 6341
135.207.0.0/16 AS Path 1129 1755 1239 7018 6341
Ebone
AS 12654
RIPE NCC RIS project
135.207.0.0/16 AS Path 7018 6341
AS7018
135.207.0.0/16 AS Path 3549 7018 6341
135.207.0.0/16 AS Path 6341
ATT
AS 3549
AS 6341
135.207.0.0/16 AS Path 7018 6341
Global Crossing
ATT Research
135.207.0.0/16
Prefix Originated
20
Policy-Based vs. Distance-Based Routing?
Host 1
Cust1
Minimizing hop count can violate commercial
relationships that constrain inter- domain
routing.
ISP1
ISP3
Host 2
ISP2
Cust3
Cust2
21
Why not minimize AS hop count?
National ISP1
National ISP2
Regional ISP3
Regional ISP1
Regional ISP2
Cust1
Cust3
Cust2
Shortest path routing is not compatible with
commercial relations
22
Customers and Providers
provider
customer
Customer pays provider for access to the Internet
23
The Peering Relationship
Peers provide transit between their respective
customers Peers do not provide transit between
peers Peers (often) do not exchange
traffic allowed
traffic NOT allowed
24
Peering Provides Shortcuts
Peering also allows connectivity between the
customers of Tier 1 providers.
25
Peering Wars
Peer
Dont Peer
  • Reduces upstream transit costs
  • Can increase end-to-end performance
  • May be the only way to connect your customers to
    some part of the Internet (Tier 1)
  • You would rather have customers
  • Peers are usually your competition
  • Peering relationships may require periodic
    renegotiation

Peering struggles are by far the most
contentious issues in the ISP world! Peering
agreements are often confidential.
26
Implementing Customer/Provider and Peer/Peer
relationships
Two parts
  • Enforce transit relationships
  • Outbound route filtering
  • Enforce order of route preference
  • provider lt peer lt customer

27
Import Routes
From provider
From provider
From peer
From peer
From customer
From customer
28
Export Routes
provider route
customer route
peer route
ISP route
To provider
From provider
To peer
To peer
To customer
To customer
29
The Border Gateway Protocol (BGP)
BGP
RFC 1771

optional extensions RFC 1997 (communities) RFC
2439 (damping) RFC 2796 (reflection) RFC3065
(confederation)

routing policy configuration languages
(vendor-specific)

Current Best Practices in management of
Interdomain Routing
BGP was not DESIGNED. It EVOLVED.
30
BGP Route Processing
Open ended programming. Constrain
ed only by vendor configuration language
Apply Policy filter routes tweak attributes
Apply Policy filter routes tweak attributes
Receive BGP Updates
Best Routes
Transmit BGP Updates
Based on Attribute Values
Best Route Selection
Apply Import Policies
Best Route Table
Apply Export Policies
Install forwarding Entries for best Routes.
IP Forwarding Table
31
Shorter Doesnt Always Mean Shorter
Mr. BGP says that path 4 1 is better
than path 3 2 1
In fairness could you do this right and
still scale? Exporting internal state would
dramatically increase global instability and
amount of routing state
Duh!
AS 4
AS 3
AS 2
AS 1
32
Routing Example 1
33
Routing Example 2
34
Tweak Tweak Tweak (TE)
  • For inbound traffic
  • Filter outbound routes
  • Tweak attributes on outbound routes in the hope
    of influencing your neighbors best route
    selection
  • For outbound traffic
  • Filter inbound routes
  • Tweak attributes on inbound routes to influence
    best route selection

outbound routes
inbound traffic
inbound routes
outbound traffic
In general, an AS has more control over outbound
traffic
35
Implementing Backup Links with Local Preference
(Outbound Traffic)
AS 1
primary link
backup link
Set Local Pref 100 for all routes from AS 1
Set Local Pref 50 for all routes from AS 1
AS 65000
Forces outbound traffic to take primary link,
unless link is down.
36
Multihomed Backups (Outbound Traffic)
AS 1
AS 3
provider
provider
primary link
backup link
Set Local Pref 100 for all routes from AS 1
Set Local Pref 50 for all routes from AS 3
AS 2
Forces outbound traffic to take primary link,
unless link is down.
37
Shedding Inbound Traffic with ASPATH Prepending
Prepending will (usually) force inbound traffic
from AS 1 to take primary link
AS 1
provider
192.0.2.0/24 ASPATH 2 2 2
192.0.2.0/24 ASPATH 2
backup
primary
customer
Yes, this is a Glorious Hack
192.0.2.0/24
AS 2
38
But Padding Does Not Always Work
AS 1
AS 3
provider
provider
192.0.2.0/24 ASPATH 2 2 2 2 2 2 2 2 2 2 2 2 2 2
192.0.2.0/24 ASPATH 2
AS 3 will send traffic on backup link because
it prefers customer routes and local preference
is considered before ASPATH length! Padding in
this way is often used as a form of load balancing
backup
primary
customer
192.0.2.0/24
AS 2
39
COMMUNITY Attribute to the Rescue!
AS 3 normal customer local pref is 100, peer
local pref is 90
AS 1
AS 3
provider
provider
192.0.2.0/24 ASPATH 2 COMMUNITY 370
192.0.2.0/24 ASPATH 2
backup
primary
Customer import policy at AS 3 If 390 in
COMMUNITY then set local preference to 90 If
380 in COMMUNITY then set local preference
to 80 If 370 in COMMUNITY then set local
preference to 70
customer
192.0.2.0/24
AS 2
40
What the heck is going on?
  • There is no guarantee that a BGP configuration
    has a unique routing solution.
  • When multiple solutions exist, the
    (unpredictable) order of updates will determine
    which one is wins.
  • There is no guarantee that a BGP configuration
    has any solution!
  • And checking configurations NP-Complete GW1999
  • Complex policies (weights, communities setting
    preferences, and so on) increase chances of
    routing anomalies.
  • yet this is the current trend!

41
Larry Speaks
Is this any way to run an Internet?
http//www.larrysface.com/
Write a Comment
User Comments (0)
About PowerShow.com