The Border Gateway Protocol¶
Warning
This is an unpolished draft of the second edition of this ebook. If you find any error or have suggestions to improve the text, please create an issue via https://github.com/obonaventure/cnp3/issues?milestone=2
Multiple choice questions¶
The BGP decision process is the process that is used by a BGP router to select the best path among all the paths learned towards a given destination prefix. The table below represents all the BGP routes learned by a BGP router and their corresponding attributes. For simplicity, the nexthops are indicated as router names instead of IP addresses.
prefix
AS Path
local-pref
nexthop
2001:db8:1/48
AS1:AS4
100
R1
2001:db8:1/48
AS1:AS3:AS4
200
R2
2001:db8:1/48
AS1:AS4
100
R3
2001:db8:1/48
AS4
150
R4
2001:db8:2/48
AS1:AS4
100
R1
2001:db8:2/48
AS1:AS3:AS4
100
R2
2001:db8:2/48
AS1:AS4
100
R3
2001:db8:2/48
AS4
150
R4
2001:db8:0/47
AS1:AS4
200
R1
2001:db8:0/47
AS1:AS3:AS4
200
R2
2001:db8:0/47
AS1:AS4
100
R3
2001:db8:0/47
AS4
150
R4
2001:db8:0/48
AS1:AS4
100
R1
2001:db8:0/48
AS1:AS3:AS4
100
R2
2001:db8:0/48
AS1:AS4
150
R3
2001:db8:0/48
AS4
150
R4
The router will advertise a route towards 2001:db8:1/48 with the AS5:AS4 AS Path.
The router will advertise a route towards 2001:db8:0/47 with the AS5:AS4 AS Path.
- Consider the BGP routing table shown in the previous question and consider the forwarding of IP packets.
Among all the affirmations below, select all the correct ones.
Consider a router that belongs to AS8 and is connected to AS9. The BGP routes that it has received are the following ones. This router is connected to four different ASes : AS1 (on router R1), AS5 (on router R2), AS6 (on router R3) and AS4 (on router R4). We assume that the same local-pref is used for all routes received from a given peer.
prefix
AS Path
local-pref
nexthop
2001:db8:2/48
AS1:AS4
50
R1 (AS1)
2001:db8:2/48
AS5:AS3:AS4
100
R2 (AS5)
2001:db8:2/48
AS6:AS4
100
R3 (AS6)
2001:db8:2/48
AS4
100
R4 (AS4)
If a Withdraw message for prefix 2001:db8:2/48 is received from AS1, then a Withdraw message is sent for this prefix to AS8.
Consider now a router that belongs to AS8 and is connected to AS9. The BGP routes that it has received are the following ones. This router is connected to four different ASes : AS1 (on router R1), AS5 (on router R2), AS6 (on router R3) and AS4 (on router R4). We assume that the same local-pref is used for all routes received from a given peer.
prefix
AS Path
local-pref
nexthop
2001:db8:1/48
AS1:AS1:AS4
100
R1 (AS1)
2001:db8:1/48
AS5:AS3:AS4
200
R2 (AS5)
2001:db8:1/48
AS6:AS4
100
R3 (AS6)
2001:db8:1/48
AS4
150
R4 (AS4)
If the router receives an Update for prefix 2001:db8:1/48 from R2 with AS Path AS5:AS7:AS8:AS4, it sends a Withdraw for this prefix to AS9.
If the router receives an Update for prefix 2001:db8:1/48 from R1 with AS Path AS1:AS4, it sends an Update for this prefix with AS Path AS5:AS1:AS4 to AS9.
If the router receives an Update for prefix 2001:db8:1/48 from R3 with AS Path AS6:AS4, it sends an Update for this prefix with AS Path AS5:AS6:AS4 to AS9.
- In the small Internet shown below, AS4 announces one prefix : 2001:db8:4/48.
The BGP routing table of AS5 contains only one path towards prefix 2001:db8:4/48. It’s AS-Path is AS2:AS1:AS3:AS4.
The BGP routing table of AS5 contains two paths towards prefix 2001:db8:4/48 : AS2:AS1:AS3:AS4 and AS2:AS3:AS4. AS5 prefers and uses the path AS2:AS3:AS4.
The BGP routing table of AS2 contains only one path towards prefix 2001:db8:4/48 : AS1:AS3:AS4.
The BGP routing table of AS2 contains only one path towards prefix 2001:db8:4/48 : AS3:AS4.
Consider the same Internet as above, but now assume that AS2 has configured its import filters to attach a higher local-preference to the routes received from AS1. AS4 announces one prefix : 2001:db8:4/48.
The BGP routing table of AS5 contains only one path towards prefix 2001:db8:4/48. It’s AS-Path is AS2:AS3:AS4.
The BGP routing table of AS5 contains two paths towards prefix 2001:db8:4/48 : AS2:AS1:AS3:AS4 and AS2:AS3:AS4. AS5 prefers and uses the path AS2:AS3:AS4.
The BGP routing table of AS2 contains only one path towards prefix 2001:db8:4/48 : AS1:AS3:AS4.
The BGP routing table of AS2 contains only one path towards prefix 2001:db8:4/48 : AS3:AS4.
- A router belongs to AS5 and is connected to three different ASes :
- AS1 is its main provider
- AS2 is a shared cost peer
- AS3 is a customer
- All routes received from AS1 are tagged with a local-preference of 100
- All routes received from AS2 are tagged with a local-preference of 150
- All routes received from AS3 are tagged with a local-preference of 200
- All routes received from AS1 are tagged with a local-preference of 100
- All routes received from AS2 are tagged with a local-preference of 100
- All routes received from AS3 are tagged with a local-preference of 100
- All routes received from AS1 are tagged with a local-preference of 200
- All routes received from AS2 are tagged with a local-preference of 150
- All routes received from AS3 are tagged with a local-preference of 100
- All routes received from AS1 are tagged with a local-preference of 150
- All routes received from AS2 are tagged with a local-preference of 200
- All routes received from AS3 are tagged with a local-preference of 100