05-13-2008 01:32 PM - edited 03-05-2019 10:57 PM
Hi
I am just trying to learn about cisco routers and i came across th ip default-gateway command used at the global configuration mode
What is that command used for
I know on pcs we set the default gateway address for the router
please inform me
05-13-2008 03:33 PM
It's the same deal for the router, it just forward all the traffic to that destination.
However it does not work if you are using any kind of ip routing
05-13-2008 11:11 PM
Its very much similar to the default-gateway on pc. Infact this command is used on network devices which doesnt support routing or if routing is disabled. Mostly L2 switches have this command pointing to the router which wil then route the traffic to required destinations.
05-18-2008 01:45 PM
hi
i have switch 3560
when i do sh ip route it shows
sh ip route
Default gateway is 182.22.77.254
Host Gateway Last Use Total Uses Interface
ICMP redirect cache is empty
but this is layer 3 switch??????????
05-18-2008 01:48 PM
Mahesh
You need to enable "ip routing" on the switch. See other thread.
If you do not enable ip routing then the 3560 will just be a L2 switch and it will need a default-gateway.
If you enable ip routing then it can now be a L3 switch and you would replace your default-gateway with a default route.
Jon
05-18-2008 01:51 PM
hi jon
so on thAT 3560 SWITCH i have no ip routing
configured thats why i had default gateway
right?
05-18-2008 01:52 PM
Mahesh
It sounds like it.
Jon
05-28-2008 09:32 PM
Hi Mamesh,
The command "ip default-gateway" is used if routing is disabled on a device. For example, this is used for managing the device remotely. Since it has a default-gateway just like computers, this simply mean that it can communicate in the network.
On the other hand, if routing is enable, you don't need the command "ip default-gateway". You can use the command "ip route x.x.x.x y.y.y.y" instead to let your device communicate with other devices on the network.
Thanks,
Deejay
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide