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

IP Default Gateway

Hi all

I have configured ip default-gateway on a cisco 2811 router. However, after configuring this, I could not ping to the internet from all my hosts. However when I use the ip route 0.0.0.0 0.0.0.0 ip address, I am able to do that.

May i know why this happen. What the difference between a ip route command and a ip default-gateway command ? :)

Hope someone can help. :) Thanks in advance.

4 REPLIES

Re: IP Default Gateway

think of ip default-gateway in a PC analogy. The default-gateway for the PC is just for itself to get to the gateway so that is can talk to other devices in the other network. The same with router, the router uses "ip route 0.0.0.0 0.0.0.0 x.x.x.x" as a way of routing the packet that is does not have a regular route for, a gateway of last resort. Further explanation, when a router sess a packet destined to, say 10.1.1.1.1 host, it looks at its routing table, it have routes for 11.1.1.0, 12.1.1.0 networks but none for 10.x.x.x network, if it has "ip route" or gateway of last resort, it will forward destination to that gateway of last resort hop. IP default-gateway does not make an entry in the routing table it is for router's own use to reach other subnet, not for routing the packets.

Please rate all posts.

New Member

Re: IP Default Gateway

Hi

Thanks for the nice explanation. Since a router is to route packet. :) Under which situation will the router make use of ip default gateway? :)

THanks in advance. :)

Re: IP Default Gateway

For a router, you should never need it.

Gold

Re: IP Default Gateway

This link explains it pretty well

http://www.cisco.com/en/US/customer/tech/tk365/technologies_tech_note09186a0080094374.shtml

You really shouldn't every use the default-gateway command on a router. The default-gateway command only works if you turn off ip routing. Turing off routing on a router kinda defeats the purpose of the box.

228
Views
0
Helpful
4
Replies
CreatePlease to create content