You are here: Articles > Networking > Cisco

 See more articles about "Cisco "

Cisco: Making long commands short with aliases

 

How to configure aliases for frequently used commands.

If you're like you me you hate typing in long commands over and over... and over... and over.



Instead of typing sh ip int br all the time wouldn't it be nice to just type sib? You can do it just by configuring an alias.



In configure mode enter:

alias exec sib Show ip Int Brief



hit enter and exit config mode. Now type sib and you should get the output from the show ip interface brief command. Note that the odd capitalization isn't needed, it's just a thing I do to help me remember what the alias is doing.



You can pipe it just like you could normally, so sib | i down will show only lines with "down" in the text. If you type sib, add a SPACE and then hit TAB the alias will be expanded to Show ip Int Brief.



You could alias create aliases like:

alias exec sibd Show ip Int Brief | include down  *down





That will show you only interfaces that have "down", some spaces, and "down" again. If you've got a router/switch with a hundred or more interfaces this is a quick way to look for the one with the problem.



Alias exec isn't the only option, it's also possible to create aliases that only work in config mode or config-interface mode. I don't use them so you'll to check Cisco.com for more info.



Cisco configures some aliases by default, you can see them, and any you've configured, with the command:

show alias

 

Also see ...

Configuring DHCP to work with Cisco Manager
H3This Tech Recipe describes using an external DHCP server, in this case from a Windows Server 2000 or 2003 system, with Cisco Call Manager (CCM). When introducing CCM into environments with an exsiting DHCP infrastructure, problems may occur because Cisco IP phones require additional informatio

Optimize Cisco CallManager - Use IP address, not servername
H3In systemserver, the default name for each server is it's hostname. These names will be passed along to the phones, requiring a DNS lookup before a phone can contact CallManager./H3PTo prevent the phones from needing to contact DNS, change each server's name in systemserver to its IP addr

Cisco switch: 802.1q trunk to router, aka router-on-a-stick
H3Connect a Cisco switch and router via 802.1q trunking. This configuration is known as a router on a stick./H3PFirst, let's start with the switch. VLAN 1 exists by default, so we'll add a couple of other VLANs: br / br /div class="code"vlan 100 br /name data br /state active br /

SSH configuration on PIX Firewall
H3Encrypted remote sessions to PIX Firewalls with SSH./H3PSecure SHell (SSH) provides encrypted terminal sessions, along with a lot of other neat features. br / br /a href="http://www.cisco.com" target="_blank" class="postlink" rel="nofollow"www.cisco.com/a has configuration examples f

Configure Frame Relay on a Cisco Router
H3Frame relay is an attractive choice for wide area network (WAN) connections. It offers simple configuration, and allows one telco circuit to connect many locations./H3PFirst, some terminology: br /DLCI Data Link Connection Identifier A number which directs traffic to different des