Overview
Appendix B. CLI Command Reference Table
This appendix condenses roughly 300 Cisco IOS CLI commands into a concise, chapter-organized reference aimed at CCNA exam preparation. Each entry names the command, the mode it’s used in, and a short description, with fuller explanations deferred to the chapters where the commands were first introduced or covered in greatest depth. Commands that appear across multiple chapters are generally listed only once, and a handful of demonstration-only commands are included for completeness. The result is a compact, quick-lookup companion that complements the book’s explanations and labs.
The coverage spans the full CCNA blueprint: foundational IOS navigation and configuration management (moving between modes, saving/erasing configs, filtering show output), Layer 2 switching (MAC tables, interface status, speed/duplex), IPv4 interface setup and verification, and routing fundamentals (routing table review and static route variants). It then moves through VLANs and trunks, ROAS/SVIs, DTP/VTP, and spanning tree (STP/RSTP priorities, root/secondary, PortFast, BPDU Guard, path cost methods). Link aggregation via EtherChannel (PAgP/LACP/static) and its verification is included, as are dynamic routing concepts centered on OSPF (process setup, networks, costs/timers, DR/BDR, authentication, operations and database views). First-hop redundancy (HSRP) and a complete IPv6 toolkit (addressing methods, neighbors, interface and routing views, static routes) round out the core networking sequence.
Operational services and security features occupy a large portion: standard and extended ACLs (numbered/named, remarks, resequencing, interface application), neighbor discovery with CDP/LLDP, time services (clock, calendar, NTP), and name services (DNS client/server, host mappings). DHCP functions cover server pools, exclusions, relay, client behavior, conflicts, and bindings, alongside host-side IP tools on Windows, macOS, and Linux. File and image management (file systems, copy via TFTP/FTP, boot settings), secure management (local users, SSH, line configuration, default gateway), SNMP and Syslog (targets, severity, buffering, timestamps, debugging), and NAT (static, dynamic, PAT, statistics) are addressed. QoS and campus access topics include voice VLAN and PoE, password hashing options, Port Security with errdisable recovery, DHCP Snooping and DAI protections, VRFs and VRF-aware commands, wireless-related DHCP options, and data format output for select show commands. Together, these entries provide a fast, practical checklist for labs and troubleshooting that ties features to the exact commands you’ll need on the exam and in the field.
FAQ
How do I save the running configuration and restore factory defaults from the CLI?
- View configs: show running-config, show startup-config
- Save running to startup:
- write
- write memory
- copy running-config startup-config
- Erase startup (factory defaults after next reboot):
- write erase
- erase startup-config
- erase nvram:
- Reboot device: reload
How can I filter lengthy show command output to only lines that match a string?
Use the include filter on show commands:
- show command | include string
This prints only the lines that contain the specified string.
How do I configure an IPv4 address on an interface and verify it’s up?
- Enter interface mode: interface interface
- Set address/mask: ip address ip-address netmask
- Enable the interface: no shutdown
- Verify:
- show ip interface brief (quick status and IP)
- show ip interface [interface] (L3 details)
- show interfaces [interface] (L1/L2 details)
How do I create VLANs, configure access/trunk ports, and verify?
- Create/name VLANs:
- vlan vlan-id
- name name
- [no] shutdown (enable/disable VLAN)
- Access port:
- interface interface
- switchport mode access
- switchport access vlan vlan-id
- Trunk port:
- interface interface
- switchport trunk encapsulation dot1q
- switchport mode trunk
- switchport trunk allowed vlan [add|remove|all|none|except] vlans
- switchport trunk native vlan vlan-id
- Verify:
- show vlan brief
- show interfaces trunk
- show interfaces switchport
What are my options for inter-VLAN routing (ROAS vs. SVI) and how do I configure them?
Option 1: Router-on-a-Stick (ROAS)
- On router:
- interface interface.subif-number
- encapsulation dot1q vlan [native]
- ip address ip-address netmask
- On switch: trunk the uplink (see trunk commands)
Option 2: Multilayer Switch with SVIs
- Enable routing: ip routing
- Create SVIs:
- interface vlan vlan-id
- ip address ip-address netmask
- no shutdown
- Make routed ports (optional): interface interface; no switchport
Verification: show ip interface brief, show ip route
How do I configure static routes (including floating routes) in IPv4?
- Recursive next-hop: ip route destination-network netmask next-hop
- Directly connected: ip route destination-network netmask exit-interface
- Fully specified: ip route destination-network netmask exit-interface next-hop
- Floating static (backup): add administrative distance at end:
- ip route destination-network netmask next-hop administrative-distance
Verification: show ip route
How do I bring up basic OSPF and check neighbor relationships?
- Start OSPF: router ospf process-id
- Activate on interfaces: network ip-address wildcard-mask area area
- Interface tuning (as needed):
- ip ospf network {point-to-point | broadcast}
- ip ospf priority priority
- ip ospf cost cost
- Other tuning: auto-cost reference-bandwidth mbps, passive-interface [default|interface], default-information originate [always]
Verification:
- show ip protocols
- show ip ospf interface brief
- show ip ospf neighbor
- show ip ospf interface interface
- show ip ospf database
- Reset if needed: clear ip ospf process
How can I configure HSRP and verify which router is active?
On each HSRP-enabled interface:
- standby group ip virtual-ip
- standby group priority priority
- standby group preempt
- standby version 2
Verification:
- show standby
- show standby brief
What are the steps to enable secure SSH access to a switch/router?
- Set identity:
- hostname name
- ip domain name domain-name
- Create credentials: username username secret password
- Generate keys: crypto key generate rsa
- Force SSH v2: ip ssh version 2
- VTY lines:
- line vty 0 15
- login local
- transport input ssh
- exec-timeout minutes (optional)
- Ensure IP reachability:
- For L2 switch: interface vlan vlan-id; ip address ip-address netmask; no shutdown; ip default-gateway ip-address
Verification: show ip ssh, show ip interface brief
How do I set up NAT overload (PAT) for internet access and verify?
- Mark interfaces:
- LAN: interface lan; ip nat inside
- WAN: interface wan; ip nat outside
- Define inside traffic with an ACL (example):
- access-list number permit src-ip wildcard
- Configure PAT using WAN interface:
- ip nat inside source list acl interface interface overload
Verification:
- show ip nat translations
- show ip nat statistics