SlideShare a Scribd company logo
1 of 39
1
Policy-Based Path-Vector Routing
Reading: Sections 4.3.3
COS 461: Computer Networks
Spring 2007 (MW 1:30-2:50 in Friend 004)
Jennifer Rexford
Teaching Assistant: Ioannis Avramopoulos
http://www.cs.princeton.edu/courses/archive/spring07/cos461/
2
Goals of Today’s Lecture
• Challenges of interdomain routing
– Scale, privacy, and policy
– Limitations of link-state and distance-vector routing
• Path-vector routing
– Faster loop detection than distance-vector routing
– More flexibility than shortest-path routing
• Border Gateway Protocol (BGP)
– Incremental, prefix-based, path-vector protocol
– Programmable import and export policies
– Multi-step decision process for selecting “best” route
• Multiple routers within an AS
• BGP convergence delay
3
Interdomain Routing
• AS-level topology
–Destinations are IP prefixes (e.g., 12.0.0.0/8)
–Nodes are Autonomous Systems (ASes)
–Edges are links and business relationships
1
2
3
4
5
67
Client Web server
4
Challenges for Interdomain
Routing
• Scale
–Prefixes: 150,000-200,000, and growing
–ASes: 20,000+ visible ones, and growing
–AS paths and routers: at least in the millions…
• Privacy
–ASes don’t want to divulge internal topologies
–… or their business relationships with neighbors
• Policy
–No Internet-wide notion of a link cost metric
–Need control over where you send traffic
–… and who can send traffic through you
5
Shortest-Path Routing is
Restrictive
• All traffic must travel on shortest paths
• All nodes need common notion of link costs
• Incompatible with commercial relationships
Regional
ISP1
Regional
ISP2
Regional
ISP3
Cust1Cust3 Cust2
National
ISP1
National
ISP2
YES
NO
6
Link-State Routing is
Problematic
• Topology information is flooded
–High bandwidth and storage overhead
–Forces nodes to divulge sensitive information
• Entire path computed locally per node
–High processing overhead in a large network
• Minimizes some notion of total distance
–Works only if policy is shared and uniform
• Typically used only inside an AS
–E.g., OSPF and IS-IS
7
Distance Vector is on the Right
Track
• Advantages
–Hides details of the network topology
–Nodes determine only “next hop” toward the dest
• Disadvantages
–Minimizes some notion of total distance, which is
difficult in an interdomain setting
–Slow convergence due to the counting-to-infinity
problem (“bad news travels slowly”)
• Idea: extend the notion of a distance vector
–To make it easier to detect loops
8
Path-Vector Routing
• Extension of distance-vector routing
–Support flexible routing policies
–Avoid count-to-infinity problem
• Key idea: advertise the entire path
–Distance vector: send distance metric per dest d
–Path vector: send the entire path for each dest d
3
2 1
d
“d: path (2,1)” “d: path (1)”
data traffic data traffic
9
Faster Loop Detection
• Node can easily detect a loop
–Look for its own node identifier in the path
–E.g., node 1 sees itself in the path “3, 2, 1”
• Node can simply discard paths with loops
–E.g., node 1 simply discards the advertisement
3
2 1
“d: path (2,1)” “d: path (1)”
“d: path (3,2,1)”
10
Flexible Policies
• Each node can apply local policies
–Path selection: Which path to use?
–Path export: Which paths to advertise?
• Examples
–Node 2 may prefer the path “2, 3, 1” over “2, 1”
–Node 1 may not let node 3 hear the path “1, 2”
2 3
1
2 3
1
11
• Interdomain routing protocol for the Internet
–Prefix-based path-vector protocol
–Policy-based routing based on AS Paths
–Evolved during the past 17 years
• 1989 : BGP-1 [RFC 1105], replacement for EGP
• 1990 : BGP-2 [RFC 1163]
• 1991 : BGP-3 [RFC 1267]
• 1995 : BGP-4 [RFC 1771], support for CIDR
• 2006 : BGP-4 [RFC 4271], update
Border Gateway Protocol
12
BGP Operations
Establish session on
TCP port 179
Exchange all
active routes
Exchange incremental
updates
AS1
AS2
While connection
is ALIVE exchange
route UPDATE messages
BGP session
13
Incremental Protocol
• A node learns multiple paths to destination
–Stores all of the routes in a routing table
–Applies policy to select a single active route
–… and may advertise the route to its neighbors
• Incremental updates
–Announcement
 Upon selecting a new active route, add node id to path
 … and (optionally) advertise to each neighbor
–Withdrawal
 If the active route is no longer available
 … send a withdrawal message to the neighbors
