Create a free account
Topic

BGP practice labs

20 hands-on BGP scenarios you build in your own Cisco Modeling Labs instance and grade against the answer key. BGP configuration and troubleshooting practice for CCNP.

eBGP at the edges, iBGP across the middle — the reference wiring for BGP, not a specific lab.

Included with a subscription

CCNPAdvancedLocked

CCNP BGP Repair: The Branch Lost the Internet

Since last night's change the branch has had no internet, and the provider says it has stopped hearing the branch LAN. Find out why on the three AS 65110 routers and bring them back to the stated design.

85 min3 objectives

CCNPIntermediateLocked

CCNP BGP: Carry IPv6 in Its Own Address Family

The branch LAN has IPv6 addresses but no IPv6 route to the internet. Add an IPv6 BGP session to the provider and advertise the LAN's /64 in the IPv6 address family.

32 min3 objectives

CCNPIntermediateLocked

CCNP BGP: Summarize Up, Send Only a Default Down

The provider gets four HQ prefixes where one would do, and the small branch router carries a full table it can't use. Summarize HQ into one /22 and send the branch a default route and nothing else.

45 min3 objectives

CCNPAdvancedLocked

CCNP BGP: Stop Transit and Pick a Path by AS Path

The enterprise is quietly carrying traffic between its two ISPs, and content from AS 64907 takes whichever ISP answered first. Stop the transit with an AS-path filter, then prefer the second ISP for that one origin AS.

52 min3 objectives

CCNPIntermediateLocked

CCNP BGP: Keep the More-Specifics Inside the Provider

The two /24s meant for the provider's eyes only are leaking to the rest of the internet. Tag them no-export, so the provider uses them and passes on only the /23.

40 min3 objectives

CCNPIntermediateLocked

CCNP BGP: Tell the Provider Which Link Is the Backup

Traffic from the internet reaches the customer over the backup link, because that provider router prefers its own eBGP path. Tag the customer's routes to that router with the provider's backup community and let the provider's own policy do the rest.

45 min3 objectives

CCNPIntermediateLocked

CCNP BGP: Pull Inbound Traffic onto the Main Circuit with MED

Half the inbound traffic arrives on the small backup circuit. Tell the provider which entrance to use with MED, so both LANs come in through the main circuit and the backup carries traffic only when it has to.

45 min3 objectives

CCNPIntermediateLocked

CCNP BGP: Send the Video Platform Through the Second ISP

The video platform should come in through the second ISP, but BGP sends everything through the first. Give that one prefix a higher weight on the edge router and leave every other route alone.

40 min3 objectives

CCNPIntermediateLocked

CCNP BGP: Peer Between Loopbacks Across Two Links

One cable cut takes the whole eBGP session down, although a second link to the same ISP is up. Move the session onto loopbacks reached over both links, so either link can carry it.

40 min3 objectives

CCNPIntermediateFree2026-11-17

CCNP BGP: Replace the Full Mesh with a Route Reflector

The branch can't reach the internet because iBGP never passes a route from one internal peer to another. Build a route reflector in the middle and give every router a full BGP table without a full mesh.

45 min3 objectives

Free with an account

CCNPAdvancedLocked

AS-Path Filtering: Accept Only Neighbor’s Own Routes

Advanced CCNP BGP policy lab focusing on inbound AS-path filtering at the edge. You will build a simple eBGP chain (AS 65003 — AS 65002 — AS 65001), originate prefixes from the two upstream routers, confirm that the edge learns multiple routes, then enforce a policy on the edge (R1) to accept only routes originated by its directly connected eBGP neighbor (AS 65002) while rejecting routes that transited AS 65003. Verification relies entirely on R1’s BGP table and AS-path regular-expression queries.

45 min5 objectives

CCNPAdvancedLocked

Lab 9: Path Selection with Weight (First Tiebreaker)

In this advanced CCNP BGP lab, you will steer a single router's outbound path choice using Cisco's Weight attribute, the very first BGP best-path tiebreaker. R1 (AS 65001) peers eBGP with two ISPs (R2 in AS 65002 and R3 in AS 65003). Both ISPs advertise the same prefix 172.16.50.0/24. Your job is to make R1 prefer the R3 path using the neighbor weight command and verify the outcome using IOS and Linux tools.

45 min5 objectives

CCNPBeginnerLocked

BGP Lab 2: Exact-Match Prefix Origination

Configure eBGP between two routers and originate select connected /24s using the exact-match 'network ... mask' command. Verify that only the intended prefixes are advertised and learned by the neighbor, and use host-based tests to confirm reachability to the advertised networks. This beginner CCNP lab reinforces that the BGP network statement only advertises a route if an exact match exists in the RIB, and that the 'mask' keyword is mandatory for non-classful advertisements.

45 min5 objectives

CCNPAdvancedLocked

BGP Troubleshooting Capstone: eBGP + iBGP Repair

Advanced BGP capstone, run as a fault hunt. The hub lost its upstream service route overnight and the branch cannot see hub prefixes either. Sessions are not all down, which is what makes it interesting: one peering never establishes, one establishes and carries nothing, and one prefix is never originated at all. You get symptoms and the required end state — no fault list. Faults span all three routers, and one of them is not in BGP at all.

75 min5 objectives

CCNPIntermediateLocked

Lab 3: iBGP over Loopbacks with OSPF Reachability

Build an internal BGP (iBGP) peering between two IOS routers in the same AS over stable Loopback0 addresses, with OSPF providing loopback reachability. Each router originates a /24 from Loopback1 into BGP, and next-hop/peering behavior is validated from end hosts. This lab emphasizes the deterministic neighbor configuration (remote-as, update-source Loopback0, router-id) and exact-match network origination, supported by a minimal, secure OSPF core.

