Topic

BGP practice labs

10 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 CCNA and CCNP.

Included with a subscription

AdvancedLocked

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.

CCNP45 min5 objectives

AdvancedLocked

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.

CCNP45 min5 objectives

AdvancedLocked

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.

CCNP75 min5 objectives

BeginnerLocked

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.

CCNP45 min5 objectives

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

CCNP35 min5 objectives

Free with an account

IntermediateLocked

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.

CCNP45 min5 objectives

AdvancedLocked

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.

CCNP70 min5 objectives

IntermediateLocked

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.

CCNP40 min5 objectives

IntermediateLocked

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.

CCNP55 min5 objectives

IntermediateLocked

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.

CCNP55 min5 objectives

Practicing BGP peering and filtering 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 and local preference. 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 because it sends with a TTL of 1 by default. 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.

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