14
BGP Route
• Destination prefix (e.g,. 128.112.0.0/16)
• Route attributes, including
– AS path (e.g., “7018 88”)
– Next-hop IP address (e.g., 12.127.0.121)
AS 88
Princeton
128.112.0.0/16
AS path = 88
Next Hop = 192.0.2.1
AS 7018
AT&T
AS 12654
RIPE NCC
RIS project
192.0.2.1
128.112.0.0/16
AS path = 7018 88
Next Hop = 12.127.0.121
12.127.0.121
15
ASPATH Attribute
AS7018
128.112.0.0/16
AS Path = 88
AS 1239
Sprint
AS 1755
Ebone
AT&T
AS 3549
Global Crossing
128.112.0.0/16
AS Path = 7018 88
128.112.0.0/16
AS Path = 3549 7018 88
AS 88
128.112.0.0/16
Princeton
Prefix Originated
AS 12654
RIPE NCC
RIS project
AS 1129
Global Access
128.112.0.0/16
AS Path = 7018 88
128.112.0.0/16
AS Path = 1239 7018 88
128.112.0.0/16
AS Path = 1129 1755 1239 7018 88
128.112.0.0/16
AS Path = 1755 1239 7018 88
16
BGP Path Selection
• Simplest case
–Shortest AS path
–Arbitrary tie break
• Example
–Three-hop AS path preferred
over a five-hop AS path
–AS 12654 prefers path
through Global Crossing
• But, BGP is not limited to
shortest-path routing
–Policy-based routing
AS 3549
Global Crossing
128.112.0.0/16
AS Path = 3549 7018 88
AS 12654
RIPE NCC
RIS project
AS 1129
Global Access
128.112.0.0/16
AS Path = 1129 1755 1239 7018 88
17
BGP Policy: Applying Policy to
Routes
• Import policy
–Filter unwanted routes from neighbor
 E.g. prefix that your customer doesn’t own
–Manipulate attributes to influence path selection
 E.g., assign local preference to favored routes
• Export policy
–Filter routes you don’t want to tell your neighbor
 E.g., don’t tell a peer a route learned from other peer
–Manipulate attributes to control what they see
 E.g., make a path look artificially longer than it is
18
BGP Policy: Influencing
Decisions
Best Route
Selection
Apply Import
Policies
Best Route
Table
Apply Export
Policies
Install forwarding
Entries for best
Routes.
Receive
BGP
Updates
Best
Routes
Transmit
BGP
Updates
Apply Policy =
filter routes &
tweak attributes
Based on
Attribute
Values
IP Forwarding Table
Apply Policy =
filter routes &
tweak attributes
Open ended programming.
Constrained only by vendor configuration language
19
Import Policy: Local Preference
• Favor one path over another
– Override the influence of AS path length
– Apply local policies to prefer a path
• Example: prefer customer over peer
AT&T Sprint
Yale
Tier-2
Tier-3
Local-pref = 100
Local-pref = 90
20
Import Policy: Filtering
• Discard some route announcements
– Detect configuration mistakes and attacks
• Examples on session to a customer
– Discard route if prefix not owned by the customer
– Discard route that contains other large ISP in AS path
AT&T
Princeton
USLEC
128.112.0.0/16
21
Export Policy: Filtering
• Discard some route announcements
– Limit propagation of routing information
• Examples
– Don’t announce routes from one peer to another
– Don’t announce routes for network-management hosts
AT&T
Princeton
Sprint
128.112.0.0/16
UUNET
network
operator
22
Export Policy: Attribute Manipulation
• Modify attributes of the active route
– To influence the way other ASes behave
• Example: AS prepending
– Artificially inflate the AS path length seen by others
– To convince some ASes to send traffic another way
AT&T
Princeton
USLEC
128.112.0.0/16
Sprint
88 88 88
23
BGP Policy Configuration
• Routing policy languages are vendor-specific
– Not part of the BGP protocol specification
– Different languages for Cisco, Juniper, etc.
• Still, all languages have some key features
– Policy as a list of clauses
– Each clause matches on route attributes
– … and either discards or modifies the matching routes
• Configuration done by human operators
– Implementing the policies of their AS
– Business relationships, traffic engineering, security, …
– http://www.cs.princeton.edu/~jrex/papers/policies.pdf
24
AS is Not a Single Node
• AS path length can be misleading
– An AS may have many router-level hops
AS 4
AS 3
AS 2
AS 1
BGP says that
path 4 1 is better
than path 3 2 1
25
An AS is Not a Single Node
• Multiple routers in an AS
–Need to distribute BGP information within the AS
–Internal BGP (iBGP) sessions between routers
AS1
AS2
eBGP
iBGP
26
Internal BGP and Local
Preference
• Example
– Both routers prefer the path through AS 100 on the left
– … even though the right router learns an external path
I-BGP
AS 256
AS 300
Local Pref = 100 Local Pref = 90
AS 100
AS 200
27
An AS is Not a Single Node
• Multiple connections to neighboring ASes
–Multiple border routers may learn good routes
–… with the same local-pref and AS path length
1
2
3
4
5
67
Multiple links
28
Hot-Potato (Early-Exit) Routing
• Hot-potato routing
– Each router selects the closest egress point
– … based on the path cost in intradomain protocol
• BGP decision process
– Highest local preference
– Shortest AS path
– Closest egress point
– Arbitrary tie break
hot potato
A
B
C
D
G
EF
4
5
3
9
3
4
108
8
A B
dst
29
Joining BGP and IGP
Information
• Border Gateway Protocol (BGP)
–Announces reachability to external destinations
–Maps a destination prefix to an egress point
 128.112.0.0/16 reached via 192.0.2.1
