Cisco CCNA Master Reference
Cisco IOS and IOS XE • CCNA 200-301 v1.1 study manual

CCNA Overview and Packet Life

A general CCNA cheat sheet followed by the complete visual encapsulation and packet-life explanation.

How to use this site: Start here to understand the network model. Use the Command Catalog to look up exact syntax. Use CLI Use Cases to complete configurations. Use Troubleshooting when the result does not match the expected state.

CCNA 200-301 v1.1 exam map

20%Network Fundamentals
20%Network Access
25%IP Connectivity
10%IP Services
15%Security Fundamentals
10%Automation and Programmability

The percentages and domain names come from Cisco's official 200-301 CCNA v1.1 exam topics.

General CCNA rules to remember

  1. A host uses its subnet mask or prefix length to decide whether a destination is local or remote.
  2. For a remote destination, the host sends the first frame to the default gateway MAC address.
  3. A Layer 2 switch forwards frames by destination MAC address and VLAN.
  4. A router forwards packets by destination IP address using longest-prefix match.
  5. A router removes the incoming Layer 2 header and creates a new Layer 2 header for the next link.
  6. Normal routing preserves source and destination IP addresses, but decreases TTL or Hop Limit.
  7. NAT can change IP addresses. PAT can also change TCP or UDP port numbers.
  8. ARP maps a local IPv4 next-hop address to a MAC address. IPv6 uses Neighbor Discovery.
  9. VLANs create separate Layer 2 broadcast domains.
  10. An access port normally carries one untagged data VLAN. A trunk carries multiple VLANs with 802.1Q tags.
  11. The native VLAN is normally untagged on an 802.1Q trunk. Both ends must agree.
  12. STP blocks redundant Layer 2 paths to prevent loops. EtherChannel makes multiple links act as one logical link.
  13. Routing chooses longest prefix first, then administrative distance, then the protocol metric.
  14. ACLs process top to bottom, stop at the first match, and end with an implicit deny.
  15. Inbound and outbound ACL direction is relative to the interface, not the user or server.
  16. An SVI usually needs the VLAN to exist and at least one active Layer 2 member or trunk path.
  17. up/up normally means Layer 1 and Layer 2 are operational. administratively down means shutdown.
  18. Do not save a remote change until you verify management access, forwarding, and required services.

IPv4 and IPv6 quick reference

Important IPv4 ranges

RangePurpose
10.0.0.0/8Private IPv4
172.16.0.0/12Private IPv4
192.168.0.0/16Private IPv4
169.254.0.0/16IPv4 link-local, often called APIPA on Windows
127.0.0.0/8Loopback
224.0.0.0/4IPv4 multicast
0.0.0.0/0Default route
255.255.255.255Limited broadcast

Important IPv6 ranges

RangePurpose
2000::/3Global unicast
FC00::/7Unique local
FE80::/10Link-local
FF00::/8Multicast
::1/128Loopback
::/128Unspecified address
::/0Default route
No broadcastIPv6 uses multicast instead

Subnet size table

PrefixSubnet maskAddressesTraditional usable hostsBlock size in changing octet
/24255.255.255.02562541 in third octet
/25255.255.255.128128126128
/26255.255.255.192646264
/27255.255.255.224323032
/28255.255.255.240161416
/29255.255.255.248868
/30255.255.255.252424
/31255.255.255.25422 on supported point-to-point links2
/32255.255.255.2551One host route1

Fast subnet method: Find the first mask octet that is not 255 or 0. Calculate 256 - mask octet. The result is the subnet increment.

Wildcard masks

Subnet maskWildcardTypical use
255.255.255.2550.0.0.0Exact host
255.255.255.2520.0.0.3/30
255.255.255.2480.0.0.7/29
255.255.255.2400.0.0.15/28
255.255.255.2240.0.0.31/27
255.255.255.1920.0.0.63/26
255.255.255.1280.0.0.127/25
255.255.255.00.0.0.255/24
255.255.0.00.0.255.255/16
255.0.0.00.255.255.255/8

Switching and routing cheat sheet

How a switch handles a frame

  1. Learn the source MAC on the incoming port and VLAN.
  2. Look up the destination MAC in the same VLAN.
  3. Forward a known unicast to one port.
  4. Flood unknown unicast, broadcast, and relevant multicast within the VLAN.
  5. Do not send the frame back out the port where it arrived.

How a router chooses a route

  1. Use the most specific matching prefix.
  2. If sources advertise the same prefix, prefer the lowest administrative distance.
  3. If the same routing protocol has multiple paths, prefer the best metric.
  4. Install eligible equal-cost paths when supported.

Rapid PVST+ election logic

  1. Lowest bridge ID becomes root. Bridge ID includes priority and MAC.
  2. Each non-root switch chooses one root port with the best path to root.
  3. Each segment chooses one designated port.
  4. Other redundant ports become alternate and discard traffic.
  5. Use PortFast only on true edge ports. Use BPDU Guard to protect them.

EtherChannel mode pairs

ProtocolWorking combinations
LACPactive-active or active-passive
PAgPdesirable-desirable or desirable-auto
Staticon-on only

Member links must match important Layer 2 or Layer 3 settings.

Common administrative distances

Route sourceDefault AD
Connected0
Static1
eBGP20
Internal EIGRP90
OSPF110
RIP120
External EIGRP170
iBGP200

Administrative distance compares routes to the same prefix from different route sources. It is not carried end to end as part of the IP packet.

Common ports, protocol numbers, and services

ServiceTransport and portRemember
FTP control/dataTCP 21 / TCP 20Legacy file transfer. Separate control and data behavior.
SSHTCP 22Encrypted remote CLI and SCP transport.
TelnetTCP 23Unencrypted. Know it, but do not use for normal management.
SMTPTCP 25Mail transfer between servers.
DNSUDP 53 and TCP 53UDP is common for queries. TCP supports large responses and zone transfers.
DHCPUDP 67 server / UDP 68 clientDORA: Discover, Offer, Request, Acknowledge.
HTTPTCP 80Unencrypted web traffic.
HTTPSTCP 443HTTP protected by TLS.
TFTPUDP 69Simple and unencrypted file transfer.
NTPUDP 123Time synchronization.
SNMP pollingUDP 161Management queries.
SNMP trapsUDP 162Unsolicited notifications.
SyslogUDP 514 commonlyCentral event logging. Other secure transports can also be used.
RADIUSUDP 1812 / 1813Authentication/authorization and accounting.
IP protocol numberProtocol
1ICMP for IPv4
6TCP
17UDP
47GRE
50IPsec ESP
51IPsec AH
58ICMPv6
89OSPF

TCP versus UDP

TCPUDP
Connection-orientedConnectionless
Sequence numbers and acknowledgmentsNo built-in delivery acknowledgment
Retransmits missing dataNo built-in retransmission
Ordered byte streamMessage-oriented datagrams
Larger header and more state8-byte header and low overhead
Used when reliable ordered delivery mattersUsed for speed, simplicity, multicast, or application-managed recovery

Security and network services reminders

ACL logic

  • Standard ACLs match source IPv4 address.
  • Extended ACLs can match protocol, source, destination, and ports.
  • Place extended ACLs near the source when practical.
  • Place standard ACLs near the destination when practical.
  • Verify both placement and direction.

Layer 2 security

  • Port security limits source MAC addresses on an access port.
  • DHCP snooping blocks untrusted DHCP server messages and builds bindings.
  • Dynamic ARP Inspection validates ARP using trusted bindings or ARP ACLs.
  • IP Source Guard restricts source IP and MAC combinations on access ports.

QoS process

  1. Classify traffic.
  2. Mark traffic, often with DSCP.
  3. Queue during congestion.
  4. Police by dropping or remarking above a rate.
  5. Shape by buffering to smooth traffic to a rate.

AAA

  • Authentication: Who are you?
  • Authorization: What may you do?
  • Accounting: What did you do and when?
  • TACACS+ and RADIUS centralize access control.

Automation and programmability quick sheet

REST concepts

HTTP verbTypical CRUD action
GETRead
POSTCreate or invoke
PUTReplace
PATCHPartially update
DELETEDelete

JSON structure

{
  "hostname": "SW1",
  "vlans": [10, 20, 30],
  "enabled": true,
  "management_ip": null
}

Object uses braces. Array uses brackets. Strings use quotes. Values can be strings, numbers, booleans, null, arrays, or objects.

Controller-based networking

  • The data plane forwards traffic.
  • The control plane builds forwarding decisions.
  • The management plane configures and observes the device.
  • Northbound APIs connect controllers to applications.
  • Southbound APIs connect controllers to infrastructure.

