Chapter 9 Redistribution

Lab 9-1: Basic Redistribution 1

Task 1

Figure 9-1 illustrates the topology that will be used in the following tasks. Configure the link between R1 and R3 to be in OSPF area 0. Configure the Lo0 interface of R3 in area 2. Do not use the network command to accomplish this task. The OSPF router IDs should be configured as 0.0.0.1 and 0.0.0.3 for R1 and R3, respectively.

image

Figure 9-1 Configuring Basic Redistribution

On R1:

R1(config)# interface FastEthernet0/0.13
R1(config-subif)# ip ospf 1 area 0

R1(config)# router ospf 1
R1(config-router)# router-id 0.0.0.1

On R3:

R3(config)# interface FastEthernet0/0
R3(config-if)# ip ospf 1 area 0

R3(config)# interface loopback 0
R3(config-if)# ip ospf 1 area 2

When you run the Open Shortest Path First (OSPF) protocol on a given interface by using the interface-configuration command, IOS starts the OSPF process automatically:

R3# show run | section router ospf 1

router ospf 1
 log-adjacency-changes

R3(config)# router ospf 1
R3(config-router)# router-id 0.0.0.3
% OSPF: Reload or use "clear ip ospf process" command, for this to take effect

R3# clear ip ospf process
Reset ALL OSPF processes? [no]: yes

You should see the following console message:

%OSPF-5-ADJCHG: Process 1, Nbr 0.0.0.1 on Ethernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
%OSPF-5-ADJCHG: Process 1, Nbr 0.0.0.1 on FastEthernet0/0 from LOADING to FULL, Loading Done

Let’s verify the configuration:

Note R1 should see R3’s Lo0 as an “O IA” route in its routing table.

On R1:

R1# show ip route ospf | begin gate
gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 9 subnets, 2 masks

O IA     10.1.1.3/32 [110/2] via 10.1.13.3, 00:01:33, Fastethernet0/0.13

Task 2

Add the following loopback interfaces to R3:

Lo31: 192.168.31.3/24

Lo32: 192.168.32.3/24

Lo33: 192.168.33.3/24

Redistribute Lo31 and Lo33 into OSPF. Do not redistribute Lo32 into OSPF. Do not use access-list or prefix-list to accomplish the task.

The first step in configuring this task is to configure the loopback interfaces on R3:

On R3:

R3(config)# interface loopback31
R3(config-if)# ip address 192.168.31.3 255.255.255.0

R3(config-if)# interface loopback32
R3(config-if)# ip address 192.168.32.3 255.255.255.0

R3(config-if)# interface loopback33
R3(config-if)# ip address 192.168.33.3 255.255.255.0

Because using an access list or a prefix list is not allowed, a route map is configured and the required interfaces are matched using the match interface option in the route map configuration mode.

Note The task states that Lo32 should not be redistributed; therefore, the route map could be configured to deny Lo32 and permit the rest of the networks, or the route map could simply permit the Lo31 and Lo33 interfaces and deny Lo32 from being redistributed.

Once the route map is configured, it’s referenced in the redistribute connected command in the router configuration mode.

We have two options as far as configuring a route map goes.

Option #1

In this option, only Lo32 is denied. If route-map tst permit 90 is not configured, the rest of the interfaces will also be denied from being redistributed, because if the logic of the route map is not completed, IOS will try to protect you and in the process will drop the rest of the interfaces. Therefore, route-map tst permit 90 is configured to permit the rest of the interfaces.

!On R3:

R3(config)# route-map tst deny 10
R3(config-route-map)# match interface loopback32
R3(config)# route-map tst permit 90

Option #2

This option is more specific and should be used in this configuration. This option is more specific because it will not redistribute future directly connected routes in this process.

R3(config)# route-map tst permit 10
R3(config-route-map)# match interface loopback31 loopback33

In the final step, the connected interfaces that are referenced in the route-map are redistributed into the OSPF routing protocol.

R3(config-route-map)# router ospf 1
R3(config-router)# redistribute connected subnets route-map tst

The subnets keyword is required; otherwise, only the classful networks (networks that are not subnetted) will be redistributed.

Let’s verify the configuration:

!On R3:

R3# show ip ospf database external | include Type-5|192

                Type-5 AS External Link States
  link state id: 192.168.31.0 (External Network Number )
  link state id: 192.168.33.0 (External Network Number )
!On R1:

R1# show ip route ospf | begin Gate
gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 9 subnets, 2 masks
O IA     10.1.1.3/32 [110/2] via 10.1.13.3, 00:10:39, Fastethernet0/0.13
O E2 192.168.31.0/24 [110/20] via 10.1.13.3, 00:01:45, Fastethernet0/0.13
O E2 192.168.33.0/24 [110/20] via 10.1.13.3, 00:01:45, Fastethernet0/0.13

Task 3

Configure R1 and R2 based on the following policy:

Configure RIPv2 between R1 and R2. Disable auto-summary.

R1 should be configured to redistribute OSPF routes into the RIP routing domain.

R1 should filter R3’s Lo33. Do not use distribute-list or offset-list to accomplish this task.

The first step is to configure RIPv2 on both R1 and R2:

!On R1:
R1(config)# router rip
R1(config-router)# version 2
R1(config-router)# no auto-summary
R1(config-router)# network 12.0.0.0
R1(config-router)# network 10.0.0.0
R1(config-router)# passive-interface FastEthernet0/0.13
R1(config-router)# passive-interface FastEthernet0/0.14

Note In the preceding configuration, the passive-interface commands are required because the task requires RIPv2 to run between R1 and R2. The passive-interface commands turn the specified subinterfaces into receive-only mode.

!On R2:

R2(config)# router rip
R2(config-router)# version 2
R2(config-router)# no auto-summary
R2(config-router)# network 12.0.0.0
R2(config-router)# network 10.0.0.0

Let’s verify the configuration:

!On R2:

R2# show ip route rip | begin Gate
Gateway of last resort is not set

      10.0.0.0/32 is subnetted, 2 subnets
R        10.1.1.1 [120/1] via 12.1.1.1, 00:00:17, FastEthernet0/0

In the second step, OSPF is redistributed into RIP on R1:

!On R1:

R1(config)# router rip
R1(config-router)# redistribute ospf 1

Let’s verify the configuration:

!On R2:

R2# show ip route rip | begin Gate
Gateway of last resort is not set

      10.0.0.0/32 is subnetted, 2 subnets
R        10.1.1.1 [120/1] via 12.1.1.1, 00:00:05, FastEthernet0/0

Note R3’s Lo0, Lo31, and Lo33 that were redistributed from the OSPF routing domain are not in the routing table of R2.

One of the biggest problems of redistribution is that each routing protocol has its own metric:

RIP: Hop count

EIGRP: Composite of bandwidth, delay, reliability, load, and K values

OSPF: Cost, which is based on bandwidth

When redistributing from OSPF into the RIP routing protocol, what should be the metric?

Well, there are many choices:

The metric can be configured such that it applies to all existing and future redistributed routes.

The metric can be set separately on each configured redistribute command.

The metric can be set based on usage of a route-map.

One notable exception is directly connected routes to which RIP applies a default metric of 0. To correct the problem, a metric of 3 is assigned to the OSPF routes that are redistributed into RIPv2:

!On R1:

R1(config)# router rip
R1(config-router)# redistribute ospf 1 metric 3

Let’s verify the configuration:

!On R2:

R2# show ip route rip | begin Gate
Gateway of last resort is not set

      10.0.0.0/32 is subnetted, 3 subnets
R        10.1.1.1 [120/1] via 12.1.1.1, 00:00:13, FastEthernet0/0
R        10.1.1.3 [120/3] via 12.1.1.1, 00:00:13, FastEthernet0/0
      13.0.0.0/24 is subnetted, 1 subnets
R        13.1.1.0 [120/3] via 12.1.1.1, 00:00:13, FastEthernet0/0
R     192.168.31.0/24 [120/3] via 12.1.1.1, 00:00:13, FastEthernet0/0
R     192.168.33.0/24 [120/3] via 12.1.1.1, 00:00:13, FastEthernet0/0

The output of the preceding show command verifies that all OSPF routes have been redistributed into RIPv2. The last step of this task requires filtering of R3's Lo33 (192.168.33.0/24). Remember that the use of distribute-list or offset-list is not allowed. Therefore, a route-map is used to set the metric of Lo33’s interface to Infinity. This will cause R1 to poison that route.

The steps required to configure this task are as follows:

1. A prefix-list is configured to identify the IP address of R3's Lo33.

2. A route-map is configured to reference the prefix-list from the previous step and to set the metric to 16 (infinity).

3. The redistribute command is reconfigured to reference the route map.

Here’s the first step:

!On R1

 R1(config)# ip prefix-list lo33 permit 192.168.33.0/24

Here’s the second step:

R1(config)# route-map tst permit 10
R1(config-route-map)# match ip address prefix-list lo33

R1(config-route-map)# set metric 16
R1(config-route-map)# route-map tst permit 90

And here’s the third and the final step:

R1(config-route-map)# router rip
R1(config-router)# redistribute ospf 1 metric 3 route-map tst

Let’s verify the configuration:

!On R2:

R2# show ip route rip | begin Gate
Gateway of last resort is not set

      10.0.0.0/32 is subnetted, 3 subnets
R        10.1.1.1 [120/1] via 12.1.1.1, 00:00:11, FastEthernet0/0
R        10.1.1.3 [120/3] via 12.1.1.1, 00:00:11, FastEthernet0/0
      13.0.0.0/24 is subnetted, 1 subnets
R        13.1.1.0 [120/3] via 12.1.1.1, 00:00:11, FastEthernet0/0
R     192.168.31.0/24 [120/3] via 12.1.1.1, 00:00:11, FastEthernet0/0

To see the routes advertised to R2, let’s enable RIP debugging on R1 and R2:

!On R1:

R1# debug ip rip

RIP: sending v2 update to 224.0.0.9 via FastEthernet0/0.12 (12.1.1.1)
RIP: build update entries
        10.1.1.1/32 via 0.0.0.0, metric 1, tag 0
        10.1.1.3/32 via 0.0.0.0, metric 3, tag 0
        13.1.1.0/24 via 0.0.0.0, metric 3, tag 0
        192.168.31.0/24 via 0.0.0.0, metric 3, tag 0
        192.168.33.0/24 via 0.0.0.0, metric 16, tag 0

In the output of the preceding debug, you can clearly see that network 192.168.33.0/24 is advertised with a hop count of 16, and the output of the following debug reveals that R2 discards the route because a hop count of 16 is inaccessible in the RIP routing protocol:

!On R2

R2# debug ip rip

RIP: received v2 update from 12.1.1.1 on FastEthernet0/0
     10.1.1.1/32 via 0.0.0.0 in 1 hops
     10.1.1.3/32 via 0.0.0.0 in 3 hops
     13.1.1.0/24 via 0.0.0.0 in 3 hops
     192.168.31.0/24 via 0.0.0.0 in 3 hops
     192.168.33.0/24 via 0.0.0.0 in 16 hops  (inaccessible)

Here’s how to disable debug on R1 and R2:

!On R1 and R2:

Rx# undebug all

Task 4

Add the following loopback interfaces to R2 and R3:

R2: Lo23: 192.168.23.2 /24

R3: Lo23: 192.168.23.3 /24

Advertise R2’s Lo23 into the RIPv2 routing protocol. R3's Lo23 should be configured in OSPF area 2 and advertised with its correct mask.

!On R2:

R2(config)# interface loopback 23
R2(config-if)# ip address 192.168.23.2 255.255.255.0

R2(config-if)# router rip
R2(config-router)# network 192.168.23.0
On R3:

R3(config)# interface loopback 23
R3(config-if)# ip address 192.168.23.3 255.255.255.0
R3(config-if)# ip ospf network point-to-point

R3(config-if)# router ospf 1
R3(config-router)# network 192.168.23.3 0.0.0.0 area 2

Let’s verify the configuration:

!On R1:

R1# show ip route | include 192.168.23

     192.168.23.0/24 is subnetted, 1 subnets
O IA  192.168.23.0/24 [110/2] via 13.1.1.3, 00:00:24, FastEthernet0/0.13

The route does not appear as a RIP route. Did RIP advertise the route? If so, what happened?

Let’s check R1’s RIP database:

R1# show ip rip database 192.168.23.0 255.255.255.0

192.168.23.0/24    redistributed
    [3] via 13.1.1.3, from 0.0.0.3,

R1# show ip route 192.168.23.0
Routing entry for 192.168.23.0/24
  Known via "ospf 1", distance 110, metric 2, type inter area
  Redistributing via rip
  Advertised by rip metric 3 route-map tst
  Last update from 13.1.1.3 on FastEthernet0/0.13, 00:04:05 ago
  Routing Descriptor Blocks:
  * 13.1.1.3, from 0.0.0.3, 00:04:05 ago, via FastEthernet0/0.13
      Route metric is 2, traffic share count is 1

Note The route is in RIP’s database, but it is in the database as a “redistributed” route. It is in the database as “redistributed” because of the redistribution of OSPF into RIP on R1 in Task 3. The routing table shows that route as Known via “ospf 1”.

So where is the update from R2?

Maybe R2 is not sending that update at all? Let’s debug RIP’s updates and verify:

R1# debug ip rip
RIP protocol debugging is on

RIP: sending v2 update to 224.0.0.9 via FastEthernet0/0.12 (12.1.1.1)
RIP: build update entries
        10.1.1.1/32 via 0.0.0.0, metric 1, tag 0
        10.1.1.3/32 via 0.0.0.0, metric 3, tag 0
        13.1.1.0/24 via 0.0.0.0, metric 3, tag 0
        192.168.23.0/24 via 0.0.0.0, metric 3, tag 0
        192.168.31.0/24 via 0.0.0.0, metric 3, tag 0
        192.168.33.0/24 via 0.0.0.0, metric 16, tag 0

RIP: received v2 update from 12.1.1.2 on FastEthernet0/0.12
        10.1.1.2/32 via 0.0.0.0 in 1 hops
        192.168.23.0/24 via 0.0.0.0 in 1 hops

R1 received an update for network 192.168.23.0/24 from R2, but it does not install it into its RIP database because the RIP database contains only redistributed routes and learned RIP routes that are actually installed in the router's routing table.

Because the “administrative distance” of RIP is higher than OSPF’s administrative distance, IOS prefers the OSPF route and rejects the RIP route.

Let’s verify this fact:

!On R3

R3(config)# interface loopback 23
R3(config-if)# shutdown

!On R1

R1# show ip route rip | begin Gate
Gateway of last resort is not set

      10.0.0.0/32 is subnetted, 3 subnets
R        10.1.1.2 [120/1] via 12.1.1.2, 00:00:15, FastEthernet0/0.12
R     192.168.23.0/24 [120/1] via 12.1.1.2, 00:00:15, FastEthernet0/0.12

R1# show ip rip database 192.168.23.0 255.255.255.0

192.168.23.0/24
    [1] via 12.1.1.2, 00:00:21, FastEthernet0/0.12

The output of the preceding show commands reveals that network 192.168.23.0/24 is a RIP route.

To verify and reveal the comparison of administrative distance of RIP versus OSPF, debug ip routing is enabled on R1 and then the Lo23 interface of R3 is enabled (no shut).

Here’s how to disable the existing debug:

Here’s how to enable debugging for IP routing:

R1# debug ip routing
IP routing debugging is on

!On R3

R3(config)# interface loopback 23
R3(config-if)# no shutdown

Let’s check the debug output on R1:

!On R1:

RT: closer admin distance for 192.168.23.0, flushing 1 routes
RT: add 192.168.23.0/24 via 13.1.1.3, ospf metric [110/2]

The first line of the preceding output reveals the comparison of the administrative distance of RIP and OSPF, and add 192.168.23.0/24 via 13.1.1.3, ospf metric [110/2]  is what is injected into the routing table of this router to verify that information:

R1# show ip route ospf | include 192.168.23.0

O IA  192.168.23.0/24 [110/2] via 13.1.1.3, 00:01:25, FastEthernet0/0.13

Let’s disable the debugging:

Task 5

Configure EIGRP AS 100 on R1’s F0/0.14 interface and R4’s F0/0 interface. R4 should redistribute its loopback0 interface into this routing domain.

!On R1:

R1(config)# router eigrp 100
R1(config-router)# network 14.1.1.1 0.0.0.0

!On R4:

R4(config)# router eigrp 100
R4(config-router)# network 14.1.1.4 0.0.0.0

You should see the following console message:

%DUAL-5-NBRCHANGE: EIGRP-IPv4 100: Neighbor 14.1.1.1 (FastEthernet0/0) is up: new adjacency

Let’s verify the configuration:

!On R4:

R4# show ip eigrp neighbors

EIGRP-IPv4 Neighbors for AS(100)
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
0   14.1.1.1                Fa0/0             13 00:00:45    8   300  0  1

First, a route-map is configured and the Lo0 interface is referenced:

R4(config)# route-map tst permit 10
R4(config-route-map)# match interface loopback0

Second, the redistribute connected command is configured to reference the route-map. When redistributing routes into EIGRP, the metric should also be configured. The metric is in the following order:

Bandwidth, Delay, Reliability, Load, and MTU.

Note EIGRP does not use MTU as a parameter for metric calculation, but it’s still a required value that must be configured.

The only exception to configuring a metric with EIGRP is when redistributing connected routes, static routes, or routes from another EIGRP routing domain.

R4(config)# router eigrp 100
R4(config-router)# redistribute connected route-map tst

Let’s verify the configuration:

!On R1:

R1# show ip route eigrp | begin Gate
Gateway of last resort is not set

      10.0.0.0/32 is subnetted, 4 subnets
D EX     10.1.1.4 [170/156160] via 14.1.1.4, 00:00:10, FastEthernet0/0.14

Task 6

Redistribute RIP into EIGRP. Ensure that R4 installs a route for network 192.168.23.0/24 into its routing table:

!On R1:

R1# show interface fastethernet0/0.12 | include BW|load
  MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec,
     reliability 255/255, txload 1/255, rxload 1/255

R1(config)# router eigrp 100
R1(config-router)# redistribute rip metric 100000 10 255 1 1500

Let’s verify the configuration:

!On R4:

R4# show ip route eigrp | begin Gate
Gateway of last resort is not set

      10.0.0.0/32 is subnetted, 3 subnets
D EX     10.1.1.1 [170/30720] via 14.1.1.1, 00:00:27, FastEthernet0/0
D EX     10.1.1.2 [170/30720] via 14.1.1.1, 00:00:27, FastEthernet0/0
      12.0.0.0/24 is subnetted, 1 subnets
D EX     12.1.1.0 [170/30720] via 14.1.1.1, 00:00:27, FastEthernet0/0

Network 192.168.23.0/24 is not being redistributed, as shown here:

R4# show ip route 192.168.23.0
% Network not in table

R4# show ip eigrp topology 192.168.23.0/24
EIGRP-IPv4 Topology Entry for AS(100)/ID(10.1.1.4)
%Entry 192.168.23.0/24 not in topology table

Warning IOS will redistribute the 192.168.23.0/24 network only if this network is in the routing table of R2 as a RIP route. Let’s say the routes from routing protocol A are to be redistributed into routing protocol B; the IOS will only redistribute the routes that are in its routing table as A into routing protocol B’s routing table.

Let’s verify the routing table of R1 for network 192.168.23.0/24:

!On R1

R1# show ip rip database 192.168.23.0 255.255.255.0

192.168.23.0/24    redistributed
    [3] via 13.1.1.3, from 0.0.0.3,

R1# show ip route 192.168.23.0

Routing entry for 192.168.23.0/24
  Known via "ospf 1", distance 110, metric 2, type inter area
  Redistributing via rip
  Advertised by rip metric 3 route-map tst
  Last update from 13.1.1.3 on FastEthernet0/0.13, 00:18:17 ago
  Routing Descriptor Blocks:
  * 13.1.1.3, from 0.0.0.3, 00:18:17 ago, via FastEthernet0/0.13
              Route metric is 2, traffic share count is 1

The output of the preceding show commands reveals that the route is present in RIP’s database, but the route in R1 is known via OSPF. The problem is, we are redistributing RIP into EIGRP.

To accomplish this task, the administrative distance of 192.168.23.0/24 is raised in OSPF by a value that is higher than RIP’s default administrative distance. The first step is to create an access list that matches 192.168.23.0/24. The next step is to change the administrative distance. The distance command will specify an administrative distance that is greater than the default RIP administrative distance. We will then specify the route source or the router ID of the router that advertises the route to R1. Finally, we will reference the access list.

!On R1:         The desired ad value
R1# show access-lists
R1#
R1(config)# access-list 1 permit 192.168.23.0 0.0.0.255
R1(config)# router ospf 1
R1(config-router)# distance 121 0.0.0.3 0.0.0.0 1

Let’s verify the configuration:

!On R1:

R1# show ip route ospf | begin Gate
Gateway of last resort is not set

      10.0.0.0/32 is subnetted, 4 subnets
O IA     10.1.1.3 [121/2] via 13.1.1.3, 00:01:11, FastEthernet0/0.13
O E2  192.168.31.0/24 [121/20] via 13.1.1.3, 00:01:11, FastEthernet0/0.13
O E2  192.168.33.0/24 [121/20] via 13.1.1.3, 00:01:11, FastEthernet0/0.13

Note The route is no longer in the routing table as an OSPF route.

Because of the adjusted AD, the route is now a RIP route. Specifically, the administrative distance of the 192.168.23.0/24 route advertised by R3 via OSPF was increased to be higher than the default RIP administrative distance. This allows the RIP route for 192.168.23.0/24 to be selected and inserted into the routing table. Let’s verify:

R1# show ip route rip | begin Gate
Gateway of last resort is not set

      10.0.0.0/32 is subnetted, 4 subnets
R        10.1.1.2 [120/1] via 12.1.1.2, 00:00:21, FastEthernet0/0.12
R     192.168.23.0/24 [120/1] via 12.1.1.2, 00:00:21, FastEthernet0/0.12

Now let’s go to R4 and verify the configuration:

!On R4:

R4# show ip route 192.168.23.0

Routing entry for 192.168.23.0/24
  Known via "eigrp 100", distance 170, metric 2560002816, type external
  Redistributing via eigrp 100
  Last update from 14.1.1.1 on FastEthernet0/0, 00:02:40 ago
  Routing Descriptor Blocks:
  * 14.1.1.1, from 14.1.1.1, 00:02:40 ago, via FastEthernet0/0
      Route metric is 30720, traffic share count is 1
      Total delay is 110 microseconds, minimum bandwidth is 1 Kbit
      Reliability 1/255, minimum MTU 1 bytes
      Loading 1/255, Hops 1

Task 7

Configure the following loopback interface on R2:

Lo40: 172.16.0.2/24.

R2 should be configured to advertise this loopback interface in RIPv2.

Ensure that the only 172.16.x.x route present in R1’s routing table is 172.16.0.0/24.

R3 should see this route as 172.16.0.0/16.

First, configure loopback40 on R2 and advertise this network in RIPv2:

!On R2:

R2(config)# interface loopback40
R2(config-if)# ip address 172.16.0.2 255.255.255.0

R2(config-if)# router rip
R2(config-router)# network 172.16.0.0

Let’s verify the configuration:

!On R1:

R1# show ip route rip | begin Gate
Gateway of last resort is not set

      10.0.0.0/32 is subnetted, 4 subnets
R        10.1.1.2 [120/1] via 12.1.1.2, 00:00:20, FastEthernet0/0.12
      172.16.0.0/24 is subnetted, 1 subnets
R        172.16.0.0 [120/1] via 12.1.1.2, 00:00:20, FastEthernet0/0.12
R     192.168.23.0/24 [120/1] via 12.1.1.2, 00:00:20, FastEthernet0/0.12

R1 has the route based on the requirement of the task. To perform the last step of this task, R1 should be configured to redistribute RIPv2 into OSPF.

By default, OSPF assigns a metric of 20 and a metric type of 2 to all redistributed routes. Therefore, there is no need to assign the cost when redistributing routes into OSPF.

!On R1:

R1(config)# router ospf 1
R1(config-router)# redistribute rip subnets

Let’s verify the configuration:

!On R3:

R3# show ip route ospf | begin Gate
Gateway of last resort is not set

      10.0.0.0/32 is subnetted, 3 subnets
O E2     10.1.1.1 [110/20] via 13.1.1.1, 00:00:32, FastEthernet0/0
O E2     10.1.1.2 [110/20] via 13.1.1.1, 00:00:32, FastEthernet0/0
      12.0.0.0/24 is subnetted, 1 subnets
O E2     12.1.1.0 [110/20] via 13.1.1.1, 00:00:32, FastEthernet0/0
      172.16.0.0/24 is subnetted, 1 subnets
O E2     172.16.0.0 [110/20] via 13.1.1.1, 00:00:32, FastEthernet0/0

Note This task specified that network 172.16.0.0 should appear in the routing table of R3 as “/16.” To accomplish this task, we need to summarize this network as follows:

!On R1:

R1(config)# router ospf 1
R1(config-router)# summary-address 172.16.0.0 255.255.0.0

Let’s verify the configuration:

!On R3:

R3# show ip route ospf | begin Gate
Gateway of last resort is not set

      10.0.0.0/32 is subnetted, 3 subnets
O E2     10.1.1.1 [110/20] via 13.1.1.1, 00:02:37, FastEthernet0/0
O E2     10.1.1.2 [110/20] via 13.1.1.1, 00:02:37, FastEthernet0/0
      12.0.0.0/24 is subnetted, 1 subnets
O E2     12.1.1.0 [110/20] via 13.1.1.1, 00:02:37, FastEthernet0/0
O E2  172.16.0.0/16 [110/20] via 13.1.1.1, 00:00:16, FastEthernet0/0

Note This fulfills the requirement of the last task, but remember that this task specified that R1 should only have 172.16.0.0/24 in its routing table.

Again, let’s verify the configuration:

!On R1:

R1# show ip route | include 172.16

      172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
O        172.16.0.0/16 is a summary, 00:01:20, Null0
R        172.16.0.0/24 [120/1] via 12.1.1.2, 00:00:23, FastEthernet0/0.12

R1 has two 172.16.x.x routes in its routing table: 172.16.0.0/24, which was learned from RIP, and 172.16.0.0/16, which is the direct result of summarization. When summarization is configured in OSPF, a discard route is injected to avoid forwarding loops. The injected discard route can be for internal OSPF routes that were summarized or external OSPF routes that were summarized.

If the discard route is internal and needs to be removed, then the no discard-route internal command can be used. However, in this case it’s for external routes, so it should be removed using the following configuration:

!On R1:

R1(config)# router ospf 1
R1(config-router)# no discard-route external

We could have used the discard-route external 255 command to accomplish this task. Remember, any route that has an administrative distance of 255 will not be injected into the routing table.

Let’s verify the configuration:

!On R1:

R1# show ip route | include 172.16

      172.16.0.0/24 is subnetted, 1 subnets
R        172.16.0.0 [120/1] via 12.1.1.2, 00:00:10, FastEthernet0/0.12

!On R3:

R3# show ip route ospf | begin Gate
Gateway of last resort is not set

      10.0.0.0/32 is subnetted, 3 subnets
O E2     10.1.1.1 [110/20] via 13.1.1.1, 00:08:37, FastEthernet0/0
O E2     10.1.1.2 [110/20] via 13.1.1.1, 00:08:37, FastEthernet0/0
      12.0.0.0/24 is subnetted, 1 subnets
O E2     12.1.1.0 [110/20] via 13.1.1.1, 00:08:37, FastEthernet0/0
O E2  172.16.0.0/16 [110/20] via 13.1.1.1, 00:06:16, FastEthernet0/0

Erase the startup configuration and reload the routers before proceeding to the next task.

Lab 9-2: Basic Redistribution 2

image

Figure 9-2 Basic Redistribution part 2

Task 1

Figure 9-2 illustrates the topology that will be used in the following tasks. Configure OSPF area 0 on the following routers and their interfaces:

R3: F0/0 and Lo1.

R4 and R5: F0/0, Lo0, Lo1, and Lo2.

Loopback interfaces should be advertised with their correct mask.

Assign the following OSPF costs to the loopback interfaces of R4 and R5:

R4 and R5’s Lo0 should have a cost of 10, Lo1 should have a cost of 20,  and Lo2 should have a cost of 30.

You should use an OSPF process ID of 1 to accomplish this task. Also, you should configure the OSPF RIDs to be 0.0.0.x, where x is the router number.

!On R3:

R3(config)# router ospf 1
R3(config-router)# router-id 0.0.0.3
R3(config-router)# network 10.1.1.3 0.0.0.0 area 0
R3(config-router)# network 30.3.3.3 0.0.0.0 area 0

R3(config)# interface loopback 1
R3(config-if)# ip ospf network point-to-point

!On R4:

R4(config-router)# interface loopback 0
R4(config-if)# ip ospf network point-to-point
R4(config-if)# ip ospf cost 10

R4(config-router)# interface loopback 1
R4(config-if)# ip ospf network point-to-point
R4(config-if)# ip ospf cost 20

R4(config-router)# interface loopback 2
R4(config-if)# ip ospf network point-to-point
R4(config-if)# ip ospf cost 30

R4(config)# router ospf 1
R4(config-router)# router-id 0.0.0.4
R4(config-router)# network 10.1.1.4 0.0.0.0 area 0
R4(config-router)# network 4.4.4.4 0.0.0.0 area 0
R4(config-router)# network 40.4.4.4 0.0.0.0 area 0
R4(config-router)# network 44.4.4.4 0.0.0.0 area 0

You should see the following console message:

%OSPF-5-ADJCHG: Process 1, Nbr 0.0.0.3 on FastEthernet0/0 from LOADING to FULL, Loading Done
!On R5:

R5(config-router)# interface loopback 0
R5(config-if)# ip ospf network point-to-point
R5(config-if)# ip ospf cost 10

R5(config-router)# interface loopback 1
R5(config-if)# ip ospf network point-to-point
R5(config-if)# ip ospf cost 20

R5(config-router)# interface loopback 2
R5(config-if)# ip ospf network point-to-point
R5(config-if)# ip ospf cost 30

R5(config)# router ospf 1
R5(config-router)# router-id 0.0.0.5
R5(config-router)# network 10.1.1.5 0.0.0.0 area 0
R5(config-router)# network 5.5.5.5 0.0.0.0 area 0
R5(config-router)# network 50.5.5.5 0.0.0.0 area 0
R5(config-router)# network 55.5.5.5 0.0.0.0 area 0

You should also see this console message:

%OSPF-5-ADJCHG: Process 1, Nbr 0.0.0.3 on FastEthernet0/0 from LOADING to FULL, Loading Done

%OSPF-5-ADJCHG: Process 1, Nbr 0.0.0.4 on FastEthernet0/0 from LOADING to FULL, Loading Done

Let’s verify the configuration:

!On R3:

R3# show ip route ospf | begin Gate
Gateway of last resort is not set

      4.0.0.0/24 is subnetted, 1 subnets
O        4.4.4.0 [110/11] via 10.1.1.4, 00:03:29, FastEthernet0/0
      5.0.0.0/24 is subnetted, 1 subnets
O        5.5.5.0 [110/11] via 10.1.1.5, 00:01:21, FastEthernet0/0
      40.0.0.0/24 is subnetted, 1 subnets
O        40.4.4.0 [110/21] via 10.1.1.4, 00:03:29, FastEthernet0/0
      44.0.0.0/24 is subnetted, 1 subnets
O        44.4.4.0 [110/31] via 10.1.1.4, 00:03:29, FastEthernet0/0
      50.0.0.0/24 is subnetted, 1 subnets
O        50.5.5.0 [110/21] via 10.1.1.5, 00:01:21, FastEthernet0/0
      55.0.0.0/24 is subnetted, 1 subnets
O        55.5.5.0 [110/31] via 10.1.1.5, 00:01:11, FastEthernet0/0

Task 2

Configure EIGRP AS 100 on the following routers and their interfaces:

R1, R2, and R3’s F0/0 and loopback0 interfaces

The F0/1 interfaces of R1 and R7

The Lo100, Lo101, and Lo102 interfaces of R7

!On R3:

R3(config)# router eigrp 100
R3(config-router)# network 10.1.1.3 0.0.0.0
R3(config-router)# network 3.3.3.3 0.0.0.0

!On R2:

R2(config)# router eigrp 100
R2(config-router)# network 10.1.1.2 0.0.0.0
R2(config-router)# network 2.2.2.2 0.0.0.0

You should see the following console message:

%DUAL-5-NBRCHANGE: EIGRP-IPv4 100: Neighbor 10.1.1.3 (FastEthernet0/0) is up: new adjacency

!On R1:

R1(config)# router eigrp 100
R1(config-router)# network 10.1.1.1 0.0.0.0
R1(config-router)# network 17.1.1.1 0.0.0.0
R1(config-router)# network  1.1.1.1 0.0.0.0

You should also see this console message:

%DUAL-5-NBRCHANGE: EIGRP-IPv4 100: Neighbor 10.1.1.3 (FastEthernet0/0) is up:
new adjacency

%DUAL-5-NBRCHANGE: EIGRP-IPv4 100: Neighbor 10.1.1.2 (FastEthernet0/0) is up:
new adjacency

!On R7:

R7(config)# router eigrp 100
R7(config-router)# network 17.1.1.7 0.0.0.0
R7(config-router)# network 7.7.7.7 0.0.0.0
R7(config-router)# network 70.7.7.7 0.0.0.0
R7(config-router)# network 77.7.7.7 0.0.0.0

You should see the following console message as well:

%DUAL-5-NBRCHANGE: EIGRP-IPv4 100: Neighbor 17.1.1.1 (GigabitEthernet0/1) is up:
new adjacency

Let’s verify the configuration:

!On R3:

R3# show ip route eigrp | begin Gate
Gateway of last resort is not set

      1.0.0.0/24 is subnetted, 1 subnets
D        1.1.1.0 [90/156160] via 10.1.1.1, 00:03:16, FastEthernet0/0
      2.0.0.0/24 is subnetted, 1 subnets
D        2.2.2.0 [90/156160] via 10.1.1.2, 00:03:46, FastEthernet0/0
      7.0.0.0/24 is subnetted, 1 subnets
D        7.7.7.0 [90/158720] via 10.1.1.1, 00:02:31, FastEthernet0/0
      17.0.0.0/24 is subnetted, 1 subnets
D        17.1.1.0 [90/30720] via 10.1.1.1, 00:03:11, FastEthernet0/0
      70.0.0.0/24 is subnetted, 1 subnets
D        70.7.7.0 [90/158720] via 10.1.1.1, 00:02:27, FastEthernet0/0
      77.0.0.0/24 is subnetted, 1 subnets
D        77.7.7.0 [90/158720] via 10.1.1.1, 00:02:24, FastEthernet0/0

Task 3

Configure OSPF area 0 with the process ID of 36 on the following routers and their interfaces:

The F0/1 interfaces of R3 and R6

The Lo0 interface of R6

The Lo2 interface of R3

These loopback interfaces should be advertised with their correct masks:

!On R3:

R3(config-if)# interface loopback 2
R3(config-if)# ip ospf network point-to-point

R3(config)# router ospf 36
R3(config-router)# network 36.1.1.3 0.0.0.0 area 0
R3(config-router)# network 33.3.3.3 0.0.0.0 area 0

On R6:

R6(config)# interface loopback 0
R6(config-if)# ip ospf network point-to-point

R6(config)# router ospf 36
R6(config-router)# network 36.1.1.6 0.0.0.0 area 0
R6(config-router)# network 6.6.6.6 0.0.0.0 area 0

You should see the following console message:

%OSPF-5-ADJCHG: Process 36, Nbr 33.3.3.3 on FastEthernet0/1 from LOADING to FULL,
Loading Done

Let’s verify the configuration:

!On R3:

R3# show ip route ospf 36 | begin Gate
Gateway of last resort is not set

      6.0.0.0/24 is subnetted, 1 subnets
O        6.6.6.0 [110/2] via 36.1.1.6, 00:00:54, FastEthernet0/1

Task 4

Configure R3 to redistribute eigrp 100 into ospf 1 such that networks 1.1.1.0/24 and 2.2.2.0/24 carry a route tag of 111 and 222, respectively. The rest of the routes should have a route tag of 333.

!On R3:

R3# show access-lists

R3(config)# access-list 1 permit 1.1.1.0 0.0.0.255
R3(config)# access-list 2 permit 2.2.2.0 0.0.0.255

R3(config)# route-map tst permit 10
R3(config-route-map)# match ip address 1
R3(config-route-map)# set tag 111

R3(config)# route-map tst permit 20
R3(config-route-map)# match ip address 2
R3(config-route-map)# set tag 222

R3(config)# route-map tst permit 30
R3(config-route-map)# set tag 333
R3(config)# router ospf 1
R3(config-router)# redistribute eigrp 100 subnets route-map tst

Let’s verify the configuration:

On R3:

R3# show ip ospf 1 database | begin Type-5
                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#        Checksum Tag
1.1.1.0         0.0.0.3         52          0x80000001 0x001D01 111
2.2.2.0         0.0.0.3         52          0x80000001 0x00DCCD 222
3.3.3.0         0.0.0.3         52          0x80000001 0x00E95C 333
7.7.7.0         0.0.0.3         52          0x80000001 0x00EE3E 333
17.1.1.0        0.0.0.3         52          0x80000001 0x00F638 333
70.7.7.0        0.0.0.3         52          0x80000001 0x00B835 333
77.7.7.0        0.0.0.3         52          0x80000001 0x005D89 333
On R4:
R4# show ip route ospf | include E2
       E1 - OSPF external type 1, E2 - OSPF external type 2
O E2     1.1.1.0 [110/20] via 10.1.1.1, 00:11:07, FastEthernet0/0
O E2     2.2.2.0 [110/20] via 10.1.1.2, 00:11:07, FastEthernet0/0
O E2     3.3.3.0 [110/20] via 10.1.1.3, 00:11:07, FastEthernet0/0
O E2     7.7.7.0 [110/20] via 10.1.1.1, 00:11:07, FastEthernet0/0
O E2     17.1.1.0 [110/20] via 10.1.1.1, 00:11:07, FastEthernet0/0
O E2     70.7.7.0 [110/20] via 10.1.1.1, 00:11:07, FastEthernet0/0
O E2     77.7.7.0 [110/20] via 10.1.1.1, 00:11:07, FastEthernet0/0

R4# show ip ospf database | begin Type-5
                Type-5 AS external link states

Link ID         ADV Router      Age         Seq#        Checksum Tag
1.1.1.0         0.0.0.3         171         0x80000001 0x001D01 111
2.2.2.0         0.0.0.3         171         0x80000001 0x00DCCD 222
3.3.3.0         0.0.0.3         171         0x80000001 0x00E95C 333
7.7.7.0         0.0.0.3         711         0x80000001 0x00EE3E 333
17.1.1.0        0.0.0.3         711         0x80000001 0x00F638 333
70.7.7.0        0.0.0.3         711         0x80000001 0x00B835 333
77.7.7.0        0.0.0.3         711         0x80000001 0x005D89 333

Task 5

Configure R4 to filter all routes that are tagged with 111. You should not use an access-list or a prefix-list to accomplish this task.

!On R4:

R4# show ip ospf rib | include 111
*>  1.1.1.0/24, Ext2, cost 20, tag 111

R4(config)# route-map tst deny 10
R4(config-route-map)# match tag 111
R4(config)# route-map tst permit 90

R4(config)# router ospf 1
R4(config-router)# distribute-list route-map tst in

Let’s verify the configuration:

!On R4:

R4# show ip route ospf | include E2
       E1 - OSPF external type 1, E2 - OSPF external type 2
O E2     2.2.2.0 [110/20] via 10.1.1.2, 00:00:20, FastEthernet0/0
O E2     3.3.3.0 [110/20] via 10.1.1.3, 00:00:20, FastEthernet0/0
O E2     7.7.7.0 [110/20] via 10.1.1.1, 00:00:20, FastEthernet0/0
O E2     17.1.1.0 [110/20] via 10.1.1.1, 00:00:20, FastEthernet0/0
O E2     70.7.7.0 [110/20] via 10.1.1.1, 00:00:20, FastEthernet0/0
O E2     77.7.7.0 [110/20] via 10.1.1.1, 00:00:20, FastEthernet0/0

Route tags are very handy tools; once a given route is tagged with a value, that route can be manipulated using the tag that it carries.

Note Network 1.1.1.0/24 is no longer in the routing table of R1. Keep in mind that it is still in the database of this router. The output of the following show command reveals that information:

R4# show ip ospf database external 1.1.1.0


            OSPF Router with ID (0.0.0.4) (Process ID 1)

                Type-5 AS External Link States

  Routing Bit Set on this LSA in topology Base with MTID 0
  LS age: 493
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 1.1.1.0 (External Network Number )
  Advertising Router: 0.0.0.3
  LS Seq Number: 80000001
  Checksum: 0x1D01
  Length: 36
  Network Mask: /24
        Metric Type: 2 (Larger than any link state path)
        MTID: 0
        Metric: 20
        Forward Address: 10.1.1.1
        External Route Tag: 111

Task 6

Configure R5 to filter all routes that carry a route tag of 222. You should not use an access-list or a prefix-list to accomplish this task.

!On R5:

R5# show ip ospf rib | include 222
*   2.2.2.0/24, Ext2, cost 20, tag 222

R5(config)# route-map tst deny 10
R5(config-route-map)# match tag 222
R5(config)# route-map tst permit 90

R5(config)# router ospf 1
R5(config-router)# distribute-list route-map tst in

Let’s verify the configuration:

!On R5:

R5# show ip route ospf | include E2
       E1 - OSPF external type 1, E2 - OSPF external type 2
O E2     1.1.1.0 [110/20] via 10.1.1.1, 00:00:31, FastEthernet0/0
O E2     3.3.3.0 [110/20] via 10.1.1.3, 00:00:31, FastEthernet0/0
O E2     7.7.7.0 [110/20] via 10.1.1.1, 00:00:31, FastEthernet0/0
O E2     17.1.1.0 [110/20] via 10.1.1.1, 00:00:31, FastEthernet0/0
O E2     70.7.7.0 [110/20] via 10.1.1.1, 00:00:31, FastEthernet0/0
O E2     77.7.7.0 [110/20] via 10.1.1.1, 00:00:31, FastEthernet0/0

Task 7

Configure R3 to redistribute ospf 1 into eigrp 100 such that network 4.4.4.0/24 and 5.5.5.0/24 are tagged with 444 and 555, respectively.

!On R3:

R3# show access-list

Standard IP access list 1
    10 permit 1.1.1.0, wildcard bits 0.0.0.255 (1 match)
Standard IP access list 2
    10 permit 2.2.2.0, wildcard bits 0.0.0.255 (1 match)
R3(config)# access-list 4 permit 4.4.4.0 0.0.0.255

R3(config)# access-list 5 permit 5.5.5.0 0.0.0.255

R3(config)# route-map tst1 permit 10
R3(config-route-map)# match ip address 4
R3(config-route-map)# set tag 444

R3(config)# route-map tst1 permit 20
R3(config-route-map)# match ip address 5
R3(config-route-map)# set tag 555

R3(config)# route-map tst1 permit 90

R3# show interface fastethernet0/0 | include BW|load
  MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec,
     reliability 255/255, txload 1/255, rxload 1/255

R3(config)# router eigrp 100
R3(config-router)# redistribute ospf 1 route-map tst1 metric 100000 10 255 1 1500

Let’s verify the configuration:


!On R3:

R3# show ip eigrp topology | include 444|555
P 5.5.5.0/24, 1 successors, FD is 28160, tag is 555
P 4.4.4.0/24, 1 successors, FD is 28160, tag is 444

Task 8

Configure R2 to filter network 4.4.4.0/24. Do not use an access-list or a prefix-list to accomplish this task.

!On R2:

R2# show ip eigrp topology | include 444
P 4.4.4.0/24, 1 successors, FD is 30720, tag is 444

Note R2 sees the tag that was assigned in the previous task.

R2(config)# route-map tst deny 10
R2(config-route-map)# match tag 444
R2(config)# route-map tst permit 90

R2(config)# router eigrp 100
R2(config-router)# distribute-list route-map tst in

You should see the following console messages verifying that some route configuration has changed:

%DUAL-5-NBRCHANGE: EIGRP-IPv4 100: Neighbor 10.1.1.1 (FastEthernet0/0) is resync: route configuration changed

%DUAL-5-NBRCHANGE: EIGRP-IPv4 100: Neighbor 10.1.1.3 (FastEthernet0/0) is resync: route configuration changed

Let’s verify the configuration:

!On R2:

R2# show ip route eigrp | include EX
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
D EX     5.5.5.0 [170/30720] via 10.1.1.3, 00:42:00, FastEthernet0/0
D EX     30.3.3.0 [170/30720] via 10.1.1.3, 00:42:00, FastEthernet0/0
D EX     40.4.4.0 [170/30720] via 10.1.1.3, 00:42:00, FastEthernet0/0
D EX     44.4.4.0 [170/30720] via 10.1.1.3, 00:42:00, FastEthernet0/0
D EX     50.5.5.0 [170/30720] via 10.1.1.3, 00:42:00, FastEthernet0/0
D EX     55.5.5.0 [170/30720] via 10.1.1.3, 00:42:00, FastEthernet0/0

Task 9

Configure R5 to filter all routes that are originated by R4. Do not use a prefix list or route tags to accomplish this task.

Note R5 receives the following three routes from R4:

!On R5:

R5# show ip route | include 10.1.1.4

O        4.4.4.0 [110/11] via 10.1.1.4, 00:15:53, FastEthernet0/0
O        40.4.4.0 [110/21] via 10.1.1.4, 00:15:53, FastEthernet0/0
O        44.4.4.0 [110/31] via 10.1.1.4, 00:15:53, FastEthernet0/0

The match ip route-source command can be used to accomplish this task. In OSPF, the route-source is not the next-hop IP address; it is the router ID of the router that originated the routes. Here’s how to see the router ID of R4:

!On R4:

R4# show ip ospf | include ID
 Routing Process "ospf 1" with ID 0.0.0.4

!On R5:

R5# show access-list

R5(config)# access-list 4 permit host 0.0.0.4

In Task 6, we configured a route-map. Let’s look at that route-map:

R5# show run | section route-map

 distribute-list route-map tst in
route-map tst deny 10
 match tag 222
route-map tst permit 90

In the preceding output, you can see that route-map tst denies any routes that carry a route tag of 222, and this route-map is applied inbound on R5. To resolve this task, we can add the following line to the existing route-map:

R5(config)# route-map tst deny 20
R5(config-route-map)# match ip route-source 4

The preceding configuration denies any prefix originated from a route source with a router ID that is referenced in access list 4. Because the preceding configuration is added to the existing route-map, the new route-map should look like the following:

!On R5:

R5# show run | section route-map

 distribute-list route-map tst in
route-map tst deny 10
 match tag 222
route-map tst deny 20
 match ip route-source 4
route-map tst permit 90

Note We have the sequence numbers in the route-map so we can add configuration lines in the beginning, middle, or end of the route-map (in this case, route-map sequence number 20 is added between route-map 10 and 90).

Because the route-map is already applied, no further configuration is necessary. Let’s verify the configuration:

!On R5:

R5# show ip route | include 10.1.1.4

Note The networks that were advertised by R4 are filtered.

Task 10

Configure R3 to redistribute ospf 1 and eigrp 100 into the ospf 36 routing domain using the following policy:

The routes from the ospf 1 routing domain with an OSPF cost of 11 should be redistributed as E2. These routes should have a tag of 11.

The routes from the ospf 1 routing domain with an OSPF cost of 21 should be redistributed as E2. These routes should have a tag of 21.

The routes from the ospf 1 routing domain with an OSPF cost of 31 should be redistributed as E2. These routes should have a tag of 31.

EIGRP AS 100 routes should be redistributed as E1 with a route tag of 99.

Do not use an access-list or prefix-list to accomplish this task.

Let’s see the OSPF routes and their cost:

R3# show ip route ospf | begin Gate
Gateway of last resort is not set

      4.0.0.0/24 is subnetted, 1 subnets
O        4.4.4.0 [110/11] via 10.1.1.4, 01:11:06, FastEthernet0/0
      5.0.0.0/24 is subnetted, 1 subnets
O        5.5.5.0 [110/11] via 10.1.1.5, 01:08:58, FastEthernet0/0
      6.0.0.0/24 is subnetted, 1 subnets
O        6.6.6.0 [110/2] via 36.1.1.6, 00:45:39, FastEthernet0/1
      40.0.0.0/24 is subnetted, 1 subnets
O        40.4.4.0 [110/21] via 10.1.1.4, 01:11:06, FastEthernet0/0
      44.0.0.0/24 is subnetted, 1 subnets
O        44.4.4.0 [110/31] via 10.1.1.4, 01:11:06, FastEthernet0/0
      50.0.0.0/24 is subnetted, 1 subnets
O        50.5.5.0 [110/21] via 10.1.1.5, 01:08:58, FastEthernet0/0
      55.0.0.0/24 is subnetted, 1 subnets
O        55.5.5.0 [110/31] via 10.1.1.5, 01:08:48, FastEthernet0/0

The source-protocol option is another useful and effective tool you can use to achieve certain results. The source-protocol option specifies a match clause that matches external routes from sources that match the source protocol.

The following route-map says that if the source protocol is OSPF 1 and the metric is 11, then the tag should be set to 11:

!On R3:

R3(config)# route-map task10 permit 10
R3(config-route-map)# match source-protocol ospf 1
R3(config-route-map)# match metric 11
R3(config-route-map)# set tag 11

The following route-map says that if the source protocol is OSPF 1 and the metric is 21, then the tag should be set to 21:

R3(config)# route-map task10 permit 20
R3(config-route-map)# match source-protocol ospf 1
R3(config-route-map)# match metric 21
R3(config-route-map)# set tag 21

The following route-map says that if the source protocol is OSPF 1 and the metric is 31, then the tag should be set to 31:

R3(config)# route-map task10 permit 30
R3(config-route-map)# match source-protocol ospf 1
R3(config-route-map)# match metric 31
R3(config-route-map)# set tag 31
R3(config)# route-map task10 permit 90

The following route-map says that if the source protocol is EIGRP 100, then the tag should be set to 99 and the route-type should be set to type-1:

R3(config)# route-map eigrp permit 10
R3(config-route-map)# match source-protocol eigrp 100
R3(config-route-map)# set tag 99
R3(config-route-map)# set metric-type type-1

R3(config)# router ospf 36
R3(config-router)# redistribute ospf 1 subnets route-map task10
R3(config-router)# redistribute eigrp 100 subnets route-map eigrp

Let’s verify the configuration:

!On R6:

R6# show ip route ospf | include E1
       E1 - OSPF external type 1, E2 - OSPF external type 2
O E1     1.1.1.0 [110/21] via 36.1.1.3, 00:00:24, FastEthernet0/1
O E1     2.2.2.0 [110/21] via 36.1.1.3, 00:00:24, FastEthernet0/1
O E1     3.3.3.0 [110/21] via 36.1.1.3, 00:00:24, FastEthernet0/1
O E1     7.7.7.0 [110/21] via 36.1.1.3, 00:00:24, FastEthernet0/1
O E1     10.1.1.0 [110/21] via 36.1.1.3, 00:00:24, FastEthernet0/1
O E1     17.1.1.0 [110/21] via 36.1.1.3, 00:00:24, FastEthernet0/1
O E1     70.7.7.0 [110/21] via 36.1.1.3, 00:00:24, FastEthernet0/1
O E1     77.7.7.0 [110/21] via 36.1.1.3, 00:00:24, FastEthernet0/1

R6# show ip route ospf | include E2

       E1 - OSPF external type 1, E2 - OSPF external type 2
O E2     4.4.4.0 [110/11] via 36.1.1.3, 00:04:44, FastEthernet0/1
O E2     5.5.5.0 [110/11] via 36.1.1.3, 00:04:44, FastEthernet0/1
O E2     30.3.3.0 [110/1] via 36.1.1.3, 00:04:44, FastEthernet0/1
O E2     40.4.4.0 [110/21] via 36.1.1.3, 00:04:44, FastEthernet0/1
O E2     44.4.4.0 [110/31] via 36.1.1.3, 00:04:44, FastEthernet0/1
O E2     50.5.5.0 [110/21] via 36.1.1.3, 00:04:44, FastEthernet0/1
O E2     55.5.5.0 [110/31] via 36.1.1.3, 00:04:44, FastEthernet0/1