• Interior Gateway Protocol (IGP)
–Used to compute paths within the AS
–Maps an egress point to an outgoing link
 192.0.2.1 reached via 10.1.1.1
192.0.2.1
10.1.1.1
30
IGP
Joining BGP with IGP
Information
AS 7018 AS 88192.0.2.1
128.112.0.0/16
10.10.10.10
BGP
192.0.2.1128.112.0.0/16
destination next hop
10.10.10.10192.0.2.0/30
destination next hop
128.112.0.0/16
Next Hop = 192.0.2.1
+
Forwarding Table
128.112.0.0/16
destination next hop
10.10.10.10
192.0.2.0/30 10.10.10.10
31
Some Routers Don’t Need BGP
• Customer that connects to a single upstream ISP
– The ISP can introduce the prefixes into BGP
– … and the customer can simply default-route to the ISP
Qwest
Yale University
Nail up default routes 0.0.0.0/0
pointing to Qwest
Nail up routes 130.132.0.0/16
pointing to Yale
130.132.0.0/16
32
Some Routers Don’t Need BGP
• Routers inside a “stub” network
–Border router may speak BGP to upstream ISPs
–But, internal routers can simply “default route”
AT&T
Princeton University
128.112.0.0/16
AS 88
USLEC
BGP
33
Causes of BGP Routing Changes
• Topology changes
– Equipment going up or down
– Deployment of new routers or sessions
• BGP session failures
– Due to equipment failures, maintenance, etc.
– Or, due to congestion on the physical path
• Changes in routing policy
– Reconfiguration of preferences
– Reconfiguration of route filters
• Persistent protocol oscillation
– Conflicts between policies in different ASes
34
BGP Session Failure
• BGP runs over TCP
– BGP only sends updates
when changes occur
– TCP doesn’t detect lost
connectivity on its own
• Detecting a failure
– Keep-alive: 60 seconds
– Hold timer: 180 seconds
• Reacting to a failure
– Discard all routes learned
from the neighbor
– Send new updates for any
routes that change
AS1
AS2
35
Routing Change: Before and After
0
1 2
3
0
1 2
3
(1,0) (2,0)
(3,1,0)
(2,0)
(1,2,0)
(3,2,0)
36
Routing Change: Path Exploration
• AS 1
– Delete the route (1,0)
– Switch to next route (1,2,0)
– Send route (1,2,0) to AS 3
• AS 3
– Sees (1,2,0) replace (1,0)
– Compares to route (2,0)
– Switches to using AS 2
0
1 2
3
(2,0)
(1,2,0)
(3,2,0)
37
Routing Change: Path Exploration
• Initial situation
– Destination 0 is alive
– All ASes use direct path
• When destination dies
– All ASes lose direct path
– All switch to longer paths
– Eventually withdrawn
• E.g., AS 2
– (2,0)  (2,1,0)
– (2,1,0)  (2,3,0)
– (2,3,0)  (2,1,3,0)
– (2,1,3,0)  null
1 2
3
0
(1,0)
(1,2,0)
(1,3,0)
(2,0)
(2,1,0)
(2,3,0)
(2,1,3,0)
(3,0)
(3,1,0)
(3,2,0)
38
BGP Converges Slowly, if at All
• Path vector avoids count-to-infinity
– But, ASes still must explore many alternate paths
– … to find the highest-ranked path that is still available
• Fortunately, in practice
– Most popular destinations have very stable BGP routes
– And most instability lies in a few unpopular destinations
• Still, lower BGP convergence delay is a goal
– Can be tens of seconds to tens of minutes
– High for important interactive applications
– … or even conventional application, like Web browsing
39
Conclusions
• BGP is solving a hard problem
– Routing protocol operating at a global scale
– With tens of thousands of independent networks
– That each have their own policy goals
– And all want fast convergence
• Key features of BGP
– Prefix-based path-vector protocol
– Incremental updates (announcements and withdrawals)
– Policies applied at import and export of routes
– Internal BGP to distribute information within an AS
– Interaction with the IGP to compute forwarding tables

