Monday, April 2, 2012

Configuring Mutual Redistribution - OSPF to RIP

In this blogtorial we will take a look at how to configure mutual redistribution between OSPF and RIP. Though it is very easy to configure, tweaking it and preventing suboptimal routing is tricky. However, we will save "Preventing Sub-optimal routing in mutual redistribution" for the next post.

Consider a very simple topology below and let's get started.



Relevant configurations are posted below.

Router R1

R1#show run
!
ip cef
!
interface FastEthernet1/0
ip address 10.0.0.1 255.255.255.224

duplex auto
speed auto
!
interface FastEthernet1/1
ip address 192.168.1.1 255.255.255.224

duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
redistribute rip subnets
!--Redistribute RIP subnets into OSPF

network 10.0.0.0 0.0.0.255 area 0
!
router rip
version 2
redistribute ospf 1 metric 1
!--Redistribute OSPF process 1 into RIP

network 192.168.1.0
no auto-summary
!
end

Router R2

R2#show run
!
interface FastEthernet1/0
ip address 192.168.1.33 255.255.255.224

duplex auto
speed auto
!
interface FastEthernet1/1
ip address 10.0.0.34 255.255.255.224

duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
redistribute rip subnets
network 10.0.0.0 0.0.0.255 area 0
!
router rip
version 2
redistribute ospf 1 metric 1
network 192.168.1.0
no auto-summary
!
end

Router R3

R3#show run
!
interface FastEthernet1/0
ip address 10.0.0.3 255.255.255.224

duplex auto
speed auto
!
interface FastEthernet1/1
ip address 10.0.0.33 255.255.255.224

duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 10.0.0.0 0.0.0.255 area 0

!

Router R4

R4#show run
!
interface FastEthernet1/0
ip address 192.168.1.34 255.255.255.224

duplex auto
speed auto
!
interface FastEthernet1/1
ip address 192.168.1.4 255.255.255.224

duplex auto
speed auto
!
router rip
version 2
network 192.168.1.0
no auto-summary
!

end

Router R1 - show ip route

R1#show ip route
10.0.0.0/27 is subnetted, 2 subnets
C 10.0.0.0 is directly connected, FastEthernet1/0
O 10.0.0.32 [110/2] via 10.0.0.3, 00:11:39, FastEthernet1/0
192.168.1.0/27 is subnetted, 2 subnets
O E2 192.168.1.32 [110/20] via 10.0.0.3, 00:11:39, FastEthernet1/0
C 192.168.1.0 is directly connected, FastEthernet1/1

R1#traceroute 192.168.1.34
Translating "192.168.1.34"

Type escape sequence to abort.
Tracing the route to 192.168.1.34

1 10.0.0.3 28 msec 72 msec 20 msec
2 10.0.0.34 40 msec 40 msec 20 msec
3 192.168.1.34 52 msec * 140 msec
!--Notice the inefficient route to get to R4 fast1/0 (192.168.1.34) interface from R1. The most efficient route to get to R4 from R1 would be go out of R1 fast1/1. We will see how to prevent sub-optimal routing in redistribution in the next post. But for now we have redistribution between rip and ospf.

Many more articles to come so stay tuned. "Join this site" on the right / click +1 below ------->