Configuration management

  • Ansible commonly uses declarative playbooks and does not require a permanent agent on Cisco devices.
  • Terraform manages desired infrastructure state through providers.
  • Idempotent automation produces the same intended state when run repeatedly.
  • Validate and preview changes before production deployment.

Packet life and encapsulation

The rest of this page preserves the full visual explanation from the previous edition and expands the path from application data to bits.

Core rule: Each layer wraps the data from the layer above. An IP packet is carried inside an Ethernet frame. A router removes the old Layer 2 frame, routes the Layer 3 packet, and creates a new Layer 2 frame for the next link.

Encapsulation and de-encapsulation map

OSI model and PDU names

7Application
Network service used by the application
Data
6Presentation
Encoding, encryption, compression
Data
5Session
Conversation control
Data
4Transport
Process-to-process delivery
TCP segment
UDP datagram
3Network
Host-to-host routing
IP packet
2Data Link
Local-link delivery
Ethernet frame
1Physical
Signals and media
Bits

Layers 5 through 7 are usually treated as one Application layer in the TCP/IP model. They do not always appear as three separate headers in a packet capture.

Encapsulation: sending down the stack

Step 1
Application creates data
Application data
Example: HTTP GET /index.html
Data
Step 2
TCP or UDP adds a header
TCP headerApplication data
TCP segment
Step 3
IP adds a header
IP headerTCP headerApplication data
IP packet
Step 4
Ethernet adds header and trailer
Ethernet headerIP headerTCP headerApplication dataFCS
Ethernet frame
Step 5
NIC sends signals
10110100 01010110 11001001 00110101 10100110
Bits

De-encapsulation: receiving up the stack

Step 1
NIC receives signals
10110100 01010110 11001001 00110101 10100110
Bits
Step 2
Ethernet validates and removes Layer 2
Ethernet headerIP headerTCP headerApplication dataFCS
Frame stripped
Step 3
IP removes Layer 3
IP headerTCP headerApplication data
Packet stripped
Step 4
TCP or UDP delivers by port
TCP headerApplication data
Segment stripped
Step 5
Application receives data
Application data delivered
Data
Going down: Data → Segment or Datagram → Packet → Frame → Bits
Going up: Bits → Frame → Packet → Segment or Datagram → Data

What each header does

TCP header: Layer 4

Job: Identify the sending and receiving processes and provide reliable, ordered delivery.

  • Source port
  • Destination port
  • Sequence number
  • Acknowledgment number
  • Flags
  • Window size
  • Checksum

Example: 51514 → 443

IP header: Layer 3

Job: Identify the original source host and final destination host across routed networks.

  • Source IP
  • Destination IP
  • TTL or Hop Limit
  • Protocol or Next Header
  • Length and fragmentation fields

Example: 192.168.10.50 → 142.250.191.78

Ethernet header and trailer: Layer 2

Job: Deliver the packet across the current Ethernet link or VLAN.

  • Source MAC
  • Destination MAC
  • EtherType
  • Optional 802.1Q VLAN tag
  • FCS trailer

Example: PC MAC → default-gateway MAC

Why the names differ: A TCP segment is inside an IP packet. The IP packet is inside an Ethernet frame. The same transmitted object can be described at different layers, but the formal PDU name depends on the layer being discussed.

End-to-end example: PC opens an HTTPS website

Your PC
192.168.10.50
AA-AA-AA-AA-AA-AA
Layer 2 switch
Forwards frames
Uses MAC table + VLAN
Default gateway
192.168.10.1
BB-BB-BB-BB-BB-BB
Internet routers
Route packets
New Layer 2 wrapper per link
Web server
142.250.191.78
TCP 443

1. PC decides local or remote

The PC applies its subnet mask. The website is outside 192.168.10.0/24, so the next hop is the default gateway.

The PC uses ARP to learn the gateway MAC address.

2. PC sends the first frame

Layer 2Src MAC: PC
Dst MAC: gateway
Layer 3Src IP: PC
Dst IP: web server
Layer 4Src port: ephemeral
Dst port: 443

3. Switch forwards the frame

The switch learns the source MAC on the incoming port and VLAN. It looks up the destination MAC and forwards the frame.

A basic Layer 2 switch does not route by the destination IP address.

4. Router removes and rebuilds Layer 2

