A layer 2 device (such as a switch without layer 3 routing capabilities) behaves like a standard IP host. You, therefore, have to specify a default gateway so that it knows where to send packets destined for hosts not located on the subnet to which the device belongs.
the 'ip default-gateway' command is necessary if you need to communicate with the switch from another network. Let's say you are in subnet 192.168.1.0/24, and the switch IP address is 192.168.2.0/24, then, without that command, you would not be able to communicate with the switch. When your switch is configured to route with IP, which effectively would make it a Layer 3 switch, it would not need to have a default gateway set, that is when you could use the 'ip route' command.
I am agree that ip route is a last resort for layer 3 devices running ip routing protocols, default-gateway is for layer two, but i found catalyst 4500 series configured with two or three vlans and not default gateway defined, instead they have ip route 0.0.0.0 0.0.0.0 10.10.10.254 and i can communicate with them, but they are not running any routing protocol. They have native vlan to communicate each other cat devices and in that vlan we have layer three devices to route the packets for vlans. Maybe the performance is affected but not the communication because is running anyway with that configuration!
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...
Attached policy provides CLI access to the Cisco 4G router over text messaging. Two files are in the attached .tar file:
2. PDF with instructions on how to load and use the .tcl file.