Welcome to the Course
A computer network lets devices exchange information and share services. The internet, an office network and a home Wi-Fi network follow the same fundamental principles at different scales.
How to use this course
- Read one concept at a time.
- Explain it aloud using your own words.
- Recreate each topology in Cisco Packet Tracer.
- Type commands instead of copying them.
- Complete the review questions without checking the answers.
Recommended laboratory equipment
- Cisco Packet Tracer
- A computer with at least 8 GB RAM
- A text editor for configuration notes
- Optional: Wireshark for packet analysis
1. Network Fundamentals
Network fundamentals explain how devices connect, identify one another, exchange data and select paths. This chapter starts with the physical devices that make networking possible.
1.1 Network Components
Router
A router connects different IP networks. It examines the destination IP address of each packet, checks its routing table and selects an appropriate path toward the destination.
Basic router verification commands:
Router> enable
Router# show ip interface brief
Router# show ip route
Router# show running-config
Layer 2 Switch
A Layer 2 switch connects devices inside a LAN. It learns source MAC addresses and records them in its MAC address table. It forwards Ethernet frames using the destination MAC address.
| Situation | Switch action |
|---|---|
| Known unicast destination | Forwards the frame through the matching port |
| Unknown unicast destination | Floods the frame through other ports in the VLAN |
| Broadcast frame | Floods it through other ports in the VLAN |
| Frame for source device on the same incoming port | Filters the frame |
Switch> enable
Switch# show mac address-table
Switch# show interfaces status
Switch# show vlan brief
Layer 3 Switch
A Layer 3 switch combines high-speed Ethernet switching with routing capabilities. It can route traffic between VLANs by using switched virtual interfaces, commonly called SVIs.
Switch(config)# ip routing
Switch(config)# interface vlan 10
Switch(config-if)# ip address 192.168.10.1 255.255.255.0
Switch(config-if)# no shutdown
Switch(config)# interface vlan 20
Switch(config-if)# ip address 192.168.20.1 255.255.255.0
Switch(config-if)# no shutdown
| Device | Main forwarding information | Typical purpose |
|---|---|---|
| Layer 2 switch | MAC address table | Forward frames inside a VLAN |
| Layer 3 switch | MAC table and routing table | Switch frames and route between VLANs |
| Router | Routing table | Connect different IP networks and WANs |
Next-Generation Firewall and IPS
A traditional firewall permits or blocks traffic using information such as source address, destination address, protocol and port. A next-generation firewall can additionally identify applications, inspect content and apply identity-based policies.
An intrusion prevention system, or IPS, analyzes traffic for malicious behavior and can automatically block detected threats.
Wireless Access Point
An access point connects wireless clients to a wired network. It bridges IEEE 802.11 wireless frames and IEEE 802.3 Ethernet frames.
Wireless LAN Controller
A wireless LAN controller centrally manages multiple access points. It can manage WLAN configuration, security, radio parameters and client roaming.
Network Controller
A network controller provides centralized visibility and policy management. Instead of configuring every device manually, administrators can express intended outcomes and let the controller coordinate implementation.
Endpoints
Endpoints are devices that consume or provide network data. Examples include laptops, phones, printers, cameras, sensors and IP telephones.
Servers
A server provides a service to other devices called clients. One physical or virtual server may provide several services.
| Server | Purpose | Common protocol or port |
|---|---|---|
| DNS | Converts names into IP addresses | UDP/TCP 53 |
| DHCP | Automatically supplies IP configuration | UDP 67 and 68 |
| Web | Provides websites and web applications | HTTP 80, HTTPS 443 |
| File | Stores and shares files | Protocol depends on implementation |
| Sends and receives email | SMTP, IMAP or POP3 |
Power over Ethernet
Power over Ethernet, or PoE, sends electrical power and network data over the same Ethernet cable. It is commonly used for access points, IP phones and security cameras.
Switch# show power inline
Interface Admin Oper Power Device
Gi1/0/1 auto on 15.4W IP Phone
Gi1/0/2 auto on 22.0W Access Point
Gi1/0/3 auto off 0.0W Not detected
1.2 Network Topology Architectures
Two-Tier Architecture
A two-tier campus design uses an access layer and a combined distribution/core layer. It is often called a collapsed-core design.
- Access layer: connects users and endpoint devices.
- Collapsed distribution/core: aggregates access switches, routes between networks and connects to external services.
Three-Tier Architecture
A traditional three-tier campus design contains three distinct layers:
- Access: connects endpoints.
- Distribution: aggregates access switches and provides routing and policy boundaries.
- Core: transports large volumes of traffic quickly between distribution blocks.
Spine-Leaf Architecture
Spine-leaf is commonly used in data centers. Every leaf switch connects to every spine switch. Servers connect to leaf switches. Leaf switches do not normally connect directly to other leaf switches.
WAN
A wide area network connects geographically separated locations. WAN services may use internet VPNs, leased circuits, broadband connections, cellular networks or provider-managed services.
Small Office/Home Office
A SOHO design normally combines routing, Ethernet switching, wireless access, DHCP, NAT and basic firewall functions in one device.
On-Premises and Cloud
| Model | Description | Real-life example |
|---|---|---|
| On-premises | The organization operates infrastructure at its own location. | A company owns servers in its office data center. |
| Public cloud | A provider supplies shared infrastructure as a service. | A web application runs on rented cloud virtual machines. |
| Private cloud | Cloud-style infrastructure is dedicated to one organization. | A bank operates internal self-service virtual infrastructure. |
| Hybrid cloud | On-premises systems integrate with public or private cloud services. | Local databases support an application hosted in the public cloud. |
1.3 Physical Interfaces and Cabling
The physical layer carries bits between devices. CCNA requires you to understand copper Ethernet, single-mode fiber, multimode fiber and common interface problems.
Copper Ethernet
Twisted-pair Ethernet cables transmit data using electrical signals. Four pairs of insulated copper wires are twisted to reduce electromagnetic interference.
| Category | Common capability | Typical use |
|---|---|---|
| Cat 5e | 1 Gbps up to 100 metres | General office access |
| Cat 6 | 1 Gbps up to 100 metres; 10 Gbps at shorter distances | Modern office installations |
| Cat 6A | 10 Gbps up to 100 metres | High-speed access and data centres |
Straight-Through and Crossover Cables
Traditional Ethernet interfaces used different transmit and receive wire pairs. The cable type depended on the connected devices.
| Connection | Traditional cable |
|---|---|
| PC to switch | Straight-through |
| Router to switch | Straight-through |
| Switch to switch | Crossover |
| PC to PC | Crossover |
| Router to router over Ethernet | Crossover |
Fiber-Optic Cabling
Fiber carries information as light rather than electrical signals. It supports longer distances, high bandwidth and resistance to electromagnetic interference.
| Characteristic | Multimode fiber | Single-mode fiber |
|---|---|---|
| Core | Larger | Smaller |
| Light source | Usually LED or VCSEL | Laser |
| Distance | Shorter | Longer |
| Typical use | Inside buildings and data centres | Campus, metropolitan and provider links |
| Relative cost | Typically lower | Optics are typically more expensive |
Shared Media and Point-to-Point Connections
On shared media, multiple devices compete for access to the same transmission medium. Collisions were possible on older Ethernet hubs.
A point-to-point Ethernet link connects exactly two interfaces, such as a computer connected directly to a switch port. Modern switched full-duplex Ethernet links do not experience collisions.
1.4 Interface and Cable Problems
Interface Status
Switch# show interfaces status
Port Name Status Vlan Duplex Speed Type
Gi0/1 PC-A connected 10 a-full a-1000 10/100/1000BaseTX
Gi0/2 Printer notconnect 10 auto auto 10/100/1000BaseTX
Gi0/3 Uplink connected trunk a-full a-1000 10/100/1000BaseTX
| Status | Likely meaning |
|---|---|
| connected | The physical link is operational. |
| notconnect | No working physical connection is detected. |
| disabled | The interface has been administratively shut down. |
| err-disabled | The switch disabled the port after detecting a problem. |
Common Physical Problems
| Problem | Observable symptom | Suggested action |
|---|---|---|
| Damaged cable | Link is down or repeatedly changes state | Test or replace the cable |
| Wrong transceiver | Fiber link remains down | Verify wavelength, speed and fiber type |
| Excessive cable length | Errors or unstable connectivity | Shorten the link or use fiber |
| Dirty fiber connector | Weak optical signal and errors | Inspect and clean it correctly |
| Electromagnetic interference | Errors increase near electrical equipment | Reroute the cable or use fiber |
Duplex and Speed Mismatch
Full duplex permits simultaneous transmission and reception. Half duplex permits communication in only one direction at a time and uses collision detection.
Switch# show interfaces gigabitEthernet 0/1
GigabitEthernet0/1 is up, line protocol is up
Full-duplex, 1000Mb/s
5 minute input rate 45000 bits/sec
5 minute output rate 68000 bits/sec
12 input errors, 8 CRC, 0 frame
0 output errors, 0 collisions
Important Error Counters
| Counter | Meaning |
|---|---|
| CRC errors | The received frame failed its integrity check. |
| Runts | Frames smaller than the minimum valid Ethernet frame size. |
| Giants | Frames larger than the accepted maximum size. |
| Collisions | Transmitters attempted to use shared half-duplex media together. |
| Late collisions | Often indicate a duplex mismatch or cabling problem. |
| Input errors | A general total containing several receive-side error types. |
1.5 TCP and UDP
Applications use transport-layer protocols to communicate between processes. TCP and UDP both use port numbers, but they provide different services.
Transmission Control Protocol
TCP is connection-oriented and provides:
- Connection establishment
- Sequence numbers
- Acknowledgements
- Retransmission of missing data
- Flow control
- Error detection
TCP Three-Way Handshake
User Datagram Protocol
UDP is connectionless. It has a smaller header and does not establish a session, acknowledge delivery, reorder data or retransmit missing data.
| Feature | TCP | UDP |
|---|---|---|
| Connection establishment | Yes | No |
| Reliable delivery mechanisms | Yes | No |
| Sequencing | Yes | No |
| Header overhead | Higher | Lower |
| Common uses | Web, email, SSH and file transfer | Voice, video, DNS and DHCP |
Port Numbers
An IP address identifies a host interface. A port number identifies an application or process on that host.
| Protocol | Port | Transport |
|---|---|---|
| FTP data/control | 20/21 | TCP |
| SSH | 22 | TCP |
| Telnet | 23 | TCP |
| SMTP | 25 | TCP |
| DNS | 53 | UDP and TCP |
| DHCP server/client | 67/68 | UDP |
| HTTP | 80 | TCP |
| POP3 | 110 | TCP |
| NTP | 123 | UDP |
| IMAP | 143 | TCP |
| SNMP | 161/162 | UDP |
| HTTPS | 443 | TCP |
- Start a Wireshark capture on your active network interface.
- Visit an HTTPS website.
- Stop the capture and apply the filter
tcp.port == 443. - Find a TCP SYN, SYN-ACK and ACK.
- Compare the source and destination port numbers.
- Apply the filter
dnsand examine a DNS query.
1.6 OSI and TCP/IP Models
Networking models divide communication into layers. Each layer performs a specific job and provides services to the layer above it. This makes designing and troubleshooting networks easier.
The OSI Seven-Layer Model
| Layer | Name | Main responsibility | Examples |
|---|---|---|---|
| 7 | Application | Provides network services to user applications | HTTP, HTTPS, DNS, DHCP, SSH |
| 6 | Presentation | Formatting, encryption and compression | TLS, character encoding, image formats |
| 5 | Session | Establishes and manages application sessions | Session establishment and termination |
| 4 | Transport | Process-to-process communication | TCP, UDP, port numbers |
| 3 | Network | Logical addressing and routing | IPv4, IPv6, ICMP, routers |
| 2 | Data Link | Local delivery, framing and MAC addressing | Ethernet, switches, VLANs |
| 1 | Physical | Transmits bits as electrical, optical or radio signals | Copper, fiber, connectors and radio |
TCP/IP Model
The TCP/IP model describes the protocol suite used by modern networks and the internet. It is commonly represented using four layers.
| TCP/IP layer | Related OSI layers | Examples |
|---|---|---|
| Application | OSI 5–7 | HTTP, DNS, DHCP, SSH and SMTP |
| Transport | OSI 4 | TCP and UDP |
| Internet | OSI 3 | IPv4, IPv6 and ICMP |
| Network Access | OSI 1–2 | Ethernet, Wi-Fi and physical media |
1.7 Encapsulation and Decapsulation
Encapsulation occurs when each networking layer adds control information to data before transmission. The receiving device removes that information through decapsulation.
- The application creates data.
- TCP or UDP adds a transport header.
- IP adds a network-layer header.
- Ethernet adds a header and trailer.
- The physical layer transmits the frame as bits.
| Layer | Protocol data unit |
|---|---|
| Application | Data |
| Transport | TCP segment or UDP datagram |
| Network | Packet |
| Data Link | Frame |
| Physical | Bits |
1.8 Ethernet Frames
Ethernet is the main LAN technology used in wired networks. It places data inside frames for delivery across a local network segment.
| Field | Size | Purpose |
|---|---|---|
| Preamble | 7 bytes | Allows receiver synchronization |
| Start Frame Delimiter | 1 byte | Marks the beginning of the frame |
| Destination MAC | 6 bytes | Identifies the local destination |
| Source MAC | 6 bytes | Identifies the sender |
| Type/Length | 2 bytes | Identifies encapsulated data or length |
| Data | 46–1500 bytes | Carries the upper-layer packet |
| Frame Check Sequence | 4 bytes | Detects transmission errors |
MAC Addresses
A MAC address is 48 bits long and normally written as 12 hexadecimal digits. For example:
00:1A:2B:3C:4D:5E
001A.2B3C.4D5E
00-1A-2B-3C-4D-5E
- The first 24 bits traditionally identify the manufacturer.
- The remaining 24 bits identify a particular interface.
- A hexadecimal digit represents four binary bits.
| Address type | Purpose | Example |
|---|---|---|
| Unicast | Identifies one interface | 00:1A:2B:3C:4D:5E |
| Broadcast | Targets all devices in a broadcast domain | FF:FF:FF:FF:FF:FF |
| Multicast | Targets a selected group | Group-dependent address |
1.9 How a Switch Learns and Forwards
A switch dynamically builds its MAC address table by examining the source MAC address of incoming frames.
- A frame enters a switch port.
- The switch reads the source MAC address.
- It records that address against the incoming port and VLAN.
- It checks the destination MAC address.
- It forwards, floods or filters the frame.
Forwarding Decisions
| Destination | Switch behaviour |
|---|---|
| Known unicast | Forward through the associated port |
| Unknown unicast | Flood through all other ports in the same VLAN |
| Broadcast | Flood through all other ports in the same VLAN |
| Known destination on incoming port | Filter the frame |
Switch# show mac address-table
Mac Address Table
-------------------------------------------
Vlan Mac Address Type Ports
---- ----------- -------- -----
10 00aa.aaaa.aaaa DYNAMIC Gi0/1
10 00bb.bbbb.bbbb DYNAMIC Gi0/2
20 00cc.cccc.cccc DYNAMIC Gi0/3
1.10 Same-Network and Remote-Network Delivery
A host uses its subnet mask to determine whether a destination is local or remote.
- Local destination: The sender creates a frame addressed directly to the destination host's MAC address.
- Remote destination: The sender creates a frame addressed to its default gateway's MAC address.
1.11 ARP
The Address Resolution Protocol maps an IPv4 address to a MAC address on the local network.
- The sender checks its ARP cache.
- If no mapping exists, it sends a broadcast ARP request.
- The device using the requested IPv4 address sends an ARP reply.
- The sender stores the IP-to-MAC mapping temporarily.
PC> arp -a
Interface: 192.168.10.20
Internet Address Physical Address Type
192.168.10.1 00-11-22-33-44-55 dynamic
Router# show arp
Protocol Address Age Hardware Addr Type Interface
Internet 192.168.10.1 - 0011.2233.4455 ARPA Gi0/0
Internet 192.168.10.20 2 00aa.bbcc.ddee ARPA Gi0/0
- Connect two PCs to a switch.
- Assign 192.168.10.10/24 and 192.168.10.20/24.
- Open Simulation mode.
- Ping PC-B from PC-A.
- Observe the ARP request, ARP reply and ICMP messages.
- Check each PC's ARP table with
arp -a. -
Check the switch table with
show mac address-table. - Identify which fields the switch learns and which fields the hosts learn.
1.12 IPv4 Addressing
An IPv4 address is a 32-bit logical address assigned to a network interface. It is written as four decimal octets separated by periods.
192.168.10.25
Binary:
11000000.10101000.00001010.00011001
Each octet contains eight bits and has a value between 0 and 255.
| Bit position | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|---|
| Example bits | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| $128 + 64 = 192$ | ||||||||
Network and Host Portions
A subnet mask identifies which IPv4 bits represent the network and which represent the host.
- A subnet-mask bit of 1 represents the network portion.
- A subnet-mask bit of 0 represents the host portion.
Address: 192.168.10.25
Subnet mask: 255.255.255.0
Prefix: /24
Network part: 192.168.10
Host part: 25
Network ID: 192.168.10.0
Broadcast: 192.168.10.255
Important Address Types
| Address | Purpose |
|---|---|
| Network address | Identifies the subnet; all host bits are 0 |
| Usable host address | May be assigned to an interface |
| Broadcast address | Targets every IPv4 host in the subnet; all host bits are 1 |
| Default gateway | Router or Layer 3 switch used to reach remote networks |
1.13 Public, Private and Special IPv4 Addresses
Private IPv4 Ranges
| Private range | CIDR block |
|---|---|
| 10.0.0.0–10.255.255.255 | 10.0.0.0/8 |
| 172.16.0.0–172.31.255.255 | 172.16.0.0/12 |
| 192.168.0.0–192.168.255.255 | 192.168.0.0/16 |
Private addresses are used inside organizations and are not routed across the public internet. Network Address Translation commonly translates them into public addresses.
Other Special Addresses
| Range | Purpose |
|---|---|
| 127.0.0.0/8 | Loopback testing; 127.0.0.1 is commonly used |
| 169.254.0.0/16 | Link-local addressing when automatic configuration fails |
| 224.0.0.0/4 | IPv4 multicast |
| 255.255.255.255 | Limited broadcast |
| 0.0.0.0 | Unspecified address or default-route representation |
1.14 Subnet Masks and Prefix Lengths
| Prefix | Subnet mask | Total addresses | Normally usable hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /21 | 255.255.248.0 | 2,048 | 2,046 |
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /23 | 255.255.254.0 | 512 | 510 |
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | Used on supported point-to-point links |
| /32 | 255.255.255.255 | 1 | One specific address |
Subnetting Formulas
If $h$ bits remain for hosts:
$$\text{Total addresses} = 2^h$$
For a conventional subnet:
$$\text{Usable hosts} = 2^h - 2$$
If $s$ host bits are borrowed:
$$\text{Number of subnets} = 2^s$$
1.15 The Block-Size Method
The block-size method quickly finds subnet boundaries without writing all 32 bits in binary.
- Locate the interesting octet—the first mask octet that is not 255 or 0.
- Calculate $256 - \text{mask value}$.
- List multiples of that block size.
- Find the range containing the given address.
Worked Example: 192.168.10.70/26
Prefix: /26
Mask: 255.255.255.192
Interesting octet: fourth octet
Block size: 256 - 192 = 64
Subnet boundaries:
0, 64, 128, 192
70 falls between 64 and 127.
| Item | Result |
|---|---|
| Network address | 192.168.10.64 |
| First usable address | 192.168.10.65 |
| Last usable address | 192.168.10.126 |
| Broadcast address | 192.168.10.127 |
| Usable hosts | 62 |
Worked Example: 172.16.77.130/20
Prefix: /20
Mask: 255.255.240.0
Interesting octet: third octet
Block size: 256 - 240 = 16
Third-octet boundaries:
0, 16, 32, 48, 64, 80, 96...
77 falls between 64 and 79.
| Item | Result |
|---|---|
| Network address | 172.16.64.0 |
| First usable address | 172.16.64.1 |
| Last usable address | 172.16.79.254 |
| Broadcast address | 172.16.79.255 |
| Usable hosts | 4,094 |
1.16 Selecting a Subnet Size
Choose enough host bits to support the required devices, including reasonable growth.
Example: Department Requiring 50 Hosts
/27 provides 30 usable hosts — too small
/26 provides 62 usable hosts — sufficient
/25 provides 126 usable hosts — sufficient but wastes more addresses
Best fit: /26
Example: Department Requiring 500 Hosts
/24 provides 254 usable hosts — too small
/23 provides 510 usable hosts — sufficient
Best fit: /23
1.17 Fixed-Length and Variable-Length Subnetting
Fixed-Length Subnet Masking
FLSM gives every subnet the same prefix length. It is simple but can waste addresses when departments have very different requirements.
Variable-Length Subnet Masking
VLSM uses different prefix lengths based on actual requirements. Allocate the largest subnet first to prevent address overlap.
VLSM Worked Example
Divide 192.168.10.0/24 for these requirements:
- Sales: 100 hosts
- Engineering: 50 hosts
- Support: 20 hosts
- Router link: 2 hosts
| Network | Required | Assigned subnet | Usable range | Broadcast |
|---|---|---|---|---|
| Sales | 100 | 192.168.10.0/25 | 192.168.10.1–126 | 192.168.10.127 |
| Engineering | 50 | 192.168.10.128/26 | 192.168.10.129–190 | 192.168.10.191 |
| Support | 20 | 192.168.10.192/27 | 192.168.10.193–222 | 192.168.10.223 |
| Router link | 2 | 192.168.10.224/30 | 192.168.10.225–226 | 192.168.10.227 |
1.18 Configuring IPv4 Addresses
Router Interface
Router> enable
Router# configure terminal
Router(config)# interface gigabitEthernet 0/0
Router(config-if)# description Office LAN
Router(config-if)# ip address 192.168.10.1 255.255.255.0
Router(config-if)# no shutdown
Router(config-if)# end
Router# show ip interface brief
Layer 2 Switch Management Address
Switch> enable
Switch# configure terminal
Switch(config)# interface vlan 10
Switch(config-if)# ip address 192.168.10.2 255.255.255.0
Switch(config-if)# no shutdown
Switch(config-if)# exit
Switch(config)# ip default-gateway 192.168.10.1
ip default-gateway lets the switch send management traffic to
remote networks.
Verification Commands
Router# show ip interface brief
Router# show interfaces gigabitEthernet 0/0
Router# show ip route
Router# show arp
Router# ping 192.168.10.10
Router# traceroute 192.168.20.10
IPv4 Subnetting Practice
1. Find the subnet containing 192.168.50.200/27.
Mask: 255.255.255.224; block size: 32. The boundaries include 160, 192 and 224. Network: 192.168.50.192; usable range: 193–222; broadcast: 223.
2. Find the subnet containing 10.25.140.7/18.
Mask: 255.255.192.0; third-octet block size: 64. The address is in 10.25.128.0/18. Usable range: 10.25.128.1–10.25.191.254; broadcast: 10.25.191.255.
3. What prefix supports at least 200 hosts?
/24. It provides 256 total addresses and 254 conventional usable host addresses.
4. Are 192.168.1.30/28 and 192.168.1.35/28 in the same subnet?
No. The block size is 16. Address 30 belongs to 192.168.1.16/28, while address 35 belongs to 192.168.1.32/28.
- Add one router, two switches and four PCs.
- Connect one switch to each router interface.
- Use 192.168.10.0/24 for LAN 1.
- Use 192.168.20.0/24 for LAN 2.
- Assign the router the first usable address in each LAN.
- Assign unique host addresses and the correct default gateways.
- Use
show ip interface briefto verify the router. - Ping hosts within the same LAN and across the router.
- Correct any mask, gateway or interface-state errors.
1.19 IPv6 Fundamentals
IPv6 uses 128-bit addresses, providing a much larger address space than 32-bit IPv4. IPv6 also supports automatic addressing, simpler headers and improved multicast-based network operations.
IPv6 Address Format
An IPv6 address contains eight groups of four hexadecimal digits. Each group represents 16 bits.
2001:0db8:0000:0000:0000:00ab:0000:1234
Hexadecimal digits represent these decimal and binary values:
| Hex | Binary | Hex | Binary | Hex | Binary | Hex | Binary |
|---|---|---|---|---|---|---|---|
| 0 | 0000 | 4 | 0100 | 8 | 1000 | C | 1100 |
| 1 | 0001 | 5 | 0101 | 9 | 1001 | D | 1101 |
| 2 | 0010 | 6 | 0110 | A | 1010 | E | 1110 |
| 3 | 0011 | 7 | 0111 | B | 1011 | F | 1111 |
1.20 Shortening IPv6 Addresses
Rule 1: Remove Leading Zeros
Leading zeros in each 16-bit group may be removed.
Original:
2001:0db8:0000:0001:00ab:0000:0000:1234
After removing leading zeros:
2001:db8:0:1:ab:0:0:1234
1000 cannot be shortened
because its zeros are not at the beginning.
Rule 2: Compress One Continuous Zero Sequence
One continuous sequence of all-zero groups may be replaced with
::.
2001:db8:0:0:0:0:0:10
2001:db8::10
:: only once in an address. Using it twice would make the
number of omitted groups ambiguous.
Expanding an IPv6 Address
Short address:
2001:db8:12::5
There are three written groups before :: and one after it.
Eight groups are required, so :: represents four zero groups.
Expanded:
2001:0db8:0012:0000:0000:0000:0000:0005
1.21 IPv6 Prefixes
IPv6 uses prefix notation. A typical LAN uses a /64 prefix, leaving 64 bits for the interface identifier.
Address: 2001:db8:10:20:abcd:1234:5678:9abc/64
Network prefix:
2001:db8:10:20::/64
Interface identifier:
abcd:1234:5678:9abc
1.22 IPv6 Address Types
Global Unicast Address
A global unicast address is routable across IPv6 networks. The currently allocated global unicast range is contained within 2000::/3.
2001:db8:10:20::25/64
2001:db8::/32 is reserved for documentation and
examples. Do not treat it as a real publicly routed production prefix.
Link-Local Address
Every IPv6-enabled interface requires a link-local address. Link-local addresses begin within FE80::/10 and are used only on the local link.
fe80::21a:2bff:fe3c:4d5e
Link-local addresses are used for:
- Neighbor Discovery
- Router discovery
- Next-hop routing information
- Communication limited to the local link
Unique Local Address
Unique local addresses use FC00::/7, with locally assigned addresses commonly beginning with FD. They are intended for private internal use and are not normally routed on the public internet.
fd12:3456:789a:10::25/64
Loopback and Unspecified Addresses
| Address | Purpose |
|---|---|
| ::1/128 | IPv6 loopback address |
| ::/128 | Unspecified IPv6 address |
IPv6 Multicast
IPv6 multicast sends traffic to a group of interested interfaces. IPv6 does not use broadcast addresses.
| Address | Meaning |
|---|---|
| FF02::1 | All IPv6 nodes on the local link |
| FF02::2 | All IPv6 routers on the local link |
| FF02::5 | All OSPFv3 routers |
| FF02::6 | All OSPFv3 designated routers |
Anycast
An anycast address is assigned to multiple interfaces, normally on different devices. Routing delivers traffic to the nearest instance according to the routing table.
1.23 IPv6 Address Configuration Methods
Static Configuration
Router> enable
Router# configure terminal
Router(config)# ipv6 unicast-routing
Router(config)# interface gigabitEthernet 0/0
Router(config-if)# ipv6 address 2001:db8:10:1::1/64
Router(config-if)# no shutdown
The ipv6 unicast-routing command enables the router to forward
IPv6 packets between interfaces.
Manual Link-Local Address
Router(config)# interface gigabitEthernet 0/0
Router(config-if)# ipv6 address fe80::1 link-local
EUI-64
Modified EUI-64 can create a 64-bit interface identifier from a 48-bit MAC address.
- Split the MAC address into two 24-bit halves.
- Insert FFFE between the halves.
- Invert the universal/local bit in the first byte.
- Combine the result with the 64-bit IPv6 prefix.
EUI-64 Worked Example
MAC address:
00:1A:2B:3C:4D:5E
Split:
001A2B | 3C4D5E
Insert FFFE:
001A:2BFF:FE3C:4D5E
Invert the U/L bit:
00 becomes 02
Interface identifier:
021A:2BFF:FE3C:4D5E
With prefix 2001:db8:10:1::/64:
2001:db8:10:1:021A:2BFF:FE3C:4D5E/64
Router(config)# interface gigabitEthernet 0/0
Router(config-if)# ipv6 address 2001:db8:10:1::/64 eui-64
SLAAC
Stateless Address Autoconfiguration allows a host to create its own global IPv6 address after receiving prefix information from a router advertisement.
- The host creates a link-local address.
- The host listens for or requests a router advertisement.
- The router advertises a network prefix and configuration flags.
- The host creates an address using the advertised prefix.
- The host checks that the address is not already in use.
DHCPv6
| Method | Address source | Other information |
|---|---|---|
| SLAAC | Host creates its address | Router advertisements |
| Stateless DHCPv6 | SLAAC | DHCPv6 supplies information such as DNS |
| Stateful DHCPv6 | DHCPv6 server | DHCPv6 server tracks address assignments |
1.24 Neighbor Discovery Protocol
IPv6 Neighbor Discovery uses ICMPv6. It replaces several IPv4 functions, including ARP and router discovery.
| Message | Abbreviation | Purpose |
|---|---|---|
| Router Solicitation | RS | A host requests router information |
| Router Advertisement | RA | A router advertises prefixes and configuration flags |
| Neighbor Solicitation | NS | Discovers a neighbour or verifies reachability |
| Neighbor Advertisement | NA | Responds with neighbour information |
| Redirect | Redirect | Identifies a better first-hop router |
Solicited-Node Multicast
Each IPv6 unicast address has a corresponding solicited-node multicast address. Neighbor Discovery uses this address instead of broadcasting to every host.
Duplicate Address Detection
Before using an IPv6 address, a host can perform Duplicate Address Detection to confirm that another interface is not already using it.
1.25 Verifying IPv6
Router# show ipv6 interface brief
GigabitEthernet0/0 [up/up]
FE80::1
2001:DB8:10:1::1
GigabitEthernet0/1 [up/up]
FE80::1
2001:DB8:10:2::1
Router# show ipv6 interface gigabitEthernet 0/0
Router# show ipv6 route
Router# show ipv6 neighbors
Router# ping 2001:db8:10:1::20
Router# traceroute 2001:db8:10:2::20
IPv6 Practice Questions
1. Shorten 2001:0db8:0000:0000:00ab:0000:0000:0010.
One valid shortest representation is 2001:db8::ab:0:0:10.
Only one continuous zero sequence may use ::.
2. Expand 2001:db8:5::25.
2001:0db8:0005:0000:0000:0000:0000:0025
3. What is the IPv6 loopback address?
::1/128
4. Does IPv6 use ARP?
No. IPv6 uses ICMPv6 Neighbor Discovery messages, including Neighbor Solicitation and Neighbor Advertisement.
5. Which IPv6 messages provide prefix and gateway information?
Router Advertisements.
- Create two LANs connected by one router.
- Enable
ipv6 unicast-routing. - Use 2001:DB8:10:1::/64 for LAN 1.
- Use 2001:DB8:10:2::/64 for LAN 2.
- Assign each router interface
::1in its subnet. - Configure IPv6 addresses on the PCs or enable automatic addressing.
- Verify link-local and global addresses.
- Ping across both LANs using IPv6.
- Inspect the router's IPv6 routing and neighbour tables.
- Repeat the test with IPv4 to create a dual-stack network.
1.26 Wireless Networking Fundamentals
Wireless LANs use radio waves instead of physical Ethernet cables. A wireless client connects to an access point using an SSID and an authentication method.
Important Wireless Terms
| Term | Meaning |
|---|---|
| SSID | The name advertised by a wireless network |
| BSSID | The MAC address identifying a wireless access point radio |
| RF | Radio frequency used to transmit wireless signals |
| Channel | A defined portion of the radio-frequency spectrum |
| Association | The process by which a client joins an access point |
| Roaming | Moving between access points while maintaining connectivity |
Wireless Bands
| Band | General characteristics |
|---|---|
| 2.4 GHz | Longer range, better wall penetration, more interference |
| 5 GHz | More channels and capacity, generally shorter range |
| 6 GHz | Additional spectrum for supported Wi-Fi 6E and newer clients |
Wireless Interference
Wireless performance can be affected by:
- Other access points using overlapping channels
- Microwave ovens and cordless devices
- Concrete walls, metal structures and glass
- Too many clients on one access point
- Excessive distance from the access point
- Non-Wi-Fi radio interference
Wireless Encryption and Authentication
| Method | Security level | Typical use |
|---|---|---|
| Open | No wireless authentication or encryption | Public guest networks with web login |
| WPA2-Personal | Pre-shared key | Homes and small offices |
| WPA2-Enterprise | 802.1X with centralized authentication | Business networks |
| WPA3-Personal | Modern personal authentication | Supported home and small-office devices |
| WPA3-Enterprise | Enterprise authentication and stronger security options | Organizations with compatible infrastructure |
1.27 Virtualization
Virtualization abstracts computing resources from the physical hardware. Multiple virtual machines can run on one physical server through a hypervisor.
| Component | Role |
|---|---|
| Physical host | Provides CPU, memory, storage and network interfaces |
| Hypervisor | Creates and manages virtual machines |
| Virtual machine | Runs an operating system and applications |
| Virtual NIC | Connects a virtual machine to a virtual or physical network |
Network Virtualization
Network virtualization creates logical networks independently of the underlying physical topology. Examples include virtual switches, VLANs, virtual routers and virtual firewalls.
1.28 VRF
Virtual Routing and Forwarding creates separate routing tables on one router or Layer 3 switch. Each VRF can contain overlapping IP address spaces while keeping traffic logically separated.
Router(config)# vrf definition CUSTOMER_A
Router(config-vrf)# address-family ipv4
Router(config-vrf-af)# exit
Router(config)# interface gigabitEthernet 0/1
Router(config-if)# vrf forwarding CUSTOMER_A
Router(config-if)# ip address 192.168.1.1 255.255.255.0
vrf forwarding to an interface normally removes its
existing IP address. Reconfigure the address afterward.
1.29 Containers
Containers package an application and its dependencies while sharing the host operating system kernel. They are generally lighter and faster to start than full virtual machines.
| Feature | Virtual machine | Container |
|---|---|---|
| Includes | Complete guest operating system | Application and dependencies |
| Startup time | Usually longer | Usually shorter |
| Isolation | Strong hardware-level abstraction | Process-level isolation |
| Typical use | Different operating systems and workloads | Portable application deployment |
1.30 Switching Concepts
Collision Domains
A collision domain is a network segment where devices could potentially compete to transmit at the same time. Each switch port creates a separate collision domain.
Broadcast Domains
A broadcast domain is the set of devices that receive a Layer 2 broadcast. Routers and Layer 3 boundaries separate broadcast domains. Each VLAN is normally a separate broadcast domain.
MAC Address Table Aging
Dynamic MAC address entries are removed after a period of inactivity. This allows the switch to adapt when a device moves to another port.
Switch# show mac address-table aging-time
Vlan Aging Time
---- ----------
All 300 seconds
Store-and-Forward Switching
In store-and-forward switching, the switch receives the entire frame, verifies its FCS and then forwards it. Corrupted frames are discarded.
Full Duplex
Full-duplex Ethernet allows simultaneous transmission and reception on a point-to-point link. Collision detection is unnecessary on a properly operating full-duplex link.
Network Fundamentals Summary
Devices
Switches forward local frames, routers forward packets between networks, access points connect wireless clients and firewalls enforce security policy.
Addressing
MAC addresses support local Ethernet delivery. IPv4 and IPv6 addresses identify interfaces across routed networks.
Models
OSI and TCP/IP models divide networking into layers and help isolate problems.
IPv4
Subnet masks separate network and host portions. Always identify the network, usable range and broadcast address.
IPv6
IPv6 uses 128-bit addresses, multicast and ICMPv6 Neighbor Discovery.
Physical media
Copper is common for access links; fiber supports longer distances and resists electromagnetic interference.
Network Fundamentals Final Review
1. What is the main function of a router?
It forwards packets between different IP networks using a routing table.
2. What does a switch learn from the source MAC address?
It learns the source MAC address and associates it with the incoming port and VLAN.
3. Which transport protocol provides reliable, ordered delivery?
TCP.
4. How many usable host addresses does a /26 provide?
62 conventional usable host addresses.
5. What is the IPv6 link-local range?
FE80::/10.
6. What replaces ARP in IPv6?
ICMPv6 Neighbor Discovery.
7. What is the difference between a collision and broadcast domain?
A collision domain is a segment where transmissions could collide. A broadcast domain is the set of devices receiving a Layer 2 broadcast.
8. What does a VRF provide?
Separate routing and forwarding tables on the same router or Layer 3 switch.
- Add one router, two Layer 2 switches, one access point, one server and four PCs.
- Create separate user, server and guest networks using IPv4 subnets.
- Configure IPv6 /64 prefixes for each network.
- Configure router interfaces and verify that they are up/up.
- Configure switch management addresses and default gateways.
- Connect the access point to a dedicated guest network.
- Test local and remote IPv4 and IPv6 connectivity.
- Inspect MAC, ARP, IPv6 neighbor and routing tables.
- Disconnect a cable and identify the problem using Layer 1 troubleshooting.
- Document the topology, addressing plan and verification results.
Review Questions
1. Which address does a Layer 2 switch primarily examine?
The destination MAC address in an Ethernet frame.
2. Which device forwards packets between IP networks?
A router or a Layer 3 switch with routing enabled.
3. Why is PoE useful?
It supplies power and data over one Ethernet cable, simplifying the installation of access points, IP phones and cameras.
4. What is a collapsed-core design?
A two-tier design in which the distribution and core functions are combined.
5. How are spine and leaf switches connected?
Every leaf connects to every spine, while servers connect to leaf switches.
- Open Cisco Packet Tracer.
- Add one router, one switch, two PCs, one server and one access point.
- Connect the wired devices using appropriate Ethernet links.
- Label each device according to its network role.
- Use
show ip interface briefon the router. - Use
show mac address-tableon the switch. - Observe which device maintains IP routes and which device learns MAC addresses.
2. Network Access
Network access covers how switches connect devices, separate traffic with VLANs, carry multiple VLANs over trunks, prevent Layer 2 loops and provide wireless connectivity.
2.1 VLANs
A VLAN, or Virtual Local Area Network, logically separates devices on a switch. Each VLAN is a separate broadcast domain.
Creating and Naming VLANs
Switch> enable
Switch# configure terminal
Switch(config)# vlan 10
Switch(config-vlan)# name USERS
Switch(config-vlan)# exit
Switch(config)# vlan 20
Switch(config-vlan)# name VOICE
Switch(config-vlan)# exit
Switch(config)# vlan 30
Switch(config-vlan)# name GUESTS
Switch(config-vlan)# exit
Assigning an Access Port
Switch(config)# interface gigabitEthernet 0/5
Switch(config-if)# description Employee-PC
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 10
Switch(config-if)# spanning-tree portfast
An access port normally carries traffic for one VLAN. It is commonly used for PCs, printers, cameras and other endpoint devices.
Verifying VLANs
Switch# show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Gi0/1, Gi0/2
10 USERS active Gi0/5, Gi0/6
20 VOICE active Gi0/7
30 GUESTS active Gi0/8
2.2 Trunk Ports
A trunk carries traffic for multiple VLANs over one physical link. VLAN identification is added using IEEE 802.1Q tagging.
Switch(config)# interface gigabitEthernet 0/24
Switch(config-if)# description Trunk-to-SW2
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk allowed vlan 10,20,30
Native VLAN
The native VLAN carries untagged frames on an 802.1Q trunk. Both ends of a trunk should use the same native VLAN.
Switch(config)# interface gigabitEthernet 0/24
Switch(config-if)# switchport trunk native vlan 999
Trunk Verification
Switch# show interfaces trunk
Port Mode Encapsulation Status Native vlan
Gi0/24 on 802.1q trunking 999
Port Vlans allowed on trunk
Gi0/24 10,20,30
Port Vlans allowed and active in management domain
Gi0/24 10,20,30
2.3 Inter-VLAN Routing
Devices in different VLANs cannot communicate through Layer 2 switching alone. A router or Layer 3 switch must route between the VLANs.
Router-on-a-Stick
Router-on-a-stick uses one physical router interface with multiple subinterfaces. Each subinterface represents one VLAN.
Router(config)# interface gigabitEthernet 0/0
Router(config-if)# no shutdown
Router(config)# interface gigabitEthernet 0/0.10
Router(config-subif)# encapsulation dot1Q 10
Router(config-subif)# ip address 192.168.10.1 255.255.255.0
Router(config)# interface gigabitEthernet 0/0.20
Router(config-subif)# encapsulation dot1Q 20
Router(config-subif)# ip address 192.168.20.1 255.255.255.0
Router(config)# interface gigabitEthernet 0/0.30
Router(config-subif)# encapsulation dot1Q 30
Router(config-subif)# ip address 192.168.30.1 255.255.255.0
Layer 3 Switch Inter-VLAN Routing
Switch(config)# ip routing
Switch(config)# vlan 10
Switch(config-vlan)# name USERS
Switch(config)# interface vlan 10
Switch(config-if)# ip address 192.168.10.1 255.255.255.0
Switch(config-if)# no shutdown
Switch(config)# vlan 20
Switch(config-vlan)# name SERVERS
Switch(config)# interface vlan 20
Switch(config-if)# ip address 192.168.20.1 255.255.255.0
Switch(config-if)# no shutdown
2.4 Voice VLANs
An IP phone and a computer can share one switch port. The phone uses the voice VLAN, while the attached computer uses the data VLAN.
Switch(config)# interface gigabitEthernet 0/10
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 10
Switch(config-if)# switchport voice vlan 20
Switch(config-if)# spanning-tree portfast
2.5 VLAN Troubleshooting
| Symptom | Possible cause | Useful command |
|---|---|---|
| PC cannot reach same-VLAN devices | Wrong access VLAN or port down | show vlan brief |
| VLAN works on one switch but not another | VLAN missing or absent from trunk allowed list | show interfaces trunk |
| Different VLANs cannot communicate | Missing gateway or inter-VLAN routing | show ip interface brief |
| Unexpected connectivity or warnings | Native VLAN mismatch | show interfaces trunk |
- Add two switches and four PCs.
- Create VLANs 10 and 20 on both switches.
- Assign two PCs to VLAN 10 and two PCs to VLAN 20.
- Connect the switches using a trunk.
- Verify that same-VLAN PCs can communicate.
- Verify that different-VLAN PCs cannot communicate yet.
- Use
show vlan briefandshow interfaces trunk. - Add a router-on-a-stick configuration.
- Configure the correct default gateway on every PC.
- Test communication between VLAN 10 and VLAN 20.
Review Questions
1. What does a VLAN provide?
A logical Layer 2 broadcast domain within a switched network.
2. What is the purpose of a trunk?
To carry traffic for multiple VLANs over one physical link.
3. What is required for communication between VLANs?
A router or Layer 3 switch providing inter-VLAN routing.
4. What is the native VLAN?
The VLAN that carries untagged frames on an 802.1Q trunk.
5. Why is a voice VLAN used?
To separate IP phone traffic from ordinary data traffic and apply appropriate voice policies.
2.6 EtherChannel
EtherChannel combines multiple physical Ethernet links into one logical link. This increases bandwidth and provides redundancy. Cisco commonly uses Port Aggregation Protocol (PAgP) or the open standard Link Aggregation Control Protocol (LACP).
LACP Modes
| Mode | Behaviour |
|---|---|
| Active | Actively negotiates LACP |
| Passive | Responds to LACP but does not initiate it |
An EtherChannel forms when at least one side is active. Passive/passive does not form a channel.
LACP Configuration
Switch1(config)# interface range gigabitEthernet 0/1 - 2
Switch1(config-if-range)# channel-group 1 mode active
Switch1(config-if-range)# exit
Switch1(config)# interface port-channel 1
Switch1(config-if)# switchport mode trunk
Switch1(config-if)# switchport trunk allowed vlan 10,20,30
Configure the matching channel on the second switch:
Switch2(config)# interface range gigabitEthernet 0/1 - 2
Switch2(config-if-range)# channel-group 1 mode active
Switch2(config-if-range)# exit
Switch2(config)# interface port-channel 1
Switch2(config-if)# switchport mode trunk
Switch2(config-if)# switchport trunk allowed vlan 10,20,30
Verifying EtherChannel
Switch# show etherchannel summary
Group Port-channel Protocol Ports
------+-------------+-----------+----------------
1 Po1(SU) LACP Gi0/1(P) Gi0/2(P)
| Indicator | Meaning |
|---|---|
| S | Layer 2 port-channel |
| U | Port-channel is in use |
| P | Interface is bundled in the port-channel |
| I | Interface is standalone |
| s | Suspended |
Switch# show interfaces port-channel 1
Switch# show lacp neighbor
Switch# show interfaces trunk
2.7 Layer 2 Loops
A Layer 2 loop occurs when redundant switch paths allow Ethernet frames to circulate indefinitely. Ethernet frames do not contain a hop-count field, so loops can cause severe network problems.
Effects of Layer 2 Loops
- Broadcast storms
- Multiple copies of the same frame
- MAC address table instability
- High CPU usage
- Duplicate frames received by endpoints
- Network-wide connectivity loss
2.8 Spanning Tree Protocol
Spanning Tree Protocol, or STP, prevents Layer 2 loops by placing redundant interfaces into a blocking state while maintaining an alternate path for failure recovery.
Bridge ID
STP elects one switch as the root bridge. The bridge with the lowest bridge ID wins. The bridge ID is based on bridge priority and MAC address.
Switch(config)# spanning-tree vlan 10 priority 24576
Lowering the priority makes a switch more likely to become the root bridge. The default priority is commonly 32768, subject to the extended system ID.
STP Port Roles
| Role | Purpose |
|---|---|
| Root port | Best path from a non-root switch toward the root bridge |
| Designated port | Forwarding port selected for a network segment |
| Alternate port | Backup path that is normally discarding |
| Disabled | Not participating because the interface is administratively down |
STP Port States
| State | Function |
|---|---|
| Blocking | Does not forward data frames; listens for BPDUs |
| Listening | Participates in STP but does not learn MAC addresses |
| Learning | Learns MAC addresses but does not forward data frames |
| Forwarding | Learns MAC addresses and forwards frames |
| Disabled | Does not participate in STP |
2.9 Rapid Spanning Tree Protocol
Rapid PVST+ improves convergence by using a separate spanning-tree instance per VLAN and transitioning ports more quickly after a topology change.
Switch(config)# spanning-tree mode rapid-pvst
Switch(config)# spanning-tree vlan 10,20,30 priority 24576
STP Verification
Switch# show spanning-tree
VLAN0010
Spanning tree enabled protocol rstp
Root ID Priority 24586
Address 0011.2233.4455
This bridge is the root
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- --------- ----------------
Gi0/1 Desg FWD 4 128.1 P2p
Gi0/2 Desg FWD 4 128.2 P2p
Switch# show spanning-tree vlan 10
Switch# show spanning-tree root
Switch# show spanning-tree blockedports
2.10 PortFast
PortFast allows an access port connected to an endpoint to enter the forwarding state immediately instead of waiting through normal STP transitions.
Switch(config)# interface gigabitEthernet 0/5
Switch(config-if)# spanning-tree portfast
2.11 BPDU Guard
BPDU Guard protects PortFast ports. If a BPDU arrives, the switch assumes an unexpected switch has been connected and places the interface into an err-disabled state.
Switch(config)# interface gigabitEthernet 0/5
Switch(config-if)# spanning-tree portfast
Switch(config-if)# spanning-tree bpduguard enable
It can also be enabled globally for PortFast interfaces:
Switch(config)# spanning-tree portfast bpduguard default
2.12 Root Guard and Loop Guard
Root Guard
Root Guard prevents a designated port from becoming a root port because of unexpected superior BPDUs. It is useful at boundaries where another switch must not become the root bridge.
Switch(config)# interface gigabitEthernet 0/24
Switch(config-if)# spanning-tree guard root
Loop Guard
Loop Guard prevents a port that unexpectedly stops receiving BPDUs from moving incorrectly into forwarding. It places the port into a loop-inconsistent state until BPDUs return.
Switch(config)# interface gigabitEthernet 0/23
Switch(config-if)# spanning-tree guard loop
2.13 STP Troubleshooting
| Problem | Check |
|---|---|
| Unexpected root bridge | Bridge priority and MAC address |
| Port is blocking | Root path cost, bridge IDs and topology design |
| Port is err-disabled | BPDU Guard, link flapping or another protection feature |
| Frequent topology changes | Unstable links, incorrect PortFast use or loops |
| Slow endpoint startup | Missing PortFast on a genuine endpoint port |
Switch# show interfaces status err-disabled
Switch# show errdisable recovery
Switch# show spanning-tree detail
Switch# show logging
- Add three switches in a triangle topology.
- Connect each switch with redundant links.
- Observe which port STP blocks.
- Use
show spanning-treeto identify the root bridge. - Change the root switch priority.
- Disconnect a forwarding link and observe reconvergence.
- Bundle two parallel links using LACP.
- Verify the port-channel with
show etherchannel summary. - Configure PortFast and BPDU Guard on an endpoint port.
- Connect another switch to that port and observe the protection response.
Network Access Review
1. What is the purpose of a trunk?
It transports traffic for multiple VLANs across one physical link.
2. What does EtherChannel provide?
Logical link aggregation, increased capacity and redundancy.
3. Why does STP block a redundant port?
To prevent a Layer 2 loop while retaining the link as a possible backup.
4. What is the root bridge?
The switch elected by STP as the reference point for calculating paths.
5. What does BPDU Guard do?
It protects an edge port by disabling it when an unexpected BPDU arrives.
6. What happens if both LACP peers are passive?
LACP does not initiate, so the EtherChannel normally does not form.
2.14 Wireless LAN Architecture
Enterprise wireless networks separate the wireless access function from centralized management. Access points provide radio connectivity, while a wireless LAN controller manages configuration, security and mobility.
Autonomous and Lightweight Access Points
| Type | Management model | Typical use |
|---|---|---|
| Autonomous AP | Configured individually | Small or simple deployments |
| Lightweight AP | Managed by a wireless controller | Enterprise WLANs |
| Cloud-managed AP | Managed through a cloud platform | Distributed branches and simplified operations |
2.15 Access Point Modes
| Mode | Purpose |
|---|---|
| Local | Provides normal WLAN client access |
| Monitor | Scans for wireless activity and security threats |
| Sniffer | Captures wireless frames for analysis |
| Rogue detector | Helps identify unauthorized access points |
| FlexConnect | Allows local branch operation with controller management |
| Bridge | Connects networks over a wireless bridge link |
2.16 WLAN Components
SSID and WLAN Policy
A WLAN profile associates an SSID with security, VLAN and traffic policies. Different user groups can receive different access policies.
CAPWAP
Control and Provisioning of Wireless Access Points, or CAPWAP, is used between lightweight access points and wireless LAN controllers.
| CAPWAP traffic | Purpose | Default UDP port |
|---|---|---|
| Control | AP management and control messages | UDP 5246 |
| Data | Client data transported through the AP/controller tunnel | UDP 5247 |
AP Discovery
An access point must discover a controller before it can obtain centralized configuration. Discovery may use DHCP information, DNS, broadcast or a statically configured controller address, depending on the deployment.
2.17 Wireless Security
Personal Authentication
Personal wireless networks use a shared passphrase. Every authorized user receives the same secret.
SSID: Home-WiFi
Security: WPA2-Personal
Passphrase: Shared secret
Enterprise Authentication
Enterprise WLANs use 802.1X. A client authenticates through an access point and controller to a centralized authentication server, commonly RADIUS.
| 802.1X role | Device |
|---|---|
| Supplicant | Wireless client requesting access |
| Authenticator | Access point or network device controlling the connection |
| Authentication server | RADIUS server validating credentials and returning policy |
2.18 Wireless Channel Planning
Access points should use channel assignments that minimize co-channel and adjacent-channel interference. Channel planning considers location, power, coverage, client density and regulatory restrictions.
2.4 GHz Example
In many regulatory domains, channels 1, 6 and 11 are commonly selected because they do not overlap with one another in the 2.4 GHz band.
Signal and Coverage
| Observation | Likely interpretation |
|---|---|
| Strong signal but slow service | Congestion, interference or upstream network issue |
| Weak signal at room edge | Distance, walls or poor AP placement |
| Frequent roaming | Coverage overlap or unstable signal |
| High retries | Interference, low signal or client transmission issues |
2.19 Wireless Troubleshooting
Client Cannot See the SSID
- Confirm the access point is powered and operational.
- Check whether the SSID is hidden.
- Verify the client supports the configured frequency and security.
- Check channel utilization and radio configuration.
- Confirm the WLAN is enabled on the controller.
Client Sees SSID but Cannot Authenticate
- Check the passphrase for personal authentication.
- Verify the client certificate or credentials for enterprise authentication.
- Check RADIUS reachability and shared secret configuration.
- Confirm date and time where certificates are used.
- Review controller and authentication-server logs.
Client Authenticates but Has No IP Address
- Confirm the client is mapped to the correct VLAN.
- Verify DHCP service and DHCP relay configuration.
- Check the trunk between the AP/controller and switch.
- Confirm the VLAN exists and is allowed on trunks.
- Check the default gateway and DHCP scope.
Useful Commands
Switch# show vlan brief
Switch# show interfaces trunk
Switch# show power inline
Switch# show mac address-table dynamic
Switch# show cdp neighbors
Switch# show lldp neighbors
- Add a wireless router or access point and two wireless clients.
- Configure an SSID named
Training-WiFi. - Enable WPA2-Personal security with a strong test passphrase.
- Connect both clients to the SSID.
- Verify that each client receives an IP address.
- Ping the wireless gateway.
- Change the passphrase and observe authentication failure.
- Restore the correct passphrase and test connectivity again.
- Document the SSID, security method, VLAN and IP network.
Network Access Final Review
1. What is the difference between an access port and a trunk?
An access port normally carries one VLAN. A trunk carries multiple VLANs and identifies them using tagging.
2. What protocol negotiates many Cisco EtherChannels?
LACP is the standards-based protocol. PAgP is Cisco proprietary.
3. Why does STP block a port?
To eliminate a Layer 2 loop while preserving a redundant path.
4. What does CAPWAP provide?
Control and data communication between lightweight access points and a wireless LAN controller.
5. What server commonly supports 802.1X authentication?
A RADIUS authentication server.
6. What should you check if a WLAN client authenticates but receives no IP address?
VLAN mapping, trunk configuration, DHCP service or relay, DHCP scope and default gateway.
3. IP Connectivity
IP connectivity explains how routers learn networks, choose paths and forward packets between different subnets.
3.1 How a Router Forwards Packets
- Receives an Ethernet frame on an active interface.
- Removes the Layer 2 header and examines the destination IP address.
- Searches its routing table.
- Selects the best matching route.
- Decrements the IPv4 TTL or IPv6 Hop Limit.
- Creates a new Layer 2 frame for the outgoing interface.
- Forwards the packet to the next hop.
3.2 The Routing Table
A routing table contains network destinations, prefix lengths, next hops and outgoing interfaces. Routes may be learned as connected, static or dynamic routes.
Router# show ip route
Codes: C - connected, S - static, O - OSPF, L - local
C 192.168.10.0/24 is directly connected, GigabitEthernet0/0
L 192.168.10.1/32 is directly connected, GigabitEthernet0/0
O 192.168.20.0/24 [110/2] via 10.0.0.2, 00:00:18, GigabitEthernet0/1
S* 0.0.0.0/0 [1/0] via 10.0.0.1
| Code | Meaning |
|---|---|
| C | Connected network |
| L | Local interface address |
| S | Static route |
| O | OSPF route |
| * | Candidate default route |
3.3 Longest-Prefix Match
When several routes match a destination, the router chooses the route with the longest prefix—the most specific route.
| Route | Matches 10.20.30.50? | Specificity |
|---|---|---|
| 10.0.0.0/8 | Yes | Least specific |
| 10.20.0.0/16 | Yes | More specific |
| 10.20.30.0/24 | Yes | Most specific; selected |
3.4 Route Selection
If routes to the same destination have different administrative distances, the route with the lower administrative distance is preferred.
| Source | Typical administrative distance |
|---|---|
| Connected | 0 |
| Static | 1 |
| OSPF | 110 |
| RIP | 120 |
| Unknown or unusable | 255 |
If routes come from the same routing source, the routing protocol's metric determines the preferred path.
3.5 Connected Routes
When an interface has an IP address and is operational, the router installs a connected route for the subnet and a local host route for the interface address.
Router(config)# interface gigabitEthernet 0/0
Router(config-if)# ip address 192.168.10.1 255.255.255.0
Router(config-if)# no shutdown
Router# show ip route connected
C 192.168.10.0/24 is directly connected, GigabitEthernet0/0
L 192.168.10.1/32 is directly connected, GigabitEthernet0/0
3.6 Static Routes
A static route is manually configured by an administrator. It does not change automatically when the topology changes unless tracking or another mechanism is used.
Next-Hop Static Route
Router(config)# ip route 192.168.20.0 255.255.255.0 10.0.0.2
Exit-Interface Static Route
Router(config)# ip route 192.168.20.0 255.255.255.0 gigabitEthernet 0/1
Fully Specified Static Route
Router(config)# ip route 192.168.20.0 255.255.255.0 \
gigabitEthernet 0/1 10.0.0.2
IPv6 Static Route
Router(config)# ipv6 route 2001:db8:20::/64 2001:db8:12::2
3.7 Default Routes
A default route matches destinations for which no more specific route exists. It is also called the gateway of last resort.
IPv4 Default Route
Router(config)# ip route 0.0.0.0 0.0.0.0 203.0.113.1
IPv6 Default Route
Router(config)# ipv6 route ::/0 2001:db8:ffff::1
3.8 Floating Static Routes
A floating static route is a backup route configured with a higher administrative distance than the primary route.
! Primary static route
Router(config)# ip route 192.168.20.0 255.255.255.0 10.0.0.2 1
! Backup floating route
Router(config)# ip route 192.168.20.0 255.255.255.0 10.0.1.2 200
3.9 Routing Table Verification
Router# show ip route
Router# show ip route 192.168.20.0
Router# show ip cef
Router# show ip protocols
Router# ping 192.168.20.10
Router# traceroute 192.168.20.10
| Command | Purpose |
|---|---|
show ip route |
Displays the IPv4 routing table |
show ip route <network> |
Shows the selected route to a destination |
ping |
Tests reachability |
traceroute |
Shows Layer 3 hops toward a destination |
- Add three routers and one LAN at each router.
- Assign unique /24 LAN networks.
- Assign /30 transit networks between routers.
- Configure all interfaces and verify they are up/up.
- Add static routes to every remote LAN.
- Use
show ip routeto verify each route. - Ping from a PC on the first LAN to a PC on the third LAN.
- Use
tracerouteto identify the router path. - Add a default route toward the simulated internet.
- Configure a floating backup route and test failover.
IP Connectivity Review
1. What is longest-prefix matching?
Selecting the route with the most specific matching prefix.
2. What does a default route do?
It forwards traffic when no more specific route exists.
3. What is a floating static route?
A backup static route with a higher administrative distance than the primary route.
4. Which has a lower administrative distance: static or OSPF?
Static routing normally has a lower value: 1 versus OSPF's 110.
5. What creates a connected route?
An operational router interface configured with an IP address and subnet mask.
3.10 OSPFv2 Fundamentals
Open Shortest Path First version 2, or OSPFv2, is a link-state routing protocol for IPv4. Routers exchange link-state information, build a common topology database and calculate shortest paths using the SPF algorithm.
Why Use OSPF?
- Automatically learns remote networks
- Converges after topology changes
- Supports hierarchical areas
- Uses cost as its path metric
- Supports classless IPv4 prefixes and VLSM
- Uses authentication options
OSPF Single Area
A small network can place all OSPF interfaces in area 0. Area 0 is also called the backbone area.
3.11 OSPF Neighbour Relationships
OSPF routers become neighbours before exchanging routing information. Neighbour formation requires compatible settings.
| Requirement | Explanation |
|---|---|
| Same area | Interfaces must belong to the same OSPF area |
| Matching timers | Hello and dead intervals must match |
| Same network type | Interfaces must use compatible OSPF network types |
| Authentication | If enabled, credentials must match |
| Reachability | Interfaces must be operational and able to exchange OSPF packets |
OSPF Neighbour States
| State | Meaning |
|---|---|
| Down | No Hello packet received from the neighbour |
| Init | A Hello was received, but the router's own ID was not seen in it |
| 2-Way | Bidirectional Hello communication exists |
| ExStart | Routers negotiate master and slave roles |
| Exchange | Database description packets are exchanged |
| Loading | Missing link-state information is requested |
| Full | Link-state databases are synchronized |
3.12 Configuring OSPF
Classic OSPF Configuration
R1(config)# router ospf 1
R1(config-router)# router-id 1.1.1.1
R1(config-router)# network 192.168.10.0 0.0.0.255 area 0
R1(config-router)# network 10.0.12.0 0.0.0.3 area 0
The number after router ospf is locally significant. It does
not need to match on neighbouring routers.
Interface-Based OSPF Configuration
R1(config)# interface gigabitEthernet 0/0
R1(config-if)# ip ospf 1 area 0
R1(config)# interface gigabitEthernet 0/1
R1(config-if)# ip ospf 1 area 0
Example: Three-Router OSPF Network
! R1
R1(config)# router ospf 1
R1(config-router)# router-id 1.1.1.1
R1(config-router)# network 192.168.10.0 0.0.0.255 area 0
R1(config-router)# network 10.0.12.0 0.0.0.3 area 0
! R2
R2(config)# router ospf 1
R2(config-router)# router-id 2.2.2.2
R2(config-router)# network 10.0.12.0 0.0.0.3 area 0
R2(config-router)# network 10.0.23.0 0.0.0.3 area 0
! R3
R3(config)# router ospf 1
R3(config-router)# router-id 3.3.3.3
R3(config-router)# network 10.0.23.0 0.0.0.3 area 0
R3(config-router)# network 192.168.30.0 0.0.0.255 area 0
3.13 OSPF Router ID
Every OSPF router requires a unique router ID. The selection order is:
- Manually configured router ID
- Highest loopback interface address
- Highest active physical interface address
Router(config)# router ospf 1
Router(config-router)# router-id 10.10.10.10
If the router ID changes after OSPF is already running, restart the OSPF process or reload the router as appropriate.
Router# clear ip ospf process
Reset ALL OSPF processes? [no]: yes
3.14 OSPF Passive Interfaces
A passive interface advertises its connected network into OSPF but does not form OSPF neighbour relationships on that interface.
Router(config)# router ospf 1
Router(config-router)# passive-interface gigabitEthernet 0/0
This is useful on user LANs where no OSPF neighbour should exist.
Router(config)# router ospf 1
Router(config-router)# passive-interface default
Router(config-router)# no passive-interface gigabitEthernet 0/1
Router(config-router)# no passive-interface gigabitEthernet 0/2
3.15 OSPF Metric and Cost
OSPF uses cost as its metric. Lower total cost is preferred. The cost is commonly calculated from reference bandwidth divided by interface bandwidth.
Router# show ip ospf interface gigabitEthernet 0/1
GigabitEthernet0/1 is up, line protocol is up
Internet Address 10.0.12.1/30, Area 0
Process ID 1, Router ID 1.1.1.1
Network Type POINT-TO-POINT, Cost: 10
Changing Interface Cost
Router(config)# interface gigabitEthernet 0/1
Router(config-if)# ip ospf cost 20
Changing Reference Bandwidth
Router(config)# router ospf 1
Router(config-router)# auto-cost reference-bandwidth 100000
3.16 OSPF Network Types
| Network type | Typical medium | DR/BDR election |
|---|---|---|
| Broadcast | Ethernet | Yes |
| Point-to-point | Point-to-point WAN or configured Ethernet link | No |
| Non-broadcast multiaccess | Older NBMA technologies | Yes, with special operation |
Configuring Point-to-Point Network Type
Router(config)# interface gigabitEthernet 0/1
Router(config-if)# ip ospf network point-to-point
3.17 DR and BDR
On a broadcast multiaccess network, OSPF elects a Designated Router and Backup Designated Router. This reduces the number of full adjacency relationships required.
| Election factor | Priority |
|---|---|
| Highest OSPF interface priority | Preferred |
| Highest router ID | Used as tie-breaker |
Router(config)# interface gigabitEthernet 0/1
Router(config-if)# ip ospf priority 100
A priority of zero prevents an interface from becoming DR or BDR.
Router(config-if)# ip ospf priority 0
3.18 OSPF Verification
Router# show ip ospf
Router# show ip ospf neighbor
Router# show ip ospf interface brief
Router# show ip ospf interface gigabitEthernet 0/1
Router# show ip route ospf
Router# show ip protocols
Example Neighbour Output
Router# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/ - 00:00:31 10.0.12.2 Gi0/1
3.3.3.3 1 FULL/DR 00:00:32 192.168.1.3 Gi0/0
3.19 OSPF Troubleshooting
| Symptom | Possible cause |
|---|---|
| No neighbour appears | Interface down, wrong network statement or passive interface |
| Neighbour stuck in Init | One-way communication or filtering |
| Neighbour stuck in ExStart | MTU mismatch or duplicate router ID |
| Routes missing | Incorrect area, network statement or passive configuration |
| Unexpected path selected | OSPF cost or reference-bandwidth issue |
Router# show ip interface brief
Router# show ip ospf neighbor
Router# show ip ospf interface
Router# show ip route
Router# show access-lists
Router# show logging
- Add three routers in a triangle topology.
- Configure /30 transit networks between routers.
- Add one /24 LAN to each router.
- Configure unique OSPF router IDs.
- Advertise every transit and LAN network in area 0.
- Verify neighbour relationships with
show ip ospf neighbor. - Verify learned routes with
show ip route ospf. - Make each user-facing interface passive.
- Change one interface cost and observe route selection.
- Shut down a transit link and verify OSPF reconvergence.
OSPF Review
1. What type of routing protocol is OSPF?
It is a link-state interior gateway protocol.
2. What is the purpose of area 0?
It is the OSPF backbone area and the required central area in a multi-area design.
3. What metric does OSPF use?
Cost, usually related to interface bandwidth.
4. What is a passive interface?
It advertises the connected network but does not form OSPF neighbour relationships on that interface.
5. Why are DR and BDR elected?
To reduce the number of full OSPF adjacencies on a broadcast multiaccess network.
4. IP Services
IP services provide address assignment, name resolution, time synchronization, monitoring, secure administration and traffic handling.
4.1 Network Address Translation
NAT translates one IP address into another. It commonly translates private internal IPv4 addresses into a public address for internet access.
| Term | Meaning |
|---|---|
| Inside local | Private address assigned to an internal device |
| Inside global | Public address representing an internal device |
| Outside global | Address assigned to an external destination |
| Outside local | External address as seen from the inside network |
Static NAT
Static NAT creates a permanent one-to-one mapping between an inside local and inside global address.
Router(config)# ip nat inside source static \
192.168.10.10 203.0.113.10
Router(config)# interface gigabitEthernet 0/0
Router(config-if)# ip nat inside
Router(config)# interface gigabitEthernet 0/1
Router(config-if)# ip nat outside
Dynamic NAT
Dynamic NAT maps inside addresses to addresses from a configured public pool. The mapping exists while the translation is active.
Router(config)# ip nat pool PUBLIC_POOL \
203.0.113.20 203.0.113.30 netmask 255.255.255.0
Router(config)# access-list 1 permit 192.168.10.0 0.0.0.255
Router(config)# ip nat inside source list 1 pool PUBLIC_POOL
PAT Overload
Port Address Translation allows many inside devices to share one public address by distinguishing sessions with transport-layer port numbers.
Router(config)# access-list 1 permit 192.168.10.0 0.0.0.255
Router(config)# ip nat inside source list 1 interface gigabitEthernet 0/1 overload
NAT Verification
Router# show ip nat translations
Router# show ip nat statistics
Router# clear ip nat translation *
4.2 DHCPv4
Dynamic Host Configuration Protocol automatically supplies IPv4 configuration such as address, subnet mask, default gateway and DNS server.
DORA Process
- Discover: Client broadcasts a request for DHCP servers.
- Offer: A DHCP server offers an address.
- Request: The client requests the offered configuration.
- Acknowledgement: The server confirms the lease.
Router as DHCP Server
Router(config)# ip dhcp excluded-address 192.168.10.1 192.168.10.20
Router(config)# ip dhcp pool USERS
Router(dhcp-config)# network 192.168.10.0 255.255.255.0
Router(dhcp-config)# default-router 192.168.10.1
Router(dhcp-config)# dns-server 192.168.10.5
Router(dhcp-config)# domain-name example.local
Router(dhcp-config)# lease 7
DHCP Verification
Router# show ip dhcp binding
Router# show ip dhcp pool
Router# show ip dhcp conflict
4.3 DHCP Relay
DHCP broadcasts normally do not cross routers. A DHCP relay forwards client requests to a DHCP server located on another network.
Router(config)# interface gigabitEthernet 0/0
Router(config-if)# ip helper-address 192.168.50.10
ip helper-address so local clients can reach the server.
4.4 DNS
The Domain Name System translates human-readable names into IP addresses.
Client query:
www.example.com
DNS response:
203.0.113.80
intranet.company.example more easily than an
IP address. DNS lets applications use names while networks use addresses.
Router DNS Lookup
Router(config)# ip name-server 192.168.10.5
Router(config)# ip domain lookup
Router# ping server.example.local
Router# nslookup www.example.com
4.5 NTP
Network Time Protocol synchronizes clocks across network devices. Accurate time is important for logs, certificates, authentication and troubleshooting.
Router(config)# ntp server 192.168.50.10
Router# show clock
Router# show ntp status
Router# show ntp associations
4.6 Syslog
Syslog sends device messages to a centralized logging server. Messages are classified by severity from 0, emergencies, to 7, debugging.
| Severity | Name |
|---|---|
| 0 | Emergency |
| 1 | Alert |
| 2 | Critical |
| 3 | Error |
| 4 | Warning |
| 5 | Notification |
| 6 | Informational |
| 7 | Debugging |
Router(config)# logging host 192.168.50.20
Router(config)# logging trap warnings
Router(config)# service timestamps log datetime msec
4.7 SNMP
Simple Network Management Protocol allows monitoring systems to collect information and receive alerts from network devices.
| SNMP component | Role |
|---|---|
| Manager | Monitoring platform requesting information |
| Agent | Software running on the monitored device |
| MIB | Structured collection of manageable objects |
| Trap | Unsolicited alert sent by the device |
Router(config)# snmp-server community MONITORING ro
Router(config)# snmp-server host 192.168.50.30 version 2c MONITORING
Router(config)# snmp-server enable traps
4.8 Quality of Service
Quality of Service, or QoS, classifies and prioritizes traffic when network resources are congested.
| QoS concept | Purpose |
|---|---|
| Classification | Identifies traffic types |
| Marking | Adds a value indicating traffic treatment |
| Queuing | Determines transmission order during congestion |
| Shaping | Buffers traffic to smooth the sending rate |
| Policing | Limits traffic and may drop or remark excess packets |
4.9 Secure Remote Access with SSH
Secure Shell provides encrypted remote administration. It is preferred over Telnet, which sends credentials and commands without strong encryption.
Router(config)# hostname R1
R1(config)# ip domain-name example.local
R1(config)# username admin privilege 15 secret StrongPasswordHere
R1(config)# crypto key generate rsa modulus 2048
R1(config)# ip ssh version 2
R1(config)# line vty 0 4
R1(config-line)# login local
R1(config-line)# transport input ssh
R1(config-line)# exit
SSH Verification
R1# show ip ssh
R1# show users
R1# show running-config | section line vty
4.10 FTP and TFTP
TFTP is a simple file-transfer protocol often used for configuration and image transfers. FTP provides more features and authentication options.
Router# copy running-config tftp:
Router# copy tftp: running-config
Router# copy flash: tftp:
Router# copy tftp: flash:
IP Services Lab
- Configure a router as a DHCP server for a user LAN.
- Exclude the gateway and infrastructure addresses.
- Configure PAT using the router's WAN interface.
- Configure a static NAT mapping for an internal web server.
- Configure a DNS server and test name resolution.
- Configure NTP and verify the clock source.
- Configure a remote syslog server.
- Enable SSH and disable Telnet on the VTY lines.
- Test each service and document the verification command.
IP Services Review
1. What does PAT use to distinguish many sessions?
Transport-layer port numbers.
2. What is the purpose of DHCP relay?
It forwards DHCP requests across a router to a DHCP server on another network.
3. Why is NTP important?
It synchronizes device clocks, improving logging, authentication and troubleshooting.
4. Why is SSH preferred to Telnet?
SSH encrypts the management session; Telnet does not provide equivalent protection.
5. What does QoS address?
It manages traffic treatment during congestion, including delay-sensitive voice and video traffic.
5. Security Fundamentals
Network security protects confidentiality, integrity and availability. Good security combines people, processes, technology and continuous monitoring.
5.1 The CIA Triad
| Principle | Meaning | Example |
|---|---|---|
| Confidentiality | Only authorized people can view information | Encryption and access control |
| Integrity | Information is not changed improperly | Hashes and digital signatures |
| Availability | Systems remain accessible when needed | Redundancy and backups |
5.2 Common Network Threats
| Threat | Description | Example |
|---|---|---|
| Malware | Malicious software | Ransomware encrypts company files |
| Phishing | Fraudulent message designed to steal information | Fake login page sent by email |
| Denial of service | Overwhelming a service to reduce availability | Large volumes of malicious requests |
| Man-in-the-middle | Attacker intercepts communication | Rogue access point captures traffic |
| Spoofing | Attacker pretends to be another device | Forged source IP or MAC address |
| Social engineering | Manipulating people rather than systems | Attacker impersonates an employee |
5.3 Device Hardening
Device hardening reduces the attack surface by disabling unnecessary services, enforcing authentication and controlling administrative access.
Basic Secure Configuration
Router(config)# hostname R1
R1(config)# enable secret StrongEnableSecret
R1(config)# service password-encryption
R1(config)# security passwords min-length 12
R1(config)# login block-for 120 attempts 3 within 60
R1(config)# username admin privilege 15 secret StrongAdminSecret
R1(config)# ip domain-name secure.example
R1(config)# crypto key generate rsa modulus 2048
R1(config)# ip ssh version 2
R1(config)# line console 0
R1(config-line)# login local
R1(config-line)# exec-timeout 5 0
R1(config-line)# logging synchronous
R1(config)# line vty 0 4
R1(config-line)# login local
R1(config-line)# transport input ssh
R1(config-line)# exec-timeout 5 0
Disable an Unused Interface
Switch(config)# interface range gigabitEthernet 0/10 - 24
Switch(config-if-range)# shutdown
Switch(config-if-range)# description UNUSED
5.4 Management Plane, Control Plane and Data Plane
| Plane | Purpose | Protection example |
|---|---|---|
| Management plane | Device administration | SSH, AAA and management ACLs |
| Control plane | Routing and network control protocols | Routing authentication and control-plane policing |
| Data plane | Forwarding user traffic | ACLs and segmentation |
5.5 AAA
AAA stands for Authentication, Authorization and Accounting.
| Function | Question answered |
|---|---|
| Authentication | Who are you? |
| Authorization | What are you allowed to do? |
| Accounting | What did you do? |
Local AAA
Router(config)# username admin privilege 15 secret LocalSecret
Router(config)# aaa new-model
Router(config)# aaa authentication login default local
Router(config)# aaa authorization exec default local
Router(config)# line vty 0 4
Router(config-line)# login authentication default
RADIUS and TACACS+
| Feature | RADIUS | TACACS+ |
|---|---|---|
| Common use | Network access and 802.1X | Device administration |
| Transport | UDP | TCP |
| Encryption | Primarily password protection | Encrypts the complete payload |
| Authorization | Supported | Detailed command authorization |
5.6 Access Control Lists
An ACL is an ordered list of permit and deny statements. Routers process entries from top to bottom and stop at the first match.
Standard IPv4 ACL
A standard ACL filters primarily by source IPv4 address.
Router(config)# access-list 10 deny host 192.168.10.50
Router(config)# access-list 10 permit any
Router(config)# interface gigabitEthernet 0/0
Router(config-if)# ip access-group 10 in
Named Standard ACL
Router(config)# ip access-list standard BLOCK-HOST
Router(config-std-nacl)# deny host 192.168.10.50
Router(config-std-nacl)# permit any
Router(config)# interface gigabitEthernet 0/0
Router(config-if)# ip access-group BLOCK-HOST in
Extended IPv4 ACL
Extended ACLs can filter by source, destination, protocol and port.
Router(config)# ip access-list extended ALLOW-WEB
Router(config-ext-nacl)# permit tcp 192.168.10.0 0.0.0.255 \
host 192.168.20.10 eq 443
Router(config-ext-nacl)# deny ip any host 192.168.20.10
Router(config-ext-nacl)# permit ip any any
Router(config)# interface gigabitEthernet 0/1
Router(config-if)# ip access-group ALLOW-WEB out
ACL Placement
- Standard ACL: place close to the destination because it cannot identify the destination.
- Extended ACL: place close to the source to stop unwanted traffic early.
ACL Verification
Router# show access-lists
Router# show ip interface gigabitEthernet 0/0
Router# show running-config | section access-list
5.7 IPv6 ACLs
IPv6 ACLs are named and use commands beginning with
ipv6 access-list.
Router(config)# ipv6 access-list V6-FILTER
Router(config-ipv6-acl)# permit tcp 2001:db8:10::/64 \
host 2001:db8:20::10 eq 443
Router(config-ipv6-acl)# deny ipv6 any host 2001:db8:20::10
Router(config-ipv6-acl)# permit ipv6 any any
Router(config)# interface gigabitEthernet 0/1
Router(config-if)# ipv6 traffic-filter V6-FILTER out
5.8 Layer 2 Security
Port Security
Port security limits which MAC addresses can use a switch port.
Switch(config)# interface gigabitEthernet 0/5
Switch(config-if)# switchport mode access
Switch(config-if)# switchport port-security
Switch(config-if)# switchport port-security maximum 2
Switch(config-if)# switchport port-security mac-address sticky
Switch(config-if)# switchport port-security violation restrict
| Violation mode | Behaviour |
|---|---|
| Protect | Drops unauthorized frames silently |
| Restrict | Drops frames and increments counters or logs events |
| Shutdown | Places the port into err-disabled state |
Switch# show port-security
Switch# show port-security interface gigabitEthernet 0/5
DHCP Snooping
DHCP snooping filters untrusted DHCP messages and builds a binding table. Only trusted ports should connect to legitimate DHCP servers or uplinks.
Switch(config)# ip dhcp snooping
Switch(config)# ip dhcp snooping vlan 10,20
Switch(config)# interface gigabitEthernet 0/24
Switch(config-if)# ip dhcp snooping trust
Dynamic ARP Inspection
Dynamic ARP Inspection validates ARP messages using the DHCP snooping binding table and helps prevent ARP spoofing.
Switch(config)# ip arp inspection vlan 10,20
Switch(config)# interface gigabitEthernet 0/24
Switch(config-if)# ip arp inspection trust
IP Source Guard
IP Source Guard filters traffic using IP-to-MAC bindings learned through DHCP snooping.
Switch(config)# interface gigabitEthernet 0/5
Switch(config-if)# ip verify source
5.9 Wireless Security
- Use WPA2 or WPA3 instead of obsolete WEP.
- Use long, unique passphrases for personal WLANs.
- Use 802.1X and RADIUS for enterprise authentication.
- Separate guest traffic from internal traffic.
- Disable unnecessary management access from guest networks.
- Monitor for rogue access points.
5.10 VPN Concepts
A Virtual Private Network creates a protected logical connection across an untrusted network. Encryption, authentication and integrity protection help secure the traffic.
| VPN type | Example use |
|---|---|
| Remote-access VPN | Employee securely connects from home |
| Site-to-site VPN | Two offices connect securely over the internet |
| IPsec VPN | Provides authentication, encryption and integrity at Layer 3 |
5.11 Security Monitoring
Security is not complete after configuration. Administrators should monitor logs, authentication events, interface changes, failed access attempts and abnormal traffic.
Router# show logging
Router# show users
Router# show login
Router# show access-lists
Router# show ip ssh
Router# show interfaces counters errors
Security Fundamentals Lab
- Configure an enable secret and local administrative user.
- Enable SSH and allow SSH only on VTY lines.
- Set console and VTY session timeouts.
- Disable unused switch ports.
- Configure port security on an employee access port.
- Configure a standard or extended ACL.
- Verify ACL matches and port-security status.
- Configure DHCP snooping on the user VLAN.
- Trust only the legitimate DHCP-server or uplink port.
- Document every security control and its purpose.
Security Review
1. What are the three CIA principles?
Confidentiality, integrity and availability.
2. What is the implicit rule at the end of an ACL?
An implicit deny.
3. What does AAA stand for?
Authentication, Authorization and Accounting.
4. What does DHCP snooping prevent?
It helps block unauthorized DHCP-server messages and builds trusted IP-to-MAC bindings.
5. What is the purpose of port security?
To restrict which MAC addresses may use a switch port.
6. Why is SSH preferred over Telnet?
SSH encrypts remote-management traffic, while Telnet sends it insecurely.
6. Automation and Programmability
Automation uses software to configure, monitor and operate networks. Programmability makes network operations more consistent, repeatable and scalable.
6.1 Traditional and Controller-Based Networking
In traditional networking, an administrator configures each device individually. In controller-based networking, a centralized controller manages policy and communicates with network devices through APIs.
| Approach | Characteristics |
|---|---|
| Traditional | Device-by-device configuration through CLI |
| Controller-based | Central policy and programmatic device management |
| Intent-based | Administrator describes desired outcome; system implements policy |
6.2 Software-Defined Networking
Software-defined networking separates the control plane from the data plane. A controller makes policy decisions, while network devices forward traffic according to those decisions.
6.3 Northbound and Southbound APIs
| API direction | Connects |
|---|---|
| Northbound | Applications and the controller |
| Southbound | Controller and network devices |
6.4 REST APIs
Representational State Transfer APIs commonly use HTTP methods to manipulate resources.
| HTTP method | Typical action |
|---|---|
| GET | Read a resource |
| POST | Create a resource |
| PUT | Replace or update a resource |
| PATCH | Partially update a resource |
| DELETE | Remove a resource |
HTTP Status Codes
| Code | Meaning |
|---|---|
| 200 | Successful request |
| 201 | Resource created |
| 400 | Bad request |
| 401 | Authentication required or failed |
| 403 | Request understood but not permitted |
| 404 | Resource not found |
| 500 | Server-side error |
Example REST Request
GET https://controller.example/api/v1/devices
Response:
200 OK
6.5 JSON
JavaScript Object Notation is a lightweight data format commonly used by REST APIs.
{
"device": {
"hostname": "SW1",
"management_ip": "192.168.10.2",
"vlans": [10, 20, 30],
"enabled": true
}
}
| JSON element | Example |
|---|---|
| Object | { "name": "SW1" } |
| Array | [10, 20, 30] |
| String | "hostname" |
| Number | 10 |
| Boolean | true or false |
6.6 YAML
YAML is a human-readable format commonly used by automation tools.
device:
hostname: SW1
management_ip: 192.168.10.2
vlans:
- 10
- 20
- 30
enabled: true
6.7 Python for Network Automation
Python can connect to devices, collect command output, transform data and apply repeatable configuration.
devices = [
{"hostname": "R1", "address": "192.168.10.1"},
{"hostname": "R2", "address": "192.168.20.1"}
]
for device in devices:
print("Checking", device["hostname"], device["address"])
Simple JSON Processing
import json
data = '''
{
"hostname": "SW1",
"vlans": [10, 20, 30]
}
'''
device = json.loads(data)
print(device["hostname"])
print(device["vlans"])
Configuration Generation
hostname = "ACCESS-SW1"
management_ip = "192.168.10.2"
configuration = f"""
hostname {hostname}
interface vlan 10
ip address {management_ip} 255.255.255.0
no shutdown
"""
print(configuration)
6.8 Configuration Management
Configuration-management tools describe the desired state of systems and help apply it consistently.
| Concept | Meaning |
|---|---|
| Desired state | How the device should be configured |
| Idempotence | Repeating a task produces the same final state |
| Inventory | List of managed devices and their properties |
| Playbook | Automation instructions describing tasks |
| Template | Reusable configuration with variables |
Example Ansible-Style YAML
---
- name: Configure access VLAN
hosts: switches
gather_facts: false
tasks:
- name: Create users VLAN
ios_vlans:
config:
- name: USERS
vlan_id: 10
state: merged
6.9 Controller-Based Architecture Examples
| Controller type | Primary focus |
|---|---|
| LAN controller | Campus switching, policy and assurance |
| Wireless controller | Access-point and WLAN management |
| WAN controller | WAN path, application and branch policy |
| Cloud management platform | Centralized management of distributed infrastructure |
6.10 Data Analytics and Machine Learning
Network platforms can collect telemetry and use analytics to identify trends, anomalies and likely faults.
| Term | Simple meaning |
|---|---|
| Telemetry | Continuous operational data from network devices |
| Analytics | Finding patterns and useful information in data |
| Machine learning | Using data to identify patterns or make predictions |
| Artificial intelligence | Broader methods for systems performing tasks associated with human intelligence |
6.11 Automation Benefits and Risks
Benefits
- Faster deployment
- Consistent configuration
- Reduced typing errors
- Repeatable changes
- Improved auditability
- Scalability
Risks
- A faulty template can affect many devices quickly.
- Exposed credentials can compromise the network.
- Unvalidated changes may cause outages.
- Automation can amplify mistakes.
Automation Lab
- Create a list of three fictional network devices.
- Store hostname, management IP and device role for each device.
- Loop through the list and print a health-check message.
- Store the same information in JSON format.
- Load the JSON file with Python.
- Generate a simple interface configuration from variables.
- Never place real credentials in the script.
- Extend the script to validate that every device has an IP address.
Automation Review
1. What is the difference between northbound and southbound APIs?
Northbound APIs connect applications to a controller. Southbound APIs connect the controller to network devices.
2. What does GET normally do in a REST API?
It retrieves a resource.
3. What is JSON used for?
It represents structured data exchanged between applications and APIs.
4. What does idempotence mean?
Repeating an automation task produces the same intended final state.
5. Why should automation be tested before production use?
An incorrect script or template can apply damaging changes to many devices very quickly.
7. Practical CCNA Labs
These labs combine the main CCNA skills. Build each topology in Cisco Packet Tracer, configure it manually and verify every result.
Lab 1: Basic Router and Switch Setup
- Add one PC, one switch and one router.
- Connect the devices with copper Ethernet links.
- Configure the router interface as 192.168.10.1/24.
- Configure the PC as 192.168.10.10/24.
- Set the PC default gateway to 192.168.10.1.
- Configure the hostname and an enable secret.
- Ping the router from the PC.
- Verify with
show ip interface brief.
Router(config)# hostname R1
R1(config)# enable secret CiscoSecret
R1(config)# interface gigabitEthernet 0/0
R1(config-if)# ip address 192.168.10.1 255.255.255.0
R1(config-if)# no shutdown
Lab 2: VLANs and Inter-VLAN Routing
- Add one router, one switch and two PCs.
- Create VLAN 10 for users and VLAN 20 for servers.
- Assign one PC to each VLAN.
- Configure the switch-to-router link as a trunk.
- Create router subinterfaces for VLANs 10 and 20.
- Configure the correct default gateway on each PC.
- Ping between the two VLANs.
Switch(config)# vlan 10
Switch(config-vlan)# name USERS
Switch(config)# vlan 20
Switch(config-vlan)# name SERVERS
Switch(config)# interface gigabitEthernet 0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 10
Switch(config)# interface gigabitEthernet 0/2
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 20
Switch(config)# interface gigabitEthernet 0/24
Switch(config-if)# switchport mode trunk
Router(config)# interface gigabitEthernet 0/0
Router(config-if)# no shutdown
Router(config)# interface gigabitEthernet 0/0.10
Router(config-subif)# encapsulation dot1Q 10
Router(config-subif)# ip address 192.168.10.1 255.255.255.0
Router(config)# interface gigabitEthernet 0/0.20
Router(config-subif)# encapsulation dot1Q 20
Router(config-subif)# ip address 192.168.20.1 255.255.255.0
Switch# show vlan brief
Switch# show interfaces trunk
Router# show ip interface brief
Lab 3: Static Routing
- Add two routers and one LAN on each side.
- Use 192.168.10.0/24 for LAN 1.
- Use 192.168.20.0/24 for LAN 2.
- Use 10.0.0.0/30 between the routers.
- Configure both router interfaces.
- Add a static route to the remote LAN on each router.
- Test end-to-end connectivity.
R1(config)# ip route 192.168.20.0 255.255.255.0 10.0.0.2
R2(config)# ip route 192.168.10.0 255.255.255.0 10.0.0.1
Lab 4: OSPF
- Use the topology from Lab 3.
- Remove the static routes.
- Configure OSPF process 1 on both routers.
- Assign unique router IDs.
- Advertise LAN and transit networks in area 0.
- Verify the neighbour relationship.
R1(config)# router ospf 1
R1(config-router)# router-id 1.1.1.1
R1(config-router)# network 192.168.10.0 0.0.0.255 area 0
R1(config-router)# network 10.0.0.0 0.0.0.3 area 0
R2(config)# router ospf 1
R2(config-router)# router-id 2.2.2.2
R2(config-router)# network 192.168.20.0 0.0.0.255 area 0
R2(config-router)# network 10.0.0.0 0.0.0.3 area 0
show ip ospf neighbor
show ip route ospf
show ip ospf interface brief
Lab 5: DHCP and NAT
- Configure a router with an inside LAN and outside interface.
- Configure the router as a DHCP server.
- Exclude the gateway addresses.
- Configure PAT using the outside interface.
- Verify that clients receive addresses.
- Test connectivity to an external simulated server.
R1(config)# ip dhcp excluded-address 192.168.10.1 192.168.10.20
R1(config)# ip dhcp pool USERS
R1(dhcp-config)# network 192.168.10.0 255.255.255.0
R1(dhcp-config)# default-router 192.168.10.1
R1(dhcp-config)# dns-server 8.8.8.8
R1(config)# access-list 1 permit 192.168.10.0 0.0.0.255
R1(config)# ip nat inside source list 1 interface gigabitEthernet 0/1 overload
Lab 6: Secure Device Management
- Set a hostname and enable secret.
- Create a local administrator.
- Generate RSA keys.
- Enable SSH version 2.
- Allow SSH only on VTY lines.
- Set an inactivity timeout.
- Verify the configuration.
Router(config)# hostname SECURE-R1
SECURE-R1(config)# ip domain-name lab.example
SECURE-R1(config)# username admin privilege 15 secret AdminSecret
SECURE-R1(config)# crypto key generate rsa modulus 2048
SECURE-R1(config)# ip ssh version 2
SECURE-R1(config)# line vty 0 4
SECURE-R1(config-line)# login local
SECURE-R1(config-line)# transport input ssh
SECURE-R1(config-line)# exec-timeout 5 0
Lab 7: Troubleshooting Challenge
Build a network with the following intentional errors:
- One router interface is shut down.
- One PC has an incorrect subnet mask.
- One switch port is assigned to the wrong VLAN.
- One trunk does not allow VLAN 20.
- One PC has the wrong default gateway.
- One OSPF network statement is incorrect.
Use this troubleshooting order:
- Check physical links and interface status.
- Check VLAN membership and trunk state.
- Check IP addresses and subnet masks.
- Check default gateways.
- Check routing tables.
- Check ACLs and security controls.
- Test with ping, traceroute and protocol-specific commands.
show interfaces status
show vlan brief
show interfaces trunk
show ip interface brief
show ip route
show ip ospf neighbor
show access-lists
ping
traceroute
Lab Completion Checklist
- Every interface has the correct address and mask.
- Every active interface is operational.
- VLANs exist on all required switches.
- Trunks carry the required VLANs.
- Default gateways are correct.
- Routing tables contain all required networks.
- Security controls are verified rather than assumed.
- Configurations are saved after testing.
Router# copy running-config startup-config
8. Final CCNA Quiz
9. CCNA Glossary
| Term | Simple definition |
|---|---|
| ACL | Ordered rules that permit or deny traffic. |
| ARP | Maps an IPv4 address to a MAC address. |
| Area 0 | OSPF backbone area. |
| Broadcast domain | Devices that receive a Layer 2 broadcast. |
| CAPWAP | Protocol used between lightweight APs and controllers. |
| DHCP | Automatically supplies IP configuration. |
| DNS | Maps names to IP addresses. |
| EtherChannel | Combines physical links into one logical link. |
| FCS | Frame Check Sequence used to detect errors. |
| IPv4 | 32-bit IP addressing protocol. |
| IPv6 | 128-bit IP addressing protocol. |
| LACP | Standards-based EtherChannel negotiation protocol. |
| MAC address | Layer 2 hardware address of an interface. |
| NAT | Translates one IP address into another. |
| NTP | Synchronizes device clocks. |
| OSPF | Link-state interior gateway routing protocol. |
| PAT | Allows many private hosts to share one public address. |
| PoE | Power and data over one Ethernet cable. |
| PortFast | Places trusted endpoint ports into forwarding quickly. |
| RADIUS | Centralized authentication and authorization service. |
| Router | Forwards packets between IP networks. |
| SNMP | Monitors and manages network devices. |
| SSH | Encrypted remote command-line access. |
| STP | Prevents Layer 2 switching loops. |
| Syslog | Centralized device event logging. |
| Trunk | Link carrying multiple VLANs. |
| VLAN | Logical Layer 2 broadcast domain. |
| VRF | Separate logical routing and forwarding table. |
| WLAN | Wireless local area network. |
Study Plan
- Read one domain and summarize it without looking at the page.
- Build the related Packet Tracer lab.
- Verify every command and record the output.
- Complete the review questions.
- Repeat weak topics until you can explain them simply.
- Use Cisco's current official exam topics to confirm scope.