cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
462
Views
0
Helpful
4
Replies

IP Default Gateway

caijunjie
Level 1
Level 1

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 4

Roberto Salazar
Level 8
Level 8

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.

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. :)

For a router, you should never need it.

tdrais
Level 7
Level 7

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.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: