ip default-network command

Answered Question
Jul 28th, 2009

Hi experts,

For a long time, I am scratching my head to understand, what for the command “ip default-network” is used. Please refer the link by CISCO which describes the concept. But I feel it is not explained with example.


I tested this in lab environment also to understand the use of this command over static route.

Please educate me what for it is used and how it is working compared to static route to the destination

Thanks and I will be looking for your help on this

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

As the ASCII diagram implies, that's a directly connected interface on R2.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.8 (5 ratings)
snarayanaraju Tue, 07/28/2009 - 10:16

Hi Edison,

Thanks for providing this information. In fact before writing here I have gone through most of the docs in CISCO site including the link you mentioned.

As a last resort, I sought your expertised assistance to understand this. Let me brief my understanding. Please correct me where ever i am deviating from the concept.


ip route

ip default-network

command is configured, does it means that to reach any subnet of go to ?

If that is the case, then what the command "ip route" is doing?

This may be a fundamental logic which i am finding difficult to understand from the begining.

Please help


Edison Ortiz Tue, 07/28/2009 - 10:39

Per the link I posted:

Command Default

If the router has a directly connected interface onto the specified network, the dynamic routing protocols running on that router will generate (or source) a default route. For Router Information Protocol (RIP), this is flagged as the pseudonetwork

On my Lab


R1 and R2 are running RIP on and I want to advertise a Quad 0 from R2 to R1.

R2(config)#ip default-network

On R1 log:

00:11:56: RIP: received v2 update from on FastEthernet0/0

00:11:56: via in 1 hops

R1#sh ip route rip

R* [120/1] via, 00:00:23, FastEthernet0/0




snarayanaraju Tue, 07/28/2009 - 10:46

Hi edison,

Its good. But do we use "ip default-network" only for dynamic routing protocols.

How it is useful when used in static routing. Can you please take some more time as I am worried why I am not able to get basic idea on this

Also please make comment on my earlier reply


Edison Ortiz Tue, 07/28/2009 - 10:50

As the documentation indicates, this is used in conjunction with dynamic routing protocols.

The static routing is used to provide the reachability information on the source router to generate the default route.

For instance, same scenario as above but now I have:

R2(config)#ip route

R2(config)#ip default-net

00:22:58: RIP: received v2 update from on FastEthernet0/0

00:22:58: via in 1 hops

R1#sh ip route rip

R* [120/1] via, 00:00:07, FastEthernet0/0

BTW, I've taken my time to explain the concept and how this command works. Building a lab to explain the concept for you took some time and effort, don't you think?

snarayanaraju Tue, 07/28/2009 - 10:49

Hi edison,

In continuing to the previous reply, you configured

R2(config)#ip default-network

R1#sh ip route rip

R* [120/1] via, 00:00:23, FastEthernet0/0

But where is this appearing in the route-table


Correct Answer
Edison Ortiz Tue, 07/28/2009 - 10:52

As the ASCII diagram implies, that's a directly connected interface on R2.

Peter Paluch Tue, 07/28/2009 - 14:24

Hello Edison,

I would like to know your opinion on the "ip default-network". In my opinion, there are various counterintuitive facts about it and the entire command bears too much annoying cruft and dependencies from the ages of classful routing protocols like RIPv1 and IGRP for which it was originally designed. Its behavior is quite complicated, classful-address oriented and dependent on the contents of the routing table in the moment of its use.

Assume that you enter the command

ip default-network A.B.C.D

where A.B.C.D is an arbitrary IP address. Now, a couple of different scenarios exists.

1.) If the routing table does not contain a classful network (I will call it major network) of the A.B.C.D nor any of that major network's subnets when issuing that command, it will be added to the configuration exactly as entered. For example, if the routing table does not contain the network nor any subnets thereof, the command

ip default-network

will be added to the configuration as shown here. Note that it references a network that the router does not know about (that was the premise in this case). However, as soon as the network or any of its subnets appears in the routing table, the router will automatically remove this command from the running configuration and replace it with a placeholder static route as explained in the case 2.) - see below.

2.) If the routing table contains a major network of the A.B.C.D or any of that major network's subnets, the command will not be added to the configuration. Instead, a placeholder static routing entry will be created in the form


The command "ip default-network A.B.C.D" in this case will be accepted without creating that placeholder static route if and only if the A.B.C.D is itself a major network.

For example, if there is a network in the routing table, issuing the command

ip default-network

will cause that a different command is added to the configuration:

ip route

The command "ip default-network" will be accepted only if written in the form:

ip default-network

That static "ip route" command is created because of limitations of original IGRP. The IGRP does not support the default route in the form of It can only flag a specific network as a candidate for default route. The creation of that placeholder static route provided a network entry in the routing table that had to be redistributed into IGRP (note that it is classful) and only then flagged as candidate for the default route.

3.) Any supernets that would cover the IP address A.B.C.D are ignored and the command "ip default-network A.B.C.D" behaves identically as in the case 1.)

So the "ip default-network" is a heavily classful-oriented command which makes it kind of difficult to use in today's intensively subnetted networks. Moreover, OSPF and IS-IS ignore this command. From my viewpoint, it was only required for IGRP that had no other means of conveying a default route. For all other routing protocols, there are other (and in my opinion, better) means to inject a default route. Its operation is too cumbersome and I have the feeling that it is a remainder of a past that is more confusing than helpful.

Best regards,


Edison Ortiz Tue, 07/28/2009 - 14:44


I fully agree with everything you said and often this questions pop-up on these forums due to CCNA/CCNP study material.

If you stay long enough, you will see the pattern.


This Discussion