Use or creation of aliases in Cisco equipment
Use or creation of aliases in Cisco equipment
Sometimes I found some commands that use a lot but are still long to write using the tab in these cases you can set an alias to reduce the command. However, it is necessary to know that this must be configured on each computer on the network. Here are the commands needed to complete the setup.
Make use of aliases is very common in Unix users, to reduce the time to write long or difficult commands to remember. You can create aliases for commands that contain lots of information as widely used for commands.
The key to making a good alias is to select a password that is short and easy to remember, of course it is important to select an alias that do not conflict with any command that already exists. Aliases can be used as part of another command. For example the following command is used as shrinking the show vlan summary command.
You can find lots of uses for the alias, for example when working with scripts you can use alias to standardize some computers.
Sometimes I found some commands that use a lot but are still long to write using the tab in these cases you can set an alias to reduce the command. However, it is necessary to know that this must be configured on each computer on the network. Here are the commands needed to complete the setup.
Router1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#alias exec smc show mac-address-table
Router1(config)#alias exec sv show vlan
Router1(config)#end
Router1#
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#alias exec smc show mac-address-table
Router1(config)#alias exec sv show vlan
Router1(config)#end
Router1#
Make use of aliases is very common in Unix users, to reduce the time to write long or difficult commands to remember. You can create aliases for commands that contain lots of information as widely used for commands.
Switch1# smc
Mac Address Table
-------------------------------------------
Vlan Mac Address Type Ports
---- ----------- -------- ----
92 0008.020a.15c8 DYNAMIC Fa0/13
92 000d.56d5.c46e DYNAMIC Fa0/3
92 000e.3880.5d7f DYNAMIC Gi0/2
92 000e.d76f.1780 DYNAMIC Gi0/2
92 000e.d7a5.748c DYNAMIC Gi0/2
92 0014.223c.310b DYNAMIC Fa0/33
121 000e.d7a5.748c DYNAMIC Gi0/2
121 0011.9591.b33d DYNAMIC Gi0/2
121 0014.2226.31fa DYNAMIC Gi0/2
121 0014.7cc3.32c0 DYNAMIC Gi0/2
911 000e.d7a5.748c DYNAMIC Gi0/2
912 000e.d7a5.748c DYNAMIC Gi0/2
913 000e.d7a5.748c DYNAMIC Gi0/2
Total Mac Addresses for this criterion: 13
Switch1#
Mac Address Table
-------------------------------------------
Vlan Mac Address Type Ports
---- ----------- -------- ----
92 0008.020a.15c8 DYNAMIC Fa0/13
92 000d.56d5.c46e DYNAMIC Fa0/3
92 000e.3880.5d7f DYNAMIC Gi0/2
92 000e.d76f.1780 DYNAMIC Gi0/2
92 000e.d7a5.748c DYNAMIC Gi0/2
92 0014.223c.310b DYNAMIC Fa0/33
121 000e.d7a5.748c DYNAMIC Gi0/2
121 0011.9591.b33d DYNAMIC Gi0/2
121 0014.2226.31fa DYNAMIC Gi0/2
121 0014.7cc3.32c0 DYNAMIC Gi0/2
911 000e.d7a5.748c DYNAMIC Gi0/2
912 000e.d7a5.748c DYNAMIC Gi0/2
913 000e.d7a5.748c DYNAMIC Gi0/2
Total Mac Addresses for this criterion: 13
Switch1#
The key to making a good alias is to select a password that is short and easy to remember, of course it is important to select an alias that do not conflict with any command that already exists. Aliases can be used as part of another command. For example the following command is used as shrinking the show vlan summary command.
Biblio-Users#sv su
Biblio-Users#sv summary
Number of existing VLANs : 53
Number of existing VTP VLANs : 53
Number of existing extended VLANs : 0
Biblio-Users#sv summary
Number of existing VLANs : 53
Number of existing VTP VLANs : 53
Number of existing extended VLANs : 0
You can find lots of uses for the alias, for example when working with scripts you can use alias to standardize some computers.
0 Comments:
Post a Comment