cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1009
Views
14
Helpful
7
Replies

default gateway command

gurkamal01
Level 1
Level 1

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 7

sirdudesly
Level 2
Level 2

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

bvsnarayana03
Level 5
Level 5

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.

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

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

hi jon

so on thAT 3560 SWITCH i have no ip routing

configured thats why i had default gateway

right?

Mahesh

It sounds like it.

Jon

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

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:

Review Cisco Networking products for a $25 gift card