The command you use depends on the ip routing status. If Ip routing is enabled use the ip route 0.0.0.0 command; if ip routing is disabled use ip default-gateway command.
When configured with ip routing disabled and a management IP address, the 3750 is an IP host on the network. In this case the default-gateway command is necessary.
If ip routing were enabled the routing information base would be consulted to route external subnet traffic. A gateway of last resort or default route would need to be configured.
The default-gateway command specifies a gateway for a non-ip routing switch management IP address.
The default route specifies a gateway of last resort in the routing table for all external subnet switch traffic.
If the switch wasnt configured for ip routing and both commands were entered, the ip route 0.0.0.0 wouldnt have any effect (Im not sure the switch would even accept the command). If ip routing were enabled, Im really not sure what would happen, but I think the ip route statement would supersede the default-gateway. Only one way to find out!
I would not talk about the ip route statement supersede the default-gateway. They are quite different concepts (as you explained) and are used in quite different circumstances.
As you explained it the device is thinking and functioning as a "router" it makes decisions about how to forward packets based on lookup in its routing table which would reflect all connected interfaces, any remote networks and subnets that it had learned and possibly a default route (gateway of last resort).
If the device is functioning as an IP host then it does not consult any routing table and will forward packets whose destination is remote by forwarding to its default-gateway. As you explained configuring "no ip routing" is one way to get it to function as an IP host. Another way it can happen is to do a rom boot. If the router is running the special operating system is is functioning as an IP host not as a router.
I believe we agree on the essentials and differ only slightly in the way that we explain it. Both commands coexist - at least when the router is operating in router mode.
If both commands are configured they will both be present in the config. Which one will be used will depend on which mode the rotuer is operating in: if in router mode the gateway of last resort (ip route 0.0.0.0) if in host mode the default-gateway. There are two things I know of that put the router is host mode: no ip routing and rommon/recovery IOS.
Even though a router will not need it and not use it probably 99 percent of the time, I usually configure routers with a default-gateway just as insurance for those few times when it might be needed.
We have 3 identical switches configured by someone else and would like to claim some of the Gigabit ports(G1/G2/G3/G4) for use on servers. When we try to change the wiring and configuration, we run in to connectivity issues. Attached is a des...
This is actually a pretty cool feature, i didn't even know it existed until I was looking for a solution to advertise a subnet (prefix in BGP talk), only if a certain condition existed. This is exactly what conditional advertisements does
j ai une question j ai achete un routeur cisco 887VA-k9 , je le configuré avec la configuration ci- dessous
si je le lier avec mon pc portable sur l un de ses ports directement ça marche toute est bien ( la connexion internet + m...