10

When would you choose to use the ip default-network command instead of the ip default-gateway command?

12

ip default-gateway is to be used in L2 devices.

ip default-network would be used in L3 devices, but works slightly different from the usual static default route configured with ip route 0.0.0.0 0.0.0.0 <next_hop>. Let's say you configure ip default-network 172.31.0.0. Then, if the device already knows a route for 172.31.0.0, this route will be flagged as a default route candidate.

You need to take into account that ip default-network command is classful.

Further details and clarifications are available here

|improve this answer|||||
2

See here

Basically ip default-gateway is for layer-2 devices and ip default-network is for layer-3 devices.

ip default-network is basically a default route

|improve this answer|||||
1

When IP routing is enabled, the commands ip default-network and "ip route 0.0.0.0" etc. work the same. These commands would be used on a router or Layer 3 switch.

"ip default-gateway" would be used when ip routing is not enabled - for instance, on a Layer 2 switch that has an SVI for management but cannot route on that SVI.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.