The end goal of this tutorial is to be able to reach R3's loopback IP from R1 and reach R1's loopback IP from R3. We will do this by redistributing OSPF into EIGRP and vice versa to allow connectivity between the two routers.
Here is a picture of the topology:
As with all my previous tutorials, all router interfaces are up/up, IP's have been configured, and the routers are all aware of their directly connected networks. Here is the output of the 'show ip int brief' and 'show ip route' commands from all three routers:
R1#show ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.1.1 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Loopback0 10.10.10.1 YES manual up up
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
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 1 subnets
C 10.10.10.0 is directly connected, Loopback0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
R1#
R2#show ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.1.2 YES manual up up
FastEthernet0/1 192.168.2.1 YES manual up up
R2#show
*Aug 14 12:41:06.303: %SYS-5-CONFIG_I: Configured from console by console
R2#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
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, FastEthernet0/1
R2#
R3#show ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
FastEthernet0/1 192.168.2.2 YES manual up up
Loopback0 30.30.30.1 YES manual up up
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
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.2.0/24 is directly connected, FastEthernet0/1
30.0.0.0/24 is subnetted, 1 subnets
C 30.30.30.0 is directly connected, Loopback0
R3#
Step 1 - Configure OSPF R1-R2
First we need to configure OSPF on both R1 and R2 and establish and adjacency between them:
R1(config)#router ospf 1
R1(config-router)#network 192.168.1.0 0.0.0.255 area 0
R2(config-router)#network 192.168.1.0 0.0.0.255 area 0
R2(config-router)#
*Aug 14 12:44:53.343: %OSPF-5-ADJCHG: Process 1, Nbr 10.10.10.1 on FastEthernet0/0 from LOADING to FULL, Loading Done
Step 2 - Configure EIGRP R2-R3
Now we need to configure EIGRP on both R2 and R3 to establish a neighbor relationship between them. Don't forget to turn off auto-summarization:
R2(config)#router eigrp 100
R2(config-router)#network 192.168.2.0 0.0.0.255
R2(config-router)#no auto-summary
R3(config)#router eigrp 100
R3(config-router)#network 192.168.2.0 0.0.0.255
R3(config-router)#no auto-summary
*Aug 14 12:50:29.391: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 192.168.2.1 (FastEthernet0/1) is up: new adjacency
Step 3 - Advertise R1 Loopback into OSPF
Now we need to tell R2 how to reach the 10.10.10.0/24 network by advertising it into OSPF on R1R1(config)#router ospf 1
R1(config-router)#network 10.10.10.0 0.0.0.255 area 0
R2#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
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/32 is subnetted, 1 subnets
O 10.10.10.1 [110/2] via 192.168.1.1, 00:00:04, FastEthernet0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, FastEthernet0/1
R2#
Step 4 - Advertise R3 Loopback into EIGRP
Now we need to tell R2 how to reach the 30.30.30.0/24 network by advertising it into EIGRP on R3
R3(config)#router eigrp 100
R3(config-router)#network 30.30.30.0 0.0.0.255
Now if we check R2, we can see the route to the 30.30.30.0/24 network that was learned from R3
R2#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
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/32 is subnetted, 1 subnets
O 10.10.10.1 [110/2] via 192.168.1.1, 00:05:34, FastEthernet0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, FastEthernet0/1
30.0.0.0/24 is subnetted, 1 subnets
D 30.30.30.0 [90/156160] via 192.168.2.2, 00:00:49, FastEthernet0/1
R2#
So far so good - we can see on R2 that it has received an OSPF route to the 10.10.10.0/24 network from R1, and it has received an EIGRP route to the 30.30.30.0/24 network from R3.
This is where we have a dilemma. R2 knows about both the OSPF and EIGRP routes from R1 and R3 respectively, but because they are routes that are learned from two separate routing protocols, the EIGRP route isn't being sent to R1, and the OSPF route isn't being sent to R3.
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
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 1 subnets
C 10.10.10.0 is directly connected, Loopback0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
R1#
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
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.2.0/24 is directly connected, FastEthernet0/1
30.0.0.0/24 is subnetted, 1 subnets
C 30.30.30.0 is directly connected, Loopback0
R3#
Route redistribution to the rescue! All we have to do is redistribute the OSPF route into EIGRP, and the EIGRP route into OSPF.
Step 5 - Redistribute EIGRP into OSPF (1-way redistribution)
Keep in mind that because R2 is the only router that is running both protocols, this is where we do the redistribution. There is no redistribution configuration that needs to be done on R1 or R3 - only R2.
Let's start by redistributing EIGRP into OSPF:
R2(config)#router ospf 1
R2(config-router)#redistribute eigrp 100 subnets
What we've done so far is what's called 1-way redistribution. We've redistributed the EIGRP route into OSPF which we can confirm by checking the route table of R1. We can see both the 192.168.2.0/24 and 30.30.30.0/24 routes are learned on R2. They are OSPF external type 2 routes as you can see from the 'E2' beside each route:
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
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 1 subnets
C 10.10.10.0 is directly connected, Loopback0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
O E2 192.168.2.0/24 [110/20] via 192.168.1.2, 00:00:21, FastEthernet0/0
30.0.0.0/24 is subnetted, 1 subnets
O E2 30.30.30.0 [110/20] via 192.168.1.2, 00:00:21, FastEthernet0/0
However if we check R3, we still don't know about the OSPF routes to R1:
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
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.2.0/24 is directly connected, FastEthernet0/1
30.0.0.0/24 is subnetted, 1 subnets
C 30.30.30.0 is directly connected, Loopback0
R3#
Let's fix that
Step 6 - Redistribute OSPF into EIGRP (2-way redistribution)
We have to redistribute the OSPF routes into EIGRP so that R3 can learn those routes from R1 and we can achieve end-to-end connectivity:
R2(config)#router eigrp 100
R2(config-router)#redistribute ospf 1
Now let's check R3 to see if he's learned the OSPF routes from R1:
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
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.2.0/24 is directly connected, FastEthernet0/1
30.0.0.0/24 is subnetted, 1 subnets
C 30.30.30.0 is directly connected, Loopback0
R3#
Uh oh...why aren't we learning the OSPF routes from R1? This is because when redistributing any external protocol into EIGRP, you MUST specify the default metrics to use (aka. K values) on those routes in order for them to work properly. I'll get more into K values and EIGRP metrics another time. For now let's just try the redistribution command again but this time we'll specify the default metrics:
R2(config)#router eigrp 100
R2(config-router)#redistribute ospf 1 metric 10000 1 255 1 1500
Now let's take a look at R3 and see if we've learned the OSPF routes from R1:
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
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/32 is subnetted, 1 subnets
D EX 10.10.10.1 [170/258816] via 192.168.2.1, 00:00:38, FastEthernet0/1
D EX 192.168.1.0/24 [170/258816] via 192.168.2.1, 00:00:38, FastEthernet0/1
C 192.168.2.0/24 is directly connected, FastEthernet0/1
30.0.0.0/24 is subnetted, 1 subnets
C 30.30.30.0 is directly connected, Loopback0
R3#
All is right with the world - we can see the routes to 10.10.10.0/24 and 192.168.1.0/24 are being learned from R1 and we know they are EIGRP external routes from the 'EX' beside each route.
Now let's verify if we can get from R1 to R3 and back:
R1#ping 30.30.30.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 30.30.30.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/81/156 ms
R1#
...and we are DONE. That is redistribution in it's simplest form.
I hope you enjoyed this tutorial and if you have any comments, feedback, or a specific topic that you would like me to cover, please leave a message below.
Thanks!

No comments:
Post a Comment