zNetLaB › Guided labs › Service Provider
BGP — a community, a local preference and a longer path
Service Provider Advanced 3 devices 5 checked tasks 100 points Plan lab
Two providers, one customer, and a decision to influence in each direction. Tag what you send with a community, prefer what you receive with local preference, and make your own AS look further away than it is by prepending it. You build it in a browser, type real commands at each device, and every task below is
checked against the running configuration — so you find out it is wrong before anybody else does.
Open this lab in the simulator
The simulator runs in your browser with nothing to install. This lab is part of the full simulator: open it free for 7 days with a new account, then with a plan. It needs an account, which keeps your progress.
The scenario
Two providers, one customer, and a decision to influence in each direction. Tag what you send with a community, prefer what you receive with local preference, and make your own AS look further away than it is by prepending it.
Your role: an engineer in the provider’s network operations centre. Level: Advanced Done when: all 5 goals show as passed (100 points).
Network status
Devices: 3 routers, cabled as drawn. No Layer 1 or Layer 2 faults: every link is connected and up. Customer starts with addresses (L0 10.99.0.1/24, G0/0 198.51.100.2/30, G0/1 203.0.113.2/30) and BGP 65100 already configured. ISP-1 starts with addresses (L0 1.1.1.1/32, G0/0 198.51.100.1/30) and BGP 65001 already configured. ISP-2 starts with addresses (L0 2.2.2.2/32, G0/0 203.0.113.1/30) and BGP 65002 already configured.
Known problems
None: nothing is misconfigured. The network is simply not finished: what the goals list is what you have to build or secure.
Goals
Both sessions are Established (15 pts) What the customer advertises carries the community 65100:1 (25 pts) ISP-1’s prefix is preferred with a local preference of 200 (25 pts) The path sent to ISP-2 is three AS numbers long, not one (20 pts) …and ISP-1 still sees the short one (15 pts)
The activity, in order
Both sessions are Established On Customer, make the BGP session to 198.51.100.1 reach Established: neighbor <ip> remote-as <AS>, and a route to the peer’s address. On Customer, make the BGP session to 203.0.113.1 reach Established: neighbor <ip> remote-as <AS>, and a route to the peer’s address.Why: BGP does nothing until the TCP session is Established. Active or Idle means a wrong AS number, no route to the peer, or a block. Verify with: show ip bgp summary What the customer advertises carries the community 65100:1 Do what the title says on the device shown in the topology, then run the show command that proves it.Why: Each goal is a state the lab can check on the running device. Verify with: show running-config ISP-1’s prefix is preferred with a local preference of 200 Do what the title says on the device shown in the topology, then run the show command that proves it.Why: Each goal is a state the lab can check on the running device. Verify with: show running-config The path sent to ISP-2 is three AS numbers long, not one Do what the title says on the device shown in the topology, then run the show command that proves it.Why: Each goal is a state the lab can check on the running device. Verify with: show running-config …and ISP-1 still sees the short one Do what the title says on the device shown in the topology, then run the show command that proves it.Why: Each goal is a state the lab can check on the running device. Verify with: show running-config
Tips
Work in the order given: later goals depend on the earlier ones. After every change, run the verify command before moving on; do not guess. Stuck? Read the verify output first. It names the interface, neighbour or route that is wrong.
Why this matters
Two providers, one customer, and a decision to influence in each direction. Tag what you send with a community, prefer what you receive with local preference, and make your own AS look further away than it is by prepending it.
What you will be able to do
Both sessions are Established
What the customer advertises carries the community 65100:1
ISP-1’s prefix is preferred with a local preference of 200
The path sent to ISP-2 is three AS numbers long, not one
The network
ISR 2921, PE Router — 3 devices in all, already cabled.
Gi0/0 198.51.100.2/30 Gi0/0 198.51.100.1/30 Gi0/1 203.0.113.2/30 Gi0/0 203.0.113.1/30 Customer ISP-1 ISP-2 Drawn from this lab: devices, cables, ports and the addresses already set.
Device Model Address already set
Customer ISR 2921 configure it
ISP-1 PE Router configure it
ISP-2 PE Router configure it
Cabling
Customer Gi0/0 ↔ ISP-1 Gi0/0
Customer Gi0/1 ↔ ISP-2 Gi0/0
What is configured at the start
These are already configured when the lab opens — including, where this is a troubleshooting lab, the fault itself:
Customer interface Loopback0
ip address 10.99.0.1 255.255.255.0
exit
interface GigabitEthernet0/0
ip address 198.51.100.2 255.255.255.252
no shutdown
exit
interface GigabitEthernet0/1
ip address 203.0.113.2 255.255.255.252
no shutdown
exit
router bgp 65100
bgp router-id 10.99.0.1
neighbor 198.51.100.1 remote-as 65001
neighbor 203.0.113.1 remote-as 65002
network 10.99.0.0 mask 255.255.255.0
ISP-1 interface Loopback0
ip address 1.1.1.1 255.255.255.255
exit
interface GigabitEthernet0/0
ip address 198.51.100.1 255.255.255.252
no shutdown
exit
router bgp 65001
bgp router-id 1.1.1.1
neighbor 198.51.100.2 remote-as 65100
network 1.1.1.1 mask 255.255.255.255
ISP-2 interface Loopback0
ip address 2.2.2.2 255.255.255.255
exit
interface GigabitEthernet0/0
ip address 203.0.113.1 255.255.255.252
no shutdown
exit
router bgp 65002
bgp router-id 2.2.2.2
neighbor 203.0.113.2 remote-as 65100
network 2.2.2.2 mask 255.255.255.255
Tasks, and how each one is checked
Every task is decided by reading the live network — a neighbour in FULL, a ping that succeeds, a line in the running configuration — not by looking for a keyword you typed. The same command shows you what the lab sees.
# Task Pts How to verify it yourself
1 Both sessions are Established 15 On Customer: show ip bgp summary — neighbour 198.51.100.1 is Established. and On Customer: show ip bgp summary — neighbour 203.0.113.1 is Established.
2 What the customer advertises carries the community 65100:1 25 Checked automatically against the device’s live state (bgpCommunity).
3 ISP-1’s prefix is preferred with a local preference of 200 25 Checked automatically against the device’s live state (bgpLocalPref).
4 The path sent to ISP-2 is three AS numbers long, not one 20 Checked automatically against the device’s live state (bgpPathLen).
5 …and ISP-1 still sees the short one 15 Checked automatically against the device’s live state (bgpPathLen).
Stuck? Ask the coach
Tell the coach what you see or what you tried. It gives you a hint, not the answer, the way a senior engineer would. Included with a free trial or any plan.
Ask the coach
Reference solution
Try it yourself first — the lab checks your work either way. This is one configuration that makes every task pass, device by device:
Customer route-map TAG permit 10
set community 65100:1
exit
route-map PREPEND permit 10
set community 65100:1
set as-path prepend 65100 65100
exit
route-map PREFER permit 10
set local-preference 200
exit
router bgp 65100
neighbor 198.51.100.1 send-community
neighbor 198.51.100.1 route-map TAG out
neighbor 198.51.100.1 route-map PREFER in
neighbor 203.0.113.1 send-community
neighbor 203.0.113.1 route-map PREPEND out
Where this is examined
This lab practises these topics in the zNetLaB certification courses:
eBGP and best-path selection — CCNP Enterprise · ENCOR · Infrastructure
PBR, route maps, prefix lists, distribute lists — CCNP Enterprise · ENARSI · Layer 3
iBGP, route reflectors, BGP attributes and troubleshooting — CCNP Enterprise · ENARSI · Layer 3
BGP: policy, communities, RR, confederations, multipath, AS-path — CCIE Enterprise Infrastructure · Network Infrastructure
eBGP policy, communities and prefix filtering — Service Provider · BGP for Providers
Related labs
Where to start
The lessons are open to everyone, all guided labs are listed by track, and
plans explains what is free and what is not.
CCNA®, CCNP® and Cisco® are trademarks of Cisco Systems, Inc. zNetLaB is not affiliated with or endorsed by Cisco.