default route and routing protcols

Answered Question
Mar 17th, 2009

Hi everybody!

i have few questions:

In the following default route,

ip route 0.0.0.0 0.0.0.0 192.192.192.1

192.192.192.1 is next hop ip address.

Consider the following routing table:

R 199.199.199.0 [120/2] via s0

c 192.192.192.0 is directly connected.

Can i configure a default route as.

Ip route 0.0.0.0 0.0.0.0 199.199.199.2

Here 199.199.199.2 is not the next hop but a an entry from routing table.

I think router will perform recursive look up to send packets using 199.199.199.2

Am i correct?

====================

2) Consider the default route:

ip route 0.0.0.0 0.0.0.0 199.199.199.1

Now in case of rip, rip will automatically advertises the default route .

But in case of eigrp and ospf, we need to redistribute this route using "redistribute static" command. Am i correct?

=========================

3) Consider the following routing table

R 199.199.199.0 via s0

C 192.192.192.0 directly connected s0

If i configure default route as:

ip route 0.0.0.0 0.0.0.0 s0

it will appear in the routing table as

C 0.0.0.0 directly connected s1.

Now if we wish to advertise this route using eigrp and ospf, do we need to use the command " redistribute connected" ?

================================

Thanks a lot and have a nice day!

I have this problem too.
0 votes
Correct Answer by badalam_nt about 7 years 10 months ago

Hi Sarah,

Additional info after browsing through some other forums:

"In earlier versions of RIP, the default route created using the ip route 0.0.0.0 0.0.0.0 was automatically advertised by RIP routers. In Cisco IOS Software Release 12.0T and later, RIP does not advertise the default route if the route is not learned via RIP."

What IOS do you have on your routers?

Petru

Correct Answer by badalam_nt about 7 years 10 months ago

Hi Sarah,

In Routing TCP/IP 2nd edition book it appears the same thing as mentioned by Edison:

RIP will not advertise the default route unless the static route is redistributed into the RIP protocol:

router rip

redistribute static

An alternative method of configuring/advertising the default route is to use the command:

ip default-network

where no matter what you specified (network which must be directly connected to the router, specified by a static route, or discovered by a dynamic routing protocol), RIP will advertise 0.0.0.0 as

the default network, not the network specified .

So instead of

(config)#ip route 0.0.0.0 0.0.0.0

and

(config)#router rip

(config-router)#redistribute static

just use

(config)#ip default-network

In both cases RIP process running on that router will advertise 0.0.0.0 to router's neighbours.

Correct Answer by Edison Ortiz about 7 years 10 months ago

Sarah,

I don't see that happening here and I believe you have something else in the config that is causing this to happen or you have a bug, per the IOS documentation:

http://www.cisco.com/en/US/docs/ios/iproute/configuration/guide/irp_cfg_info_prot_ps6350_TSD_Products_Configuration_Guide_Chapter.html

Cisco IOS software will source the default network with RIP if one of the following conditions is met:

•The ip default-network command is configured.

•The default-information originate command is configured.

•The default route is learned via another routing protocol or static route and then redistributed into RIP.

Correct Answer by Edison Ortiz about 7 years 10 months ago

Here 199.199.199.2 is not the next hop but a an entry from routing table.

I think router will perform recursive look up to send packets using 199.199.199.2

Am i correct?

Yes.

2) Consider the default route:

ip route 0.0.0.0 0.0.0.0 199.199.199.1

Now in case of rip, rip will automatically advertises the default route .

You need to redistribute static with RIP.

If i configure default route as:

ip route 0.0.0.0 0.0.0.0 s0

it will appear in the routing table as

C 0.0.0.0 directly connected s1.

Still, that's a static route and you must use the redistribute static command.

S* 0.0.0.0/0 is directly connected, FastEthernet0/0

R1#sh ip route 0.0.0.0

Routing entry for 0.0.0.0/0, supernet

Known via "static", distance 1, metric 0 (connected), candidate default path

__

Edison.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (4 ratings)
Loading.
Correct Answer
Edison Ortiz Tue, 03/17/2009 - 13:00

Here 199.199.199.2 is not the next hop but a an entry from routing table.

I think router will perform recursive look up to send packets using 199.199.199.2

Am i correct?

Yes.

2) Consider the default route:

ip route 0.0.0.0 0.0.0.0 199.199.199.1

Now in case of rip, rip will automatically advertises the default route .

You need to redistribute static with RIP.

If i configure default route as:

ip route 0.0.0.0 0.0.0.0 s0

it will appear in the routing table as

C 0.0.0.0 directly connected s1.

Still, that's a static route and you must use the redistribute static command.

S* 0.0.0.0/0 is directly connected, FastEthernet0/0

R1#sh ip route 0.0.0.0

Routing entry for 0.0.0.0/0, supernet

Known via "static", distance 1, metric 0 (connected), candidate default path

__

Edison.

sarahr202 Tue, 03/17/2009 - 14:22

Hi Edison!

"2) Consider the default route:

ip route 0.0.0.0 0.0.0.0 199.199.199.1

Now in case of rip, rip will automatically advertises the default route .

You need to redistribute static with RIP. "

Edison below is my lab set up;

ra s0---s0 rb s1--------rd

ra s0 194.194.194.1/24

router rip

network 194.194.194.0

================

rb s0 194.194.194.2/24

s1 192.192.192.1/24

ip route 0.0.0.0 0.0.0.0 192.192.192.2

router rip

network 192.192.192.0

=================================

Routing table at rb:

RouterB#show ip route (output omitted)

Gateway of last resort is 192.192.192.2 to network 0.0.0.0

C 192.192.192.0/24 is directly connected, Serial1

C 194.194.194.0/24 is directly connected, Serial0

S* 0.0.0.0/0 [1/0] via 192.192.192.2

===========================

routing table at ra:

routerA#show ip route (output omitted)

Gateway of last resort is 194.194.194.2 to network 0.0.0.0

C 194.194.194.0/24 is directly connected, Serial0

R* 0.0.0.0/0 [120/1] via 194.194.194.2, 00:00:12, Serial0

RouterA#

=========================

I find in case of rip, we don't need to redistribute the default route.

Thanks a lot Edison and have a nice day!

sarahr202 Tue, 03/17/2009 - 14:42

Now i removed the " ip route 0.0.0.0 0.0.0.0 192.192.192.2" . I configured ip route 0.0.0.0 0.0.0.0 s1 on rb.

The routing table at ra is:

RouterA#show ip route( output omitted)

Gateway of last resort is 194.194.194.2 to network 0.0.0.0

C 194.194.194.0/24 is directly connected, Serial0

R* 0.0.0.0/0 [120/1] via 194.194.194.2, 00:00:11, Serial0

Results:

The rip advertises without " redistribute" command, the default route whether it is configured using ip route 0.0.0.0 0.0.0.0 192.192.192.2 or ip route 0.0.0.0 0.0.0.0 s1

=======================================================================

Now i am gonna use eigrp on ra and rb to see if the default route get redistributed automatically.

Rb config:(output omitted)

interface Serial0

ip address 194.194.194.2 255.255.255.0

!

interface Serial1

ip address 192.192.192.1 255.255.255.0

clockrate 56000

!

router eigrp 1

network 194.194.194.0

!

no ip classless

ip route 0.0.0.0 0.0.0.0 Serial1

!

!

line con 0

line aux 0

line vty 0 4

login

!

end

======================

Ra config:(output omitted)

interface Serial1

ip address 200.200.200.1 255.255.255.0

clockrate 56000

!

router eigrp 1

network 194.194.194.0

auto-summary

no eigrp log-neighbor-changes

!

ip classless

==================

routing table at ra:

routerA#show ip route( output omitted)

Gateway of last resort is not set

C 194.194.194.0/24 is directly connected, Serial0

RouterA#

The eigrp unlike rip does not advertise the default route without redistribute command. I found the same result for ospf

You guys have a good day!

Correct Answer
Edison Ortiz Tue, 03/17/2009 - 14:43

Sarah,

I don't see that happening here and I believe you have something else in the config that is causing this to happen or you have a bug, per the IOS documentation:

http://www.cisco.com/en/US/docs/ios/iproute/configuration/guide/irp_cfg_info_prot_ps6350_TSD_Products_Configuration_Guide_Chapter.html

Cisco IOS software will source the default network with RIP if one of the following conditions is met:

•The ip default-network command is configured.

•The default-information originate command is configured.

•The default route is learned via another routing protocol or static route and then redistributed into RIP.

sarahr202 Tue, 03/17/2009 - 15:26

Thanks Edison!

I truly believe i have bug in my ios after all these are 2500 series routers.

I performed my lab 4 times each time get the same result- rip advertising the default route without" redistribute " command.

Thanks a lot !

P.s yesterday i had interview with cisco gold partner, I took along all my questions that i posted and answers you guys posted.Hiring manager was very much interested in these post( i think he is also net pro member). Let see what happens next .

Correct Answer
badalam_nt Tue, 03/17/2009 - 16:38

Hi Sarah,

In Routing TCP/IP 2nd edition book it appears the same thing as mentioned by Edison:

RIP will not advertise the default route unless the static route is redistributed into the RIP protocol:

router rip

redistribute static

An alternative method of configuring/advertising the default route is to use the command:

ip default-network

where no matter what you specified (network which must be directly connected to the router, specified by a static route, or discovered by a dynamic routing protocol), RIP will advertise 0.0.0.0 as

the default network, not the network specified .

So instead of

(config)#ip route 0.0.0.0 0.0.0.0

and

(config)#router rip

(config-router)#redistribute static

just use

(config)#ip default-network

In both cases RIP process running on that router will advertise 0.0.0.0 to router's neighbours.

chinkevi_2 Tue, 03/17/2009 - 17:29

i think this is the behavior if you have ip classless. do no ip classless you won't see the default route without redistribution. I don't remember why that is..

Correct Answer
badalam_nt Tue, 03/17/2009 - 17:33

Hi Sarah,

Additional info after browsing through some other forums:

"In earlier versions of RIP, the default route created using the ip route 0.0.0.0 0.0.0.0 was automatically advertised by RIP routers. In Cisco IOS Software Release 12.0T and later, RIP does not advertise the default route if the route is not learned via RIP."

What IOS do you have on your routers?

Petru

sarahr202 Tue, 03/17/2009 - 19:55

Hi petru!

Cisco Internetwork Operating System Software

IOS (tm) 2500 Software (C2500-I-L), Version 12.1(9), RELEASE SOFTWARE (fc1)

Copyright (c) 1986-2001 by cisco Systems, Inc.

Compiled Wed 13-Jun-01 15:12 by kellythw

Image text-base: 0x03041334, data-base: 0x00001000

thanks a lot!

Edison Ortiz Tue, 03/17/2009 - 17:59

Sarah,

I understand you have limited funds as student but learning IOS for the first time with old software such as the 2500 can be a problem.

If you are inclined and have a powerful computer, I recommend getting GNS3 installed and run recent IOS images virtually.

That's what I do to solve most of the questions here and for my customers without the need of having a physical router.

In your case, you can have the best of both worlds - physical hardware and GNS3 to compare your results.

http://www.gns3.net/

I hate for you to fail your upcoming exam due to false positive from an old 2500 image.

HTH,

__

Edison.

sdoremus33 Tue, 03/17/2009 - 19:31

Edison,

I too am learning and cant afford higher end cisco routers curently have 2600 (*3), and a couple of 2500 series routers

2514

2522, etc.....

So the site you mentioned

http://www.gns3.net/

can you also emulate Cisco Pix and ASA devices for IPSEC + Can you also simulate DMVPN configurations for studying. hope that makes sense. Thanks I learn alot from your posts in this forum. Take care.

Edison Ortiz Wed, 03/18/2009 - 06:56

Hi Steven,

Yes, you can emulate a Cisco PIX but not an ASA. You can simulate DMVPN by using the IOS routers available (7200, 3700, 3600).

HTH,

__

Edison.

sarahr202 Tue, 03/17/2009 - 19:53

Thanks Edison

But the link says i have to have ios.

So i am back to square one.

sdoremus33 Tue, 03/17/2009 - 20:43

Edison,

What are the requirenments to download the Cisco IOS Images.

I am trying to download Csico Image for say (3600 series router w IPSEC) from cisco site to be used with Dynamips

Edison Ortiz Wed, 03/18/2009 - 06:58

Steven,

You mean requirements as for memory and flash? There isn't as everything is virtual. You set your own limitations in term of memory and flash according to your workstation capabilities.

For instance, you can run more virtual router instances if you download an image that requires only 96MB DRAM vs an image that requires 256MB DRAM.

HTH,

_

Edison.

Edison Ortiz Wed, 03/18/2009 - 11:44

Hi Sarah,

I was playing a little more about this subject and found another way to bring a default into RIP.

1) Create an IP route pointing to an interface

ip route 0.0.0.0 0.0.0.0 FastEthernet0/1

2) Have network 0.0.0.0 under RIP

R1#sh run | be router rip

router rip

version 2

network 192.168.12.0

network 0.0.0.0

no auto-summary

Here is the remote router's view:

R2#sh ip route 0.0.0.0

Routing entry for 0.0.0.0/0, supernet

Known via "rip", distance 120, metric 1, candidate default path

Redistributing via rip

Last update from 192.168.12.1 on FastEthernet0/0, 00:00:07 ago

Routing Descriptor Blocks:

* 192.168.12.1, from 192.168.12.1, 00:00:07 ago, via FastEthernet0/0

Route metric is 1, traffic share count is 1

And the router generating the default is marking it as a 'candidate default path' so in essence is doing a 'ip default network'.

R1#sh ip route 0.0.0.0

Routing entry for 0.0.0.0/0, supernet

Known via "static", distance 1, metric 0 (connected), candidate default path

Redistributing via rip

Advertised by rip

Routing Descriptor Blocks:

* directly connected, via FastEthernet0/1

Route metric is 0, traffic share count is 1

More information on the ip route command can be found in the 'Usage Guidelines'.

http://www.cisco.com/en/US/docs/ios/ipaddr/command/reference/iad_ip.html#wp1012824

HTH,

__

Edison.

Actions

This Discussion