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
- 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.
| Name | Prefix | Used for | Watch on |
|---|---|---|---|
| P1 | 198.51.100.0/27 | Weight | R2 |
| P2 | 198.51.100.32/27 | Local preference | R2 |
| P3 | 198.51.100.64/27 | AS-path length | R2 |
| P4 | 198.51.100.96/27 | Origin | R2 |
| P5 | 198.51.100.128/27 | MED | R2 |
| P6 | 198.51.100.160/27 | eBGP over iBGP, then IGP metric | R2, then R1 |
| Customer block | 203.0.113.0/24 | Oldest path and router ID | R6 |
| Device | Interface | Address | Connects to |
|---|---|---|---|
| R1 | Loopback0 | 10.255.0.1/32 | |
| R1 | Loopback1 | 203.0.113.1/24 | |
| R1 | Gi0/0 | 10.0.12.1/30 | R2 Gi0/0 |
| R1 | Gi0/1 | 10.0.13.1/30 | R3 Gi0/0 |
| R2 | Loopback0 | 10.255.0.2/32 | |
| R2 | Gi0/0 | 10.0.12.2/30 | R1 Gi0/0 |
| R2 | Gi0/1 | 10.0.23.1/30 | R3 Gi0/1 |
| R2 | Gi0/2 | 172.16.24.1/30 | R4 Gi0/0 |
| R3 | Loopback0 | 10.255.0.3/32 | |
| R3 | Gi0/0 | 10.0.13.2/30 | R1 Gi0/1 |
| R3 | Gi0/1 | 10.0.23.2/30 | R2 Gi0/1 |
| R3 | Gi0/2 | 172.16.35.1/30 | R5 Gi0/0 |
| R4 | Loopback0 | 10.255.0.4/32 | |
| R4 | Gi0/0 | 172.16.24.2/30 | R2 Gi0/2 |
| R4 | Gi0/1 | 172.16.46.1/30 | R6 Gi0/0 |
| R5 | Loopback0 | 10.255.0.5/32 | |
| R5 | Gi0/0 | 172.16.35.2/30 | R3 Gi0/2 |
| R5 | Gi0/1 | 172.16.56.1/30 | R6 Gi0/1 |
| R6 | Loopback0 | 10.255.0.6/32 | |
| R6 | Loopback11 | 198.51.100.1/27 | |
| R6 | Loopback12 | 198.51.100.33/27 | |
| R6 | Loopback13 | 198.51.100.65/27 | |
| R6 | Loopback14 | 198.51.100.97/27 | |
| R6 | Loopback15 | 198.51.100.129/27 | |
| R6 | Loopback16 | 198.51.100.161/27 | |
| R6 | Gi0/0 | 172.16.46.2/30 | R4 Gi0/1 |
| R6 | Gi0/1 | 172.16.56.2/30 | R5 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.
Every link, as text
- R1
Gi0/0to R2Gi0/0 - R1
Gi0/1to R3Gi0/0 - R2
Gi0/1to R3Gi0/1 - R2
Gi0/2to R4Gi0/0 - R3
Gi0/2to R5Gi0/0 - R4
Gi0/1to R6Gi0/0 - R5
Gi0/1to R6Gi0/1
| Node | Device | Image in Add Node | Set to |
|---|---|---|---|
| R1 | Cisco IOSv | vios-adventerprisek9-m.spa.159-3.m9 | 1 vCPU, 512 MB |
| R2 | Cisco IOSv | vios-adventerprisek9-m.spa.159-3.m9 | 1 vCPU, 512 MB |
| R3 | Cisco IOSv | vios-adventerprisek9-m.spa.159-3.m9 | 1 vCPU, 512 MB |
| R4 | Cisco IOSv | vios-adventerprisek9-m.spa.159-3.m9 | 1 vCPU, 512 MB |
| R5 | Cisco IOSv | vios-adventerprisek9-m.spa.159-3.m9 | 1 vCPU, 512 MB |
| R6 | Cisco IOSv | vios-adventerprisek9-m.spa.159-3.m9 | 1 vCPU, 512 MB |
How to open this lab
Sign in to your workspace at
lab.cloudlabbox.com.In File Manager, open Shared, then the folder
BGP in depth guided labs.Open
02 - Best-path selection attribute by attributeand 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
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.