๐ฏ From Connected to Command Master
Now that you're connected (Chapter 1), it's time to understand what networking really means and master the CLI like a professional network engineer. This chapter covers both network fundamentals and advanced CLI techniques.
๐ฏ Chapter Goals: Understand network basics, master all CLI modes, learn essential commands, and think like a network engineer!
๐ What is a Network? (Deep Dive)
A network is infrastructure that allows devices to communicate and share resources. Think of it as a combination of roads, postal system, and telephone network all in one.
Network Components Breakdown
๐ Physical Layer
- Cables: Copper (ethernet), Fiber optic
- Connectors: RJ45, SFP, LC, SC
- Wireless: WiFi, Bluetooth, Cellular
- Power: PoE (Power over Ethernet)
๐ Logical Layer
- Protocols: TCP/IP, HTTP, SSH, OSPF
- Addressing: IP addresses, MAC addresses
- Routing: Path determination
- Security: Firewalls, ACLs, VPNs
Network Types by Size
LAN (Local Area Network)Single building or campus. Example: office network, home network. Typically uses switches and WiFi access points.
WAN (Wide Area Network)Connects multiple LANs across cities/countries. Example: internet, corporate networks between offices. Uses routers and ISP connections.
MAN (Metropolitan Area Network)City-wide network. Example: municipal WiFi, campus networks across a city.
๐ฅ Network Devices - Detailed Roles
๐ Switch - The Intelligent Traffic Director
Primary FunctionConnects devices within the same network segment (LAN). Learns MAC addresses and forwards frames efficiently.
How it WorksMaintains a MAC address table, learns source addresses, forwards to known destinations, floods unknown destinations.
Key FeaturesVLAN support, Spanning Tree Protocol, Port security, Quality of Service (QoS)
AnalogySmart post office within a neighborhood - knows every house and delivers mail efficiently within the area.
๐ฎ Router - The Inter-Network Connector
Primary FunctionConnects different networks together. Makes routing decisions based on IP addresses and routing tables.
How it WorksExamines destination IP, consults routing table, forwards packets to next hop toward destination.
Key FeaturesStatic/Dynamic routing, NAT, DHCP, Access Control Lists, VPN termination
AnalogyInternational postal service - determines best path to deliver mail between different countries/cities.
๐ก Access Point - The Wireless Bridge
Primary FunctionProvides wireless connectivity to wired network. Converts between wireless (802.11) and wired (Ethernet) protocols.
Key FeaturesSSID management, WPA/WPA2 encryption, Band steering, Load balancing
๐ฅ Firewall - The Security Guard
Primary FunctionControls traffic flow based on security rules. Inspects and filters packets based on various criteria.
Key FeaturesStateful inspection, Application filtering, VPN support, Intrusion prevention
๐ข Cisco CLI Modes - Complete Architecture
Mode Hierarchy & Navigation
Switch>
User EXEC Mode - Limited view
โ enable
Switch#
Privileged EXEC Mode - Full view, no changes
โ configure terminal
Switch(config)#
Global Configuration Mode - Device-wide changes
โ interface fa0/1
Switch(config-if)#
Interface Configuration Mode - Port-specific changes
โ line vty 0 4
Switch(config-line)#
Line Configuration Mode - Remote access settings
1. User EXEC Mode (Switch>)
PurposeBasic monitoring and troubleshooting. Limited access for regular users.
Available Commandsping
, traceroute
, telnet
, ssh
, basic show
commands
Cannot DoView running config, change settings, access detailed information
Security LevelLowest - safe for non-technical users
2. Privileged EXEC Mode (Switch#)
PurposeFull monitoring capabilities, system maintenance, file operations
Available CommandsAll show
commands, copy
, reload
, debug
, clear
Cannot DoModify running configuration (read-only for configs)
Security LevelHigh - full visibility, no modification
3. Global Configuration Mode (Switch(config)#)
PurposeDevice-wide configuration changes
Available Commandshostname
, interface
, line
, router
, vlan
, ip route
AffectsEntire device settings, global parameters
Security LevelMaximum - can break network if misconfigured
4. Interface Configuration Mode (Switch(config-if)#)
PurposeConfigure specific network interfaces/ports
Available Commandsip address
, switchport mode
, speed
, duplex
, shutdown
AffectsSingle interface only
5. Line Configuration Mode (Switch(config-line)#)
PurposeConfigure remote access (SSH, Telnet, Console)
Available Commandspassword
, login
, transport input
, exec-timeout
AffectsHow users connect remotely
๐ Essential Commands - Professional Level
Navigation & Mode Commands
enable
Enter Privileged EXEC mode. May prompt for password.
Shortcut: en
Reverse: disable
configure terminal
Enter Global Configuration mode.
Shortcut: conf t
Alternative: config t
interface [type][number]
Enter Interface Configuration mode.
Examples: int fa0/1
, int gi1/0/1
, int vlan1
line [type] [number]
Enter Line Configuration mode.
Examples: line console 0
, line vty 0 4
exit
Go back one level in hierarchy.
Use: Step-by-step exit
end
Jump directly to Privileged EXEC mode.
Shortcut: Ctrl+Z
Use: Quick escape from any config mode
Information Gathering Commands
show version
Hardware, software, uptime, memory info
Shortcut: sh ver
Shows: Model, IOS version, uptime, memory, configuration register
show running-config
Current active configuration
Shortcut: sh run
Note: This is what's currently running (RAM)
show startup-config
Saved configuration that loads at boot
Shortcut: sh start
Note: This is stored in NVRAM
show ip interface brief
Quick interface status overview
Shortcut: sh ip int br
Shows: Interface, IP, Status, Protocol
show interfaces
Detailed interface statistics
Shortcut: sh int
Shows: Errors, utilization, duplex, speed
show mac address-table
Switch MAC address learning table
Shortcut: sh mac address-table
Shows: Learned MAC addresses per port
show cdp neighbors
Directly connected Cisco devices
Shortcut: sh cdp nei
Shows: Neighbor devices, their interfaces, platform
show ip route
Routing table (routers only)
Shortcut: sh ip route
Shows: All known networks and next hops
โก Advanced CLI Features & Productivity
Command Completion & Help
Tab
Auto-complete commands and parameters
Example: Type sho
+ Tab = show
?
Context-sensitive help
Examples: ?
(all commands), show ?
(show options), interface ?
(interface types)
command ?
Show available parameters for command
Example: ip address ?
shows IP address syntax
Command History & Editing
Up/Down ArrowsNavigate command history
Use: Recall and modify previous commands
show history
Display command history list
Shows: Last 10-20 commands (configurable)
Terminal Editing KeysCtrl+A
(beginning), Ctrl+E
(end), Ctrl+U
(delete line), Ctrl+K
(delete to end)
Output Control
| more
Page through long output
Example: show running-config | more
| include [text]
Show only lines containing specific text
Example: show run | include interface
| begin [text]
Start output from first line containing text
Example: show run | begin vlan
| exclude [text]
Hide lines containing specific text
Example: show int | exclude down
Configuration Management
copy running-config startup-config
Save current config to permanent storage
Shortcut: copy run start
Critical: Changes are lost without this!
reload
Restart the device
Note: Unsaved changes will be lost
write memory
Alternative way to save configuration
Same as: copy run start
๐ IP Addressing Fundamentals
What is an IP Address?
An IP address is like a postal address for network devices. It has two main parts:
Network PortionIdentifies which "neighborhood" (network) the device belongs to
Host PortionIdentifies the specific "house" (device) within that neighborhood
IPv4 Address Format
IPv4 addresses are 32-bit numbers written as four octets separated by dots:
192.168.1.100
192
.
168
.
1
.
100
โข 4 octets, each ranging from 0-255
โข Network portion (green) identifies the subnet
โข Host portion (yellow) identifies specific device
Private vs Public IP Addresses
๐ Private IP Ranges
- 10.0.0.0/8: 10.0.0.0 - 10.255.255.255
- 172.16.0.0/12: 172.16.0.0 - 172.31.255.255
- 192.168.0.0/16: 192.168.0.0 - 192.168.255.255
Use: Internal networks, not routed on internet
๐ Public IP Addresses
- Globally unique
- Routable on internet
- Assigned by ISPs
- Examples: 8.8.8.8, 1.1.1.1
Use: Internet-facing services
Subnet Mask Basics
Subnet mask determines which part of IP address is network vs host:
255.255.255.0 (/24)First 24 bits are network, last 8 bits are host
Example: In 192.168.1.100/24, network is 192.168.1.0
255.255.0.0 (/16)First 16 bits are network, last 16 bits are host
Example: In 172.16.5.100/16, network is 172.16.0.0
๐ง Hands-On Lab - Professional Practice
Lab 1: CLI Navigation Mastery
- Connect to device (from Chapter 1)
- Practice mode transitions:
enable
โ Notice prompt change to #
configure terminal
โ Notice (config)# prompt
interface fastethernet 0/1
โ Notice (config-if)# prompt
exit
โ Back to (config)#
line console 0
โ Notice (config-line)# prompt
end
โ Jump back to #
- Test help system:
?
at each mode level
show ?
to see all show commands
interface ?
to see interface types
Lab 2: Information Gathering
- Device Information:
show version
โ Record model and IOS version
show running-config
โ Observe current settings
show startup-config
โ Compare with running config
- Interface Analysis:
show ip interface brief
โ Note which interfaces are up/down
show interfaces
โ Check for errors or problems
show mac address-table
โ See learned MAC addresses
- Practice filtering:
show run | include interface
show int | exclude down
Lab 3: Advanced Features
- Command shortcuts:
- Use Tab completion for all commands
- Practice abbreviations:
sh run
, sh ip int br
- History usage:
- Run several commands
show history
to see list
- Use Up arrow to recall commands
- Configuration safety:
- Make a small change in config mode
show running-config
to verify
copy run start
to save (or don't save for practice)
๐ง Pro Challenge: Navigate from User EXEC to Interface Config and back to Privileged EXEC using only shortcuts and single-letter commands where possible.
โ ๏ธ Common Mistakes & Best Practices
Critical Mistakes to Avoid
Not Saving Configurationsโ Making changes without copy run start
โ
Always save important changes immediately
Working in Wrong Modeโ Trying configuration commands in EXEC mode
โ
Always check your prompt - know which mode you're in
Ignoring Error Messagesโ Pressing Enter without reading error output
โ
Read and understand every error message
Not Using Help Systemโ Guessing command syntax
โ
Use ?
liberally to learn proper syntax
Professional Best Practices
Always Use ShortcutsProfessional engineers use sh run
, not show running-config
Master Tab CompletionReduces typos and increases speed significantly
Use Command HistoryUp arrow and command editing saves massive amounts of time
Filter Output EffectivelyLearn | include
, | exclude
, | begin
for large configs
Document Your WorkUse show run
to capture "before" state, save configs with meaningful names
๐ Chapter Summary
- Network Fundamentals: LANs, WANs, device roles, IP addressing basics
- CLI Mode Mastery: 5 main modes, proper navigation, security implications
- Essential Commands:
show
commands, configuration management, troubleshooting
- Advanced Features: Help system, command history, output filtering
- Professional Skills: Shortcuts, best practices, common mistake avoidance
- IP Fundamentals: IPv4 format, private/public ranges, subnet mask basics
๐ฏ Professional Level Achieved! You now have the CLI skills and network understanding that separates beginners from professionals. These fundamentals will serve you throughout your networking career.
๐ Advanced Quiz (Test Your Mastery)
1. You're in (config-if)# mode and need to check the running config. What's the fastest way? Press Ctrl+Z
to jump to privileged mode, then sh run
2. What's the difference between running-config and startup-config? Running-config is active (RAM), startup-config is saved (NVRAM) and loads at boot
3. How do you see only interface-related lines in the running config? show run | include interface
4. What command shows you directly connected Cisco devices? show cdp neighbors
(CDP = Cisco Discovery Protocol)
5. If 192.168.1.100/24 is the IP, what's the network address? 192.168.1.0 (the /24 means first 24 bits are network)
6. What happens to unsaved configuration changes if you reload? They're lost completely - always copy run start
to save
7. How do you auto-complete a partially typed command? Press the Tab key after typing partial command
8. What's the shortcut to jump directly to privileged EXEC mode from any config mode? Ctrl+Z
or end
command
๐ Excellent! You've mastered CLI navigation and network fundamentals. Ready to dive deep into IP addressing?
Comments