ENCOR Assignment3
ENCOR Assignment3
Student Name:
Student ID:
Topology
Addressing Table
Device Interface IPv4 Address IPv6 Address IPv6 Link-Local
2020 - 2025 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 1 of 15 www.netacad.com
Lab - Implement BGP Communities
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.
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
2020 - 2025 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 2 of 15 www.netacad.com
Lab - Implement BGP Communities
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/80
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/80
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
2020 - 2025 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 3 of 15 www.netacad.com
Lab - Implement BGP Communities
2020 - 2025 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 4 of 15 www.netacad.com
Lab - Implement BGP Communities
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/80
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/80
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
2020 - 2025 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 5 of 15 www.netacad.com
Lab - Implement BGP Communities
2020 - 2025 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 6 of 15 www.netacad.com
Lab - Implement BGP Communities
b. Use the show bgp ipv4 unicast and show bgp ipv6 unicast commands to view the specified BGP
tables. Note that R1 has multiple paths to each destination network. Take note of the next hop address for
the destination networks marked with the “>” symbol.
R1# show bgp ipv4 unicast
BGP table version is 9, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
t secondary path, L long-lived-stale,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
2020 - 2025 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 7 of 15 www.netacad.com
Lab - Implement BGP Communities
* 10.1.3.130 0 0 300 i
* 192.168.3.64/26 10.1.2.2 0 500 300 i
*> 10.1.3.3 0 0 300 i
* 10.1.3.130 0 0 300 i
2020 - 2025 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 8 of 15 www.netacad.com
Lab - Implement BGP Communities
c. Use the show ip route bgp and show ipv6 route bgp commands to view the routing tables. Note that
there is only one route to each destination, and that the routes included in the routing table have the same
next hop as those with the “>” symbol in the BGP tables.
R1# show ip route bgp | begin Gateway
Gateway of last resort is not set
2020 - 2025 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 9 of 15 www.netacad.com
Lab - Implement BGP Communities
b. Add a neighbor statement for each neighbor with the send community parameter.
R1(config)# router bgp 6500
R1(config-router)# address-family ipv4 unicast
R1(config-router-af)# neighbor 10.1.2.2 send-community
R1(config-router-af)# neighbor 10.1.3.3 send-community
R1(config-router-af)# neighbor 10.1.3.130 send-community
R1(config-router-af)# address-family ipv6 unicast
R1(config-router-af)# neighbor 2001:db8:acad:1012::2 send-community
R1(config-router-af)# neighbor 2001:db8:acad:1013::3 send-community
R1(config-router-af)# neighbor 2001:db8:acad:1014::3 send-community
R1(config-router-af)# exit
c. At this point, the routers are ready to send community information, but there is no community information
available. On R2, issue the command show bgp ipv4 unicast 192.168.2.0/27, and you will see there is
no community information listed.
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
2020 - 2025 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 10 of 15 www.netacad.com
Lab - Implement BGP Communities
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-
Open configuration window
hop address, 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
2020 - 2025 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 11 of 15 www.netacad.com
Lab - Implement BGP Communities
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.
2020 - 2025 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 12 of 15 www.netacad.com
Lab - Implement BGP Communities
2020 - 2025 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 13 of 15 www.netacad.com
Lab - Implement BGP Communities
f. On R3, verify the IPv6 policy is working. Issue the command show bgp ipv6 unicast and note the local
preference has been assigned to the ASN500 routes advertised from R2.
R3# show bgp ipv6 unicast
BGP table version is 11, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
t secondary path, L long-lived-stale,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
2020 - 2025 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 14 of 15 www.netacad.com
Lab - Implement BGP Communities
*> 2001:DB8:ACAD:3001::/64
:: 0 32768 i
Close configuration window
Reflection Questions
1. Name the three common well known communities.
Type your answers here.
2. When setting a community inside a route map using the set community command, what is the function of the
optional “additive” keyword?
Type your answers here.
Note: To find out how the router is configured, look at the interfaces to identify the type of router and how many
interfaces the router has. There is no way to effectively list all the combinations of configurations for each router
class. This table includes identifiers for the possible combinations of Ethernet and Serial interfaces in the device.
The table does not include any other type of interface, even though a specific router may contain one. An example
of this might be an ISDN BRI interface. The string in parenthesis is the legal abbreviation that can be used in
Cisco IOS commands to represent the interface.
End of document
2020 - 2025 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 15 of 15 www.netacad.com