0% found this document useful (0 votes)
213 views4 pages

CCNA2 Cheat Sheet

This document is a cheat sheet for CCNA 2, outlining essential commands and their explanations for basic device configuration, switching concepts, VLANs, STP, EtherChannel, DHCP, FHRP, static and dynamic routing, wireless LAN, security, and troubleshooting. Each section provides specific commands along with their functions, such as setting up VLANs, enabling port security, and configuring routing protocols. It serves as a quick reference guide for network configuration and management tasks.

Uploaded by

Rayen Driouech
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
213 views4 pages

CCNA2 Cheat Sheet

This document is a cheat sheet for CCNA 2, outlining essential commands and their explanations for basic device configuration, switching concepts, VLANs, STP, EtherChannel, DHCP, FHRP, static and dynamic routing, wireless LAN, security, and troubleshooting. Each section provides specific commands along with their functions, such as setting up VLANs, enabling port security, and configuring routing protocols. It serves as a quick reference guide for network configuration and management tasks.

Uploaded by

Rayen Driouech
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

CCNA 2 Cheat Sheet - Commands with Explanations

1. Basic Device Configuration

enable - Enters privileged EXEC mode.

configure terminal - Enters global configuration mode.

hostname [name] - Sets the device hostname.

banner motd #[message]# - Displays a message on login.

enable secret [password] - Sets an encrypted privileged EXEC password.

line console 0 - Accesses console line configuration.

password [password] - Sets console line password.

login - Enables password checking on console line.

line vty 0 4 - Accesses virtual terminal lines.

service password-encryption - Encrypts all plaintext passwords.

2. Switching Concepts

show mac address-table - Displays the MAC address table.

clear mac address-table dynamic - Clears dynamically learned MAC addresses.

3. VLANs and Inter-VLAN Routing

vlan [id] - Creates a VLAN with the given ID.

name [VLAN_NAME] - Names the VLAN.

switchport mode access - Sets interface as access port.

switchport access vlan [id] - Assigns VLAN to the access port.

switchport mode trunk - Sets interface to trunk mode.

switchport trunk allowed vlan [id,id,...] - Allows specified VLANs on the trunk.

interface g0/0.[sub-id] - Creates sub-interface for Router-on-a-Stick.

encapsulation dot1Q [vlan-id] - Sets VLAN encapsulation.

ip address [ip] [mask] - Assigns IP address to sub-interface.


CCNA 2 Cheat Sheet - Commands with Explanations

4. STP (Spanning Tree Protocol)

show spanning-tree - Displays STP status and information.

spanning-tree vlan [id] priority [value] - Sets bridge priority.

spanning-tree portfast - Enables PortFast on an access port.

5. EtherChannel

interface range f0/1 - 2 - Selects a range of interfaces.

channel-group 1 mode desirable - Enables EtherChannel using PAgP.

channel-group 1 mode active - Enables EtherChannel using LACP.

interface port-channel 1 - Configures logical port-channel interface.

switchport mode trunk - Sets trunk mode on port-channel.

6. DHCP on Router

ip dhcp excluded-address [start] [end] - Excludes IPs from DHCP pool.

ip dhcp pool [name] - Creates a DHCP pool.

network [ip] [mask] - Defines DHCP network range.

default-router [ip] - Sets default gateway for clients.

dns-server [ip] - Sets DNS server for clients.

7. FHRP (HSRP example)

interface [interface-id] - Enters interface config mode.

standby [group] ip [ip] - Sets virtual IP for the group.

standby [group] priority [value] - Sets priority for HSRP election.

standby [group] preempt - Allows router to take over as active.

8. Static and Default Routes


CCNA 2 Cheat Sheet - Commands with Explanations

ip route [net] [mask] [next-hop | interface] - Sets static route.

ip route 0.0.0.0 0.0.0.0 [next-hop] - Sets default route.

9. Dynamic Routing

router rip - Enters RIP config mode.

version 2 - Enables RIP version 2.

network [network] - Specifies network to advertise.

no auto-summary - Disables automatic summarization.

router ospf [pid] - Enters OSPF config mode.

network [net] [wildcard] area [id] - Advertises network in OSPF.

10. Wireless LAN

Configuration is usually GUI-based: set SSID, password, encryption mode, DHCP.

11. Security

switchport port-security - Enables port security.

switchport port-security maximum 1 - Sets max MAC addresses allowed.

switchport port-security mac-address sticky - Learns MACs dynamically.

switchport port-security violation shutdown - Shuts port on violation.

hostname [name] - Required for SSH.

ip domain-name [domain] - Sets domain name.

crypto key generate rsa - Generates RSA keys.

username [user] secret [pw] - Creates local user for SSH.

line vty 0 4; transport input ssh; login local - Enables SSH login.

12. Troubleshooting
CCNA 2 Cheat Sheet - Commands with Explanations

show running-config - Displays current configuration.

show interfaces - Displays interface status and stats.

show ip interface brief - Summarizes IP interface info.

ping [ip] - Tests connectivity.

traceroute [ip] - Traces route to destination.

debug [feature] - Enables debugging output.

You might also like