This lab will discuss and demonstrate the configuration and verification of
So up until this point you’ve learnt how to configure different routing protocols such as the Routing Information Protocol (RIP), Enhanced Interior Gateway Routing protocol (EIGRP) and Open Shortest Path First (OSPF) but now its time to learn how to make this protocols play nice with each other and share their routes between each other. It’s always nice to share things.
First lets look at how route redistribution works in a basic way. In this lab you’ll be redistributing routes between OSPF and RIP, with that being said routes from OSPF will appear in RIP marked as a RIP route and RIP routes redistributed will appear in OSPF as an OSPF E2 route by default.
So for example; lets say you work at ABC Inc. and your corporation buys company XYZ Inc. Your company uses OSPF and XYZ Inc. uses RIP. During the acquisition you’ll want to merge infrastructures to ensure information sharing between the already existing infrastructure to the newly acquired company. In this case you’ll have to configure redistribution between the two networks. Keep in mind even redistribution may not work 100% of the time. For example when you purchase a company that uses the same RFC1918 private address space as you. You don’t want their routes to 10.50.33.0/24 in your network which has its own route to 10.50.33.0/24, this would cause serious problems. In cases like these, NAT is used until the issue can be fully addressed.
Route redistribution should NOT be designed into a network from the beginning but should only be used during scenarios where you need to route between two different autonomous systems running different routing protocols. For example, company acquisitions or vendor incompatibilities; in which case you have a device that only supports rip but your network runs OSPF. You will need to either utilize static routing or redistribution.
When you configure redistribution, the command(s) are entered under the routing process configuration mode; in which case you specify the metric for the redistributed routes when redistributing a particular routing process into the routing process you’re currently configuring. For example in RIP router configuration mode you’d redistribute ospf and specify a hop count metric.
In OSPF router configuration mode, when redistributing RIP routes into OSPF you’d specify a COST associated with the routes redistributed by RIP into OSPF. You can however leave a metric out following the redistribute command specifying a metric is best practice.
Also a quick note to remember, when configuring route redistribution into EIGRP or OSPF you must use the subnets keyboard following the specified metric or the routing process will only redistribute a classful network into the routing process.
So now that you have an understanding of mutual route redistribution lets jump into the configuration.
Please review the following command(s) listed below;
Command | Description |
---|---|
redistribute protocol metric metric info | This command is executed in router configuration mode of RIP, EIGRP or OSPF to configure the routing process to redistribute routes from a different source into the configured routing process such as static into RIP or RIP into OSPF. It’s best practice to specify a metric. |
The following logical topology shown below is used in this lab;
Objective 1. – Create four new loopback interfaces on R1 using the 10.1.0.0/22 address allocation and configure those interfaces to participate in OSPF area 0. Ensure that these loopback interfaces participate in OSPF with their configured subnet mask and not a host mask.
By default loopback interfaces participate in ospf as a /32 host route unless you change the default network type from LOOPBACK to Point-to-Point as shown below;
R1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. R1(config)#interface loopback0 R1(config-if)#ip address 10.1.0.1 255.255.255.0 R1(config-if)#ip ospf 1 area 0 R1(config-if)#ip ospf network point-to-point R1(config-if)# R1(config-if)#interface loopback1 R1(config-if)#ip address 10.1.1.1 255.255.255.0 R1(config-if)#ip ospf 1 area 0 R1(config-if)#ip ospf network point-to-point R1(config-if)# R1(config-if)#interface loopback2 R1(config-if)#ip address 10.1.2.1 255.255.255.0 R1(config-if)#ip ospf 1 area 0 R1(config-if)#ip ospf network point-to-point R1(config-if)# R1(config-if)#interface loopback3 R1(config-if)#ip address 10.1.3.1 255.255.255.0 R1(config-if)#ip ospf 1 area 0 R1(config-if)#ip ospf network point-to-point R1(config-if)#end R1# %SYS-5-CONFIG_I: Configured from console by console R1#
Objective 2. – Create four new loopback interfaces on R5 using the 172.5.0.0/22 address allocation and configure those interfaces to participate in RIP.
R5#configure terminal Enter configuration commands, one per line. End with CNTL/Z. R5(config)#interface loopback0 R5(config-if)#ip address 172.5.0.1 255.255.255.0 R5(config-if)# R5(config-if)#interface loopback1 R5(config-if)#ip address 172.5.1.1 255.255.255.0 R5(config-if)# R5(config-if)#interface loopback2 R5(config-if)#ip address 172.5.2.1 255.255.255.0 R5(config-if)# R5(config-if)#interface loopback3 R5(config-if)#ip address 172.5.3.1 255.255.255.0 R5(config-if)#exit R5(config)#router rip R5(config-router)#network 172.5.0.0 R5(config-router)#end R5# %SYS-5-CONFIG_I: Configured from console by console R5#
Objective 3. – By viewing R3’s routing table, verify that the newly created loopback interfaces are being learned by R3.
R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
* - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
172.5.0.0/24 is subnetted, 4 subnets
R 172.5.1.0 [120/2] via 172.29.34.4, 00:00:01, Serial0/0.324
R 172.5.0.0 [120/2] via 172.29.34.4, 00:00:01, Serial0/0.324
R 172.5.3.0 [120/2] via 172.29.34.4, 00:00:01, Serial0/0.324
R 172.5.2.0 [120/2] via 172.29.34.4, 00:00:01, Serial0/0.324
172.29.0.0/24 is subnetted, 2 subnets
C 172.29.34.0 is directly connected, Serial0/0.324
R 172.29.45.0 [120/1] via 172.29.34.4, 00:00:01, Serial0/0.324
10.0.0.0/24 is subnetted, 6 subnets
O 10.1.3.0 [110/129] via 10.102.23.2, 00:02:24, Serial0/0.322
O 10.1.2.0 [110/129] via 10.102.23.2, 00:02:24, Serial0/0.322
O 10.1.1.0 [110/129] via 10.102.23.2, 00:02:24, Serial0/0.322
O 10.1.0.0 [110/129] via 10.102.23.2, 00:02:24, Serial0/0.322
O 10.102.12.0 [110/128] via 10.102.23.2, 00:02:24, Serial0/0.322
C 10.102.23.0 is directly connected, Serial0/0.322
R3#
Objective 4. – On R3 redistribute RIP routes into OSPF using the cost of 50000 then redistribute OSPF routes into RIP using the hop count of 3.
Before redistributing RIP into OSPF keep in mind you must use the subnets keyword after the redistribution metric as shown below other wise you’ll redistribute only a classful network;
R3#configure terminal Enter configuration commands, one per line. End with CNTL/Z. R3(config)#router ospf 1 R3(config-router)#redistribute rip metric 50000 subnets R3(config-router)#exit R3(config)#router rip R3(config-router)#redistribute ospf 1 metric 3 R3(config-router)#end R3#
Objective 5. – Verify on R1 and R5 that routes from the opposite autonomous system exist in their routing table.
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
* - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
172.5.0.0/24 is subnetted, 4 subnets
O E2 172.5.1.0 [110/50000] via 10.102.12.2, 00:00:15, Serial0/0.122
O E2 172.5.0.0 [110/50000] via 10.102.12.2, 00:00:15, Serial0/0.122
O E2 172.5.3.0 [110/50000] via 10.102.12.2, 00:00:15, Serial0/0.122
O E2 172.5.2.0 [110/50000] via 10.102.12.2, 00:00:15, Serial0/0.122
172.29.0.0/24 is subnetted, 2 subnets
O E2 172.29.34.0 [110/50000] via 10.102.12.2, 00:00:15, Serial0/0.122
O E2 172.29.45.0 [110/50000] via 10.102.12.2, 00:00:15, Serial0/0.122
10.0.0.0/24 is subnetted, 6 subnets
C 10.1.3.0 is directly connected, Loopback3
C 10.1.2.0 is directly connected, Loopback2
C 10.1.1.0 is directly connected, Loopback1
C 10.1.0.0 is directly connected, Loopback0
C 10.102.12.0 is directly connected, Serial0/0.122
O 10.102.23.0 [110/128] via 10.102.12.2, 00:05:34, Serial0/0.122
R1#
As shown above you can see that the RIP routes being redistributed into the OSPF autonomous system are denoted as E2 routes in the routing table on R1.
R5#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
* - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
172.5.0.0/24 is subnetted, 4 subnets
C 172.5.1.0 is directly connected, Loopback1
C 172.5.0.0 is directly connected, Loopback0
C 172.5.3.0 is directly connected, Loopback3
C 172.5.2.0 is directly connected, Loopback2
172.29.0.0/24 is subnetted, 2 subnets
R 172.29.34.0 [120/1] via 172.29.45.4, 00:00:05, Serial0/0.524
C 172.29.45.0 is directly connected, Serial0/0.524
10.0.0.0/24 is subnetted, 6 subnets
R 10.1.3.0 [120/4] via 172.29.45.4, 00:00:06, Serial0/0.524
R 10.1.2.0 [120/4] via 172.29.45.4, 00:00:06, Serial0/0.524
R 10.1.1.0 [120/4] via 172.29.45.4, 00:00:06, Serial0/0.524
R 10.1.0.0 [120/4] via 172.29.45.4, 00:00:06, Serial0/0.524
R 10.102.12.0 [120/4] via 172.29.45.4, 00:00:07, Serial0/0.524
R 10.102.23.0 [120/4] via 172.29.45.4, 00:00:07, Serial0/0.524
R5#
As shown above you can see that the OSPF networks in the 10.0.0.0/8 range are now in R5’s routing table with a hop count of 4. To get to R3 its 1 hop to R4, on R3 the redistributed metric adds +3 giving you a total metric of 4 on R5 for routes learned from the OSPF network.