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 10.10.10.6
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 10.10.10.6
sintb show ip interface brief
rt show ip route
R4#rt
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
10.0.0.0/30 is subnetted, 2 subnets
C 10.10.10.0 is directly connected, FastEthernet0/0
R 10.10.10.4 [120/1] via 10.10.10.2, 00:00:22, FastEthernet0/0
R4#sintb
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.10.10.1 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
R4#premote
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/10/16 ms
Exec mode aliases:
h help
lo logout
p ping
r resume
s show
u undebug
un undebug
w where
premote ping 10.10.10.6
sintb show ip interface brief
rt show ip route
R4#rt
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
10.0.0.0/30 is subnetted, 2 subnets
C 10.10.10.0 is directly connected, FastEthernet0/0
R 10.10.10.4 [120/1] via 10.10.10.2, 00:00:22, FastEthernet0/0
R4#sintb
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.10.10.1 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
R4#premote
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/10/16 ms
No comments:
Post a Comment