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

default gateway command

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

7 REPLIES
Community Member

Re: default gateway command

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

http://www.cisco.com/warp/public/105/default.html

Re: default gateway command

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.

Community Member

Re: default gateway command

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??????????

Hall of Fame Super Blue

Re: default gateway command

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

Community Member

Re: default gateway command

hi jon

so on thAT 3560 SWITCH i have no ip routing

configured thats why i had default gateway

right?

Hall of Fame Super Blue

Re: default gateway command

Mahesh

It sounds like it.

Jon

Community Member

Re: default gateway command

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

540
Views
14
Helpful
7
Replies
CreatePlease to create content