cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
24509
Views
0
Helpful
3
Replies

IP Default-Gateway vs IP Route 0.0.0.0 on layer 3 switch

sonikbaby
Level 1
Level 1

So I was setting up a layer 3 switch and was wondering the exact difference between ip default-gateway and ip route 0.0.0.0

Is ip default-gateway just for vlan1? Is it a command mostly used for layer 2 switches and should be disregarded on layer 3 switches?      

Just wanted a little clarification.

Thanks!     

2 Accepted Solutions

Accepted Solutions

Reza Sharifi
Hall of Fame
Hall of Fame

Correct, you use ip default-gateway if the switch is layer-2 and you just want connectivity to the rest of the network for management.  ip route is usually used when the switch is utilized as layer-2 and layer-3 (router).

Here is good doc explaining the difference:

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

HTH

View solution in original post

John Blakley
VIP Alumni
VIP Alumni

The "ip default-gateway " is used when routing is disabled. The "ip route 0.0.0.0 0.0.0.0 " is for when routing is enabled. If routing is enabled on the switch, it will ignore the "ip default-gateway" command in favor of the ip route command.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***

View solution in original post

3 Replies 3

Reza Sharifi
Hall of Fame
Hall of Fame

Correct, you use ip default-gateway if the switch is layer-2 and you just want connectivity to the rest of the network for management.  ip route is usually used when the switch is utilized as layer-2 and layer-3 (router).

Here is good doc explaining the difference:

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

HTH

John Blakley
VIP Alumni
VIP Alumni

The "ip default-gateway " is used when routing is disabled. The "ip route 0.0.0.0 0.0.0.0 " is for when routing is enabled. If routing is enabled on the switch, it will ignore the "ip default-gateway" command in favor of the ip route command.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***

In Easy Word

IP Default-Gateway

.Configured on Device with IP routing Disabled.

.Will throw your all traffic to L3 Device Vlan IP.

E.g

There is a switch with 192.168.1.10 ip and its Gateway 192.168.1.1 (thats vlan ip configured in l3 Device)

With no ip default gateway it will be pingable by 192.168.1x IPs but if you want your Switch to be pingable 192.168.2.x (That another vlan in your L3 Device) it will require ip defaut-gateway, that will through all your default traffic to 192.168.1.1 in that case L3 device will do for your.

IP ROUTE 0.0.0.0

Now in above case that your switch need to ping a desitination that have no routes matching in your l3 device.

0.0.0.0 means through all default traffic to next hope ip.

Because default route is least preffered route.

Jawad
Review Cisco Networking products for a $25 gift card