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

3 Answers 3


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 <next_hop>. Let's say you configure ip default-network Then, if the device already knows a route for, 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


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


When IP routing is enabled, the commands ip default-network and "ip route" 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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