16.1.4 Lab - Configure Route Redistribution Using BGP
16.1.4 Lab - Configure Route Redistribution Using BGP
Topology
Addressing Table
Device Interface IP Address Subnet Mask
R1
G0/0/1 10.1.11.1 255.255.255.0
R1
Loopback 0 10.1.1.1 255.255.255.0
R2 G0/0/0 10.1.12.2 255.255.255.0
R2
G0/0/1 10.1.23.2 255.255.255.0
R3 G0/0/0 10.1.23.3 255.255.255.0
R3
G0/0/1 10.1.32.3 255.255.255.0
R3
Loopback 0 10.3.3.3 255.255.255.0
D1 G1/0/11 10.1.11.2 255.255.255.0
D1
Loopback 0 198.51.100.1 255.255.255.128
D2 G1/0/11 10.1.32.2 255.255.255.0
D2
Loopback 0 209.165.201.1 255.255.255.128
© 2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 1 of 13 www.netacad.com
Lab - Implement Route Redistribution Between Multiple Protocols
Objectives
Part 1: Build the Network and Configure Basic Device Settings
Part 2: Configure and Verify Two-Way Redistribution on R1
Part 3: Configure and Verify Two-Way Redistribution on R3
Part 4: Filter and Verify Redistribution using a Route Map
Background / Scenario
Every routing protocol has a unique redistribution behavior. The default redistribution behavior for EIGRP,
OSPF, and BGP is as follows:
o External routes redistributed into EIGRP have a seed metric of infinity and EIGRP routes set with
infinity are not installed into the EIGRP topology table.
o External routes redistributed into OSPF by default, are Type 2 (E2) external. Routes sourced from
BGP will have a seed metric of 1, while other routing protocols will have a seed metric of 20. Only
classful networks are redistributed, not subnets.
o External routes redistributed into BGP have the origin set to incomplete (?), the multi-exit
discriminator (MED) is set to the IGP metric and the weight is set to 32,768. By default, BGP does not
redistribute internal BGP routes.
In this lab, you will configure mutual or two-way redistribution between multiple EIGRP and OSPF on R1.
Then you will configure two-way redistribution between OSPF and BGP on R3. Finally, a route map will be
used to selectively redistribute routes.
Note: This lab is an exercise in configuring and verifying two-way route redistribution on router’s R1 and R3.
Route redistribution in this lab 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). The switches used in the labs are Cisco Catalyst 3650 with Cisco IOS XE Release
16.9.4 (universalk9 image). Other routers, switches, 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: Make sure that all the devices 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)
• 2 Switches (Cisco 3650 with Cisco IOS XE release 16.9.4 universal image or comparable)
Instructions
© 2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 2 of 13 www.netacad.com
Lab - Implement Route Redistribution Between Multiple Protocols
Router R1
hostname R1
no ip domain lookup
banner motd # R1, Configure BGP Route Redistribution #
line con 0
exec-timeout 0 0
logging synchronous
exit
interface g0/0/0
ip address 10.1.12.1 255.255.255.0
no shutdown
exit
interface g0/0/1
ip address 10.1.11.1 255.255.255.0
no shutdown
exit
interface loopback 0
ip address 10.1.1.1 255.255.255.0
ip ospf network point-to-point
ip ospf cost 15
no shutdown
exit
router eigrp 64512
eigrp router-id 1.1.1.1
network 10.1.11.0 0.0.0.255
exit
router ospf 1
router-id 1.1.1.1
network 10.1.1.0 0.0.0.255 area 1
network 10.1.12.0 0.0.0.255 area 0
exit
end
Router R2
hostname R2
no ip domain lookup
banner motd # R2, Configure BGP Route Redistribution #
line con 0
exec-timeout 0 0
logging synchronous
exit
interface g0/0/0
© 2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 3 of 13 www.netacad.com
Lab - Implement Route Redistribution Between Multiple Protocols
© 2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 4 of 13 www.netacad.com
Lab - Implement Route Redistribution Between Multiple Protocols
end
Switch D1
hostname D1
no ip domain lookup
ip routing
banner motd # D1, Configure BGP Route Redistribution #
line con 0
exec-timeout 0 0
logging synchronous
exit
interface range g1/0/1-24
shutdown
exit
interface g1/0/11
no switchport
ip address 10.1.11.2 255.255.255.0
no shutdown
exit
interface loopback 0
ip address 198.51.100.1 255.255.255.128
no shutdown
exit
router eigrp 64512
eigrp router-id 11.11.11.11
network 10.1.11.0 0.0.0.255
network 198.51.100.0 0.0.0.127
end
Switch D2
hostname D2
no ip domain lookup
ip routing
banner motd # D2, Configure BGP Route Redistribution #
line con 0
exec-timeout 0 0
logging synchronous
exit
interface range g1/0/1-24
shutdown
exit
interface g1/0/11
no switchport
ip address 10.1.32.2 255.255.255.0
no shutdown
exit
© 2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 5 of 13 www.netacad.com
Lab - Implement Route Redistribution Between Multiple Protocols
interface loopback 0
ip address 209.165.201.1 255.255.255.128
no shutdown
exit
router bgp 64532
bgp router-id 22.22.22.22
no bgp default ipv4-unicast
neighbor 10.1.32.3 remote-as 64532
address-family ipv4
network 209.165.201.0 mask 255.255.255.128
neighbor 10.1.32.3 activate
exit-address-family
end
b. Set the clock on all devices to UTC time.
c. Save the running configuration to startup-config on all devices.
Close configuration window
b. Next, issue the show ip route eigrp command, as shown, and notice the internal EIGRP route is from
D1, Loopback 0.
R1# show ip route eigrp | begin Gateway
Gateway of last resort is not set
198.51.100.0/25 is subnetted, 1 subnets
D 198.51.100.0
[90/130816] via 10.1.11.2, 00:07:43, GigabitEthernet0/0/1
b. Next, on R1 issue the show ip route ospf command, as shown. Notice the two OSPF intra–area routes.
R1# show ip route ospf | begin Gateway
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 8 subnets, 2 masks
O 10.1.23.0/24 [110/2] via 10.1.12.2, 00:35:32, GigabitEthernet0/0/0
O 10.3.3.0/24 [110/3] via 10.1.12.2, 00:35:32, GigabitEthernet0/0/0
Close configuration window
© 2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 6 of 13 www.netacad.com
Lab - Implement Route Redistribution Between Multiple Protocols
b. Next, issue the show ip route ospf command, as shown. Notice the first route is an OSPF inter–area
route from Area 1 on R1 with an OSPF cost of 17. Notice the other route is an OSPF intra–area prefix
with an OSPF cost of 2.
R3# show ip route ospf | begin Gateway
Gateway of last resort is not set
b. Next, issue the show bgp ipv4 unicast command and notice the 209.165.201.0/25 prefix is learned via
internal BGP (iBGP).
R3# show bgp ipv4 unicast | begin Network
Network Next Hop Metric LocPrf Weight Path
*>i 209.165.201.0/25 10.1.32.2 0 100 0 i
Close configuration window
© 2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 7 of 13 www.netacad.com
Lab - Implement Route Redistribution Between Multiple Protocols
© 2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 8 of 13 www.netacad.com
Lab - Implement Route Redistribution Between Multiple Protocols
b. Next, on R3 issue the redistribute command again, and add the keyword match to redistribute internal
and external Type 1 OSPF routes into BGP.
Open configuration window
c. Issue the show bgp ipv4 unicast on D2, as shown, to see the two external OSPF routes redistributed
into BGP. Notice the metric of 22 and origin code of incomplete (?). Remember that both prefixes
originated in EIGRP AS 64512.
Open configuration window
© 2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 9 of 13 www.netacad.com
Lab - Implement Route Redistribution Between Multiple Protocols
b. From D2 ping the 198.51.100.1 address on D1 using the Loopback 0 address on D2. The ping should be
successful. This verifies full end-to-end connectivity and successful redistribution on R1 and R3.
Open configuration window
Part 4: Filter and Verify Redistribution using a Prefix List and Route Map
In this part of the lab, you will use a prefix list and router map on R3 to filter specific OSPF prefixes from being
redistributed into BGP.
© 2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 10 of 13 www.netacad.com
Lab - Implement Route Redistribution Between Multiple Protocols
Step 1: Create a prefix list named LOOPBACK and specify the action for each statement.
Permit only the Loopback addresses on D1, R1 and R3, as shown. The last sequence 20 statement filters all
other prefixes. If not explicitly set, the deny statement is implied similar to using an ACL.
Open configuration window
b. Issue the show bgp ipv4 unicast to verify filtering of OSPF prefixes into BGP. Notice only the Loopback
addresses on D1, R1 and R3 are redistributed into BGP.
Open configuration window
c. From D2 ping the 198.51.100.1 address on D1. The ping should not be successful.
D2# ping 198.51.100.1
© 2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 11 of 13 www.netacad.com
Lab - Implement Route Redistribution Between Multiple Protocols
d. From D2 ping the 198.51.100.1 address on D1 using the Loopback 0 address on D2. The ping should be
successful. This verifies full end-to-end connectivity and successful redistribution on R1 and R3 as well as
redistribution filtering on R3 using a prefix list and route map.
D2# ping 198.51.100.1 source 209.165.201.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 198.51.100.1, timeout is 2 seconds:
Packet sent with a source address of 209.165.201.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/2/4 ms
close configuration window
Reflection Questions
1. Why does the ping to 198.51.100.1 fail when you do not specify the source Loopback 209.165.201.1 on D2?
Type your answers here.
2. By default, routes redistributed into BGP have the origin code, weight, and MED have which values?
Type your answers here.
3. By default, which OSFP prefixes are redistributed into BGP using the redistribute ospf 1 command?
Type your answers here.
4. Redistributed routes into OSPF have a metric of 20, with the exception of redistributed BGP routes which has
a seed metric of _____ ?
Type your answers here.
© 2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 12 of 13 www.netacad.com
Lab - Implement Route Redistribution Between Multiple Protocols
Router Model Ethernet Interface #1 Ethernet Interface #2 Serial Interface #1 Serial Interface #2
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 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 13 of 13 www.netacad.com