IntermediatePublished 2026-07-03
BGP Lab 5: Local Preference - Preferred Exit
Bundle lab
Configure and validate BGP local-preference to prefer one provider when the same destination prefix is learned from two eBGP neighbors. You will see two equal AS-PATH routes to 172.16.100.0/24 on the edge router and then apply an inbound route-map on the R2 session to set local-preference 200 so the edge prefers exiting via R2. Verification includes host pings/traceroute and router BGP best-path checks.
Learning objectives
- Build and verify eBGP sessions on directly connected /30 links
- Originate an identical service prefix from two providers and observe best-path tie-break
- Set local-preference inbound on a specific neighbor to steer outbound traffic
- Validate BGP best-path selection using show commands and end-host tests
- Differentiate between local-preference (AS-wide) and weight (local-only) in path selection
Troubleshooting focus
- If no 172.16.100.0/24 appears on RTR-EDGE-A: verify that R2 and R3 have Loopback1 with 172.16.100.1/24 and an exact-match network statement (with mask) so BGP originates the route.
- If the neighbor does not establish: check that each eBGP neighbor uses the directly connected interface IP with the correct remote-as and that the /30 addressing matches on both ends.
- If the wrong path remains best: confirm the route-map is applied inbound to the R2 neighbor, that the set local-preference value is higher than 100, and that no weight or MED policies are overriding the decision.
- If host pings fail: ensure RTR-EDGE-A originates 192.0.2.0/24 so providers have a return route to CLIENT-A, and verify default gateways on the hosts.
Topology
Subscribe to preview this lab's topology.
See plansGrade your work
How this lab is graded
- Build it your way. Where a lab lets you choose a value — a VLAN name, an interface description — grading checks that you configured it, not which name you picked. Names that another line has to reference, like an ACL applied with
access-class, are stated in the guide and do have to match. - Addresses, modes and protocol keywords are exact. An IP address, a subnet mask,
switchport mode trunk, an encapsulation — these carry the meaning of the lab, so they are graded as written in the guide. - Grading reads your saved configuration. Export the lab from CML after you have configured it, and make sure anything you set is in the running-config — a change that only exists in a terminal session never reaches the grader.
- You can submit as many times as you like. Your best score stands, and each attempt tells you which checks passed so you can work the gaps.
- Scored something you believe is correct? Use Report an issue on this page — that is exactly how the grading fixes in the changelog got found.
Create a free account to submit your lab for grading.
Create a free accountFound a problem with this lab?
Please sign in to report a problem — tying it to your attempts lets us reproduce and fix it faster.