Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

what will "ip default-network" command actually do?

Hi all,

Can any one explain what will " ip default-network" command actually do? it seems that use "ip default-network x.x.x.x" to make the packet to route to x.x.x.x. But what will the router actually do? Suppose I ping z.z.z.z from router A. what I think is that the router will forward the packet to the next-hop router B that go to network x.x.x.x through one of its connected subnets y.y.y.y, because the source and destination address of the ip packet will not be modified.But if in the next-hop router, there is a route to z.z.z.z, so the packet will not go through the default-network x.x.x.x and so that the ip default-network command can be replaced by a default-route "ip route 0.0.0.0 0.0.0.0 y.y.y.y" and the command "ip default-network" is no longer needed and the command may mislead us some time. Is that right? Anybody can tell me the truth? Thank You!

Best Regards

Teru Lei

  • Other Network Infrastructure Subjects
1 ACCEPTED SOLUTION

Accepted Solutions
Silver

Re: what will "ip default-network" command actually do?

Tere,

All your x's y's and z's have me confused. ;) "ip default network" command simply will install a gateway of last resort (default) into your router from where ever it learns this "ip default network". You are correct, if I understood your explaination, that "ip route to 0.0.0.0 0.0.0.0 can replace the function of the default network. Some like this ip default network due to being able to have your gateway of last resort change depending on where you learn your default network from. Static routes to 0/0 seem a bit less dynamic in nature.

Hope this helps you,

Don

3 REPLIES
Silver

Re: what will "ip default-network" command actually do?

Tere,

All your x's y's and z's have me confused. ;) "ip default network" command simply will install a gateway of last resort (default) into your router from where ever it learns this "ip default network". You are correct, if I understood your explaination, that "ip route to 0.0.0.0 0.0.0.0 can replace the function of the default network. Some like this ip default network due to being able to have your gateway of last resort change depending on where you learn your default network from. Static routes to 0/0 seem a bit less dynamic in nature.

Hope this helps you,

Don

New Member

Re: what will "ip default-network" command actually do?

Default-route is used in such a circumstance that there is no explicit route to the destination in the router,.

Every route entry in the route table has such fields "Network Address" and "NetMask", when a packet is received in the roter, an AND operation will be made to the destination address with the "NetMask" field, and then the router will compare the result with the "Network Address" field of every route entry. If there is a entry matches the result, it will be used to forward the packet.

The "Network Address" and "Netmask" of the default-route are both 0.0.0.0, whatever the destination address in the packet is, the result of AND with the default-route will be 0.0.0.0, so this entry will be the best matches if there is no other explicit route to the destination.

So you are right that if there is a route to z.z.z.z in the router, it wil be used to forward the packet than the default-route.

But the "ip default-network" command is not useless, and sometimes

is very useful.

New Member

Re: what will "ip default-network" command actually do?

I just want to add a little bit more information to the information previously posted. Depending on the routing protocols being used (eg RIP), when you issue the command "ip default-network x.x.x.x" on a router, that router will automatically advertise itself as the default gateway for the "x.x.x.x" network to ALL routers in the routing domain (ALL these guys are of course running RIP). Specifying default route as you know will appear only on whichever router the default route configured on.

171
Views
0
Helpful
3
Replies
This widget could not be displayed.