07-14-2007 07:40 AM - edited 03-05-2019 05:17 PM
Why doesn't the ip default-gateway xxx.xxx.xxx.xxx command work on interface Vlan1. Using c2900xl-c3h2s-mz.120-5.WC10.bin
Solved! Go to Solution.
07-14-2007 08:05 AM
The 'ip default-gateway x.x.x.x' command is only allowed under the global config, not under an interface.
Keep in mind, you are allowed to type the command while under the interface, but it will be applied in the global config. IOS is smart enough to change the mode from interface level to global level.
07-14-2007 07:46 AM
I was watching the Cisco Mentor Video lab for CCNA and the intructor shows that he configures the default-gateway from the Vlan 1 sub interface. I think that is wrong it shoudl be from the global config. Please tell me if I am correct?
07-14-2007 08:05 AM
The 'ip default-gateway x.x.x.x' command is only allowed under the global config, not under an interface.
Keep in mind, you are allowed to type the command while under the interface, but it will be applied in the global config. IOS is smart enough to change the mode from interface level to global level.
07-14-2007 09:00 AM
Edison is quite correct. When you type a command the parser examines what you have typed and makes these checks:
- is the command syntax correct, if not the input is reported as an error.
- is the command valid for the mode that you are in, if so the command is executed.
- is the command valid in global config, if so the mode is changed to global config and the command is executed.
- if none of those are true then the input is reported as an error.
HTH
Rick
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: