Computer Networking : Principles, Protocols and Practice

The Border Gateway Protocol

«  Multiple choice questions   ::   Contents   ::   Ethernet networks  »

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

  1. 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

Assuming that the router above belongs to AS5, select all the routes that it will advertise to an hypothetical router that belongs to AS9.
The router will advertise a route towards 2001:db8:1/48 with the AS5:AS1:AS3:AS4 AS Path.
The router will advertise a route towards 2001:db8:2/48 with the AS5:AS4 AS Path.
The router will advertise a route towards 2001:db8:0/47 with the AS5:AS1:AS4 AS Path.
The router will advertise a route towards 2001:db8:0/48 with the AS5:AS4 AS Path.

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.

The router will advertise a route towards 2001:db8:0/48 with the AS5:AS1:AS4 AS Path. .. comment:: In the BGP Decision process, a route with a shorter AS Path is always preferred over a route with a longer AS Path.
  1. 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.
The router will forward a packet whose destination is 2001:db8:1::1 via R2
The router will forward a packet whose destination is 2001:db8:0::1 via R4
The router will forward a packet whose destination is 2001:db8:2::1 via R4
The router will forward a packet whose destination is 2001:db8:1::1 via R1
The router will forward a packet whose destination is 2001:db8:0::1 via R1
The router will forward a packet whose destination is 2001:db8:2::1 via R1
The router will forward a packet whose destination is 2001:db8:1::1 via R3
The router will forward a packet whose destination is 2001:db8:0::1 via R3
The router will forward a packet whose destination is 2001:db8:2::1 via R3
The router will forward a packet whose destination is 2001:db8:1::1 via R4
The router will forward a packet whose destination is 2001:db8:0::1 via R2
  1. 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)

Select in the list below all the correct affirmations about the reaction of this router to the reception of a BGP message from one of its peers. We assume that AS9 is a client of AS8 and thus it receives all the routes learned by AS9.
If a Withdraw message for prefix 2001:db8:2/48 is received from AS1, then no message is sent to AS8.
If a Withdraw message for prefix 2001:db8:2/48 is received from AS5, then no message is sent to AS8.
If a Withdraw message for prefix 2001:db8:2/48 is received from AS6, then no message is sent to AS8.

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.

If a Withdraw message for prefix 2001:db8:2/48 is received from AS4, then the router will send an Update message for prefix 2001:db8:2/48 with AS8:AS6:AS4 as AS Path.
  1. 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)

Consider the routes that this router advertises to AS9. Assuming that there are no routing policies (i.e. the router advertises all its best routes), select all the correct affirmations about the reaction of the router to the reception of BGP messages from one of its peers.
If the router receives a Withdraw for prefix 2001:db8:1/48 from R1, it does not send any BGP message to AS9.
If the router receives a Withdraw for prefix 2001:db8:1/48 from R3, it does not send any BGP message to AS9.
If the router receives a Withdraw for prefix 2001:db8:1/48 from R4, it does not send any BGP message to AS9.
If the router receives a Withdraw for prefix 2001:db8:1/48 from R2, it sends an Update to AS9 that advertises this prefix via the AS6:AS4 path.
If the router receives an Update for prefix 2001:db8:1/48 from R2 with AS Path AS5:AS7:AS8:AS4, it sends an Update for this prefix with AS Path AS8:AS5:AS7:AS8: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.

  1. In the small Internet shown below, AS4 announces one prefix : 2001:db8:4/48.

[align=center,node distance=3cm]
\tikzstyle{arrow} = [thick,->,>=stealth]
\tikzset{router/.style = {rectangle, draw, text centered, minimum height=2em}, }
\tikzset{host/.style = {circle, draw, text centered, minimum height=2em}, }
\tikzset{ftable/.style={rectangle, dashed, draw} }
\tikzset{as/.style={cloud, draw,cloud puffs=10,cloud puff arc=120, aspect=2, minimum height=2em, minimum width=2em} }
\node[as] (AS1) {AS1};
\node[as, right of=AS1] (AS2) {AS2};
\node[as, right of=AS2] (AS5) {AS5};
\node[as, below of=AS1] (AS3) {AS3};
\node[as, right of=AS3] (AS4) {AS4};
 \path[draw,thick]
 (AS1) edge (AS2)
 (AS1) edge (AS3)
 (AS3) edge (AS2)
 (AS3) edge (AS4)
 (AS2) edge (AS5);

Assuming that all the links are up and the network has converged, select all the correct affirmations about the state of the BGP routing tables. Assume that there are no routing policies in this Internet.
The BGP routing table of AS3 contains only one path towards prefix 2001:db8:4/48. It’s AS-Path is AS4.
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 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 two paths towards prefix 2001:db8:4/48 : AS1:AS3:AS4 and AS3:AS4. AS2 prefers and uses the path 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.

  1. 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.

    [align=center,node distance=3cm]
\tikzstyle{arrow} = [thick,->,>=stealth]
\tikzset{router/.style = {rectangle, draw, text centered, minimum height=2em}, }
\tikzset{host/.style = {circle, draw, text centered, minimum height=2em}, }
\tikzset{ftable/.style={rectangle, dashed, draw} }
\tikzset{as/.style={cloud, draw,cloud puffs=10,cloud puff arc=120, aspect=2, minimum height=2em, minimum width=2em} }
\node[as] (AS1) {AS1};
\node[as, right of=AS1] (AS2) {AS2};
\node[as, right of=AS2] (AS5) {AS5};
\node[as, below of=AS1] (AS3) {AS3};
\node[as, right of=AS3] (AS4) {AS4};
 \path[draw,thick]
 (AS1) edge (AS2)
 (AS1) edge (AS3)
 (AS3) edge (AS2)
 (AS3) edge (AS4)
 (AS2) edge (AS5);

Assuming that all the links are up and the network has converged, select all the correct affirmations about the state of the BGP routing tables. Assume that there are no routing policies in this Internet.
The BGP routing table of AS3 contains only one path towards prefix 2001:db8:4/48. It’s AS-Path is AS4.
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 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 two paths towards prefix 2001:db8:4/48 : AS1:AS3:AS4 and AS3:AS4. AS2 prefers and uses the path AS1: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.

  1. 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
Which of the configurations below is a correct setting for the local-preference ?
  • 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

Verify your answers

«  Multiple choice questions   ::   Contents   ::   Ethernet networks  »