The de Facto Inter-Domain Routing Protocol BGP Provides Each AS A Means To
The de Facto Inter-Domain Routing Protocol BGP Provides Each AS A Means To
3c
BGP
3a message
3b
AS3 2c other
1c 2a networks
other 1a 2b
networks 1b AS2
AS1 1d
Network Layer4-2
BGP basics: distributing path information
❖ using eBGP session between 3a and 1c, AS3 sends prefix
reachability info to AS1.
▪ 1c can then use iBGP do distribute new prefix info to all routers in
AS1 including gateway router 1b
▪ 1b can then re-advertise new reachability (AS3’s) info to AS2 over
1b-to-2a eBGP session
❖ when router learns of new prefix, it creates entry for
prefix in its forwarding table.
eBGP session
3a iBGP session
3b
AS3 2c other
1c 2a networks
other 1a 2b
networks 1b AS2
AS1 1d
Network Layer4-3
Path attributes and BGP routes
❖ advertised prefix includes BGP attributes
▪ prefix + attributes = “route”
❖ two important attributes:
▪ AS-PATH: contains ASs through which prefix
advertisement has passed: e.g., AS 67, AS 17
▪ NEXT-HOP: indicates specific internal-AS router
to next-hop AS. (may be multiple links from
current AS to next-hop-AS)
❖ gateway router receiving route advertisement
uses import policy to accept/decline
▪ e.g., never route through AS x
▪ policy-based routing Network Layer4-4
BGP route selection
❖ router may learn about more than 1 route
to destination AS, selects route based on:
1. local preference value attribute: policy
decision
2. shortest AS-PATH
3. closest NEXT-HOP router: hot potato
routing
4. additional criteria
Network Layer4-5
BGP routing policy
legend: provider
B networ
X k
W A
customer
C network
:
Y
Network Layer4-6
How does entry get in forwarding table?
Summary
1. Router becomes aware of prefix
▪ via BGP route advertisements from other
routers
2. Determine router output port for prefix
▪ Use BGP route selection to find best inter-AS
route
▪ Use OSPF (typically) to find best intra-AS
route leading to best inter-AS route
▪ Router identifies router port for that best
route
3. Enter prefix-port entry in forwarding table
BGP messages
❖ BGP messages exchanged between peers over TCP
connection
❖ BGP 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 Layer4-8