Cisco Commands
Cisco Commands
Working environment
1|Page
Cisco Commands BY: Fawzy Abdelbaset
2|Page
Cisco Commands BY: Fawzy Abdelbaset
SW1#show history Lists the commands currently held in the history buffer
SW1#show ip interface brief shows an overview of all interfaces, their physical
status; protocol status and ip address if assigned.
SW1#show interface vlan 1 Shows detailed information about the specified
interface, its status, protocol, duplex, speed,
encapsulation, last 5 min Traffic.
SW1#show interfaces description Shows the description of all interfaces
SW1#show interfaces status Shows the status of all interfaces like connected or not,
speed, duplex, trunk or access vlan.
SW1#show crypto key mypubkey rsa Shows the public encryption key used for SSH.
SW1#show dhcp lease shows information about the leased IP address (when
an interface is configured to get IP address via a dhcp
server)
Configuring port Security
• Make the switch interface as access port: The sticky keyword is
SW1(config-if) #switchport mode access used to let the
• Enable port security on the interface: Interface dynamically
SW1(config-if) #switchport port-security learns and configures
• Specify the maximum number of allowed MAC addresses: the Mac addresses
SW1(config-if) #switchport port-security maximum 1 of the currently
• Define the action to take when violation occurs: connected hosts,
SW1(config-if) #switchport port-security violation shutdown (options:
shutdown, protect, restrict)
• Specify the allowed MAC addresses:
SW1(config-if) #switchport port-security mac-address
&68b5.9965.1195
(options: H.H.H, sticky)
3|Page
Cisco Commands BY: Fawzy Abdelbaset
4|Page
Cisco Commands BY: Fawzy Abdelbaset
5|Page
Cisco Commands BY: Fawzy Abdelbaset
Configuring VTP
• Configure VTP mode: VTP mode is used
SW1(config) #vtp mode server (options: server, client, transparent) when an engineer
• Configure VTP domain name: wants to deactivate
SW1(config) #vtp domain EXAMPLE (case-sensitive) VTP on a particular
• Configure VTP password: (optional) switch
SW1(config) #vtp password cisco (case-sensitive)
• (Configure VTP pruning: (optional)
SW1(config) #vtp pruning (only works on VTP servers)
• Enable VTP version 2: (optional)
SW1(config) #vtp version 2
• Bring up trunks between the switches
6|Page