R6# show ip ospf database | include 11_

4.4.4.0         33.3.3.3        341         0x80000001 0x005A0E 11
5.5.5.0         33.3.3.3        341         0x80000001 0x00362F 11

R6# show ip ospf database | include 21_

40.4.4.0        33.3.3.3        381         0x80000001 0x009D92 21
50.5.5.0        33.3.3.3        381         0x80000001 0x000420 21

R6# show ip ospf database | include 31_

44.4.4.0        33.3.3.3        429         0x80000001 0x008295 31
55.5.5.0        33.3.3.3        429         0x80000001 0x00DB2F 31

R6# show ip ospf database | include 99_
1.1.1.0         33.3.3.3        1780        0x80000001 0x00D3BC 99
2.2.2.0         33.3.3.3        1780        0x80000001 0x00AFDD 99
3.3.3.0         33.3.3.3        1780        0x80000001 0x008BFE 99
7.7.7.0         33.3.3.3        1780        0x80000001 0x00FA83 99
10.1.1.0        33.3.3.3        1780        0x80000002 0x005C2A 99
17.1.1.0        33.3.3.3        1780        0x80000001 0x00037D 99
70.7.7.0        33.3.3.3        1780        0x80000001 0x00C47A 99
77.7.7.0        33.3.3.3        1780        0x80000001 0x0069CE 99

Task 11

Configure R3 such that EIGRP routes that have a composite metric of 156160 to 158720 are not redistributed into the ospf 36 routing domain. None of the previous configurations should be removed or overridden to accomplish this task.

This task is asking you to filter the routes that have a composite metric of 156160 to 158720; the formula to calculate the metric and the deviation value is shown here  (add the two numbers together and then divide by two):

156160 + 158720 = 314880

314880 / 2 = 157440 → this gives us the metric value

To calculate the deviation value, subtract the start of the number range (the lower value, or the from value; in this case, 156160) from the to value (in this case, 158720) and then divide the result by two:

158720 – 156160 = 2560

2560 / 2 = 1280

Thus, the match metric statement in the route-map should have the following values. This statement says that if 1280 is subtracted from 157440, we will get the lowest value within the range, and if it is added, we will get the highest value within the range:

match metric 157440 +-1280

Let’s test the values:

157440 - 1280 = 156160 → this is the lowest value within the range.

157440 + 1280 = 158720 → this is the highest value within the range.

Now let’s look at the existing EIGRP routes:

!On R3:

R3# show ip route eigrp | begin Gate
Gateway of last resort is not set

      1.0.0.0/24 is subnetted, 1 subnets
D        1.1.1.0 [90/156160] via 10.1.1.1, 01:57:21, FastEthernet0/0
      2.0.0.0/24 is subnetted, 1 subnets
D        2.2.2.0 [90/156160] via 10.1.1.2, 01:57:45, FastEthernet0/0
      7.0.0.0/24 is subnetted, 1 subnets
D        7.7.7.0 [90/158720] via 10.1.1.1, 01:56:37, FastEthernet0/0
      17.0.0.0/24 is subnetted, 1 subnets
D        17.1.1.0 [90/30720] via 10.1.1.1, 01:57:22, FastEthernet0/0
      70.0.0.0/24 is subnetted, 1 subnets
D        70.7.7.0 [90/158720] via 10.1.1.1, 01:56:32, FastEthernet0/0
      77.0.0.0/24 is subnetted, 1 subnets
D        77.7.7.0 [90/158720] via 10.1.1.1, 01:56:26, FastEthernet0/0

A route-map is configured to deny any route that has a composite metric of 156160 to 158720, inclusive:

R3(config)# route-map task11 deny 10
R3(config-route-map)# match metric 157440 +- 1280

R3(config)# route-map task11 permit 90

R3(config-route-map)# router eigrp 100
R3(config-router)# distribute-list route-map task11 in

Let’s verify the configuration:

!On R3:

%DUAL-5-NBRCHANGE: EIGRP-IPv4 100: Neighbor 10.1.1.1 (FastEthernet0/0) is resync:
route configuration changed
%DUAL-5-NBRCHANGE: EIGRP-IPv4 100: Neighbor 10.1.1.2 (FastEthernet0/0) is resync:
route configuration changed
R3# show ip route eigrp | begin Gate
Gateway of last resort is not set

      17.0.0.0/24 is subnetted, 1 subnets
D        17.1.1.0 [90/30720] via 10.1.1.1, 01:15:07, FastEthernet0/0

Note If a given prefix is not in the routing table of R3 as an EIGRP route, it will not be redistributed.

Erase the startup configuration and reload the routers before proceeding to the next task.

Lab 9-3: Redistribute RIPv2 and EIGRP

image

Figure 9-3 Configuring Redistribution of RIPv2 and EIGRP

Figure 9-3 illustrates the topology that will be used in the following tasks. EIGRP needs five metrics when redistributing other protocols: bandwidth, delay, reliability, load, and MTU, as detailed in Table 9-1.

Table 9-1 EIGRP Metrics

image

Multiple EIGRP processes can run on the same router, with redistribution between them. For example, EIGRP1 and EIGRP2 can run on the same router. However, running two processes of the same protocol on the same router is rarely necessary, and can consume the router’s memory and CPU.

The redistribution of EIGRP into another EIGRP process does not require any metric conversion, so there is no need to define metrics or use the default-metric command during redistribution.

A redistributed static route takes precedence over the summary route because the static route has an administrative distance of 1, whereas EIGRP summary routes have an administrative distance of 5. This happens when a static route is redistributed with the use of redistribute static under the EIGRP process and the EIGRP process has a default route.

The RIP metric is composed of hop count, and the maximum valid metric is 15. Anything above 15 is considered infinite. You can use 16 to describe an infinite metric in RIP. When redistributing a protocol into RIP, Cisco recommends that you use a low metric, such as 1. A high metric, such as 10, limits RIP even further. If you define a metric of 10 for redistributed routes, these routes can only be advertised to routers up to five hops away, at which point the metric (hop count) exceeds 15. By defining a metric of 1, you enable a route to travel the maximum number of hops in a RIP domain. However, doing this increases the possibility of routing loops if there are multiple redistribution points and a router learns about the network with a better metric from the redistribution point than from the original source. Therefore, you have to make sure that the metric is neither too high, preventing it from being advertised to all the routers, nor too low, leading to routing loops when there are multiple redistribution points.

You can see that there is a vast difference in how RIP perceives metric values. As an example, RIPv2 may see a prefix with a metric of 16 as unreachable or infinite. However, a metric of 16 in EIGRP would be considered a very attractive metric that most likely would be used for forwarding data.

Task 1

Configure RIPv2 on R2, R3, and R4. These routers should advertise their directly connected interfaces in this routing domain. You should disable auto-summary.

!On R2:

R2(config)# router rip
R2(config-router)# no auto-summary
R2(config-router)# version 2
R2(config-router)# network 12.0.0.0
R2(config-router)# network 23.0.0.0
R2(config-router)# network 24.0.0.0

!On R3:

R3(config)# router rip
R3(config-router)# no auto-summary
R3(config-router)# version 2
R3(config-router)# network 3.0.0.0
R3(config-router)# network 23.0.0.0

!On R4:

R4(config)# router rip
R4(config-router)# no auto-summary
R4(config-router)# version 2
R4(config-router)# network 24.0.0.0
R4(config-router)# network 45.0.0.0

Let’s verify the configuration:

!On R4:

R5# show ip route rip | begin Gate
Gateway of last resort is not set

      3.0.0.0/24 is subnetted, 1 subnets
R        3.3.3.0 [120/2] via 24.1.1.2, 00:00:02, FastEthernet0/0
      12.0.0.0/24 is subnetted, 1 subnets
R        12.1.1.0 [120/1] via 24.1.1.2, 00:00:02, FastEthernet0/0
      23.0.0.0/24 is subnetted, 1 subnets
R        23.1.1.0 [120/1] via 24.1.1.2, 00:00:02, FastEthernet0/0

Task 2

Configure RIPv2 on the F0/1 interfaces of R1 and R5. Disable auto-summary.

!On R1:

R1(config)# router rip
R1(config-router)# no auto-summary
R1(config-router)# version 2
R1(config-router)# network 12.0.0.0

!On R5:
R4(config)# router rip
R4(config-router)# no auto-summary
R4(config-router)# version 2
R4(config-router)# network 45.0.0.0

Let’s verify the configuration:

!On R1:

R1# show ip route rip | begin Gate
Gateway of last resort is not set
      3.0.0.0/24 is subnetted, 1 subnets
R        3.3.3.0 [120/2] via 12.1.1.2, 00:00:23, FastEthernet0/1
      23.0.0.0/24 is subnetted, 1 subnets
R        23.1.1.0 [120/1] via 12.1.1.2, 00:00:23, FastEthernet0/1
      24.0.0.0/24 is subnetted, 1 subnets
R        24.1.1.0 [120/1] via 12.1.1.2, 00:00:23, FastEthernet0/1
      45.0.0.0/24 is subnetted, 1 subnets
R        45.1.1.0 [120/2] via 12.1.1.2, 00:00:23, FastEthernet0/1

Task 3

R3’s loopback0 interface should be advertised with a hop count of 5.

!On R3:

R3# show access-lists

R3(config)# access-list 3 permit 3.3.3.0 0.0.0.255

R3(config)# router rip
R3(config-router)# offset-list 3 out 4

Let’s verify the configuration:

!On R2:

R2# show ip route | include 3.3.3.0

R        3.3.3.0 [120/5] via 23.1.1.3, 00:00:11, Serial1/3

Task 4

Configure EIGRP AS 100 based on the following policy:

Configure EIGRP AS 100 on the S1/6 interfaces of R1 and R5.

Configure EIGRP AS 100 on the S1/1 and S1/5 interfaces of R6.

Set the administrative distance of all external routes to 110.

!On R1:

R1(config)# router eigrp 100
R1(config-router)# network 16.1.1.1 0.0.0.0
R1(config-router)# distance eigrp 90 110

!On R5:

R5(config)# router eigrp 100
R5(config-router)# network 56.1.1.5 0.0.0.0
R5(config-router)# distance eigrp 90 110

!On R6:

R6(config)# router eigrp 100
R6(config-router)# network 16.1.1.6 0.0.0.0
R6(config-router)# network 56.1.1.6 0.0.0.0

You should see the following console message:

%DUAL-5-NBRCHANGE: EIGRP-IPv4 100: Neighbor 16.1.1.1 (Serial1/1) is up:
new adjacency

%DUAL-5-NBRCHANGE: EIGRP-IPv4 100: Neighbor 56.1.1.5 (Serial1/5) is up:
new adjacency

Let’s verify the configuration:

On R1:

R1# show ip route eigrp | begin Gate
Gateway of last resort is not set

      56.0.0.0/24 is subnetted, 1 subnets
D        56.1.1.0 [90/21024000] via 16.1.1.6, 00:02:36, Serial1/6

Task 5

Perform a mutual redistribution between RIPv2 and EIGRP on routers R1 and R5. EIGRP routes should be redistributed into the RIPv2 routing domain with a hop count of 1. RIPv2 routes should be redistributed into EIGRP using the interface metrics. You should use clear ip route * once this redistribution is completed.

Ensure that every router has reachability to the 3.3.3.3 IP address, and use ping to verify it.

!On R1:

R1(config)# router rip
R1(config-router)# redistribute eigrp 100 metric 1

R1# show interface serial1/6 | include BW|load
  MTU 1500 bytes, BW 128 Kbit/sec, DLY 20000 usec,
     reliability 255/255, txload 1/255, rxload 1/255

R1(config)# router eigrp 100
R1(config-router)# redistribute rip metric 128 2000 255 1 1500

!On R5:

R5(config)# router rip
R5(config-router)# redistribute eigrp 100 metric 1

R5# show interface serial1/6 | include BW|load
  MTU 1500 bytes, BW 128 Kbit/sec, DLY 20000 usec,
     reliability 255/255, txload 1/255, rxload 1/255

R5(config)# router eigrp 100
R5(config-router)# redistribute rip metric 128 2000 255 1 1500

On All Routers:

rx# clear ip route *

Let’s verify the configuration:

On R1:

R1# show ip route | begin Gate
Gateway of last resort is not set

      3.0.0.0/24 is subnetted, 1 subnets
R        3.3.3.0 [120/3] via 12.1.1.2, 00:00:15, FastEthernet0/1
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.1.1.0/24 is directly connected, FastEthernet0/1
L        12.1.1.1/32 is directly connected, FastEthernet0/1
      16.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        16.1.1.0/24 is directly connected, Serial1/6
L        16.1.1.1/32 is directly connected, Serial1/6
      23.0.0.0/24 is subnetted, 1 subnets
R        23.1.1.0 [120/1] via 12.1.1.2, 00:00:15, FastEthernet0/1
      24.0.0.0/24 is subnetted, 1 subnets
R        24.1.1.0 [120/1] via 12.1.1.2, 00:00:15, FastEthernet0/1
      45.0.0.0/24 is subnetted, 1 subnets
D EX     45.1.1.0 [110/21536000] via 16.1.1.6, 00:00:15, Serial1/6
      56.0.0.0/24 is subnetted, 1 subnets