More Related Content

What's hot

Dynamic routing under_sec
Dynamic routing under_secDynamic routing under_sec
Dynamic routing under_sec
subhash85
 
2008118090324 hk
2008118090324 hk2008118090324 hk
2008118090324 hk
Vivek Singh
 
Routing table and routing algorithms
Routing table and routing algorithmsRouting table and routing algorithms
Routing table and routing algorithms
lavanyapathy
 

What's hot (20)

Routing Techniques
Routing TechniquesRouting Techniques
Routing Techniques
 
Default and On demand routing - Advance Computer Networks
Default and On demand routing - Advance Computer NetworksDefault and On demand routing - Advance Computer Networks
Default and On demand routing - Advance Computer Networks
 
DSDV VS AODV
DSDV VS AODV DSDV VS AODV
DSDV VS AODV
 
Routing ppt
Routing pptRouting ppt
Routing ppt
 
Pbroute
PbroutePbroute
Pbroute
 
Computer networks network layer,routing
Computer networks network layer,routingComputer networks network layer,routing
Computer networks network layer,routing
 
Dc ch11 : routing in switched networks
Dc ch11 : routing in switched networksDc ch11 : routing in switched networks
Dc ch11 : routing in switched networks
 
Dynamic routing under_sec
Dynamic routing under_secDynamic routing under_sec
Dynamic routing under_sec
 
Bridges
BridgesBridges
Bridges
 
Network Routing | Computer Science
Network Routing | Computer ScienceNetwork Routing | Computer Science
Network Routing | Computer Science
 
Routing basic
Routing basicRouting basic
Routing basic
 
Routing
RoutingRouting
Routing
 
Route static Configuration
Route static ConfigurationRoute static Configuration
Route static Configuration
 
Day 8 2 distance vector routing
Day 8 2 distance vector routingDay 8 2 distance vector routing
Day 8 2 distance vector routing
 
Routing simulator
Routing simulatorRouting simulator
Routing simulator
 
Distance vector and link state routing protocol
Distance vector and link state routing protocolDistance vector and link state routing protocol
Distance vector and link state routing protocol
 
2008118090324 hk
2008118090324 hk2008118090324 hk
2008118090324 hk
 
Presentation Routing algorithm
Presentation Routing algorithmPresentation Routing algorithm
Presentation Routing algorithm
 
Lte rrc-connection-setup-messaging
Lte rrc-connection-setup-messagingLte rrc-connection-setup-messaging
Lte rrc-connection-setup-messaging
 
Routing table and routing algorithms
Routing table and routing algorithmsRouting table and routing algorithms
Routing table and routing algorithms
 

Similar to 16 bgp

Computer network (14)
Computer network (14)Computer network (14)
Computer network (14)
NYversity
 
E rou01 routing_basics
E rou01 routing_basicsE rou01 routing_basics
E rou01 routing_basics
tanawan44
 
fdocuments.in_chapter-7-routing-protocols-for-ad-hoc-wireless-networks-7-rout...
fdocuments.in_chapter-7-routing-protocols-for-ad-hoc-wireless-networks-7-rout...fdocuments.in_chapter-7-routing-protocols-for-ad-hoc-wireless-networks-7-rout...
fdocuments.in_chapter-7-routing-protocols-for-ad-hoc-wireless-networks-7-rout...
MrSSaiKumar
 

Similar to 16 bgp (20)

15 coms 525 tcpip - border gateway protocols
15    coms 525 tcpip - border gateway protocols15    coms 525 tcpip - border gateway protocols
15 coms 525 tcpip - border gateway protocols
 
Wrou01
Wrou01Wrou01
Wrou01
 
Computer network (14)
Computer network (14)Computer network (14)
Computer network (14)
 
Lec7
Lec7Lec7
Lec7
 
Chapter07
Chapter07Chapter07
Chapter07
 
E rou01 routing_basics
E rou01 routing_basicsE rou01 routing_basics
E rou01 routing_basics
 
Brkrst 3123 previdi-final
Brkrst 3123 previdi-finalBrkrst 3123 previdi-final
Brkrst 3123 previdi-final
 
Routing algorithms mehodology materials doc1
Routing algorithms mehodology materials doc1Routing algorithms mehodology materials doc1
Routing algorithms mehodology materials doc1
 