The router removes the Ethernet header and FCS, decrements TTL, performs a longest-prefix route lookup, then builds a new frame for the next hop.

5. What normally stays the same

Source IP, destination IP, TCP source port, and TCP destination port remain end to end.

Exceptions: NAT or PAT can change IP addresses and ports.

6. Server receives and unwraps

The server removes Layer 2, then Layer 3, then Layer 4. TCP destination port 443 delivers the data to the HTTPS service.

For HTTPS, the HTTP request is encrypted inside TLS.

FieldAcross a Layer 2 switchAcross a routerNAT/PAT exception
Source MACNormally unchangedReplaced with router exit-interface MACNot the NAT function
Destination MACNormally unchangedReplaced with next-hop MACNot the NAT function
Source IPUnchangedNormally unchangedCan be translated
Destination IPUnchangedNormally unchangedCan be translated by destination NAT
TTL / Hop LimitUnchangedDecreased by oneStill decreased by routing
TCP/UDP portsUnchangedNormally unchangedPAT can translate a port

Expanded CCNA explanation

Packet versus frame

QuestionIP packetEthernet frame
LayerLayer 3Layer 2
Main addressesSource and destination IPSource and destination MAC
ScopeTravels through routed networksCrosses one local Ethernet segment or VLAN
Device lookupRouter uses destination IP and longest-prefix matchSwitch uses destination MAC and VLAN
At a routed hopForwarded after TTL/Hop Limit processingOld frame removed and a new frame built

How the host chooses the destination MAC

  1. The host compares the destination IP with its own subnet using the subnet mask.
  2. For a local destination, the host resolves the final host MAC.
  3. For a remote destination, the host resolves the default gateway MAC.
  4. ARP resolves IPv4 next hops. IPv6 Neighbor Discovery resolves IPv6 next hops.

What a router does in order

  1. Receives and validates the incoming Layer 2 frame.
  2. Removes the incoming Layer 2 header and trailer.
  3. Reads the destination IP address.
  4. Decrements TTL or Hop Limit.
  5. Performs a longest-prefix route lookup.
  6. Applies configured policy, such as ACL, NAT, QoS, or firewall inspection.
  7. Resolves the next-hop Layer 2 address when required.
  8. Builds a new Layer 2 frame for the outgoing link.

Ethernet, IPv4, TCP, and UDP header quick reference

HeaderCommon sizeImportant fieldsKey fact
Ethernet II14-byte header + 4-byte FCS
Optional 4-byte VLAN tag
Destination MAC, source MAC, EtherType, optional VLAN tag, FCSUsed for the current Ethernet link. MAC addresses change at routed hops.
IPv420 bytes minimumSource IP, destination IP, TTL, protocol, header checksum, fragmentationRouters decrement TTL and recalculate the IPv4 header checksum.
IPv640-byte base headerSource, destination, Hop Limit, Next Header, Traffic Class, Flow LabelNo base-header checksum. Routers do not fragment IPv6 packets.
TCP20 bytes minimumPorts, sequence, acknowledgment, flags, window, checksum, optionsReliable ordered byte stream.
UDP8 bytesSource port, destination port, length, checksumNo connection setup, sequencing, or retransmission.

MTU and MSS

What Wireshark might not show

Common mistakes to avoid

Incorrect ideaCorrect model
A router adds an Ethernet header and the data becomes a packet.The IP packet already exists. Ethernet wraps the packet to create a frame.
The destination MAC is the remote web server MAC.For a remote network, the first destination MAC is the default gateway MAC.
A switch forwards by destination IP.A basic Layer 2 switch forwards by destination MAC and VLAN.
MAC addresses remain end to end.MAC addresses normally change at every routed hop.
IP addresses always remain end to end.They normally do, but NAT can translate them.
ARP finds a MAC address anywhere on the Internet.ARP resolves only an IPv4 address on the local link.
Port 443 is a physical switchport.TCP port 443 identifies an application socket for HTTPS.

Key takeaways

  • Layer 4 adds process identifiers. Layer 3 adds end-to-end logical addressing. Layer 2 adds local-link addressing.
  • Switches forward frames. Routers forward packets.
  • A router creates a new Layer 2 frame for each routed link.
  • The destination IP drives routing. The next-hop MAC drives local Ethernet delivery.
  • The PDU name depends on the layer being discussed.
Show the original reference diagram
Original network encapsulation diagram supplied by the user