cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
18255
Views
40
Helpful
5
Replies

difference between ip default-gateway and default route

cisco
Level 1
Level 1

please help

regards

Neo

1 Accepted Solution

Accepted Solutions

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Neo,

we use ip default-gateway when ip routing is disabled to provide a default gateway to a device like a L2 LAN switch

we use ip route 0.0.0.0 0.0.0.0 Gw-ipaddress when ip routing is enabled

if ip routing is enabled ip default-gateway command is ignored

if ip routing is disabled ip route 0.0.0.0 0.0.0.0 is not effective

Hope to help

Giuseppe

View solution in original post

5 Replies 5

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Neo,

we use ip default-gateway when ip routing is disabled to provide a default gateway to a device like a L2 LAN switch

we use ip route 0.0.0.0 0.0.0.0 Gw-ipaddress when ip routing is enabled

if ip routing is enabled ip default-gateway command is ignored

if ip routing is disabled ip route 0.0.0.0 0.0.0.0 is not effective

Hope to help

Giuseppe

rubberheart
Level 1
Level 1

default-gateway for layer2

default route for layer3

ya

default-gateway ........... is the port of exit from your subnet (exit of a broadcast domain) to another subnet, WAN, etc. It is usually the interface in the router to wich your network is connected. You define it as the IP address of the router connected to your subnet.

default route ......  If the packet doesn't match any subnet in the routing table and you have defined a default-route, the packet will take the default-route and the packet will be delivered to the next-hop defined in the default-route.

Ganesh Hariharan
VIP Alumni
VIP Alumni

please help

regards

Neo

Hi Neo,

All have given the exact answers for the difference let me also try to explain the same with my version

Default route is used as the gateway of last resort meaning if there is no more specific route the default route is used.


Default Gateway is used on a non routing device, meaning if the destination is off the local subnet use the default gateway.If you config default gateway on a router you must do "no ip routing" first.

Hope to Help !!

Ganesh.H

Remember to rate the helpful post

Review Cisco Networking for a $25 gift card