Creating Command Aliases
You want to create aliases for commonly used or complex commands.
You can create command aliases on your router with the alias command:
configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router1(config)#
show ip routeRouter1(config)#
show ip ospf neighborRouter1(config)#
Unix system administrators have been using command aliases for many years to help reduce typing and save time. These shortcut commands allow you to reduce long or complex command sequences to a few simple characters. This is most useful for extremely common commands, and for commands that are complex or difficult to remember. You can create an alias for any command, including some or all of its associated keywords or variables.
Here we have created the alias,
rt, for one of the most common commands we
use everyday, show ip
show ip route
We can now use this simple two-letter command to display the routing table, saving time and typing:
rtCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static ...