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

Difference between ip default-gateway command & a default route

Can any please let me know the difference between ip default-gateway command & a default route. i have a couple 4500 and 2950 for which i need to have a management VLAN as well as their VLAN memberships.


Re: Difference between ip default-gateway command & a default ro

ip default-gateway command is for layer 2, it's how you can access a switch from outside the mgmt interface vlan. Think of this as you would configure and ip address on a PC or a end host, it needs a default-gateway.

A default route on the other hand is for a device that has a lauer 3 capability, this is the gateway of last resort for anything that the device receives to be routed and the destination is not in it's routing table it (the L3 device) sends it to the default route or gateway of last resort.

Since you are referring to 2950 which is strictly a layer 2 device, even if it take dafault route or "ip route x.x.x.x", it will not work, for this device you need to configure default-gateway so that this switch can be reached outside it out subnet, this is given the default-gateway have routes to the rest of the network.

Please rate all posts.

CreatePlease to create content