D        56.1.1.0 [90/21024000] via 16.1.1.6, 00:00:15, Serial1/6

!On R2:

R2# show ip route rip | begin Gate
Gateway of last resort is not set

      3.0.0.0/24 is subnetted, 1 subnets
R        3.3.3.0 [120/2] via 24.1.1.4, 00:00:24, FastEthernet0/0
      16.0.0.0/24 is subnetted, 1 subnets
R        16.1.1.0 [120/1] via 12.1.1.1, 00:00:25, FastEthernet0/1
      45.0.0.0/24 is subnetted, 1 subnets
R        45.1.1.0 [120/1] via 24.1.1.4, 00:00:24, FastEthernet0/0
                  [120/1] via 12.1.1.1, 00:00:25, FastEthernet0/1
      56.0.0.0/24 is subnetted, 1 subnets
R        56.1.1.0 [120/1] via 12.1.1.1, 00:00:25, FastEthernet0/1

!On R3:

R3# show ip route rip | begin Gate
Gateway of last resort is not set

      12.0.0.0/24 is subnetted, 1 subnets
R        12.1.1.0 [120/1] via 23.1.1.2, 00:00:09, Serial1/2
      16.0.0.0/24 is subnetted, 1 subnets
R        16.1.1.0 [120/2] via 23.1.1.2, 00:00:09, Serial1/2
      24.0.0.0/24 is subnetted, 1 subnets
R        24.1.1.0 [120/1] via 23.1.1.2, 00:00:09, Serial1/2
      45.0.0.0/24 is subnetted, 1 subnets
R        45.1.1.0 [120/2] via 23.1.1.2, 00:00:09, Serial1/2
      56.0.0.0/24 is subnetted, 1 subnets
R        56.1.1.0 [120/2] via 23.1.1.2, 00:00:09, Serial1/2

!On R4:

R4# show ip route rip | begin Gate
Gateway of last resort is not set
      3.0.0.0/24 is subnetted, 1 subnets
R        3.3.3.0 [120/1] via 45.1.1.5, 00:00:20, FastEthernet0/1
      12.0.0.0/24 is subnetted, 1 subnets
R        12.1.1.0 [120/1] via 45.1.1.5, 00:00:20, FastEthernet0/1
                  [120/1] via 24.1.1.2, 00:00:20, FastEthernet0/0
      16.0.0.0/24 is subnetted, 1 subnets
R        16.1.1.0 [120/1] via 45.1.1.5, 00:00:20, FastEthernet0/1
      23.0.0.0/24 is subnetted, 1 subnets
R        23.1.1.0 [120/1] via 45.1.1.5, 00:00:20, FastEthernet0/1
                  [120/1] via 24.1.1.2, 00:00:20, FastEthernet0/0
      56.0.0.0/24 is subnetted, 1 subnets
R        56.1.1.0 [120/1] via 45.1.1.5, 00:00:20, FastEthernet0/1

!On R5:

R5# show ip route | begin Gate
Gateway of last resort is not set

      3.0.0.0/24 is subnetted, 1 subnets
D EX     3.3.3.0 [110/21536000] via 56.1.1.6, 00:04:48, Serial1/6
      12.0.0.0/24 is subnetted, 1 subnets
D EX     12.1.1.0 [110/21536000] via 56.1.1.6, 00:04:53, Serial1/6
      16.0.0.0/24 is subnetted, 1 subnets
D        16.1.1.0 [90/21024000] via 56.1.1.6, 00:04:53, Serial1/6
      23.0.0.0/24 is subnetted, 1 subnets
D EX     23.1.1.0 [110/21536000] via 56.1.1.6, 00:04:48, Serial1/6
      24.0.0.0/24 is subnetted, 1 subnets
D EX     24.1.1.0 [110/21536000] via 56.1.1.6, 00:04:48, Serial1/6
      45.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        45.1.1.0/24 is directly connected, FastEthernet0/1
L        45.1.1.5/32 is directly connected, FastEthernet0/1
      56.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        56.1.1.0/24 is directly connected, Serial1/6
L        56.1.1.5/32 is directly connected, Serial1/6
!On R6:

R6# show ip route eigrp | begin Gate
Gateway of last resort is not set

      3.0.0.0/24 is subnetted, 1 subnets
D EX     3.3.3.0 [170/21024000] via 16.1.1.1, 00:05:40, Serial1/1
      12.0.0.0/24 is subnetted, 1 subnets
D EX     12.1.1.0 [170/21024000] via 16.1.1.1, 00:06:28, Serial1/1
      23.0.0.0/24 is subnetted, 1 subnets
D EX     23.1.1.0 [170/21024000] via 16.1.1.1, 00:05:40, Serial1/1
      24.0.0.0/24 is subnetted, 1 subnets
D EX     24.1.1.0 [170/21024000] via 16.1.1.1, 00:05:40, Serial1/1
      45.0.0.0/24 is subnetted, 1 subnets
D EX     45.1.1.0 [170/21024000] via 56.1.1.5, 00:05:40, Serial1/5

The output of the preceding show commands reveals that every router has every route in its routing table, but this only means that the control plane has worked properly. Let’s verify and test the data plane by pinging 3.3.3.3 from R6:

!On R6:

R6# ping 3.3.3.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

Let’s see the next-hop router toward network 3.3.3.0/24:

R6# show ip route | include 3.3.3.0
D EX     3.3.3.0 [170/21024000] via 16.1.1.1, 00:06:58, Serial1/1

Now let’s go to R1 and see the next-hop router toward network 3.3.3.0/24:

!On R1:

R1# show ip route | include 3.3.3.0

R        3.3.3.0 [120/3] via 12.1.1.2, 00:00:14, FastEthernet0/1

It looks like R1 is going through R2 to reach network 3.3.3.0/24. Let’s see the next-hop router that R2 takes to reach network 3.3.3.0/24:

!On R2:

R2# show ip route | include 3.3.3.0

R        3.3.3.0 [120/2] via 24.1.1.4, 00:00:18, FastEthernet0/0

It looks like R2 is going through R4 to reach network 3.3.3.0/24. Let’s see the next-hop router that R4 takes to reach network 3.3.3.0/24:

!On R4:

R4# show ip route | include 3.3.3.0

R        3.3.3.0 [120/1] via 45.1.1.5, 00:00:14, FastEthernet0/1

It looks like R4 is going through R5 to reach network 3.3.3.0/24. Let’s see the next-hop router that R5 takes to reach network 3.3.3.0/24:

!On R5:

R5# show ip route | include 3.3.3.0

D EX     3.3.3.0 [110/21536000] via 56.1.1.6, 00:09:27, Serial1/6

This looks like a perfect loop, because R6 is using R1 as its next-hop router to reach network 3.3.3.0/24. Let’s use traceroute to verify this:

!On R6:

R6# traceroute 3.3.3.3 numeric

Type escape sequence to abort.
Tracing the route to 3.3.3.3
VRF info: (vrf in name/id, vrf out name/id)
  1 16.1.1.1 28 msec 12 msec 12 msec
  2 12.1.1.2 16 msec 36 msec 16 msec
  3 24.1.1.4 16 msec 12 msec 20 msec
  4 45.1.1.5 16 msec 16 msec 16 msec
  5 56.1.1.6 28 msec 28 msec 32 msec
  6 16.1.1.1 24 msec 28 msec 24 msec
  7 12.1.1.2 24 msec 28 msec 24 msec
  8 24.1.1.4 28 msec 28 msec 24 msec
  9 45.1.1.5 24 msec 24 msec 24 msec
 10 56.1.1.6 44 msec 40 msec 40 msec
 11 16.1.1.1 36 msec 36 msec 36 msec
 12 12.1.1.2 36 msec 36 msec 36 msec
 13 24.1.1.4 36 msec 36 msec 36 msec
 14 45.1.1.5 36 msec 36 msec 36 msec
 15 56.1.1.6 52 msec 48 msec 48 msec
 16 16.1.1.1 44 msec 44 msec 44 msec
 17 12.1.1.2 48 msec 44 msec 48 msec
 18 24.1.1.4 48 msec 44 msec 48 msec
 19 45.1.1.5 44 msec 44 msec 48 msec
 20 56.1.1.6 60 msec 60 msec 60 msec
 21 16.1.1.1 56 msec 56 msec 56 msec
 22 12.1.1.2 56 msec 56 msec 56 msec
 23 24.1.1.4 56 msec 56 msec 56 msec
 24 45.1.1.5 56 msec 56 msec 56 msec
 25 56.1.1.6 72 msec 68 msec 72 msec
 26 16.1.1.1 64 msec 68 msec 100 msec
 27 12.1.1.2 64 msec 68 msec 68 msec
 28 24.1.1.4 68 msec 68 msec 64 msec
 29 45.1.1.5 64 msec 68 msec 68 msec
 30 56.1.1.6 80 msec 80 msec 84 msec

You can see very clearly that the data in this lab is looping. We have analyzed the control plan mechanism used to generate this situation, but for clarity’s sake, we need to take a look at it from a higher-order view. Figure 9-4 illustrates the process from the perspective of the control plane mechanism we configured in the first portion of this lab and explores the actual mechanism that leads to the loop in our topology.

image

Figure 9-4 Control Plane Mechanism

After looking closely at Figure 9-4, you can see that the control plan has led to the generation of the routing loop. In Figure 9-5, you see the “data plane” which is the path the data actually follows. By looking at this, you can see where the problem originates and then adopt a methodology to correct it.

image

Figure 9-5 Control Plane Mechanism

Now that we know the reason, we need to ask ourselves, how do we fix this problem?

Solution #1

There is no reason for R1 and R5 to advertise the RIP routes back into the RIP routing domain. Therefore, we will configure R1 and R5 to filter RIP routes from being advertised out of their F0/1 interface into the RIP routing domain.

Let’s try this solution and verify it:

!On R1 and R5:

Rx# show access-lists
Rx#

Rx(config)# access-list 1 deny 3.3.3.0 0.0.0.255
Rx(config)# access-list 1 permit any

Rx(config)# router rip
Rx(config-router)# distribute-list 1 out FastEthernet0/1

Let’s run clear ip route * on all routers and verify the result:

!On All Routers:

Rx# clear ip route *

!On R6:

R6# traceroute 3.3.3.3 numeric

Type escape sequence to abort.
Tracing the route to 3.3.3.3
VRF info: (vrf in name/id, vrf out name/id)
  1 16.1.1.1 16 msec 12 msec 16 msec
  2 12.1.1.2 16 msec 16 msec 16 msec
  3 23.1.1.3 28 msec *  28 msec

You can see that R6 goes to R1, R1 goes to R2, and R2 goes to R3. But why are we getting the asterisk (*) in the third line of the traceroute?

The reason we get this kind of timeout is because of the IOS default value for icmp rate-limit. Let’s verify this parameter:

R6# show ip icmp rate-limit


                           DF bit unreachables       All other unreachables
Interval (millisecond)     500                       500

Interface                  #  DF bit unreachables     #  All other unreachables
---------                  ---------------------     ------------------------
Serial1/1                  0                         0
Serial1/5                  0                         0

The output of the preceding command reveals that the ICMP timeout is 500 ms. This value can be increased, decreased, or negated altogether. Let’s negate the timeout:

!On All Routers:

Rx(config)# no ip icmp rate-limit unreachable

!On R6:

R6# traceroute 3.3.3.3 numeric

Type escape sequence to abort.
Tracing the route to 3.3.3.3
VRF info: (vrf in name/id, vrf out name/id)
  1 16.1.1.1 12 msec 16 msec 16 msec
  2 12.1.1.2 16 msec 16 msec 16 msec
  3 23.1.1.3 28 msec 28 msec 32 msec

Solution #2

Another way to perform this redistribution is to only allow the required routes to be redistributed; in this case, on R1 and R5, we only need to redistribute the EIGRP routes into RIP and nothing else.

Before we configure the second solution, let’s remove the first solution:

!On R1 and R5:

Rx(config)# no access-list 1
Rx(config)# router rip
Rx(config-router)# no distribute-list 1 out FastEthernet0/1

Rx# clear ip route *

Note You may have to run clear ip route * a few times for RIP to converge.

Let’s verify the configuration:

!On R6:

R6# traceroute 3.3.3.3 numeric

