- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2013 02:08 PM - edited 03-07-2019 11:58 AM
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!
Solved! Go to Solution.
- Labels:
-
Other Switching
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2013 02:19 PM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2013 02:19 PM
The "ip default-gateway
HTH,
John
*** Please rate all useful posts ***
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2013 02:19 PM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2013 02:19 PM
The "ip default-gateway
HTH,
John
*** Please rate all useful posts ***
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2013 03:12 PM
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.
