cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3528
Views
0
Helpful
11
Replies

EIGRP default-network command

daudparvez
Level 1
Level 1

It is written in CISCO CCNP book that if we want to use the default-network command for flagging a network as a gateway of last resort to be advertised in EIGRP, it must be classful.

I tried this command on a subnet (5.0.0.0/30) and was surprised to see that this subnet is flagged on the neighboring routers as gateway of last resort, although it is not used at it's classful boundary.

Can someone please explaing this?

Thanks in advance,

Daud Parvez

1 Accepted Solution

Accepted Solutions

Rick,

It does make it a bit harder to discern what is going on when the subnet  of the loopback is 5.0.0.0. I believe that if Daud changed the loopback  to 5.0.0.5 it would still work - as long as he did not change the  default network statement.

I am sorry but I think it would not work - I have made an experiment in dynamips/dynagen before writing my previous reply, and these were the results I have obtained experimentally. I was actually commenting what I have tested myself.

In other words I believe that default-network 5.0.0.0 will work but that default-network 5.0.0.4 would not work.

Most certainly, neither would work. Assuming that the loopback was configured as 5.0.0.5/30, then:

  • Using 5.0.0.0 in the ip default-network would mean flagging a non-existent network in the routing table. In particular, the so-called "parent" route 5.0.0.0/8 in the routing table would be flagged but as this network is not actually advertised because it does not really exist. If a network is not advertised, it cannot serve as a candidate default on other routers.
  • Using 5.0.0.4 in the ip default-network would result in router creating an artificial routing entry in the form "ip route 5.0.0.0 255.0.0.0 5.0.0.4". You would then be expected to redistribute this classful static network into EIGRP and subsequently flag it using the command ip default-network 5.0.0.0

I cannot help but remark that if there is a contest for the most obscure IOS command then the ip default-network is a clear winner...

Best regards,

Peter

View solution in original post

11 Replies 11

Peter Paluch
Cisco Employee
Cisco Employee

Hello Daud,

Please post your configuration and the output of the show ip route. The ip default-network behaves in an obscure way, and the best is to have the entire configuration and the contents of the routing table at hand before analyzing what really happened. In any case, to my best knowledge, the ip default-network is indeed a classful-oriented command.

Best regards,

Peter

Hi Peter,

Please find the my configurations and output of "show ip route" command in attached files.

Daud

Thanks for the additional information. Perhaps I can clarify a bit about what is going on:

you may have configured a /30 subnet of network 5.0.0.0 but your ip default network statement just refers to the classful network (ip default-network 5.0.0.0). Since you have specified a classful network in your default network statement and since you are advertising that network to your neighbors, then the other routers use that network to help set their default gateway.

HTH

Rick

HTH

Rick

Rick,

Perhaps we are talking about the same thing just using different words...

As I see it, what happened here is that the command ip default-network 5.0.0.0 was looking for a network with address 5.0.0.0 and it did not care about the netmask! In other words, the command found the network 5.0.0.0 in the routing table, totally ignored that it is a /30 subnet instead of /8, and flagged it as a candidate default route. EIGRP then simply took this flag and distributed it along with the route itself.

If Daud changed the loopback address so that the network it belongs into is not exactly 5.0.0.0, the command ip default-network would stop working (for example, configuring the loopback to 5.0.0.5/30).

Best regards,

Peter

Peter

It does make it a bit harder to discern what is going on when the subnet of the loopback is 5.0.0.0. I believe that if Daud changed the loopback to 5.0.0.5 it would still work - as long as he did not change the default network statement.

In other words I believe that default-network 5.0.0.0 will work but that default-network 5.0.0.4 would not work.

HTH

Rick

HTH

Rick

Rick,

It does make it a bit harder to discern what is going on when the subnet  of the loopback is 5.0.0.0. I believe that if Daud changed the loopback  to 5.0.0.5 it would still work - as long as he did not change the  default network statement.

I am sorry but I think it would not work - I have made an experiment in dynamips/dynagen before writing my previous reply, and these were the results I have obtained experimentally. I was actually commenting what I have tested myself.

In other words I believe that default-network 5.0.0.0 will work but that default-network 5.0.0.4 would not work.

Most certainly, neither would work. Assuming that the loopback was configured as 5.0.0.5/30, then:

  • Using 5.0.0.0 in the ip default-network would mean flagging a non-existent network in the routing table. In particular, the so-called "parent" route 5.0.0.0/8 in the routing table would be flagged but as this network is not actually advertised because it does not really exist. If a network is not advertised, it cannot serve as a candidate default on other routers.
  • Using 5.0.0.4 in the ip default-network would result in router creating an artificial routing entry in the form "ip route 5.0.0.0 255.0.0.0 5.0.0.4". You would then be expected to redistribute this classful static network into EIGRP and subsequently flag it using the command ip default-network 5.0.0.0

I cannot help but remark that if there is a contest for the most obscure IOS command then the ip default-network is a clear winner...

Best regards,

Peter

I cannot help but remark that if there is a contest for the most obscure IOS command then the ip default-network is a clear winner...

I cannot help but agree I have worked on a few EIGRP networks and have never seen the need to use it to be honest.

Jon

You should probably avoid using the default network command if you can. It was designed for IGRP due to that protocol's inability to propagate a 0.0.0.0/0 and is normally not needed for EIGRP, which has no problem sending a 0.0.0.0/0 default. It's always been a bit bizarre in it's implementation (and buggy).

Hello Donald,

It's always been a bit bizarre in it's implementation (and buggy). 

Yes, I can only confirm that.

By the way: would it be a problem to finally add the default-information originate command support to EIGRP at last? I am certain that the codebase that exists for RIP could be reused/adapted for EIGRP to provide for this functionality. Using tricks with redistribution (or summarization) to inject a default route into EIGRP is just plain awkward. Also, every other IGP supported by Cisco supports this command. There is, I believe, no need for EIGRP to be an exception here.

Thank you!

Best regards,

Peter

Totally agree with you.  The only problem is getting it high enough on the list for someone to do the coding. It's been on the featurette list for several years but hasn't gotten any attention.  Working through the account team and marketing is what makes it go up in priority.

omagutie
Cisco Employee
Cisco Employee

I found this in the documentation about how it works, take a look:

 

https://www.cisco.com/c/en/us/support/docs/ip/routing-information-protocol-rip/16448-default.html#ipnetwork

 

Have a good day !