Take the 2-minute tour ×
Network Engineering Stack Exchange is a question and answer site for network engineers. It's 100% free, no registration required.

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

share|improve this question

3 Answers 3

up vote 11 down vote accepted

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

share|improve this answer

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

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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