Type escape sequence to abort.
Tracing the route to 3.3.3.3
VRF info: (vrf in name/id, vrf out name/id)
  1 16.1.1.1 12 msec 12 msec 16 msec
  2 12.1.1.2 16 msec 16 msec 16 msec
  3 24.1.1.4 16 msec 12 msec 12 msec
  4 45.1.1.5 16 msec 16 msec 16 msec
  5 56.1.1.6 28 msec 28 msec 36 msec
  6 16.1.1.1 24 msec 24 msec 28 msec
  7 12.1.1.2 24 msec 28 msec 24 msec
  8 24.1.1.4 24 msec 24 msec 24 msec
  9 45.1.1.5 24 msec 28 msec 24 msec
 10 56.1.1.6 40 msec 40 msec 40 msec
 11 16.1.1.1 36 msec 36 msec 36 msec
 12 12.1.1.2 36 msec 36 msec 36 msec
 13 24.1.1.4 36 msec 36 msec 36 msec
 14 45.1.1.5 36 msec 36 msec 36 msec
 15 56.1.1.6 48 msec 52 msec 48 msec
 16 16.1.1.1 48 msec 44 msec 48 msec
 17 12.1.1.2 48 msec 44 msec 48 msec
 18 24.1.1.4 44 msec 48 msec 48 msec
 19 45.1.1.5 44 msec 48 msec 48 msec
 20 56.1.1.6 60 msec 60 msec 60 msec
 21 16.1.1.1 56 msec 56 msec 56 msec
 22 12.1.1.2 56 msec 56 msec 60 msec
 23 24.1.1.4 56 msec 56 msec 56 msec
 24 45.1.1.5 56 msec 56 msec 56 msec
 25 56.1.1.6 68 msec 72 msec 72 msec
 26 16.1.1.1 64 msec 68 msec 68 msec
 27 12.1.1.2 68 msec 64 msec 64 msec
 28 24.1.1.4 68 msec 76 msec 68 msec
 29 45.1.1.5 68 msec 68 msec 68 msec
 30 56.1.1.6 80 msec 80 msec 84 msec

Now we can configure the second solution:

!On R1 and R5:

Rx(config)# ip prefix-list net deny 12.1.1.0/24
Rx(config)# ip prefix-list net deny 25.1.1.0/24
Rx(config)# ip prefix-list net deny 45.1.1.0/24
Rx(config)# ip prefix-list net deny 3.3.3.0/24
Rx(config)# ip prefix-list net permit 0.0.0.0/0 le 32

Rx(config)# route-map tst permit 10
Rx(config-route-map)# match ip address prefix net
Rx(config)# router rip
Rx(config-router)# redistribute eigrp 100 route-map tst metric 1

!On R1 – R5:

Rx# clear ip route *

!On R1, R5 and R6:

Rx# clear ip eigrp neighbor

Let’s verify and test the configuration:

!On R6:

R6# traceroute 3.3.3.3 numeric

Type escape sequence to abort.
Tracing the route to 3.3.3.3
VRF info: (vrf in name/id, vrf out name/id)
  1 16.1.1.1 12 msec 16 msec 16 msec
  2 12.1.1.2 16 msec 16 msec 16 msec
  3 23.1.1.3 28 msec 28 msec 28 msec

Solution #3

To avoid routing loops when mutual redistribution is configured at multiple points, the routes originating in a routing domain must be denied from being redistributed back into the same routing domain. Let’s say a mutual redistribution is being performed between protocols A and B. The routes from protocol A are tagged with a value (say, 111). And the routes from protocol B are tagged with a value (say, 222). When the redistribution is performed in a mutual manner, the routing table of protocols A and B will consist of routes that are tagged with values of 111 and 222, respectively. Therefore, when you’re redistributing protocol B into protocol A, any route that carries a tag of 111 is filtered inbound. When you’re redistributing protocol A into protocol B, any route that carries a tag of 222 is filtered inbound.

A common method of tagging routes is using the administrative distance of the originating routing protocol.  EIGRP routes are tagged with 90, OSPF routes are tagged with 110, and RIP routes are tagged with 120. This makes it easy to look at the route tag associated with a route and know where the route originated.

Let’s configure this task and verify the result. However, before configuring solution #3, let’s remove the configuration from the previous solution:

!On R1 and R5:

Rx(config)# no ip prefix-list net

Rx(config)# no route-map tst

Rx(config)# router rip
Rx(config-router)# no redistribute eigrp 100
Rx(config-router)# redistribute eigrp 100 metric 1

Let’s test the configuration:

!On R6:

R6# traceroute 3.3.3.3 numeric

Type escape sequence to abort.
Tracing the route to 3.3.3.3
VRF info: (vrf in name/id, vrf out name/id)
  1 16.1.1.1 16 msec 16 msec 16 msec
  2 12.1.1.2 16 msec 16 msec 16 msec
  3 24.1.1.4 16 msec 16 msec 12 msec
  4 45.1.1.5 12 msec 16 msec 16 msec
  5 56.1.1.6 28 msec 32 msec 32 msec
  6 16.1.1.1 28 msec 24 msec 24 msec
  7 12.1.1.2 28 msec 24 msec 28 msec
  8 24.1.1.4 24 msec 28 msec 24 msec
  9 45.1.1.5 28 msec 24 msec 24 msec
 10 56.1.1.6 36 msec 40 msec 40 msec
 11 16.1.1.1 36 msec 36 msec 36 msec
 12 12.1.1.2 36 msec 36 msec 36 msec
 13 24.1.1.4 36 msec 36 msec 36 msec
 14 45.1.1.5 36 msec 36 msec 36 msec
 15 56.1.1.6 48 msec 48 msec 48 msec
 16 16.1.1.1 44 msec 44 msec 48 msec
 17 12.1.1.2 44 msec 48 msec 44 msec
 18 24.1.1.4 48 msec 48 msec 44 msec
 19 45.1.1.5 48 msec 48 msec 44 msec
 20 56.1.1.6 60 msec 64 msec 56 msec
 21 16.1.1.1 56 msec 56 msec 56 msec
 22 12.1.1.2 56 msec 56 msec 56 msec
 23 24.1.1.4 56 msec 56 msec 56 msec
 24 45.1.1.5 56 msec 60 msec 56 msec
 25 56.1.1.6 68 msec 72 msec 72 msec
 26 16.1.1.1 64 msec 68 msec 68 msec
 27 12.1.1.2 68 msec 68 msec 64 msec
 28 24.1.1.4 64 msec 68 msec 68 msec
 29 45.1.1.5 64 msec 64 msec 68 msec
 30 56.1.1.6 80 msec 80 msec 80 msec

Now we can configure solution #3 and verify it:

!On R1 and R5:

Rx(config)# route-map RIPtoEIGRP deny 10
Rx(config-route-map)# match tag 90
Rx(config)# route-map RIPtoEIGRP permit 90
Rx(config-route-map)# set tag 120

Rx(config)# route-map EIGRPtoRIP deny 10
Rx(config-route-map)# match tag 120
Rx(config)# route-map EIGRPtoRIP permit 90
Rx(config-route-map)# set tag 90

The best way to understand the following route maps is to read them from bottom to top:

route-map eigrprip permit 90: This route map tags all EIGRP routes with a value of 90.

route-map ripeigrp deny 10: This route map denies any route that carries a tag value of 90.

route-map ripeigrp permit 90: This route map tags all RIP routes with a value of 120.

route-map eigrprip deny 10: This route map denies any route that carries a tag value of 120.

Rx(config)# router rip
Rx(config-router)# redistribute eigrp 100 route-map EIGRPtoRIP metric 1

Rx(config)# router eigrp 100
Rx(config-router)# redistribute rip route-map RIPtoEIGRP metric 128 2000 255 1 1500

Let’s test the configuration:

!On R6:

R6# traceroute 3.3.3.3 numeric

Type escape sequence to abort.
Tracing the route to 3.3.3.3
VRF info: (vrf in name/id, vrf out name/id)
  1 16.1.1.1 16 msec 16 msec 16 msec
  2 12.1.1.2 16 msec 12 msec 16 msec
  3 23.1.1.3 32 msec 28 msec 28 msec

Solution #4

We can use summarization to fix this problem. Let’s configure this solution and verify it. However, before we try solution #4, we should remove the previous solution:

!On R1 and R5:

Rx(config)# no route-map RIPtoEIGRP
Rx(config)# no route-map EIGRPtoRIP

Rx(config)# router rip
Rx(config-router)# no redistribute eigrp 100 route-map EIGRPtoRIP
Rx(config-router)# redistribute eigrp 100 metric 1

Rx(config-router)# router eigrp 100
Rx(config-router)# no redistribute rip route-map RIPtoEIGRP
Rx(config-router)# redistribute rip metric 128 2000 255 1 1500

Let’s verify the configuration:

!On R6:
R6# traceroute 3.3.3.3 numeric

Type escape sequence to abort.
Tracing the route to 3.3.3.3
VRF info: (vrf in name/id, vrf out name/id)
  1 56.1.1.5 16 msec 16 msec 12 msec
  2 45.1.1.4 16 msec 16 msec 16 msec
  3 24.1.1.2 16 msec 16 msec 16 msec
  4 12.1.1.1 16 msec 12 msec 16 msec
  5 16.1.1.6 32 msec 28 msec 28 msec
  6 56.1.1.5 28 msec 24 msec 24 msec
  7 45.1.1.4 24 msec 28 msec 24 msec
  8 24.1.1.2 24 msec 24 msec 24 msec
  9 12.1.1.1 28 msec 24 msec 28 msec
 10 16.1.1.6 40 msec 40 msec 40 msec
 11 56.1.1.5 36 msec 36 msec 36 msec
 12 45.1.1.4 36 msec 36 msec 36 msec
 13 24.1.1.2 36 msec 36 msec 36 msec
 14 12.1.1.1 36 msec 36 msec 36 msec
 15 16.1.1.6 52 msec 48 msec 52 msec
 16 56.1.1.5 44 msec 48 msec 44 msec
 17 45.1.1.4 48 msec 48 msec 44 msec
 18 24.1.1.2 44 msec 48 msec 48 msec
 19 12.1.1.1 44 msec 48 msec 44 msec
 20 16.1.1.6 60 msec 60 msec 60 msec
 21 56.1.1.5 56 msec 56 msec 56 msec
 22 45.1.1.4 56 msec 76 msec 56 msec
 23 24.1.1.2 56 msec 68 msec 56 msec
 24 12.1.1.1 56 msec 56 msec 56 msec
 25 16.1.1.6 72 msec 68 msec 72 msec
 26 56.1.1.5 68 msec 68 msec 64 msec
 27 45.1.1.4 68 msec 68 msec 68 msec
 28 24.1.1.2 68 msec 64 msec 68 msec
 29 12.1.1.1 68 msec 68 msec 68 msec
 30 16.1.1.6 80 msec 80 msec 84 msec

Now we can configure solution #4:

!On R1 and R6:

Rx(config)# interface serial1/6
Rx(config-if)# ip summary-address eigrp 100 3.0.0.0 255.0.0.0

When summarization is configured, the more specific routes are suppressed; therefore, a single summary route is injected into the EIGRP routing domain, and because the more specific routes are suppressed, the RIP routes are reachable through RIP routing domain.

Let’s test the configuration:

On R6:

R6# show ip route eigrp | begin Gate
Gateway of last resort is not set
     3.0.0.0/24 is subnetted, 1 subnets
D EX     3.3.3.0 [170/21024000] via 16.1.1.1, 00:05:40, Serial1/1
      12.0.0.0/24 is subnetted, 1 subnets
D EX     12.1.1.0 [170/21024000] via 16.1.1.1, 00:06:28, Serial1/1
      23.0.0.0/24 is subnetted, 1 subnets
D EX     23.1.1.0 [170/21024000] via 16.1.1.1, 00:05:40, Serial1/1
      24.0.0.0/24 is subnetted, 1 subnets
D EX     24.1.1.0 [170/21024000] via 16.1.1.1, 00:05:40, Serial1/1
      45.0.0.0/24 is subnetted, 1 subnets
D EX     45.1.1.0 [170/21024000] via 56.1.1.5, 00:05:40, Serial1/5

On R1:

R1# show ip route 3.3.3.0

Routing entry for 3.3.3.0/24
  Known via “rip”, distance 120, metric 6
  Redistributing via rip, eigrp 100
  Advertised by eigrp 100 metric 128 2000 255 1 1500
  Last update from 12.1.1.2 on FastEthernet0/1, 00:00:14 ago
  Routing Descriptor Blocks:
  * 12.1.1.2, from 12.1.1.2, 00:00:14 ago, via FastEthernet0/1
      Route metric is 6, traffic share count is 1

!On R2:
R2# show ip route 3.3.3.0

Routing entry for 3.3.3.0/24
  Known via “rip”, distance 120, metric 5
  Redistributing via rip
  Last update from 23.1.1.3 on Serial1/3, 00:00:28 ago
  Routing Descriptor Blocks:
  * 23.1.1.3, from 23.1.1.3, 00:00:28 ago, via Serial1/3
      Route metric is 5, traffic share count is 1

!On R6:

R6# traceroute 3.3.3.3 numeric

Type escape sequence to abort.
Tracing the route to 3.3.3.3
VRF info: (vrf in name/id, vrf out name/id)
  1 16.1.1.1 12 msec
    56.1.1.5 16 msec
    16.1.1.1 16 msec
  2 45.1.1.4 16 msec
    12.1.1.2 16 msec
    45.1.1.4 16 msec
  3 23.1.1.3 28 msec
    24.1.1.2 16 msec
    23.1.1.3 28 msec

Erase the startup configuration of the routers and switches and reload them before proceeding to the next lab.

Lab 9-4: Redistribute RIPv2 and OSPF

image

Figure 9-6 Configuring Redistribution RIPv2 and OSPF

