BGP in depth lab 2 of 14

Best-path selection attribute by attribute

Kestrel Fibre's change board wants every routing change predicted in writing before it goes in. Work down the BGP decision process one rung at a time, with a separate test prefix for each rung, and finish with one table that shows weight, local preference, AS-path length, origin, MED, eBGP over iBGP, IGP metric and router ID each deciding a real path.

Run this lab

It needs Lite: its 6 nodes are set to 6 vCPU and 3,072 MB in total. That fits the free demo too.

In your workspace: Shared, then BGP in depth guided labs, then 02 - Best-path selection attribute by attribute

Try it free for 30 minutesRun it on Lite from £3 a day

The free demo needs no card and no email. Every lab plan includes every guided lab.

Level
Intermediate
Time
About 90 minutes
Nodes need
6 vCPU, 3,072 MB
Smallest plan
Lite

The scenario

You've joined the network team at Kestrel Fibre, a small UK ISP. Last month somebody added a route map to fix one customer's traffic and moved half the company's traffic to the expensive transit link. The change board has a new rule: every routing change is predicted in writing first, then proved.

To practise, you've been given a copy of the edge. Kestrel (AS 64500) has two exits, R2 to AS 64501 and R3 to AS 64502. Both reach AS 64503, which owns six test prefixes. Each prefix is used for one rung of the decision process, so at the end one router shows you every rung at once.

NamePrefixUsed forWatch on
P1198.51.100.0/27WeightR2
P2198.51.100.32/27Local preferenceR2
P3198.51.100.64/27AS-path lengthR2
P4198.51.100.96/27OriginR2
P5198.51.100.128/27MEDR2
P6198.51.100.160/27eBGP over iBGP, then IGP metricR2, then R1
Customer block203.0.113.0/24Oldest path and router IDR6
DeviceInterfaceAddressConnects to
R1Loopback010.255.0.1/32
R1Loopback1203.0.113.1/24
R1Gi0/010.0.12.1/30R2 Gi0/0
R1Gi0/110.0.13.1/30R3 Gi0/0
R2Loopback010.255.0.2/32
R2Gi0/010.0.12.2/30R1 Gi0/0
R2Gi0/110.0.23.1/30R3 Gi0/1
R2Gi0/2172.16.24.1/30R4 Gi0/0
R3Loopback010.255.0.3/32
R3Gi0/010.0.13.2/30R1 Gi0/1
R3Gi0/110.0.23.2/30R2 Gi0/1
R3Gi0/2172.16.35.1/30R5 Gi0/0
R4Loopback010.255.0.4/32
R4Gi0/0172.16.24.2/30R2 Gi0/2
R4Gi0/1172.16.46.1/30R6 Gi0/0
R5Loopback010.255.0.5/32
R5Gi0/0172.16.35.2/30R3 Gi0/2
R5Gi0/1172.16.56.1/30R6 Gi0/1
R6Loopback010.255.0.6/32
R6Loopback11198.51.100.1/27
R6Loopback12198.51.100.33/27
R6Loopback13198.51.100.65/27
R6Loopback14198.51.100.97/27
R6Loopback15198.51.100.129/27
R6Loopback16198.51.100.161/27
R6Gi0/0172.16.46.2/30R4 Gi0/1
R6Gi0/1172.16.56.2/30R5 Gi0/1

What you’ll practise

  • Recite the BGP decision process in order and say what each rung compares
  • Predict the winning path before changing anything, then prove it with show commands and traceroute
  • Explain which attributes stay on one router, which stay inside the AS and which cross AS boundaries
  • Show why two paths from different neighbouring ASes never compare MED by default
  • Show why an iBGP router only sees a second path when its neighbour's best path is its own
  • Use bgp always-compare-med and bgp bestpath compare-routerid, and explain what each one changes

The tasks

  • The decision process
  • Task 1: Read the baseline
  • Task 2: Weight (P1)
  • Task 3: Local preference (P2)
  • Task 4: AS-path length (P3)
  • Task 5: Origin (P4)
  • Task 6: MED (P5)
  • Task 7: eBGP over iBGP, and IGP metric (P6)
  • Task 8: Oldest path, then router ID
  • Task 9: Prove it in the data plane

The Lab Tasks pane has the scenario, these tasks, the checks to run, hints and the full solution.

Topology and devices

The network as it opens in EVE-NG, drawn from the lab’s own canvas, and the image each node runs.

Topology of Best-path selection attribute by attribute6 nodes, 7 links. Every link is listed as text below the diagram.R1R2R3R4R5R6Gi0/2Gi0/0Gi0/2Gi0/0Gi0/1Gi0/0Gi0/1Gi0/1Gi0/0Gi0/0Gi0/1Gi0/0Gi0/1Gi0/1
6 nodes, with the interface names each link uses. On a narrow screen, scroll the diagram sideways.
Nodes in Best-path selection attribute by attribute, with the image each runs and the vCPU and RAM it’s set to
NodeDeviceImage in Add NodeSet to
R1Cisco IOSvvios-adventerprisek9-m.spa.159-3.m91 vCPU, 512 MB
R2Cisco IOSvvios-adventerprisek9-m.spa.159-3.m91 vCPU, 512 MB
R3Cisco IOSvvios-adventerprisek9-m.spa.159-3.m91 vCPU, 512 MB
R4Cisco IOSvvios-adventerprisek9-m.spa.159-3.m91 vCPU, 512 MB
R5Cisco IOSvvios-adventerprisek9-m.spa.159-3.m91 vCPU, 512 MB
R6Cisco IOSvvios-adventerprisek9-m.spa.159-3.m91 vCPU, 512 MB

How to open this lab

  1. Sign in to your workspace at lab.cloudlabbox.com.

  2. In File Manager, open Shared, then the folder BGP in depth guided labs.

  3. Open 02 - Best-path selection attribute by attribute and start its nodes, then open Lab Tasks for the scenario and the steps.

The lab is read-only. You can start the nodes and configure the devices, but changes to the topology can’t be saved. To change it, rebuild it in your own folder.

More BGP in depth labs

All BGP in depth labs

Related labs in other courses

CloudLabBox is independent of Arista Networks, Cisco, Juniper Networks and MikroTik. The lab follows exam topics and isn’t vendor training material; vendor names identify the exams and the images in the workspace.