Discussion 5
1
CS 168, Summer 2025 @ UC Berkeley
Slides credit: Sylvia Ratnasamy, Rob Shakir, Peyrin Kao, Iuniana Oprescu
BGP 📣
Logistics
Routing
Interdomain Routing
Export & Selection
Export & Selection
UC Berkeley
AT&T
Comcast
Stanford this way!
Stanford this way!
UCB and Facebook export their route to Stanford
They agree to carry AT&T’s traffic to Stanford
Export & Selection
UC Berkeley
AT&T
Comcast
Stanford this way!
AT&T selects route through UC Berkeley
AT&T might now send traffic to Stanford via UCB
Export & Selection
UC Berkeley
AT&T
Comcast
Stanford this way!
AT&T exports route to Google only
Agrees to carry Google’s traffic to Stanford, but not Comcast’s
Types of ASes (domains)
Tier 1 ASes
A
B
C
Business Relationship among ASes
Business Relationship Restrictions
BGP: The Big Picture
Three parts of Gateway Protocols
BGP Route Attributes
Route Selection in Priority Order
Priority | Rule | Remarks |
1 | LOCAL PREF | Pick highest LOCAL PREF |
2 | ASPATH | Pick shortest ASPATH length |
3 | IGP cost | Lowest IGP cost to next hop (egress router) |
4 | MED | Lowest MED preferred |
5 | Router ID | Smallest next-hop router’s IP address as tie-breaker
|
Priority Oscillation
Policy Oscillation
3
0
1
2
Each node prefers route through neighbor over direct route.
1 prefers reaching 0 through 2 or 3
2 prefers reaching 0 through 1 or 3
3 prefers reaching 0 through 1 or 2
Suppose initially each node only knows the shortest path to 0 (green arrow).
1 knows 1→0
2 knows 2→0
3 knows 3→0
Policy Oscillation 1
3
0
1
2
Each node prefers route through neighbor over direct route.
Suppose initially each node only knows the shortest path to 0 (green arrow).
1 knows 1→0
2 knows 2→0
3 knows 3→0
1 advertises 1→0 to 2
1 prefers reaching 0 through 2 or 3
2 prefers reaching 0 through 1 or 3
3 prefers reaching 0 through 1 or 2
Policy Oscillation 2
3
0
1
2
Each node prefers route through neighbor over direct route.
Suppose initially each node only knows the shortest path to 0 (green arrow).
1 knows 1→0
2 knows 2→0
3 knows 3→0
1 prefers reaching 0 through 2 or 3
2 prefers reaching 0 through 1 or 3
3 prefers reaching 0 through 1 or 2
3 advertises 3→0 to 1
Policy Oscillation 3
3
0
1
2
Each node prefers route through neighbor over direct route.
Suppose initially each node only knows the shortest path to 0 (green arrow).
1 knows 1→0
2 knows 2→0
3 knows 3→0
1 prefers reaching 0 through 2 or 3
2 prefers reaching 0 through 1 or 3
3 prefers reaching 0 through 1 or 2
1 withdraws its path of 1→0 from 2 (because 1 now takes 1->3->0)
Policy Oscillation 4
3
0
1
2
Each node prefers route through neighbor over direct route.
Suppose initially each node only knows the shortest path to 0 (green arrow).
1 knows 1→0
2 knows 2→0
3 knows 3→0
1 prefers reaching 0 through 2 or 3
2 prefers reaching 0 through 1 or 3
3 prefers reaching 0 through 1 or 2
2 now advertises 2→0 to 3 �(3 would take it as it favors its neighbor)
Policy Oscillation 5
3
0
1
2
Each node prefers route through neighbor over direct route.
Suppose initially each node only knows the shortest path to 0 (green arrow).
1 knows 1→0
2 knows 2→0
3 knows 3→0
1 prefers reaching 0 through 2 or 3
2 prefers reaching 0 through 1 or 3
3 prefers reaching 0 through 1 or 2
3 now withdraws 3→0 from 1
Policy Oscillation 6
3
0
1
2
Each node prefers route through neighbor over direct route.
Suppose initially each node only knows the shortest path to 0 (green arrow).
1 knows 1→0
2 knows 2→0
3 knows 3→0
1 prefers reaching 0 through 2 or 3
2 prefers reaching 0 through 1 or 3
3 prefers reaching 0 through 1 or 2
1 again advertises its path 1→0
Policy Oscillation 7
3
0
1
2
Each node prefers route through neighbor over direct route.
Suppose initially each node only knows the shortest path to 0 (green arrow).
1 knows 1→0
2 knows 2→0
3 knows 3→0
1 prefers reaching 0 through 2 or 3
2 prefers reaching 0 through 1 or 3
3 prefers reaching 0 through 1 or 2
Back to where we started! :(
2 withdraws its path 2→0 from 3
Why doesn’t this happen in reality?
Gao-Rexford Policy
Destination prefix advertised by… | Export route to… |
Customer | Everyone� (providers, peers, other customers) |
Peer | Customers |
Provider | Customers |
Routing Follows the Money
Traffic allowed
Traffic not allowed
Peers do not provide transit to other peers!
A
B
C
D
E
F
G
Gao-Rexford Policy Continued
peers
providers
customers
Gao-Rexford avoids Policy Oscillation
3
0
1
2
Destination prefix advertised by… | Export route to… |
Peer | Customers |
Worksheet
Question 1: True/False
Worksheet
Question 2: Interdomain vs Intradomain
Worksheet
Question 3: BGP
Question 3: BGP
Questions?
Feedback Form: https://tinyurl.com/cs168-su25-disc-feedback