Figure 9-6 illustrates the topology that will be used in the following tasks. As mentioned in the previous lab involving RIP, you should remember that the metric is composed of a hop count and that the maximum valid metric is 15. Anything above 15 is considered infinite; you can use 16 to describe an infinite metric in RIP. When you’re redistributing a protocol into RIP, Cisco recommends that you use a low metric, such as 1. A high metric, such as 10, limits RIP even further. If you define a metric of 10 for redistributed routes, these routes can only be advertised to routers up to five hops away, at which point the metric (hop count) exceeds 15. By defining a metric of 1, you enable a route to travel the maximum number of hops in a RIP domain. However, doing this increases the possibility of routing loops if there are multiple redistribution points and a router learns about the network with a better metric from the redistribution point than from the original source. Therefore, you have to make sure that the metric is neither too high, preventing it from being advertised to all the routers, nor too low, leading to routing loops when there are multiple redistribution points.

With OSPF, the metric is a cost value based on 108 divided by the bandwidth of the link in bits/sec. For example, the OSPF cost of Ethernet is 10: 108/107 = 10

Note If a metric is not specified, OSPF uses a default value of 20 with the default metric type, or type-2, when redistributing routes from all protocols except Border Gateway Protocol (BGP) routes, which get a metric of 1.

When there is a major network that is subnetted, you need to use the keyword subnets to redistribute protocols into OSPF. Without this keyword, OSPF only redistributes major networks that are not subnetted.

It is possible to run more than one OSPF process on the same router. However, running more than one process of the same protocol is rarely needed and consumes the router’s memory and CPU. Also, you do not need to define the metric or use the default-metric command when redistributing one OSPF process into another.

Now we will experiment with redistribution between these two protocols.

Task 1

Configure OSPF area 0 on the F0/0 interfaces of R1 and R2:

!On R1:

R1(config)# router ospf 1
R1(config-router)# router-id 0.0.0.1
R1(config-router)# network 110.1.1.1 0.0.0.0 area 0

!On R2:

R2(config)# router ospf 1
R2(config-router)# router-id 0.0.0.2
R2(config-router)# network 110.1.1.2 0.0.0.0 area 0

You should see the following console message:

OSPF-5-ADJCHG: Process 1, Nbr 0.0.0.1.1.1.1 on FastEthernet0/0 from LOADING to FULL, Loading Done

Let’s verify the configuration:

!On R2:

R2# show ip ospf neighbor

Neighbor ID     Pri   State          Dead Time   Address         Interface
0.0.0.1           1   FULL/DR       00:00:36    110.1.1.1       FastEthernet0/0

Task 2

Configure RIPv2 on R1, R2, and R3 based on the following requirement:

On R1, configure RIPv2 on the F0/1 interface.

On R2, configure RIPv2 on the F0/1 and S1/3 interfaces.

On R3, configure RIPv2 on the S1/2 and loopback0 interfaces.

Disable auto-summarization on all three routers.

!On R1:

R1(config)# router rip
R1(config-router)# version 2
R1(config-router)# no auto-summary
R1(config-router)# network 120.0.0.0

On R2:

R2(config)# router rip
R2(config-router)# version 2
R2(config-router)# no auto-summary
R2(config-router)# network 120.0.0.0
R2(config-router)# network 23.0.0.0

On R3:

R3(config)# router rip
R3(config-router)# version 2
R3(config-router)# no auto-summary
R3(config-router)# network 3.0.0.0
R3(config-router)# network 23.0.0.0

Let’s verify the configuration:

!On R1:

R1# show ip route rip | begin Gate
Gateway of last resort is not set

      3.0.0.0/24 is subnetted, 1 subnets
R        3.3.3.0 [120/2] via 120.1.1.2, 00:00:01, FastEthernet0/1
      23.0.0.0/24 is subnetted, 1 subnets
R        23.1.1.0 [120/1] via 120.1.1.2, 00:00:01, FastEthernet0/1

On R2:

R2# show ip route rip | begin Gate
Gateway of last resort is not set

      3.0.0.0/24 is subnetted, 1 subnets
R        3.3.3.0 [120/1] via 23.1.1.3, 00:00:03, Serial1/3

Task 3

Configure the update, invalidation, and flush timers to be one-third of their default values:

!On R1:

Rx# show ip protocols | section rip
Routing Protocol is "rip"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Sending updates every 30 seconds, next due in 13 seconds
  Invalid after 180 seconds, hold down 180, flushed after 240
  Redistributing: rip
  Default version control: send version 2, receive version 2
    Interface             Send  Recv  Triggered RIP  Key-chain
    FastEthernet0/1       2     2
  Automatic network summarization is not in effect
  Maximum path: 4
  Routing for Networks:
    120.0.0.0
  Routing Information Sources:
    Gateway         Distance      Last Update
    120.1.1.2            120      00:00:05
  Distance: (default is 120)

!On All Routers:

Rx(config)# router rip
Rx(config-router)# timers basic 10 60 60 80

Let’s verify the configuration:

!On R1:

R1# show ip protocols | section rip
Routing Protocol is "rip"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Sending updates every 10 seconds, next due in 0 seconds
  Invalid after 60 seconds, hold down 60, flushed after 80
  Redistributing: rip
  Default version control: send version 2, receive version 2
    Interface             Send  Recv  Triggered RIP  Key-chain
    Ethernet0/1           2     2
  Automatic network summarization is not in effect
  Maximum path: 4
  Routing for Networks:
    120.0.0.0
  Routing Information Sources:
    Gateway         Distance      Last Update
    120.1.1.2            120      00:00:04
  Distance: (default is 120)

Task 4

Perform a mutual redistribution between OSPF and RIPv2 on R1. R1 should redistribute the OSPF routes into RIPv2 with a metric of 1. RIP routes should be redistributed into OSPF using the default cost and metric type. Ensure full reachability using ping.

!On R1:

R1(config)# router rip
R1(config-router)# redistribute ospf 1 metric 1

R1(config)# router ospf 1
R1(config-router)# redistribute rip subnets

Let’s verify the configuration:

Note You only have to type the command show ip route | include 3.3.3.0 once. After pressing the Enter key, press the up-arrow key once and then the Enter key again.

!On R2:

R2# show ip route | include 3.3.3.0

R        3.3.3.0 [120/1] via 23.1.1.3, 00:00:00, Serial1/3

R2# show ip route | include 3.3.3.0

R        3.3.3.0 [120/1] via 23.1.1.3, 00:00:01, Serial1/3

R2# show ip route | include 3.3.3.0

R        3.3.3.0 [120/1] via 23.1.1.3, 00:00:02, Serial1/3
R2# show ip route | include 3.3.3.0

R        3.3.3.0 [120/1] via 23.1.1.3, 00:00:03, Serial1/3

R2# show ip route | include 3.3.3.0

R        3.3.3.0 [120/1] via 23.1.1.3, 00:00:04, Serial1/3

R2# show ip route | include 3.3.3.0

R        3.3.3.0 [120/1] via 23.1.1.3, 00:00:04, Serial1/3

R2# show ip route | include 3.3.3.0

O E2     3.3.3.0 [110/20] via 110.1.1.1, 00:00:00, FastEthernet0/0

R2# show ip route | include 3.3.3.0

O E2     3.3.3.0 [110/20] via 110.1.1.1, 00:00:01, FastEthernet0/0

R2# show ip route | include 3.3.3.0

O E2     3.3.3.0 [110/20] via 110.1.1.1, 00:00:02, FastEthernet0/0

R2# show ip route | include 3.3.3.0

O E2     3.3.3.0 [110/20] via 110.1.1.1, 00:00:02, FastEthernet0/0

R2# show ip route | include 3.3.3.0

O E2     3.3.3.0 [110/20] via 110.1.1.1, 00:00:03, FastEthernet0/0

R2# show ip route | include 3.3.3.0

O E2     3.3.3.0 [110/20] via 110.1.1.1, 00:00:04, FastEthernet0/0

R2# show ip route | include 3.3.3.0

O E2     3.3.3.0 [110/20] via 110.1.1.1, 00:00:04, FastEthernet0/0

R2# show ip route | include 3.3.3.0

O E2     3.3.3.0 [110/20] via 110.1.1.1, 00:00:05, FastEthernet0/0
R2# show ip route | include 3.3.3.0

O E2     3.3.3.0 [110/20] via 110.1.1.1, 00:00:06, FastEthernet0/0

R2# show ip route | include 3.3.3.0

O E2     3.3.3.0 [110/20] via 110.1.1.1, 00:00:07, FastEthernet0/0

R2# show ip route | include 3.3.3.0

O E2     3.3.3.0 [110/20] via 110.1.1.1, 00:00:07, FastEthernet0/0

R2# show ip route | include 3.3.3.0

O E2     3.3.3.0 [110/20] via 110.1.1.1, 00:00:08, FastEthernet0/0

R2# show ip route | include 3.3.3.0
R2# show ip route | include 3.3.3.0

The route was not in the routing table, then it showed up as RIP, then it showed up as OSPF O E2, and then the route disappeared.

Let’s enable some debugging to find the problem so we can fix it. Let’s enable debug ip routing and debug ip rip on R2 and debug ip ospf lsa-generation on R1:

!On R1:

R1# debug ip ospf lsa-generation
ospf summary lsa generation debugging is on

!On R2:

R2# debug ip routing
IP routing debugging is on

R2# debug ip rip
RIP protocol debugging is on

When you see RT: add 3.3.3.0/24 via 23.1.1.3, rip metric [120/1] on R2 twice, disable all debugging on R1 and R2.

Let’s now analyze the output of the debug commands.

Step #1:

R3 advertises network 3.3.3.0/24 to R2, and R2 adds that entry to its RIB:

!On R2:

RT: add 3.3.3.0/24 via 23.1.1.3, rip metric [120/1]

RT: updating rip 3.3.3.0/24 (0x0):
    via 23.1.1.3 Se1/3

Let’s check the routing table of R2:

R2# show ip route | include 3.3.3.0
R        3.3.3.0 [120/1] via 23.1.1.3, 00:00:08, Serial1/3

Once R2 receives network 3.3.3.0/24, it advertises the network to R1.

Step #2:

R1 receives network 3.3.3.0/24 from R2 and redistributes it into OSPF, and it sends an LSA type 5 to R2:

!On R1:

OSPF-1 LSGEN: Generate external LSA 3.3.3.0, mask 255.255.255.0, type 5, age 0, seq 0x80000059

OSPF-1 LSGEN: Generate external LSA 3.3.3.0, mask 255.255.255.0, type 5, age 0, seq 0x8000009B
OSPF-1 LSGEN: MTID   Metric   Metric-type    FA            Tag         Topology Name
OSPF-1 LSGEN: 0      20       2              0.0.0.0       0           Base

Let’s look at this on R1:

R1# show ip ospf database external | include 3.3.3.0
  link state id: 3.3.3.0 (external network number )

Step #3:

R2 receives the OSPF external update from R1. Because OSPF has a lower administrative distance, it flushes the RIP-learned route and replaces it with OSPF with a next-hop IP address of 110.1.1.1. R2 also sends a RIP update to R1 notifying it that network 3.3.3.0/24 is no longer available. Let’s go to R2 and see this in the debug output:

RT: closer admin distance for 3.3.3.0, flushing 1 routes
RT: add 3.3.3.0/24 via 110.1.1.1, ospf metric [110/20]

RT: updating rip 110.1.1.0/24 (0x0):
    via 120.1.1.1 Fa0/1

Let’s look at this on R2:

R2# show ip route | include 3.3.3.0

O E2     3.3.3.0 [110/20] via 110.1.1.1, 00:00:07, FastEthernet0/0

Step #4:

Since R2 flushed the RIP-learned (3.3.3.0/24) network and replaced it with OSPF, it sent an update to R1 for network 3.3.3.0/24, telling R1 that this is no longer available (meaning this prefix is inaccessible). This means that it’s 16 hops away from the local router. Because R1 no longer has network 3.3.3.0/24 in its routing table, it can no longer redistribute the route into OSPF, so it advertises network 3.3.3.0/24 with a metric of 16,777,215.

Because R1 does not have network 3.3.3.0/24 in its routing table, it can no longer redistribute it into OSPF, so it advertises network 3.3.3.0/24 with its maximum metric, poisoning the route.

OSPF-1 LSGEN: generate external lsa 3.3.3.0, mask 255.255.255.0, type 5, age 3600, seq 0x80000016
OSPF-1 LSGEN: MITD    Metric    Metric-type    FA       Tag       Topology Name
OSPF-1 LSGEN: 0       16777215  2              0.0.0.0  0           Base

This is when the route totally disappeared:

R2# show ip route | include 3.3.3.0
R2#

But a few seconds later, R2 receives a RIP update from R3 for network 3.3.3.0/24 and adds it to its RIB, and the cycle repeats:

R2# show ip route | include 3.3.3.0
R        3.3.3.0 [120/1] via 23.1.1.3, 00:00:04, Serial1/3

To fix this problem, R2 should always trust RIP’s information for network 3.3.3.0/24 over OSPF. Therefore, let’s change the administrative distance of RIP to be lower than OSPF’s administrative distance. Once this configuration is performed, R3 will ignore OSPF’s update regarding network 3.3.3.0/24.

!On R2:

R2(config)# router rip
R2(config-router)# distance 109

Let’s test and verify the configuration:

!On R1:

R1# ping 3.3.3.3

Type escape sequence to abort.
sending 5, 100-byte icmp echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/30/32 ms

!On R2:

R2# ping 3.3.3.3

Type escape sequence to abort.
sending 5, 100-byte icmp echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/32 ms

Erase the startup configuration of the routers and switches and reload them before proceeding to the next lab.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.55.193