cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1285
Views
0
Helpful
17
Replies

OSPF default routing

rjackson
Level 5
Level 5

My books say that to make ospf advertise a default route create a static default with 'ip route 0.0.0.0 0.0.0.0 x.x.x.x' or use the 'ip default-network x.x.x.0' statement. Then use 'default-info originate always' in the routing process. Always is required for the default-net statement. Since I'm working on a lab I cannot use the static route and I cant get then other method to work right.

Using the default-net statement the router properly advertises the default net to other routers but it does not create a route for itself to use. I put in 'ip default-net 2.2.2.0 and it generates a route statement like this 'ip route 2.0.0.0 255.0.0.0 2.2.2.0'. Anyone know whats going on here?

interface Serial0

ip address 2.2.2.1 255.255.255.252

no ip mroute-cache

clockrate 64000

!

interface Serial1

ip address 1.1.1.2 255.255.255.252

clockrate 64000

!

interface TokenRing0

ip address 20.1.1.1 255.255.255.0

ring-speed 16

!

router ospf 10

network 1.1.1.0 0.0.0.3 area 0

network 20.0.0.0 0.0.0.255 area 0

default-information originate always

!

ip http server

ip classless

ip route 2.0.0.0 255.0.0.0 2.2.2.0

17 Replies 17

What do you mean by "protocol independant?" Try an experiment. Set up a router with OSPF, no "default information originate,' or any other default command under the OSPF process, and set up a default network command. Now, go to the router's neighbors, and look at the routing table. Is there a gateway of last resort on those routers? No. You see the network you've declared as the "default network," but it's not marked as a default in any way. Why is that?

That's because the default network command will only create a "candidate default," in EIGRP and IGRP, which is carried in the protocol to all peers, etc., throughout the network. OSPF, IS-IS, RIP, and BGP all have no way of carrying a "candidate default," they can only carry a 0/0 default route.

In fact, the original reason for the default-network command was for IGRP, since IGRP cannot carry a 0/0 route at all. It was a "backdoor" way for IGRP to carry a default, without carrying the 0/0. EIGRP only carries the default network for compatability with IGRP, and no other reason. It really wasn't designed for use as a "static free way to create a default route." :-)

So, while the default network command impacts the local routing table regardless of the local routing protocols impacted, it will also not impact the information carried within the routing protocols. Does this make sense? In other words, regardless of what the on-line docs say, the default network command is only "protocol independant" in the sense that the static route command is "protocol independant." It will not generate a default route any other protocol can carry other than EIGRP and IGRP.

I hope that makes sense. In every network I see the default network command used, I always _strongly_ urge it to be removed, as soon as possible. There are a lot of reasons, not the least of which is the command is, eventually, going to be removed from IOS.

Russ.W

It means that the default-network statement and the distribution of the default route to other routers are separate functions.

You do not have to be running any routing protocol to use the default-network statement.

Heres the quote from the doc I referenced in the link:

"If you configure ip default-network 198.10.1.0, the routing table changes to the following:

2513#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

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, * - candidate default

Gateway of last resort is 161.44.192.2 to network 198.10.1.0

161.44.0.0 255.255.255.0 is subnetted, 1 subnets

C 161.44.192.0 is directly connected, Ethernet0

S 161.44.0.0 255.255.0.0 [1/0] via 161.44.192.0

S* 198.10.1.0 [1/0] via 161.44.192.2

131.108.0.0 255.255.255.0 is subnetted, 1 subnets

C 131.108.99.0 is directly connected, TokenRing0

2513#show ip protocols

2513#

You can see the gateway of last resort has now been set as 161.44.192.2. This result is independent of any routing protocol, as shown by the show ip protocols command at the bottom of the output."

The comment at the end shows that it works with no routing protocols running.

Later in the doc is discusses how the different routing protocols can distribute the default route. They do it in different ways but they can all send it out, as long as it meets the requirements of the default-network command.

DANG!!@#$% (censored version). I just realized that my example of using the area range to summarize the route to a classfull boundary doesn't work. It creates the router and it distributes it. Problem is it points to null0.

That does not mean that the default-net and ospf wont work together. It means that it requires a static route pointing to the real next hop to reach the summary. Thats what gets created when you enter the ip default-net statement the first time using a network that is not classful.

So I still cant figure out how to generate a valid default route with a direct or indirect static route.