12.1.2 Lab - Implement BGP Path Manipulation - ITExamAnswers
12.1.2 Lab - Implement BGP Path Manipulation - ITExamAnswers
12.1.2 Lab - Implement BGP Path Manipulation - ITExamAnswers
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
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:4
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
2020 - 2021 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 1 of 22 www.netacad.com
Lab - Implement BGP Path Manipulation
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 Path Manipulation Settings on all Routers
Background / Scenario
The default settings in BGP allow for a great deal of undesired route information to pass between
autonomous systems. In this lab you will configure Multi-Protocol BGP and implement various path
manipulation options for both IPv4 and IPv6.
Note: This lab is an exercise in developing, deploying, and verifying various path manipulation tools for BGP,
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
2020 - 2021 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 2 of 22 www.netacad.com
Lab - Implement BGP Path Manipulation
no ip domain lookup
hostname R1
line con 0
exec-timeout 0 0
logging synchronous
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
Router R2
no ip domain lookup
hostname R2
line con 0
exec-timeout 0 0
logging synchronous
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
2020 - 2021 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 3 of 22 www.netacad.com
Lab - Implement BGP Path Manipulation
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
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
2020 - 2021 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 4 of 22 www.netacad.com
Lab - Implement BGP Path Manipulation
2020 - 2021 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 5 of 22 www.netacad.com
Lab - Implement BGP Path Manipulation
2020 - 2021 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 6 of 22 www.netacad.com
Lab - Implement BGP Path Manipulation
2020 - 2021 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 7 of 22 www.netacad.com
Lab - Implement BGP Path Manipulation
2020 - 2021 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 8 of 22 www.netacad.com
Lab - Implement BGP Path Manipulation
0 300 500 i
*> 2001:DB8:ACAD:3000::/64
2001:DB8:ACAD:1013::3
0 0 300 i
* 2001:DB8:ACAD:1012::2
0 500 300 i
* 2001:DB8:ACAD:1014::3
0 0 300 i
*> 2001:DB8:ACAD:3001::/64
2001:DB8:ACAD:1013::3
0 0 300 i
* 2001:DB8:ACAD:1012::2
0 500 300 i
* 2001:DB8:ACAD:1014::3
0 0 300 i
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
Part 3: Configure and Verify BGP Path Manipulation Settings on all Routers
In Part 3, you will configure path manipulation tools for BGP. The way these tools are being used here is not
meant to represent best practice, but to assess your ability to complete the required configurations.
2020 - 2021 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 9 of 22 www.netacad.com
Lab - Implement BGP Path Manipulation
2020 - 2021 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 10 of 22 www.netacad.com
Lab - Implement BGP Path Manipulation
2020 - 2021 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 11 of 22 www.netacad.com
Lab - Implement BGP Path Manipulation
2020 - 2021 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 12 of 22 www.netacad.com
Lab - Implement BGP Path Manipulation
2020 - 2021 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 13 of 22 www.netacad.com
Lab - Implement BGP Path Manipulation
c. Create a route-map named USE_THIS_PATH_FOR_IPV4 that matches on the prefix list you just created
and sets the local preference to 250.
R1(config)# route-map USE_THIS_PATH_FOR_IPV4 permit 10
R1(config)# match ip address prefix-list PERFERRED_IPV4_PATH
R1(config)# set local-preference 250
d. Next, apply this route map to the BGP neighbor 10.1.3.130.
R1(config)# router bgp 6500
R1(config-router)# address-family ipv4 unicast
R1(config-router-af)# neighbor 10.1.3.130 route-map USE_THIS_PATH_FOR_IPV4 in
R1(config-router-af)# end
e. Perform a reset of the IPv4 adjacency with R3 for the inbound traffic without tearing down the session.
R1# clear bgp ipv4 unicast 300 in
f. On R1, issue the command show ip route bgp and take note of the next hop addresses for the
192.168.3.0/27 and 192.168.3.64/26 networks; it should be 10.1.3.130 for both. Issue the command
show bgp ipv4 unicast and you should see the local preference value in the appropriate column.
R1# show ip route bgp | begin Gateway
Gateway of last resort is not set
2020 - 2021 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 14 of 22 www.netacad.com
Lab - Implement BGP Path Manipulation
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
Router R1
R1# show run
Building configuration...
2020 - 2021 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 15 of 22 www.netacad.com
Lab - Implement BGP Path Manipulation
boot-start-marker
boot-end-marker
!
no aaa new-model
!
no ip domain lookup
!
login on-success log
!
subscriber templating
!
ipv6 unicast-routing
multilink bundle-name authenticated
!
spanning-tree extend system-id
!
redundancy
mode none
!
interface Loopback0
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
!
interface Loopback1
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
!
interface GigabitEthernet0/0/0
ip address 10.1.2.1 255.255.255.0
negotiation auto
ipv6 address FE80::1:1 link-local
ipv6 address 2001:DB8:ACAD:1012::1/64
!
interface GigabitEthernet0/0/1
no ip address
negotiation auto
!
interface Serial0/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
!
interface Serial0/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
!
router bgp 6500
2020 - 2021 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 16 of 22 www.netacad.com
Lab - Implement BGP Path Manipulation
2020 - 2021 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 17 of 22 www.netacad.com
Lab - Implement BGP Path Manipulation
!
line con 0
exec-timeout 0 0
logging synchronous
transport input none
stopbits 1
line aux 0
stopbits 1
line vty 0 4
login
!
end
Router R2
R2# show run
Building configuration...
2020 - 2021 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 18 of 22 www.netacad.com
Lab - Implement BGP Path Manipulation
2020 - 2021 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 19 of 22 www.netacad.com
Lab - Implement BGP Path Manipulation
Router R3
R3# show run
Building configuration...
2020 - 2021 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 20 of 22 www.netacad.com
Lab - Implement BGP Path Manipulation
interface Loopback0
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
!
interface Loopback1
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
!
interface GigabitEthernet0/0/0
ip address 10.2.3.3 255.255.255.0
negotiation auto
ipv6 address FE80::3:1 link-local
ipv6 address 2001:DB8:ACAD:1023::3/64
!
interface GigabitEthernet0/0/1
no ip address
negotiation auto
!
interface Serial0/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
!
interface Serial0/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
!
router bgp 300
bgp router-id 3.3.3.3
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 10.1.3.1 remote-as 6500
neighbor 10.1.3.129 remote-as 6500
neighbor 10.2.3.2 remote-as 500
neighbor 2001:DB8:ACAD:1013::1 remote-as 6500
neighbor 2001:DB8:ACAD:1014::1 remote-as 6500
neighbor 2001:DB8:ACAD:1023::2 remote-as 500
!
address-family ipv4
network 192.168.3.0 mask 255.255.255.224
network 192.168.3.64 mask 255.255.255.192
neighbor 10.1.3.1 activate
neighbor 10.1.3.1 distribute-list ALLOWED_TO_R1 out
neighbor 10.1.3.129 activate
neighbor 10.1.3.129 distribute-list ALLOWED_TO_R1 out
neighbor 10.2.3.2 activate
exit-address-family
2020 - 2021 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 21 of 22 www.netacad.com
Lab - Implement BGP Path Manipulation
!
address-family ipv6
network 2001:DB8:ACAD:3000::/64
network 2001:DB8:ACAD:3001::/64
neighbor 2001:DB8:ACAD:1013::1 activate
neighbor 2001:DB8:ACAD:1014::1 activate
neighbor 2001:DB8:ACAD:1023::2 activate
exit-address-family
!
ip forward-protocol nd
no ip http server
ip http secure-server
!
ip access-list extended ALLOWED_TO_R1
permit ip host 192.168.3.0 host 255.255.255.224
permit ip host 192.168.3.64 host 255.255.255.192
!
control-plane
!
banner motd ^C This is R3, BGP Path Manipulation Lab ^C
!
line con 0
exec-timeout 0 0
logging synchronous
transport input none
stopbits 1
line aux 0
stopbits 1
line vty 0 4
login
!
end
2020 - 2021 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 22 of 22 www.netacad.com