Lecture number 5 Theory.pdf(machine learning)
Lecture  number  5 Theory.pdf(machine learning)Lecture  number  5 Theory.pdf(machine learning)
Lecture number 5 Theory.pdf(machine learning)
 
BGP.ppt
BGP.pptBGP.ppt
BGP.ppt
 
11 bgp-ethernet
11 bgp-ethernet11 bgp-ethernet
11 bgp-ethernet
 
Lecture 7
 Lecture 7 Lecture 7
Lecture 7
 
L22.ppt
L22.pptL22.ppt
L22.ppt
 
Module 3 Part B - computer networks module 2 ppt
Module 3 Part B - computer networks module 2 pptModule 3 Part B - computer networks module 2 ppt
Module 3 Part B - computer networks module 2 ppt
 
3 ip routing eigrp
3 ip routing eigrp3 ip routing eigrp
3 ip routing eigrp
 
fdocuments.in_chapter-7-routing-protocols-for-ad-hoc-wireless-networks-7-rout...
fdocuments.in_chapter-7-routing-protocols-for-ad-hoc-wireless-networks-7-rout...fdocuments.in_chapter-7-routing-protocols-for-ad-hoc-wireless-networks-7-rout...
fdocuments.in_chapter-7-routing-protocols-for-ad-hoc-wireless-networks-7-rout...
 
Tcil_Concept of Routing_n_protocols.pptx
Tcil_Concept of Routing_n_protocols.pptxTcil_Concept of Routing_n_protocols.pptx
Tcil_Concept of Routing_n_protocols.pptx
 
computer communications
computer communicationscomputer communications
computer communications
 
ROUTING PROTOCOLS new.pptx
ROUTING PROTOCOLS new.pptxROUTING PROTOCOLS new.pptx
ROUTING PROTOCOLS new.pptx
 
bgp(border gateway protocol)
bgp(border gateway protocol)bgp(border gateway protocol)
bgp(border gateway protocol)
 

More from TCT (8)

500 real-english-phrases
500 real-english-phrases500 real-english-phrases
500 real-english-phrases
 
Basic mgmt skills
Basic mgmt skillsBasic mgmt skills
Basic mgmt skills
 
Simple attacking plans
Simple attacking plansSimple attacking plans
Simple attacking plans
 
Basic chessrules
Basic chessrulesBasic chessrules
Basic chessrules
 
1.2 workflow and_process_redesign
1.2 workflow and_process_redesign1.2 workflow and_process_redesign
1.2 workflow and_process_redesign
 
208 dataflowdgm
208 dataflowdgm208 dataflowdgm
208 dataflowdgm
 
78513857405
7851385740578513857405
78513857405
 
Basic mgmt skills
Basic mgmt skillsBasic mgmt skills
Basic mgmt skills
 

Recently uploaded

Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
amitlee9823
 
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
drmarathore
 
