11-05-2010 01:42 PM - edited 03-06-2019 01:54 PM
I have run into an issue where I am unable to execute an interface command alias from an interface range config mode. I was wondering if anyone could offer some additional information on whether I am doing something wrong or if Cisco has failed here. Judging from the output in example 3 a person could assume that the alias in example 1 would work when executed in interface-range configuration mode. Except when I try it I get output from example 2.
Does anyone have any thoughts? I have tried this in both a 6500 and a 3560 and it does the same thing in both.
2. LABROUTER02(config-if-range)#vladd 2-1000
^
% Invalid input detected at '^' marker.
3. LABROUTER02(config)#alias ?
Buffer config-owner-buffer
DRMI-Slot-Config DRMI Slot Config Mode
DRMI-Stby-Config-Mode DRMI Stby Config Mode
RMI-Node-Config Resource Policy Node Config mode
RMI-Resource-Group Resource Group Config mode
.
.
.
interface Interface configuration mode
interface Interface range configuration mode
interface-dlci Frame Relay dlci configuration mode
11-06-2010 02:19 AM
I have run into an issue where I am unable to execute an interface command alias from an interface range config mode. I was wondering if anyone could offer some additional information on whether I am doing something wrong or if Cisco has failed here. Judging from the output in example 3 a person could assume that the alias in example 1 would work when executed in interface-range configuration mode. Except when I try it I get output from example 2.
Does anyone have any thoughts? I have tried this in both a 6500 and a 3560 and it does the same thing in both.
- alias interface vladd switchport trunk allowed vlan add
2. LABROUTER02(config-if-range)#vladd 2-1000
^
% Invalid input detected at '^' marker.
3. LABROUTER02(config)#alias ?
Buffer config-owner-buffer
DRMI-Slot-Config DRMI Slot Config Mode
DRMI-Stby-Config-Mode DRMI Stby Config Mode
RMI-Node-Config Resource Policy Node Config mode
RMI-Resource-Group Resource Group Config mode.
.
.
interface Interface configuration mode
interface Interface range configuration mode
interface-dlci Frame Relay dlci configuration mode
Hi,
Can you please elaborate the requirement beacuase with alias configuration you can view the command with specific word mapped with alias,Like below is the example for using alias
s - Show Running-Config Interface
Router(config)# alias exec s show running-config interface
From these examples, you can see that the aliases you create don't have to be complete commands. You can specify parameters for a command after entering the alias.
For example, to use the shortcut for the show running-config interface command—s—you can specify the interface for which you want to view configuration information after that command.
Here's an example:
s fa0/0
Hope to Help !!
Ganesh.H
Remember to rate the helpful post
11-07-2010 03:58 PM
Hi Ganesh,
I understand how the alias works. In the example I provided, the command vladd would be an alias for switchport trunk allowed vlan add in interface configuration mode. The alias does work when modifying a single interface. My problem is that it does not work when modifying a range of interfaces.
The next thing I'm going to try is command macros instead of the alias. It just frustrates me that this doesn't work because the output from the ? after the alias command implies that it will.
Thanks,
Dave
11-07-2010 04:11 PM
I think you are talking about Smartport Macros.
11-07-2010 04:15 PM
Indeed I am! I just proved that this works in the lab but I do have to specify a variable. It's not quite as clean but I think it will work. Thanks!
11-07-2010 04:22 PM
Bummer..roadblock. This worked on my 3560, and it looks like it works on 6500 SXH but not my 7600 running SR code. Oiy....
11-07-2010 04:33 PM
I'm not sure if this will work with 7600 but Smartport Macros is slowly being deprecated in favour of AutoSmartport Macros. The former has been delegated to a "hidden" command if you are running IOS 12.2(53)SE and later.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide