13.1.2 Lab - Implement BGP Communities PDF
13.1.2 Lab - Implement BGP Communities PDF
Topology
Addressing Table
Device Interface IPv4 Address IPv6 Address IPv6 Link-Local
R1
S0/1/0 10.1.3.1/25 2001:db8:acad:1013::1/64 fe80::1:2
R1
S0/1/1 10.1.3.129/25 2001:db8:acad:1014::1/64 fe80::1:3
R1
Loopback0 192.168.1.1/27 2001:db8:acad:1000::1/64 fe80::1:4
R1
Loopback1 192.168.1.65/26 2001:db8:acad:1001::1/64 fe80::1:5
R2 G0/0/0 10.1.2.2/24 2001:db8:acad:1012::2/64 fe80::2:1
R2
G0/0/1 10.2.3.2/24 2001:db8:acad:1023::2/64 fe80::2:2
R2
Loopback0 192.168.2.1/27 2001:db8:acad:2000::1/64 fe80::2:3
R2
Loopback1 192.168.2.65/26 2001:db8:acad:2001::1/64 fe80::2:4
R3 G0/0/0 10.2.3.3/24 2001:db8:acad:1023::3/64 fe80::3:1
R3
S0/1/0 10.1.3.3/25 2001:db8:acad:1013::3/64 fe80::3:2
R3
S0/1/1 10.1.3.130/25 2001:db8:acad:1014::3/64 fe80::3:3
R3
Loopback0 192.168.3.1/27 2001:db8:acad:3000::1/64 fe80::3:4
R3
Loopback1 192.168.3.65/26 2001:db8:acad:3001::1/64 fe80::3:5
Objectives
Part 1: Build the Network and Configure Basic Device Settings and Interface Addressing
Part 2: Configure and Verify Multi-Protocol BGP on all Routers
Part 3: Configure and Verify BGP Communities on all Routers
Background / Scenario
As you saw in the previous lab, standard path manipulation tools generally require a lot of configuration. Imagine if
the last lab was implemented in a large and complex routing environment. Using BGP communities gives you an
option for tagging and controlling routing information in a less labor-intensive manner. In this lab you will configure
Multi-Protocol BGP and implement BGP community configurations for both IPv4 and IPv6.
Note: This lab is an exercise in developing, deploying, and verifying BGP communities, and does not reflect
networking best practices.
Note: The routers used with CCNP hands-on labs are Cisco 4221 with Cisco IOS XE Release 16.9.4 (universalk9
image). Other routers and Cisco IOS versions can be used. Depending on the model and Cisco IOS version, the
commands available and the output produced might vary from what is shown in the labs.
Note: Ensure that the routers have been erased and have no startup configurations. If you are unsure contact your
instructor.
Instructor Note: Refer to the Instructor Lab Manual for the procedures to initialize and reload devices.
Required Resources
3 Routers (Cisco 4221 with Cisco IOS XE Release 16.9.4 universal image or comparable)
1 PC (Choice of operating system with a terminal emulation program installed)
Console cables to configure the Cisco IOS devices via the console ports
Ethernet and serial cables as shown in the topology
Instructions
Part 1: Build the Network and Configure Basic Device Settings and Interface Addressing
In Part 1, you will set up the network topology and configure basic settings and interface addressing on routers.
Router R1
no ip domain lookup
hostname R1
line con 0
exec-timeout 0 0
logging synchronous
exit
banner motd # This is R1, BGP Path Manipulation Lab #
ipv6 unicast-routing
interface g0/0/0
ip address 10.1.2.1 255.255.255.0
ipv6 address fe80::1:1 link-local
ipv6 address 2001:db8:acad:1012::1/64
no shutdown
interface s0/1/0
ip address 10.1.3.1 255.255.255.128
ipv6 address fe80::1:2 link-local
ipv6 address 2001:db8:acad:1013::1/64
no shutdown
interface s0/1/1
ip address 10.1.3.129 255.255.255.128
ipv6 address fe80::1:3 link-local
ipv6 address 2001:db8:acad:1014::1/64
no shutdown
interface loopback 0
ip address 192.168.1.1 255.255.255.224
ipv6 address fe80::1:4 link-local
ipv6 address 2001:db8:acad:1000::1/64
no shutdown
interface loopback 1
ip address 192.168.1.65 255.255.255.192
ipv6 address fe80::1:5 link-local
ipv6 address 2001:db8:acad:1001::1/64
no shutdown
exit
Router R2
no ip domain lookup
hostname R2
line con 0
exec-timeout 0 0
logging synchronous
exit
banner motd # This is R2, BGP Path Manipulation Lab #
ipv6 unicast-routing
interface g0/0/0
ip address 10.1.2.2 255.255.255.0
ipv6 address fe80::2:1 link-local
ipv6 address 2001:db8:acad:1012::2/64
no shutdown
interface g0/0/1
ip address 10.2.3.2 255.255.255.0
ipv6 address fe80::2:2 link-local
ipv6 address 2001:db8:acad:1023::2/64
no shutdown
interface loopback 0
ip address 192.168.2.1 255.255.255.224
ipv6 address fe80::2:3 link-local
ipv6 address 2001:db8:acad:2000::1/64
no shutdown
interface loopback 1
ip address 192.168.2.65 255.255.255.192
ipv6 address fe80::2:4 link-local
ipv6 address 2001:db8:acad:2001::1/64
no shutdown
Router R3
no ip domain lookup
hostname R3
line con 0
exec-timeout 0 0
logging synchronous
exit
banner motd # This is R3, BGP Path Manipulation Lab #
ipv6 unicast-routing
interface g0/0/0
ip address 10.2.3.3 255.255.255.0
ipv6 address fe80::3:1 link-local
ipv6 address 2001:db8:acad:1023::3/64
no shutdown
interface s0/1/0
ip address 10.1.3.3 255.255.255.128
ipv6 address fe80::3:2 link-local
ipv6 address 2001:db8:acad:1013::3/64
no shutdown
interface s0/1/1
ip address 10.1.3.130 255.255.255.128
ipv6 address fe80::3:3 link-local
ipv6 address 2001:db8:acad:1014::3/64
no shutdown
interface loopback 0
ip address 192.168.3.1 255.255.255.224
ipv6 address fe80::3:4 link-local
ipv6 address 2001:db8:acad:3000::1/64
no shutdown
interface loopback 1
ip address 192.168.3.65 255.255.255.192
ipv6 address fe80::3:5 link-local
ipv6 address 2001:db8:acad:3001::1/64
no shutdown
b. Set the clock on each router to UTC time.
c. Save the running configuration to startup-config.
Close configuration window
b. In this case, note that there are two paths, one directly from R3/ASN300 and the other from R1/ASN6500. This
might not be desirable, because it sets ASN6500 up as a transit network. To fix this issue, a prefix list on R3 can
be created to match the source address and mask of networks belonging to ASN300.
Open configuration window
c. Next, build a route map for IPv4 and IPv6 on R3 that uses the prefix list to set the no-export additive community
on networks matching the prefix list, and the internet additive community on networks that do not match the
prefix list. By default, when setting a community, any existing communities are over-written, but can be preserved
using the optional additive keyword.
R3(config)# route-map COMMSET permit 10
R3(config-route-map)# match ip address prefix-list LOCAL_NETWORK_COMMSET
R3(config-route-map)# set community no-export additive
R3(config-route-map)# exit
R3(config)# route-map COMMSET permit 20
R3(config-route-map)# set community internet additive
R3(config-route-map)# exit
R3(config)# route-map COMMSET_6 permit 10
R3(config-route-map)# match ipv6 address prefix-list LOCAL_6_NETWORK_COMMSET
R3(config-route-map)# set community no-export additive
R3(config-route-map)# exit
R3(config)# route-map COMMSET_6 permit 20
R3(config-route-map)# set community internet additive
d. Next, apply these route maps to the neighbor statements associated with R1.
R3(config)# router bgp 300
R3(config-router)# address-family ipv4 unicast
R3(config-router-af)# neighbor 10.1.3.1 route-map COMMSET out
R3(config-router-af)# neighbor 10.1.3.129 route-map COMMSET out
R3(config-router-af)# address-family ipv6 unicast
R3(config-router-af)# neighbor 2001:db8:acad:1013::1 route-map COMMSET_6 out
R3(config-router-af)# neighbor 2001:db8:acad:1014::1 route-map COMMSET_6 out
e. Perform a reset of the adjacencies with the outbound traffic to R1 without tearing down the session.
R3# clear bgp ipv4 unicast 6500 out
R3# clear bgp ipv6 unicast 6500 out
Close configuration window
f. On R2, issue the command show bgp ipv4 unicast 192.168.3.0/27 to see to the available BGP paths to
192.168.3.0/27 from R2. This time, you should not see a path to 192.168.3.0/27 via the next-hop 10.1.2.1. If you
use the command show bgp ipv6 unicast 2001:db8:acad:3000::/64, you will see only one next-hop address,
Open configuration window
and that is 2001:db8:acad:1023::3.
R2# show bgp ipv4 unicast 192.168.3.0/27
BGP routing table entry for 192.168.3.0/27, version 6
Paths: (1 available, best #1, table default)
Advertised to update-groups:
2
Refresh Epoch 1
300
10.2.3.3 from 10.2.3.3 (3.3.3.3)
Origin IGP, metric 0, localpref 100, valid, external, best
rx pathid: 0, tx pathid: 0x0
R2# show bgp ipv6 unicast 2001:db8:acad:3000::/64
BGP routing table entry for 2001:DB8:ACAD:3000::/64, version 8
Paths: (1 available, best #1, table default)
Advertised to update-groups:
2
Refresh Epoch 2
300
2001:DB8:ACAD:1023::3 (FE80::3:1) from 2001:DB8:ACAD:1023::3 (3.3.3.3)
Origin IGP, metric 0, localpref 100, valid, external, best
rx pathid: 0, tx pathid: 0x0
Close configuration window
e. On R2, verify the community tags are present by issuing the commands show bgp ipv4 unicast 192.168.1.0/27 |
i Community and show bgp ipv6 unicast 2001:db8:acad:1000::/64 | i Community.
Open configuration window
If you run those same commands on R3, you will see that the community tags are present there as well. Because
Community is an optional transitive attribute, it is passed on to eBGP neighbors by default.
Reflection Questions
1. Name the three common well known communities.
The three well-known communities are Internet, No_Advertise and No_Export.
2. When setting a community inside a route map using the set community command, what is the function of the
optional “additive” keyword?
By default, using the set community command removes or erases previous community information. The
additive keyword preserves previous community information and adds to existing community information.