This is a draft cheat sheet. It is a work in progress and is not finished yet.
Core Modes
Mode |
Syntax |
Description |
User |
|
Default landing space |
Privileged (from User) |
|
Turn on privileged commands. |
Global (from Privileged) |
|
Configure from the terminal. |
Interface (from Global) |
{ interface <interface> <#/#> }
|
Select an interface to configure. |
|
{ interface range <interface> <#/#-#> }
|
Select a range of interfaces to configure. |
Line (from Global) |
|
Configure primary terminal line. |
|
|
Configure virtual terminal line. |
Base Configuration
Mode |
Syntax |
Description |
Global |
* { no ip domain-lookup }
|
Configure no IP DNS hostname translation. |
|
|
Configure system's network name. |
|
{ banner motd & <message> & }
|
Configure a login MOTD banner. |
|
{ enable secret <password> }
|
Configure privileged level encrypted password. |
|
{ service password-encryption }
|
Encrypt system passwords. |
Interface |
{ ip address <ip> <subnet> }
|
Configure IP address of an interface. |
|
|
Configure interface port status up. |
Line - Console |
* { logging synchronous }
|
Configure synchronised message output. |
|
{ password <password> }
|
Configure password. |
|
|
Enable password checking. |
Line - VTY |
{ password <password> }
|
Configure password. |
|
|
Enable password checking. |
* Optional or alternative command(s).
Show Commands
Device & Mode |
Syntax |
Description |
Universal - Privileged |
|
Display access lists |
|
|
Display ARP table. |
|
|
Display CDP info. |
|
|
Display system clock. |
|
|
Display DHCP status. |
|
|
Display flash file system info. |
|
|
Display session command history. |
|
|
Display interface status and config. |
|
{ show ip interface brief }
|
Display brief summary of IP status and config. |
|
|
Display items in the DHCP database. |
|
|
Display the contents of logging buffers. |
|
{ show port-security interface <interface> <#/#> }
|
Display port security config. |
|
{ show running-config }
|
Display running config. |
|
|
Display info about Telnet connections. |
|
{ show startup-config }
|
Display start-up config. |
|
|
Display status of SSH server connections. |
|
|
Display info about virtual terminal lines. |
|
|
Display system hardware and software status. |
Router - Privileged |
|
Display IP routing table. |
|
|
Display IP NAT info. |
|
{ show ip <bgp/eigrp/ospf/rip> }
|
Display info on selected protocol. |
|
|
Display active network routing protocols. |
Switch - Privileged |
|
Display DTP info. |
|
|
Display etherchannel info. |
|
|
Display MAC config. |
|
{ show mac-address-table }
|
Display MAC forwarding table. |
|
|
Display VTP VLAN status. |
|
|
Display VTP info. |
To enable typing of privileged level commands in any mode, use { do <e.g. show command> }
.
How To: Clear Device Configurations
Device & Mode |
Syntax |
Description |
Universal - Privileged |
{ erase startup-config }
|
Erase contents of config memory. |
|
|
Erase NV memory. |
Switch - Privileged |
{ delete flash:vlan dat }
|
Delete the VLAN database. |
How To: Configure ACLs
Mode |
Syntax |
Description |
Global |
* { access-list <#> <permit/deny> <ip> <wc mask> }
|
Add an ACL entry. |
|
{ ip access-list <type> <acl_name> }
|
Configure named ACL. |
|
{ <permit/deny> <ip> <wc mask> }
|
Specify packets to forward/reject. |
|
|
Return to Global mode. |
|
|
* { interface <interface> <#/#> }
|
|
* { interface range <interface> <#/#-#> }
|
Interface |
{ ip access-group <acl_name> <in/out> }
|
Assign specified ACL to interface inbound/outbound traffic. |
|
|
|
Line - VTY |
{ access-class <ACL_name> <in/out> }
|
Assign specified ACL to line inbound/outbound traffic. |
|
Global |
{ ip access-list resequence <acl_name> <start_#> <increment_#> }
|
Configure ACL resequence. |
|
|
* Optional or alternative command(s).
How To: Configure Default Route
Mode |
Syntax |
Description |
Global |
{ ip route 0.0.0.0 0.0.0.0 <isp_default_gateway> }
|
|
{ ip default-network <isp_default_gateway> }
|
How To: Configure DHCP
Mode |
Syntax |
Description |
Global |
{ ip dhcp excluded-address <low ip> <high ip> }
|
Configure prevent DHCP from assigning certain addresses. |
|
{ ip dhcp pool <pool name> }
|
Configure DHCP address pools. |
|
{ network <ip> <subnet> }
|
Specify network to provide DHCP service for. |
|
{ default-router <gateway ip> }
|
Configure default router (gateway). |
|
|
Configure DNS servers. |
|
|
|
|
{ interface <interface> <#/#> }
|
Interface |
{ ip helper-address <dhcp_server_ip> }
|
Configure DHCP relay. |
The IP address range 169.254.#.# indicates Microsoft Automatic Private Addressing, which indicates a possible DHCP problem.
To release a DHCP assigned IP address, type { ipconfig /release }
command in Windows CLI.
To renew a DHCP assigned IP address, type { ipconfig /renew }
command in Windows CLI.
How To: Configure IPv6
Mode |
Syntax |
Description |
Global |
{ ipv6 unicast-routing }
|
Enable IPv6 unicast routing. |
Interface |
{ ipv6 address <global_prefix:subnet_id:interface_id/mask> }
|
Configure IPv6 address. |
How To: Configure L3 Switching
Mode |
Syntax |
Description |
Global |
|
Enable routing on the switch. |
|
|
Select catalyst VLAN. |
Interface |
{ ip address <ip> <subnet>}
|
Configure IP address of VLAN. |
|
|
Configure interface port status up. |
How To: Configure Port Security
Mode |
Syntax |
Description |
Global |
{ interface <interface> <#/#> }
|
|
* { interface range <interface> <#/#-#> }
|
Interface |
{ switchport mode access }
|
Configure interface port to access mode. |
|
{ switchport port-security }
|
Enable interface port security. |
|
{ switchport port-security mac-address <?> }
|
Configure secure mac addresses. |
|
{ switchport port-security maximum <?> }
|
Configure maximum secure addresses. |
|
{ switchport port-security violation <?> }
|
Configure security violation mode. |
* Optional or alternative command(s).
How To: Configure RIPv2
Mode |
Syntax |
Description |
Global |
|
Configure routing protocol. |
|
|
Configure version. |
|
{ network <network ip> }
|
Specify network. |
|
|
Disable auto-summary. |
* Optional or alternative command(s).
How To: Configure ROAS
Device & Mode |
Syntax |
Description |
Router - Global |
{ interface <interface> <#/#.#> }
|
Router - Interface |
{ encapsulation dot1q <vlan #> }
|
Configure IEEE 802.1Q. |
|
{ ip address <ip> <subnet> }
|
Configure IP address. |
Switch - Global |
{ interface <interface> <#/#> }
|
Switch - Interface |
{ switchport trunk encapsulation dot1q }
|
Configure trunking characteristics. (older models) |
|
{ switchport mode trunk }
|
Configure trunking mode of the interface. |
|
{ switchport nonegotiate }
|
Configure disable engagement in negotiation protocol. |
Good practice to correlate VLAN- and sub-interface numbers.
The VLAN will have the first address on the sub-interface network.
VLAN members to use sub-interface IP address as default gateway.
How To: Configure SSH
Mode |
Syntax |
Description |
Global |
{ ip domain-name <domain> }
|
Define default domain. |
|
{ crypto key generate rsa }
|
Generate RSA crypto key. |
|
{ username <user> secret <password> }
|
Establish User Name authentication. |
Line - VTY |
|
Enable local password checking. |
|
{ transport input <protocols> }
|
Define transport protocols for line. |
How To: Configure Static Route
Mode |
Syntax |
Description |
Global |
{ ip route <destination> <subnet> <gateway> <ad_#> }
|
Configure static route and assign AD. |
How To: Configure Switch Management Interface
Mode |
Syntax |
Description |
Global |
{ interface <vlan> <#> }
|
Select native VLAN. |
|
{ ip address <ip> <subnet> }
|
Configure IP address of VLAN. |
|
|
Configure interface port status up. |
How To: Configure VLANs
Mode |
Syntax |
Description |
Global |
|
Create VLAN. |
|
|
Configure VLAN name. |
Interface |
{ description <description> }
|
Configure interface description. |
|
{ switchport mode access }
|
Configure interface port to access only one VLAN |
|
{ switchport access vlan <#> }
|
Allocate interface port to VLAN. |
|
|
Configure interface port status up. |
Good practice to correlate VLAN- and interface numbers.
|