Saturday, March 17, 2012

Cisco Routers/Switches - Command alias

You can create command alias on Cisco routers/swithces by using the command alias in the global configuration mode

See the origal documentation by Cisco Systems :
Using Aliases for CLI Commands

Syntax :
alias mode command-alias original-command
no alias mode [command-alias]

Example :

R4(config)#alias exec premote ping
R4(config)#alias exec sintb show ip interface brief

R4(config)#alias exec rt show ip route         

R4#show aliases
Exec mode aliases:
h help
lo logout
p ping
r resume
s show
u undebug
un undebug
w where

  premote               ping
  sintb                 show ip interface brief
  rt                    show ip route

Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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 route

Gateway of last resort is not set is subnetted, 2 subnets
C is directly connected, FastEthernet0/0
R [120/1] via, 00:00:22, FastEthernet0/0

Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down 

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/10/16 ms

No comments: