CCIE Aliases or Macros

I have learned a lot about Aliases this week and just trying to make sure I am not leaving anything off the table. Can I update interfaces on a switch from interface fa1/0/1 to interface fa1/1? I have 4 switches and the interfaces between them are not all the same.

I know I could do alias interface intfa1/1 interface fa1/0/1 (but I want to put a space between the int fa0/1, is this possible or any other way I could potentially do this?

Ill share some knowledge below that I didn’t know before.

How to clean up your aliases when done if need be!

No alias exec
No alias configure
No alias interface

Other then aliases I thought this was very cool.

define interface-range WAPs Fa0/1 - 6
define interface-range Staff Fa0/7 - 16 , Fa0/20 - 22 , Fa0/24
define interface-range Public Fa0/17 - 19 , Fa0/23

I also didn’t know you could do this to see differences between the startup and running config!

alias configure diff do sh archive config differences nvram:startup-config system:running-config
alias exec diff sh archive config differences nvram:startup-config system:running-config

Appreciate the help!

Hi Jeromy,

Thanks for sharing these, they might be helpful to others :+1:

On a single switch, you can use your ranges like you did with the Staff range:

interface range gi1/1-4, ten1/1-2

But a single command between different switches, that will be a problem.


Hey Rene,
I am not wanting to do a range command for one switch. But rather make an Alias (currently i have an alias as intfa0/19 which equals int fa1/0/19 (but there are no spaces like how real command line would be)

Trying to see if there is a way to type interface fa0/19 (which would really be doing interface fast1/0/19) …it seems I can only do an alias first not type something and then add an “alias” onto it. Unless you know a way, which I am asking. Thanks for the help!