16.1.4 Lab - Configure Route Redistribution Using BGP
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
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.
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)
2 Switches (Cisco 3650 with Cisco IOS XE release 16.9.4 universal image or comparable)
1 PC (Windows with terminal emulation program)
Console cables to configure the Cisco IOS devices via the console ports
Ethernet cables as shown in the topology
Instructions
Part 1: Build the Network and Configure Basic Device Settings
In Part 1, you will set up the network topology and configure basic settings.
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
ip address 10.1.12.2 255.255.255.0
no shutdown
exit
interface g0/0/1
ip address 10.1.23.2 255.255.255.0
no shutdown
exit
router ospf 1
router-id 2.2.2.2
network 10.1.12.0 0.0.0.255 area 0
network 10.1.23.0 0.0.0.255 area 0
end
Router R3
hostname R3
no ip domain lookup
banner motd # R3, Configure BGP Route Redistribution #
line con 0
exec-timeout 0 0
logging synchronous
exit
interface g0/0/0
ip address 10.1.23.3 255.255.255.0
no shutdown
exit
interface g0/0/1
ip address 10.1.32.3 255.255.255.0
no shutdown
exit
interface loopback 0
ip address 10.3.3.1 255.255.255.0
ip ospf network point-to-point
no shutdown
exit
router ospf 1
router-id 3.3.3.3
network 10.3.3.0 0.0.0.255 area 0
network 10.1.23.0 0.0.0.255 area 0
router bgp 64532
bgp router-id 3.3.3.3
no bgp default ipv4-unicast
neighbor 10.1.32.2 remote-as 64532
address-family ipv4
neighbor 10.1.32.2 activate
neighbor 10.1.32.2 next-hop-self
exit-address-family
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
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, 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
Open configuration window
64512.
D2# show bgp ipv4 unicast | begin Network
Network Next Hop Metric LocPrf Weight Path
*>i 10.1.1.0/24 10.1.32.3 17 100 0 ?
*>i 10.1.11.0/24 10.1.32.3 22 100 0 ?
*>i 10.1.12.0/24 10.1.32.3 2 100 0 ?
*>i 10.1.23.0/24 10.1.32.3 0 100 0 ?
*>i 10.3.3.0/24 10.1.32.3 0 100 0 ?
*>i 198.51.100.0/25 10.1.32.3 22 100 0 ?
*> 209.165.201.0/25 0.0.0.0 0 32768 i
close configuration window
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
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
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?
The ping from D2 uses the source address of 10.1.32.2 which is not an iBGP nor eBGP route. Therefore, this
prefix is not being redistributed into OSPF. The ICMP echo reaches D1 but the ICMP echo-reply is being
dropped by D1 since the 10.1.32.0/24 prefix in not in the routing table on D1.
2. By default, routes redistributed into BGP have the origin code, weight, and MED have which values?
The origin code is set to incomplete or ?, the weight is 32,768 and the MED is based on the IGP metric unless
directly connected, which is given a MED value of 0.
3. By default, which OSFP prefixes are redistributed into BGP using the redistribute ospf 1 command?
Only classful intra-area and inter-area prefixes are redistributed into BGP.
4. Redistributed routes into OSPF have a metric of 20, with the exception of redistributed BGP routes which has a seed
metric of _____ ?
one