CHEAP Call Girls in Mayapuri (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Mayapuri  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Mayapuri  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Mayapuri (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
ehyxf
 
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
wpkuukw
 
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
wpkuukw
 
CHEAP Call Girls in Ashok Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Ashok Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Ashok Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Ashok Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men 🔝Deoghar🔝 Escorts...
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men  🔝Deoghar🔝   Escorts...➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men  🔝Deoghar🔝   Escorts...
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men 🔝Deoghar🔝 Escorts...
amitlee9823
 
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
amitlee9823
 

Recently uploaded (20)

(ISHITA) Call Girls Service Aurangabad Call Now 8617697112 Aurangabad Escorts...
(ISHITA) Call Girls Service Aurangabad Call Now 8617697112 Aurangabad Escorts...(ISHITA) Call Girls Service Aurangabad Call Now 8617697112 Aurangabad Escorts...
(ISHITA) Call Girls Service Aurangabad Call Now 8617697112 Aurangabad Escorts...
 
Top Rated Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
 
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
 
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
 
CHEAP Call Girls in Mayapuri (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Mayapuri  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Mayapuri  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Mayapuri (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
 
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
 
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
 
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
 
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
 
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
 
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
 
CHEAP Call Girls in Ashok Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Ashok Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Ashok Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Ashok Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men 🔝Deoghar🔝 Escorts...
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men  🔝Deoghar🔝   Escorts...➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men  🔝Deoghar🔝   Escorts...
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men 🔝Deoghar🔝 Escorts...
 
SM-N975F esquematico completo - reparación.pdf
SM-N975F esquematico completo - reparación.pdfSM-N975F esquematico completo - reparación.pdf
SM-N975F esquematico completo - reparación.pdf
 
HLH PPT.ppt very important topic to discuss
HLH PPT.ppt very important topic to discussHLH PPT.ppt very important topic to discuss
HLH PPT.ppt very important topic to discuss
 
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 

16 bgp

  • 1. 1 Policy-Based Path-Vector Routing Reading: Sections 4.3.3 COS 461: Computer Networks Spring 2007 (MW 1:30-2:50 in Friend 004) Jennifer Rexford Teaching Assistant: Ioannis Avramopoulos http://www.cs.princeton.edu/courses/archive/spring07/cos461/
  • 2. 2 Goals of Today’s Lecture • Challenges of interdomain routing – Scale, privacy, and policy – Limitations of link-state and distance-vector routing • Path-vector routing – Faster loop detection than distance-vector routing – More flexibility than shortest-path routing • Border Gateway Protocol (BGP) – Incremental, prefix-based, path-vector protocol – Programmable import and export policies – Multi-step decision process for selecting “best” route • Multiple routers within an AS • BGP convergence delay
  • 3. 3 Interdomain Routing • AS-level topology –Destinations are IP prefixes (e.g., 12.0.0.0/8) –Nodes are Autonomous Systems (ASes) –Edges are links and business relationships 1 2 3 4 5 67 Client Web server
  • 4. 4 Challenges for Interdomain Routing • Scale –Prefixes: 150,000-200,000, and growing –ASes: 20,000+ visible ones, and growing –AS paths and routers: at least in the millions… • Privacy –ASes don’t want to divulge internal topologies –… or their business relationships with neighbors • Policy –No Internet-wide notion of a link cost metric –Need control over where you send traffic –… and who can send traffic through you
  • 5. 5 Shortest-Path Routing is Restrictive • All traffic must travel on shortest paths • All nodes need common notion of link costs • Incompatible with commercial relationships Regional ISP1 Regional ISP2 Regional ISP3 Cust1Cust3 Cust2 National ISP1 National ISP2 YES NO
  • 6. 6 Link-State Routing is Problematic • Topology information is flooded –High bandwidth and storage overhead –Forces nodes to divulge sensitive information • Entire path computed locally per node –High processing overhead in a large network • Minimizes some notion of total distance –Works only if policy is shared and uniform • Typically used only inside an AS –E.g., OSPF and IS-IS
  • 7. 7 Distance Vector is on the Right Track • Advantages –Hides details of the network topology –Nodes determine only “next hop” toward the dest • Disadvantages –Minimizes some notion of total distance, which is difficult in an interdomain setting –Slow convergence due to the counting-to-infinity problem (“bad news travels slowly”) • Idea: extend the notion of a distance vector –To make it easier to detect loops
  • 8. 8 Path-Vector Routing • Extension of distance-vector routing –Support flexible routing policies –Avoid count-to-infinity problem • Key idea: advertise the entire path –Distance vector: send distance metric per dest d –Path vector: send the entire path for each dest d 3 2 1 d “d: path (2,1)” “d: path (1)” data traffic data traffic
  • 9. 9 Faster Loop Detection • Node can easily detect a loop –Look for its own node identifier in the path –E.g., node 1 sees itself in the path “3, 2, 1” • Node can simply discard paths with loops –E.g., node 1 simply discards the advertisement 3 2 1 “d: path (2,1)” “d: path (1)” “d: path (3,2,1)”
  • 10. 10 Flexible Policies • Each node can apply local policies –Path selection: Which path to use? –Path export: Which paths to advertise? • Examples –Node 2 may prefer the path “2, 3, 1” over “2, 1” –Node 1 may not let node 3 hear the path “1, 2” 2 3 1 2 3 1
  • 11. 11 • Interdomain routing protocol for the Internet –Prefix-based path-vector protocol –Policy-based routing based on AS Paths –Evolved during the past 17 years • 1989 : BGP-1 [RFC 1105], replacement for EGP • 1990 : BGP-2 [RFC 1163] • 1991 : BGP-3 [RFC 1267] • 1995 : BGP-4 [RFC 1771], support for CIDR • 2006 : BGP-4 [RFC 4271], update Border Gateway Protocol
  • 12. 12 BGP Operations Establish session on TCP port 179 Exchange all active routes Exchange incremental updates AS1 AS2 While connection is ALIVE exchange route UPDATE messages BGP session
  • 13. 13 Incremental Protocol • A node learns multiple paths to destination –Stores all of the routes in a routing table –Applies policy to select a single active route –… and may advertise the route to its neighbors • Incremental updates –Announcement  Upon selecting a new active route, add node id to path  … and (optionally) advertise to each neighbor –Withdrawal  If the active route is no longer available  … send a withdrawal message to the neighbors
  • 14. 14 BGP Route • Destination prefix (e.g,. 128.112.0.0/16) • Route attributes, including – AS path (e.g., “7018 88”) – Next-hop IP address (e.g., 12.127.0.121) AS 88 Princeton 128.112.0.0/16 AS path = 88 Next Hop = 192.0.2.1 AS 7018 AT&T AS 12654 RIPE NCC RIS project 192.0.2.1 128.112.0.0/16 AS path = 7018 88 Next Hop = 12.127.0.121 12.127.0.121
  • 15. 15 ASPATH Attribute AS7018 128.112.0.0/16 AS Path = 88 AS 1239 Sprint AS 1755 Ebone AT&T AS 3549 Global Crossing 128.112.0.0/16 AS Path = 7018 88 128.112.0.0/16 AS Path = 3549 7018 88 AS 88 128.112.0.0/16 Princeton Prefix Originated AS 12654 RIPE NCC RIS project AS 1129 Global Access 128.112.0.0/16 AS Path = 7018 88 128.112.0.0/16 AS Path = 1239 7018 88 128.112.0.0/16 AS Path = 1129 1755 1239 7018 88 128.112.0.0/16 AS Path = 1755 1239 7018 88
  • 16. 16 BGP Path Selection • Simplest case –Shortest AS path –Arbitrary tie break • Example –Three-hop AS path preferred over a five-hop AS path –AS 12654 prefers path through Global Crossing • But, BGP is not limited to shortest-path routing –Policy-based routing AS 3549 Global Crossing 128.112.0.0/16 AS Path = 3549 7018 88 AS 12654 RIPE NCC RIS project AS 1129 Global Access 128.112.0.0/16 AS Path = 1129 1755 1239 7018 88
  • 17. 17 BGP Policy: Applying Policy to Routes • Import policy –Filter unwanted routes from neighbor  E.g. prefix that your customer doesn’t own –Manipulate attributes to influence path selection  E.g., assign local preference to favored routes • Export policy –Filter routes you don’t want to tell your neighbor  E.g., don’t tell a peer a route learned from other peer –Manipulate attributes to control what they see  E.g., make a path look artificially longer than it is
  • 18. 18 BGP Policy: Influencing Decisions Best Route Selection Apply Import Policies Best Route Table Apply Export Policies Install forwarding Entries for best Routes. Receive BGP Updates Best Routes Transmit BGP Updates Apply Policy = filter routes & tweak attributes Based on Attribute Values IP Forwarding Table Apply Policy = filter routes & tweak attributes Open ended programming. Constrained only by vendor configuration language
  • 19. 19 Import Policy: Local Preference • Favor one path over another – Override the influence of AS path length – Apply local policies to prefer a path • Example: prefer customer over peer AT&T Sprint Yale Tier-2 Tier-3 Local-pref = 100 Local-pref = 90
  • 20. 20 Import Policy: Filtering • Discard some route announcements – Detect configuration mistakes and attacks • Examples on session to a customer – Discard route if prefix not owned by the customer – Discard route that contains other large ISP in AS path AT&T Princeton USLEC 128.112.0.0/16
  • 21. 21 Export Policy: Filtering • Discard some route announcements – Limit propagation of routing information • Examples – Don’t announce routes from one peer to another – Don’t announce routes for network-management hosts AT&T Princeton Sprint 128.112.0.0/16 UUNET network operator
  • 22. 22 Export Policy: Attribute Manipulation • Modify attributes of the active route – To influence the way other ASes behave • Example: AS prepending – Artificially inflate the AS path length seen by others – To convince some ASes to send traffic another way AT&T Princeton USLEC 128.112.0.0/16 Sprint 88 88 88
  • 23. 23 BGP Policy Configuration • Routing policy languages are vendor-specific – Not part of the BGP protocol specification – Different languages for Cisco, Juniper, etc. • Still, all languages have some key features – Policy as a list of clauses – Each clause matches on route attributes – … and either discards or modifies the matching routes • Configuration done by human operators – Implementing the policies of their AS – Business relationships, traffic engineering, security, … – http://www.cs.princeton.edu/~jrex/papers/policies.pdf
  • 24. 24 AS is Not a Single Node • AS path length can be misleading – An AS may have many router-level hops AS 4 AS 3 AS 2 AS 1 BGP says that path 4 1 is better than path 3 2 1
  • 25. 25 An AS is Not a Single Node • Multiple routers in an AS –Need to distribute BGP information within the AS –Internal BGP (iBGP) sessions between routers AS1 AS2 eBGP iBGP
  • 26. 26 Internal BGP and Local Preference • Example – Both routers prefer the path through AS 100 on the left – … even though the right router learns an external path I-BGP AS 256 AS 300 Local Pref = 100 Local Pref = 90 AS 100 AS 200
  • 27. 27 An AS is Not a Single Node • Multiple connections to neighboring ASes –Multiple border routers may learn good routes –… with the same local-pref and AS path length 1 2 3 4 5 67 Multiple links
  • 28. 28 Hot-Potato (Early-Exit) Routing • Hot-potato routing – Each router selects the closest egress point – … based on the path cost in intradomain protocol • BGP decision process – Highest local preference – Shortest AS path – Closest egress point – Arbitrary tie break hot potato A B C D G EF 4 5 3 9 3 4 108 8 A B dst
  • 29. 29 Joining BGP and IGP Information • Border Gateway Protocol (BGP) –Announces reachability to external destinations –Maps a destination prefix to an egress point  128.112.0.0/16 reached via 192.0.2.1 • Interior Gateway Protocol (IGP) –Used to compute paths within the AS –Maps an egress point to an outgoing link  192.0.2.1 reached via 10.1.1.1 192.0.2.1 10.1.1.1
  • 30. 30 IGP Joining BGP with IGP Information AS 7018 AS 88192.0.2.1 128.112.0.0/16 10.10.10.10 BGP 192.0.2.1128.112.0.0/16 destination next hop 10.10.10.10192.0.2.0/30 destination next hop 128.112.0.0/16 Next Hop = 192.0.2.1 + Forwarding Table 128.112.0.0/16 destination next hop 10.10.10.10 192.0.2.0/30 10.10.10.10
  • 31. 31 Some Routers Don’t Need BGP • Customer that connects to a single upstream ISP – The ISP can introduce the prefixes into BGP – … and the customer can simply default-route to the ISP Qwest Yale University Nail up default routes 0.0.0.0/0 pointing to Qwest Nail up routes 130.132.0.0/16 pointing to Yale 130.132.0.0/16
  • 32. 32 Some Routers Don’t Need BGP • Routers inside a “stub” network –Border router may speak BGP to upstream ISPs –But, internal routers can simply “default route” AT&T Princeton University 128.112.0.0/16 AS 88 USLEC BGP
  • 33. 33 Causes of BGP Routing Changes • Topology changes – Equipment going up or down – Deployment of new routers or sessions • BGP session failures – Due to equipment failures, maintenance, etc. – Or, due to congestion on the physical path • Changes in routing policy – Reconfiguration of preferences – Reconfiguration of route filters • Persistent protocol oscillation – Conflicts between policies in different ASes
  • 34. 34 BGP Session Failure • BGP runs over TCP – BGP only sends updates when changes occur – TCP doesn’t detect lost connectivity on its own • Detecting a failure – Keep-alive: 60 seconds – Hold timer: 180 seconds • Reacting to a failure – Discard all routes learned from the neighbor – Send new updates for any routes that change AS1 AS2
  • 35. 35 Routing Change: Before and After 0 1 2 3 0 1 2 3 (1,0) (2,0) (3,1,0) (2,0) (1,2,0) (3,2,0)
  • 36. 36 Routing Change: Path Exploration • AS 1 – Delete the route (1,0) – Switch to next route (1,2,0) – Send route (1,2,0) to AS 3 • AS 3 – Sees (1,2,0) replace (1,0) – Compares to route (2,0) – Switches to using AS 2 0 1 2 3 (2,0) (1,2,0) (3,2,0)
  • 37. 37 Routing Change: Path Exploration • Initial situation – Destination 0 is alive – All ASes use direct path • When destination dies – All ASes lose direct path – All switch to longer paths – Eventually withdrawn • E.g., AS 2 – (2,0)  (2,1,0) – (2,1,0)  (2,3,0) – (2,3,0)  (2,1,3,0) – (2,1,3,0)  null 1 2 3 0 (1,0) (1,2,0) (1,3,0) (2,0) (2,1,0) (2,3,0) (2,1,3,0) (3,0) (3,1,0) (3,2,0)
  • 38. 38 BGP Converges Slowly, if at All • Path vector avoids count-to-infinity – But, ASes still must explore many alternate paths – … to find the highest-ranked path that is still available • Fortunately, in practice – Most popular destinations have very stable BGP routes – And most instability lies in a few unpopular destinations • Still, lower BGP convergence delay is a goal – Can be tens of seconds to tens of minutes – High for important interactive applications – … or even conventional application, like Web browsing
  • 39. 39 Conclusions • BGP is solving a hard problem – Routing protocol operating at a global scale – With tens of thousands of independent networks – That each have their own policy goals – And all want fast convergence • Key features of BGP – Prefix-based path-vector protocol – Incremental updates (announcements and withdrawals) – Policies applied at import and export of routes – Internal BGP to distribute information within an AS – Interaction with the IGP to compute forwarding tables

Editor's Notes

  1. <number>
  2. <number>
  3. <number>
  4. <number>
  5. <number>
  6. <number>