15.1.2 Lab - Control Routing Updates
15.1.2 Lab - Control Routing Updates
Topology
Addressing Table
Device Interface IPv4 Address Subnet Mask
R1
Loopback 1 172.16.1.1 255.255.255.0
R1
Loopback 12 172.16.12.1 255.255.255.192
R1
Loopback 13 172.16.13.1 255.255.255.224
R1
Loopback 14 172.16.14.1 255.255.255.240
R1
Loopback 15 172.16.15.1 255.255.255.248
R2 G0/0/0 172.16.0.1 255.255.255.252
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 1 of 16 www.netacad.com
Lab - Control Routing Updates
R2
G0/0/1 192.168.0.1 255.255.255.252
R2
Loopback 10 10.10.10.1 255.255.255.0
R3 G0/0/0 192.168.0.2 255.255.255.252
R3
Loopback 3 192.168.3.1 255.255.255.0
R3
Loopback 20 192.168.20.1 255.255.255.0
R3
Loopback 21 192.168.21.1 255.255.255.0
R3
Loopback 22 192.168.22.1 255.255.255.0
R3
Loopback 23 192.168.23.1 255.255.255.0
R3
Loopback 32 192.168.32.1 255.255.255.192
R3
Loopback 33 192.168.33.1 255.255.255.224
R3
Loopback 34 192.168.34.1 255.255.255.240
R3
Loopback 35 192.168.35.1 255.255.255.248
Objectives
In this lab you will learn how to control routing updates in an EIGRP and OSPF redistributed routing network.
Specifically, you will:
Part 1: Build the Network and Configure Basic Device Settings
Part 2: Configure Routing and Redistribution
Part 3: Filter Redistributed Routes using a Distribute List and ACL
Part 4: Filter Redistributed Routes using a Distribute List and Prefix List
Part 5: Filter Redistributed Routes using a Route Map
Background / Scenario
In this scenario, R1 and R2 are running EIGRP while R2 and R3 are running multi-area OSPF. R2 is the
OSPF autonomous system border router (ASBR) consisting of areas 0, 10, and 20. R2 will also redistribute
the EIGRP routes into OSPF and the OSPF routes into EIGRP.
Your task is to control routing updates between the two routing domains by using distribute lists, prefix lists,
and route maps.
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. Refer to the Router Interface Summary Table at the end of the lab for the correct interface
identifiers.
Note: Make sure that the routers and switches 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)
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 2 of 16 www.netacad.com
Lab - Control Routing Updates
Console cables to configure the Cisco IOS devices via the console ports
1 PC (Choice of operating system with terminal emulation program installed)
Ethernet cables as shown in the topology
Instructions
hostname R1
no ip domain lookup
line con 0
logging sync
exec-time 0 0
exit
banner motd # This is R1, Controlling Routing Updates #
interface g0/0/0
description Connection to R2
ip add 172.16.0.2 255.255.255.252
no shut
exit
interface Lo1
ip address 172.16.1.1 255.255.255.0
exit
interface Lo12
ip address 172.16.12.1 255.255.255.192
exit
interface Lo13
ip address 172.16.13.1 255.255.255.224
exit
interface Lo14
ip address 172.16.14.1 255.255.255.240
exit
interface Lo15
ip address 172.16.15.1 255.255.255.248
end
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 3 of 16 www.netacad.com
Lab - Control Routing Updates
Router R2
hostname R2
no ip domain lookup
line con 0
logging sync
exec-time 0 0
exit
banner motd # This is R2, Controlling Routing Updates #
interface g0/0/0
description Connection to R1
ip add 172.16.0.1 255.255.255.252
no shut
exit
interface GigabitEthernet0/0/1
description Connection to R3
ip address 192.168.0.1 255.255.255.252
no shut
exit
int lo10
ip add 10.10.10.1 255.255.255.0
ip ospf network point-to-point
end
Router R3
hostname R3
no ip domain lookup
line con 0
logging sync
exec-time 0 0
exit
banner motd # This is R3, Controlling Routing Updates #
interface g0/0/0
description Connection to R2
ip add 192.168.0.2 255.255.255.252
no shut
exit
interface Lo3
ip add 192.168.3.1 255.255.255.0
ip ospf network point-to-point
exit
interface Lo32
ip add 192.168.32.1 255.255.255.0
ip ospf network point-to-point
exit
interface Lo33
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 4 of 16 www.netacad.com
Lab - Control Routing Updates
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 5 of 16 www.netacad.com
Lab - Control Routing Updates
R1(config-router)# end
Close configuration window
b. On R3, advertise the connected networks using OSPF process ID 123 for area 0 and area 20.
Open configuration window
c. On R2, configure EIGRP and redistribute the OSPF networks into EIGRP AS 1. Then configure OSPF
Open configuration window
and redistribute and summarize the EIGRP networks into OSPF.
R2(config)# router eigrp 1
R2(config-router)# eigrp router-id 2.2.2.2
R2(config-router)# network 172.16.0.0 0.0.0.3
R2(config-router)# exit
*Mar 18 13:08:33.786: %DUAL-5-NBRCHANGE: EIGRP-IPv4 1: Neighbor 172.16.0.2
(GigabitEthernet0/0/0) is up: new adjacency
R2(config)#
R2(config)# router ospf 123
R2(config-router)# router-id 2.2.2.2
R2(config-router)# network 192.168.0.0 0.0.0.3 area 0
R2(config-router)# network 10.10.10.0 0.0.0.255 area 10
R2(config-router)# end
*Mar 18 13:08:36.024: %OSPF-5-ADJCHG: Process 123, Nbr 3.3.3.3 on
GigabitEthernet0/0/1 from LOADING to FULL, Loading Done
Close configuration window
b. Verify the OSPF routing table entries on R3. R3 has an inter-area route entry for the OSPF area 10
network.
Open configuration window
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 6 of 16 www.netacad.com
Lab - Control Routing Updates
c. Verify the EIGRP and OSPF routing table entries on R2. R2 has entries for all of the EIGRP networks and
the OSPF networks including the Area 20 networks.
Open configuration window
d. Verify connectivity to an EIGRP and OSPF network using the ping command as shown. R2 has
connectivity to the EIGRP and OSPF networks.
R2# ping 172.16.13.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.13.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R2# ping 192.168.20.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.20.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 7 of 16 www.netacad.com
Lab - Control Routing Updates
a. On R2, redistribute the OSPF routes in EIGRP. Routes redistributed into EIGRP require that a metric be
assigned.
R2(config)# router eigrp 1
R2(config-router)# redistribute ospf 123 metric 10000 100 255 1 1500
R2(config-router)# exit
b. On R2, redistribute the EIGRP routes in OSPF. Routes redistributed into OSPF are automatically
assigned a metric of 20. In our example, you are assigning a higher cost metric of 100 to redistributed
routes.
R2(config)# router ospf 123
R2(config-router)# redistribute eigrp 1 subnets metric 100
R2(config-router)# end
b. On R1, verify the EIGRP routing table. Originally the R1 routing table displayed no entries as R1 was
directly connected to all EIGRP networks. However, R1 now knows about the external routes redistributed
from the R2 OSPF routing domain. The highlighted entries identify all of the OSPF routes.
Open configuration window
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 8 of 16 www.netacad.com
Lab - Control Routing Updates
c. Verify the EIGRP routing table on R3. Previously, R3 only had the Area 10 network in its routing table. R3
now knows about the external EIGRP routes redistributed by R2. Also notice that the redistribution
Open configuration window
command assigned a metric of 100.
R3# show ip route ospf | begin Gateway
Gateway of last resort is not set
d. From all routers, verify connectivity to all configured destinations using the following TCL script. All pings
should be successful. Troubleshoot if necessary.
Open configuration window
tclsh
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 9 of 16 www.netacad.com
Lab - Control Routing Updates
foreach address {
192.168.0.1
192.168.20.1
192.168.21.1
192.168.22.1
192.168.23.1
192.168.3.1
192.168.32.1
192.168.33.1
192.168.34.1
192.168.35.1
10.10.10.1
172.16.0.1
172.16.0.2
172.16.1.1
172.16.12.1
172.16.13.1
172.16.14.1
172.16.15.1
} { ping $address }
Close configuration window
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 10 of 16 www.netacad.com
Lab - Control Routing Updates
b. You will filter the Area 20 networks from being advertised into the EIGRP domain. Although a distribute
list could be implemented on the receiving router (i.e., R1), it is usually best to filter routes from the
redistributing router. Therefore, on R2, create a standard named ACL called OSPF20-FILTER that denies
the 192.168.20.0/22 route. The ACL must also permit all other routes otherwise, no OSPF routes would
be redistributed into EIGRP.
Open configuration window
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 11 of 16 www.netacad.com
Lab - Control Routing Updates
Note: If additional router filtering was required, only the OSPF20-FILTER ACL on R2 would need to be
altered.
Part 4: Filter Redistributed Routes using a Distribute List and Prefix List
In this part, you will filter routes using the distribute list and prefix list technique.
Using a distribute list with an ACL or with a prefix list basically achieves the same result of filtering routes.
However, in large enterprise networks, route filtering can be quite complex. The ACLs can be very extensive
and therefore taxing on router resources. For this reason, prefix lists should be used instead of ACLs since
they are more efficient and less taxing on router resources than ACLs.
Note: Prefix lists are not exclusively used with distribute lists but can also be used with route maps and other
commands.
Step 1: Filter redistributed routes using a distribute list and prefix list.
In this step, a prefix list will be configured with a distribute list to filter R1 routes being advertised from R2 to
R3.
a. On R3, verify the routing table entry for the routes learned externally identified with the O E2 source entry.
The output displays route entries for the EIGRP networks connected to R1.
R3# show ip route ospf | include O E2
O E2 172.16.0.0/30
O E2 172.16.1.0/24
O E2 172.16.12.0/26
O E2 172.16.13.0/27
O E2 172.16.14.0/28
O E2 172.16.15.0/29
b. Configure R2 with a prefix list identifying which networks to advertise to R3. Specifically, only the
networks with the first two octets being 172.16 (i.e., 172.16.0.0/16) with a subnet mask of /24 or less will
be advertised.
R2(config)# ip prefix-list EIGRP-FILTER permit 172.16.0.0/16 le 24
c. Configure a distribute list under the OSPF process to filter routes propagated to R3 using the pre-
configured prefix list.
R2(config)# router ospf 123
R2(config-router)# distribute-list prefix EIGRP-FILTER out eigrp 1
R2(config-router)# exit
Note: If additional router filtering was required, only the EIGRP-FILTER prefix list on R2 would need to be
altered.
d. On R3, verify which EIGRP redistributed routes have been learned from R2. Notice how only the
172.16.1.0/24 route is listed because all other routes have subnet masks greater than /24.
R3# show ip route ospf | include O E2
O E2 172.16.1.0 [110/100] via 192.168.0.1, 02:07:51, GigabitEthernet0/0/0
e. To observe how a prefix list can be used to filter routes, remove the previously configured prefix list and
change the prefix list on R2 advertise only EIGRP networks with subnet masks of /26 or greater.
R2(config)# no ip prefix-list EIGRP-FILTER permit 172.16.0.0/16 le 24
R2(config)# ip prefix-list EIGRP-FILTER permit 172.16.0.0/16 ge 26
f. Verify the change on R3 as shown. Now only the 172.16.1.0/24 route is not listed as all other routes have
subnet masks greater than or equal to /26.
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 12 of 16 www.netacad.com
Lab - Control Routing Updates
g. Now change the prefix list on R2 to advertise only networks with subnet masks of /28 or less.
R2(config)# no ip prefix-list EIGRP-FILTER permit 172.16.0.0/16 ge 26
R2(config)# ip prefix-list EIGRP-FILTER permit 172.16.0.0/16 le 28
h. Verify the output on R3 as shown. Notice how the 172.16.0.0/30 and 172.16.15.0/29 are no longer
advertised as their subnet masks are greater than /28.
R3# show ip route ospf | include O E2
O E2 172.16.1.0/24
O E2 172.16.12.0/26
O E2 172.16.13.0/27
O E2 172.16.14.0/28
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 13 of 16 www.netacad.com
Lab - Control Routing Updates
b. Route maps can be used to filter redistributed traffic in multiple ways. In this step, you will filter and deny
the R3 Lo 34 and Lo 35 networks (i.e., 192.168.34.0/28 and 192.168.35.0/29) from being redistributed
into the EIGRP routing domain. All other networks connected to R1 will be redistributed.
On R2, create a standard named ACL called R3-ACL that identifies the R3 Lo 34 and Lo 35 networks
(i.e., 192.168.34.0/28 and 192.168.35.0/29) as shown.
R2(config)# ip access-list standard R3-ACL
R2(config-std-nacl)# remark ACL used with the R3-FILTER route map
R2(config-std-nacl)# permit 192.168.34.0 0.0.0.15
R2(config-std-nacl)# permit 192.168.35.0 0.0.0.7
R2(config-std-nacl)# exit
c. Configure a route map with a statement that denies traffic based on a match with the named ACL. Then
add a permit statement without a match statement to provide an explicit “permit all”.
R2(config)# route-map R3-FILTER deny 10
R2(config-route-map)# description RM filters R3 OSPF routes
R2(config-route-map)# match ip address R3-ACL
R2(config-route-map)# exit
R2(config)# route-map R3-FILTER permit 20
R2(config-route-map)# description RM permits all other R3 OSPF routes
R2(config-route-map)# exit
d. Apply this route map to EIGRP by reentering the redistribute command using the route-map keyword.
R2(config)# router eigrp 1
R2(config-router)# redistribute ospf 123 route-map R3-FILTER metric 1000000
100 255 1 1500
e. Verify that the two R3 networks are filtered out in the R1 routing table. Notice that the 192.168.34.0/28
and 192.168.35.0/29 networks are no longer in the R1 routing table.
R1# show ip route eigrp | begin Gateway
Gateway of last resort is not set
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 14 of 16 www.netacad.com
Lab - Control Routing Updates
Step 2: Filter redistributed routes and set attributes using a route map.
The preceding step was a simple example of using a route map to filter redistributed routes. However, route
maps can be used to do much more.
In this step, you will filter the 172.16.13.0/27 network from R1 and change its OSPF metric to 25 instead of
100 like all other redistributed routes. You will also change its metric type from an external type 2 route (i.e., O
E2), to an external type 1 route (i.e., O E1).
a. On R3, verify the routing table entry for the routes learned externally identified with the 0 E2 source entry.
The 172.16.13.0/27 route will be configured with additional attributes.
R3# show ip route ospf | begin Gateway
Gateway of last resort is not set
b. Although an ACL could be used, this example will use a prefix list. Configure a prefix list identifying the
route to be filtered.
R2(config)# ip prefix-list R1-PL permit 172.16.13.0/27
c. Configure a route map matching the identified route in the prefix list and assign the OSPF metric cost of
25 and change the metric type to External Type 1. Then add a permit statement without a match
statement acting as an explicit “permit all”.
R2(config)# route-map R1-FILTER permit 10
R2(config-route-map)# description RM filters 172.16.13.0/27
R2(config-route-map)# match ip address prefix-list R1-PL
R2(config-route-map)# set metric 25
R2(config-route-map)# set metric-type type-1
R2(config-route-map)# exit
R2(config)# route-map R1-FILTER permit 20
R2(config-route-map)# description RM permits all other R1 OSPF routes
R2(config-route-map)# exit
d. Apply this route map to OSPF by reentering the redistribute command using the route-map keyword.
R2(config)# router ospf 123
R2(config-router)# redistribute eigrp 1 subnets route-map R1-FILTER
R2(config-router)# exit
e. Verify that the two R3 networks are filtered out in the R1 routing table. Notice that only the 172.16.13.0/27
route is an OSPF External Type 1 route (i.e., O E1) with a cost metric of 26 (i.e., the assigned metric cost
of 25 plus the cost of 1 for the R2 to R3 link).
R3# show ip route ospf | begin Gateway
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 15 of 16 www.netacad.com
Lab - Control Routing Updates
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 16 of 16 www.netacad.com