55 min5 objectives

CCNPBeginnerFree2026-07-03

eBGP Fundamentals: The First Peering

Build your first external BGP (eBGP) peering between two routers in different autonomous systems over a /30 point-to-point link and exchange one /24 prefix from each side using Loopback0. The topology is intentionally small yet realistic, with two edge routers (AS 65001 and AS 65002) and three Alpine hosts for basic reachability checks and operator context. You will configure deterministic BGP neighbors, originate prefixes with exact-match network statements, and validate reachability and route installation using standard IOS and Linux tools. This is Lab 1 of 10 in the CCNP-aligned BGP Fundamentals series and sets the foundation for later labs on iBGP, route filtering, and path selection.

35 min5 objectives

Free with an account

CCNPIntermediateLocked

Transit AS: Carry eBGP across iBGP (next-hop-self)

In this CCNP-level lab (BGP Fundamentals Lab 4/10), you will build a small, realistic transit-AS scenario: an external route learned by R1 via eBGP from AS 65003 must be carried across iBGP to R2 inside AS 65001. You will intentionally encounter the classic iBGP next-hop problem (R2 sees an unreachable next-hop for 172.16.30.0/24) and fix it on R1 with neighbor next-hop-self. iBGP peering runs over Loopback0 addresses with reachability provided by OSPF area 0 between R1 and R2. Two hosts validate end-to-end data-plane reachability and routing control-plane state.

55 min5 objectives

CCNPAdvancedLocked

Inbound Steering: AS-Path Prepending (Primary/Backup eBGP)

Advanced CCNP BGP lab: Build parallel eBGP sessions between two ASes over primary and backup /30 links. Originate a service prefix from AS 65001 and influence AS 65002's inbound path by applying outbound AS-path prepending on the backup session only. Validate best-path selection and next-hop on the neighbor, and confirm reachability from hosts.

70 min5 objectives

CCNPIntermediateLocked

BGP Lab 5: Local Preference - Preferred Exit

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.

45 min5 objectives

CCNPIntermediateLocked

BGP Lab 7: Filtering Advertised Prefixes (Prefix-List)

Deploy eBGP between two routers and precisely control which locally-originated networks are advertised to a neighbor using an outbound prefix-list. R1 originates four /24 loopback routes but advertises only two to R2. Verify using IOS show commands and basic host reachability checks.

40 min5 objectives

Practicing BGP peering, filtering and path control on Cisco Modeling Labs

Why it matters, and what these labs cover.

BGP is the protocol that joins your network to everyone else, and it behaves unlike every IGP you learned before it. It does not discover neighbors, it does not advertise anything on its own, and it does not pick paths on bandwidth or delay. You tell it exactly who to peer with, exactly which prefixes to originate, and exactly which policy to apply. That inversion is what makes BGP hard to absorb from a book: the commands are short, but the behavior around them is not. A session sits in Active while the configuration looks perfect. A prefix appears in show ip bgp and never installs in the routing table. A filter applied inbound seems to do nothing at all. None of that becomes intuition until you have watched it happen on a session you built yourself.

These labs run real Cisco IOS in Cisco Modeling Labs and start where the exam does: router bgp 65001, a neighbor statement pointed at the far AS with remote-as 65002, and a network statement with an explicit mask to originate a prefix, which BGP advertises only when that exact prefix and mask already sit in the routing table. You verify with show ip bgp summary, learn to read the State and PfxRcd column properly, then confirm the prefix installed as a B route with show ip route bgp. Later labs add policy: per-neighbor prefix-list filtering, AS-path filtering with an anchored regex in ip as-path access-list applied as a filter-list, and path selection using weight, local preference and MED. The path-control labs go further: a route reflector instead of an iBGP full mesh, eBGP between loopbacks with ebgp-multihop, communities including no-export, aggregate-address with summary-only, a default-only feed to a branch, and the IPv6 address family. Troubleshooting labs hand you a session stuck in Idle or Active, a reversed remote-as, a network mask that does not line up, and an unreachable next hop. Every upload is graded requirement by requirement against the answer key.

Frequently asked questions

How does BGP choose between two paths to the same prefix?

It walks an ordered list of tiebreakers and stops at the first one that decides. Weight comes first: it is Cisco-proprietary, local to the router, never advertised to a peer, and defaults to 0 for learned routes, so a higher value wins immediately. Local preference is next, and unlike weight it propagates to iBGP peers inside your AS, defaulting to 100 with the higher value preferred. Further down, among paths the router did not originate itself, the shorter AS-path wins. The labs have you set weight and local preference and then prove which one the router acted on with show ip bgp for that prefix.

What is the difference between eBGP and iBGP?

eBGP peers sit in different autonomous systems; iBGP peers sit in the same one. eBGP routes carry an administrative distance of 20 against 200 for iBGP, and eBGP assumes the peer is directly connected: it refuses a peer on no connected subnet and sends with a TTL of 1, which is why peering between loopbacks needs ebgp-multihop. The operational difference that catches people is the iBGP split-horizon rule: a route learned from one iBGP peer is not re-advertised to another iBGP peer, so iBGP needs a full mesh or a route reflector while eBGP has no such restriction.

Do the BGP labs need real routers or a live internet connection?

No. Everything runs inside your own Cisco Modeling Labs instance using private AS numbers and documentation address space, so you build both halves of every peering yourself and never touch a public ASN or a real upstream provider. The lab package is free-tier and imports into CML in one click.

Learn BGP

The theory behind these labs: the study hub and guides.

Looking for something else? Browse the full lab archive, narrow it to standalone labs, or see today's daily lab.