We recently changed IP schemes from 192.168.x.x to 10.x.x.x In doing so, I noticed that the prior network engineer had ip default-gateway in the configuration pointing to an old default gateway that no longer exist. I happened to notice this after our maintenance window ended.

ip default-gateway
ip classless
ip route
no ip http server
no ip http secure-server

Question: Im assuming that I can safely remove this without affecting the current connection status, since 192.168.x.x scheme is no longer in effect and the gateway is no longer in effect?

2 Answers 2


A router that is configured to route does not use the ip default-gateway. It uses the default route, and you have that in the configuration.

Cisco has a document that explains the differences: Configuring a Gateway of Last Resort Using IP Commands :

The ip default-gateway command differs from the other two commands. It should only be used when ip routing is disabled on the Cisco router.

You can, and should, eliminate the ip default-gateway command if ip routing is enabled.

Configuring the ip default-gateway command on a device that has routing enabled is a rookie mistake that gets made all too often.


In addition to @RonMaupin's answer: if the defined gateway is unreachable (and even not configured on the network) there's no way that command can be relevant anymore. It can't be used, so it can safely be removed.

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.