OSPF redistribute connected

Answered Question
Mar 4th, 2010

Hi all,

I have 2 routers at home network.

2650xm ix connected to ISP Cable modem

2620 is connected to 2650XM by switch and they both are in same network.

Routing protocol config  on  2650

router ospf 10
log-adjacency-changes
redistribute connected
network 192.168.1.0 0.0.0.255 area 0
!
router rip
version 2
network 192.168.1.0
default-information originate

2650xm#sh 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 96.51.144.1 to network 0.0.0.0

     64.0.0.0/32 is subnetted, 1 subnets
S       64.59.135.150 [254/0] via 96.51.144.1, FastEthernet0/0
     96.0.0.0/22 is subnetted, 1 subnets
C       96.51.144.0 is directly connected, FastEthernet0/0
C    10.0.0.0/8 is directly connected, Loopback0
C    192.168.1.0/24 is directly connected, FastEthernet1/0
S*   0.0.0.0/0 [254/0] via 96.51.144.1
2650xm#sh ip pro
2650xm#sh ip protocols
Routing Protocol is "ospf 10"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 10.10.10.10
  It is an autonomous system boundary router
  Redistributing External Routes from,
    connected
  Number of areas in this router is 1. 1 normal 0 stub 0 nssa
  Maximum path: 4
  Routing for Networks:
    192.168.1.0 0.0.0.255 area 0
Reference bandwidth unit is 100 mbps
  Routing Information Sources:
    Gateway         Distance      Last Update
  Distance: (default is 110)

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 4 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
    FastEthernet1/0       2     2
  Automatic network summarization is in effect
  Maximum path: 4
  Routing for Networks:
    192.168.1.0
  Routing Information Sources:
    Gateway         Distance      Last Update
    192.168.1.40         120      07:19:30
  Distance: (default is 120)

2620 router Protocol config

router ospf 10
log-adjacency-changes
network 192.168.1.0 0.0.0.255 area 0
!
router rip
version 2
network 192.168.1.0

2620Router#sh 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 192.168.1.1 to network 0.0.0.0

C    2.0.0.0/8 is directly connected, Loopback0
O E2 10.0.0.0/8 [110/20] via 192.168.1.1, 05:54:19, FastEthernet0/0
C    192.168.1.0/24 is directly connected, FastEthernet0/0
R*   0.0.0.0/0 [120/1] via 192.168.1.1, 00:00:20, FastEthernet0/0***********************************************************

MY Question is  why router 2620 learn route from 2650 using rip as default? as ospf has less AD which is 110 then rip?

Right now 2650 is advertising routes to 2620 router by Rip and OSPF and 2620 has chosen Rip protocol as compare to OSPF?

If some one can explain this to me please


mant thanks

mahesh

I have this problem too.
0 votes
Correct Answer by Edison Ortiz about 6 years 10 months ago

If the 2620 needs to reach the internet, per your current configuration, it will use RIP to reach the router advertising the default route.

Once the packet reaches the ASBR router, it will use static to reach the internet (next hop 96.51.144.1).

The packet won't be dropped unless you have NAT issues.

Regards

Edison

Correct Answer by Jon Marshall about 6 years 10 months ago

mahesh18 wrote:

Hi Edison,

thanks for reply

But i still can not understand why router 2620 has chosen rip?

thanks

mahesh

Mahesh

The 2620 has chosen the RIP default-route because only RIP is sending a default-route from the 2651. Using "redistribute connected" under the OSPF configuration will not tell OSPF to advertise a default route.

So if you want a default-route to be advertised by OSPF as well as RIP you need to use one of the options supplied by Edison.

Jon

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Edison Ortiz Thu, 03/04/2010 - 17:23

Mahesh,

You can redistribute any route into OSPF with the exception of the default route.

To generate a default route into OSPF

  •      You need the default route in the router generating the advertising along with the command default information-originate
  •      You can use the command default information-originate always when the router does not have a default route on its routing table.

If you want the 2620 router to obtain the default via OSPF, I recommend using the command on the first bullet point.

Regards

Edison

mahesh18 Thu, 03/04/2010 - 17:31

Hi Edison,

thanks for reply

But i still can not understand why router 2620 has chosen rip?

thanks

mahesh

Correct Answer
Jon Marshall Fri, 03/05/2010 - 00:21

mahesh18 wrote:

Hi Edison,

thanks for reply

But i still can not understand why router 2620 has chosen rip?

thanks

mahesh

Mahesh

The 2620 has chosen the RIP default-route because only RIP is sending a default-route from the 2651. Using "redistribute connected" under the OSPF configuration will not tell OSPF to advertise a default route.

So if you want a default-route to be advertised by OSPF as well as RIP you need to use one of the options supplied by Edison.

Jon

mahesh18 Fri, 03/05/2010 - 06:48

Hi Jon,

correct me if i am wrong so my understanding is two routers are still ospf nei and they exchange hello paclets.

but if router 2620  needs access to internet then it uses the default route advertisied by the rip.

Thanks

mahesh

KARUPPUCHAMY MA... Fri, 03/05/2010 - 06:57

Hi,


//

correct me if i am wrong so my understanding is two routers are still ospf nei and they exchange hello paclets. //  Yes. Thats correct. If two routers are ospf neighbors then they will exchange the hello packets with respect to  time-interval's configured on those interfaces.


//but if router 2620  needs access to internet then it uses the default route advertisied by the rip. //

No. The traffic which is initiated from 2620 router it will reach till 2650 after that the packet will get drop.

Because 2650 networks are not redistributed into ospf network.

But if you have conneted in the internet link in RIP domain then it is possible. Hope you got it.

Regards

Karuppu

mahesh18 Fri, 03/05/2010 - 07:27

Hi,

can you explain this in more detail

Because 2650 networks are not redistributed into ospf network.

thanks

mahesh

Edison Ortiz Fri, 03/05/2010 - 07:33

No. The traffic which is initiated from 2620 router it will reach till 2650 after that the packet will get drop.



Because 2650 networks are not redistributed into ospf network.

That's incorrect.

Correct Answer
Edison Ortiz Fri, 03/05/2010 - 07:31

If the 2620 needs to reach the internet, per your current configuration, it will use RIP to reach the router advertising the default route.

Once the packet reaches the ASBR router, it will use static to reach the internet (next hop 96.51.144.1).

The packet won't be dropped unless you have NAT issues.

Regards

Edison

Actions

This Discussion