0

I have three routers connected to each other. Each has a subnet that it uses (eigrp, ospf, rip) as shown in the figure

figure

I managed to redistribute EIGRP and OSPF, this works perfect. But when I try to redistribute RIP and OSPF, RIP router 3 changes its via (Figure 2)

figure 2

Before applying these commands:

router rip
redistribute ospf 1 metric 2

and

router ospf 1
redistribute rip subnets

In the routing table the path to that router in the routing table looks like this:

R 15.30.7.48/30 [120/1] via 15.30.7.53, 00:00:18, GigabitEthernet0/2

Applying the above commands for redistribution changes to this:

O E2    15.30.7.48/30 [110/20] via 15.30.7.74, 00:01:29, Serial0/3/0

And the via of this network should not change

Why does this happen? How can I solve that?

EDIT:

This is what my routing table looks like on router 3 before redistributing OSPF

Codes: L - local, 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, E - EGP
       i - IS-IS, 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

     15.0.0.0/8 is variably subnetted, 17 subnets, 6 masks
R       15.30.5.0/25 [120/2] via 15.30.7.58, 00:00:22, GigabitEthernet0/1
R       15.30.5.128/26 [120/2] via 15.30.7.53, 00:00:21, GigabitEthernet0/2
R       15.30.6.64/26 [120/1] via 15.30.7.53, 00:00:21, GigabitEthernet0/2
C       15.30.6.128/27 is directly connected, GigabitEthernet0/0
L       15.30.6.129/32 is directly connected, GigabitEthernet0/0
R       15.30.6.240/29 [120/1] via 15.30.7.58, 00:00:22, GigabitEthernet0/1
R       15.30.7.48/30 [120/1] via 15.30.7.53, 00:00:21, GigabitEthernet0/2
C       15.30.7.52/30 is directly connected, GigabitEthernet0/2
L       15.30.7.54/32 is directly connected, GigabitEthernet0/2
C       15.30.7.56/30 is directly connected, GigabitEthernet0/1
L       15.30.7.57/32 is directly connected, GigabitEthernet0/1
R       15.30.7.60/30 [120/2] via 15.30.7.58, 00:00:22, GigabitEthernet0/1
                      [120/2] via 15.30.7.53, 00:00:21, GigabitEthernet0/2
R       15.30.7.64/30 [120/1] via 15.30.7.58, 00:00:22, GigabitEthernet0/1
C       15.30.7.72/30 is directly connected, Serial0/3/0
L       15.30.7.73/32 is directly connected, Serial0/3/0
C       15.30.7.76/30 is directly connected, Serial0/3/1
L       15.30.7.77/32 is directly connected, Serial0/3/1

The routing table after redistributing OSPF:

Codes: L - local, 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, E - EGP
       i - IS-IS, 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

     15.0.0.0/8 is variably subnetted, 34 subnets, 6 masks
O       15.30.2.0/25 [110/67] via 15.30.7.74, 00:00:18, Serial0/3/0
O       15.30.2.128/25 [110/68] via 15.30.7.74, 00:00:18, Serial0/3/0
O       15.30.3.0/25 [110/69] via 15.30.7.74, 00:00:18, Serial0/3/0
O       15.30.4.0/25 [110/68] via 15.30.7.74, 00:00:18, Serial0/3/0
O       15.30.4.128/25 [110/67] via 15.30.7.74, 00:00:18, Serial0/3/0
O E2    15.30.5.0/25 [110/20] via 15.30.7.74, 00:00:18, Serial0/3/0
O E2    15.30.5.128/26 [110/20] via 15.30.7.74, 00:00:18, Serial0/3/0
O       15.30.5.192/26 [110/66] via 15.30.7.74, 00:00:18, Serial0/3/0
O E2    15.30.6.64/26 [110/20] via 15.30.7.74, 00:00:18, Serial0/3/0
C       15.30.6.128/27 is directly connected, GigabitEthernet0/0
L       15.30.6.129/32 is directly connected, GigabitEthernet0/0
O       15.30.6.192/27 [110/65] via 15.30.7.74, 00:00:18, Serial0/3/0
O       15.30.6.224/29 [110/66] via 15.30.7.74, 00:00:18, Serial0/3/0
O E2    15.30.6.240/29 [110/20] via 15.30.7.74, 00:00:18, Serial0/3/0
O       15.30.6.248/30 [110/65] via 15.30.7.74, 00:00:18, Serial0/3/0
O       15.30.6.252/30 [110/66] via 15.30.7.74, 00:00:18, Serial0/3/0
O       15.30.7.0/30 [110/68] via 15.30.7.74, 00:00:18, Serial0/3/0
O       15.30.7.4/30 [110/65] via 15.30.7.74, 00:00:18, Serial0/3/0
O       15.30.7.8/30 [110/67] via 15.30.7.74, 00:00:18, Serial0/3/0
O       15.30.7.12/30 [110/67] via 15.30.7.74, 00:00:18, Serial0/3/0
O       15.30.7.16/30 [110/68] via 15.30.7.74, 00:00:18, Serial0/3/0
O       15.30.7.20/30 [110/66] via 15.30.7.74, 00:00:18, Serial0/3/0
O E2    15.30.7.48/30 [110/20] via 15.30.7.74, 00:00:18, Serial0/3/0
C       15.30.7.52/30 is directly connected, GigabitEthernet0/2
L       15.30.7.54/32 is directly connected, GigabitEthernet0/2
C       15.30.7.56/30 is directly connected, GigabitEthernet0/1
L       15.30.7.57/32 is directly connected, GigabitEthernet0/1
O E2    15.30.7.60/30 [110/20] via 15.30.7.74, 00:00:18, Serial0/3/0
O E2    15.30.7.64/30 [110/20] via 15.30.7.74, 00:00:18, Serial0/3/0
O       15.30.7.68/30 [110/128] via 15.30.7.74, 00:00:18, Serial0/3/0
C       15.30.7.72/30 is directly connected, Serial0/3/0
L       15.30.7.73/32 is directly connected, Serial0/3/0
C       15.30.7.76/30 is directly connected, Serial0/3/1
L       15.30.7.77/32 is directly connected, Serial0/3/1

The configuration file:

interface GigabitEthernet0/0
 ip address 15.30.6.129 255.255.255.224
 duplex auto
 speed auto
!
interface GigabitEthernet0/1
 ip address 15.30.7.57 255.255.255.252
 duplex auto
 speed auto
!
interface GigabitEthernet0/2
 ip address 15.30.7.54 255.255.255.252
 duplex auto
 speed auto
!
interface Serial0/3/0
 ip address 15.30.7.73 255.255.255.252
!
interface Serial0/3/1
 ip address 15.30.7.77 255.255.255.252
 clock rate 2000000
!
interface Vlan1
 no ip address
 shutdown
!
router ospf 1
 log-adjacency-changes
 redistribute rip subnets 
 network 15.30.7.72 0.0.0.3 area 0
!
router rip
 version 2
 redistribute ospf 1 metric 2 
 passive-interface GigabitEthernet0/0
 network 15.0.0.0
 no auto-summary

1 Answer 1

3

We need to see your configurations to be sure, but remember that the administrative distance of OSPF is lower (preferred) than RIP. So your router prefers the OSPF route over RIP routes.

2
  • I just edited the question with more information about routing tables and configuration. Could you tell me if this is actually happening and how I can fix it? Mar 2 at 21:54
  • 2
    Yes, the router prefers OSPF routes to RIP routes. That's by design. You can change it by changing the administrative distance so that RIP is preferred.
    – Ron Trunk
    Mar 2 at 22:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.