cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
370
Views
5
Helpful
3
Replies

C2924 XL Gateway question

javier.moreno
Level 1
Level 1

Why doesn't the ip default-gateway xxx.xxx.xxx.xxx command work on interface Vlan1. Using c2900xl-c3h2s-mz.120-5.WC10.bin

1 Accepted Solution

Accepted Solutions

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.

View solution in original post

3 Replies 3

javier.moreno
Level 1
Level 1

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?

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.

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

HTH

Rick
Getting Started

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: