πŸ” Access Required

Enter PIN to continue

πŸ“‘ CCNA Bootcamp β€” daily lessons

Completed 10 / 73 lessons

Lesson 1/73 β€” OSI model, encapsulation, PDU names, TCP/IP stack

Why it matters

Every network fault maps to a specific layer. If the symptom is "web page times out" the root cause could be a dying physical cable (layer 1), a bad ARP entry (layer 2), a missing route (layer 3), or a blocked TCP port (layer 4). Pinpointing the layer before troubleshooting saves hours of random checks.

OSI TCP/IP 7 β€” Application Application(OSI 5+6+7: HTTP, DNS, SSH) 6 β€” Presentation 5 β€” Session 4 β€” Transport Transport (TCP / UDP) 3 β€” Network Internet (IP) 2 β€” Data Link Link (Ethernet) 1 β€” Physical Encapsulation (outer to inner) L2 β€” Ethernet Frame Eth hdr FCS L3 β€” IP Packet IP hdr L4 β€” TCP Segment TCP hdr payload (HTTP / data) Direction: top layers pushed into inner ones β†’ each adds its own header

Each layer's PDU & device

LayerPDU nameTypical device
1 β€” PhysicalBitsRepeater / Hub
2 β€” Data LinkFrameSwitch / Bridge
3 β€” NetworkPacketRouter
4 β€” TransportSegment (TCP) / Datagram (UDP)Firewall / Load Balancer
5 β€” SessionData (message)β€”
6 β€” PresentationData (message)β€”
7 β€” ApplicationData (message)Application / Browser

Common pitfall

Symptom: Browser reports "Connection refused", yet ping 10.1.1.1 succeeds.
Root cause: ping uses ICMP at layer 3 β€” it reaches the host. "Connection refused" is a TCP RST at layer 4 β€” the application port is not listening. The OS itself is alive; the service died.
Fix: Test the port: nc -zv 10.1.1.1 443. If closed, start the web server or check process.

  1. Question 1. A router forwards a packet from one subnet to another. At which OSI layer does the router operate for this decision?
    Reveal answer 1

    Layer 3 (Network). The router reads the destination IP address to choose the outgoing interface β€” a network-layer decision. Switches use MAC addresses (layer 2).

  2. Question 2. SSL/TLS encryption happens at which layer of the TCP/IP model? (Hint: it is not a transport-layer function.)
    Reveal answer 2

    Application layer β€” more precisely the Presentation layer (OSI 6), which is bundled into the TCP/IP Application layer. Transport security operates above TCP port 443 but the encryption is a session/presentation function from the OSI perspective.

  3. Question 3. A host sends an ARP request. What is the PDU type (frame, packet, segment, bit) and at which layer does ARP operate?
    Reveal answer 3

    ARP is carried inside an Ethernet frame, making it a frame-level PDU. It operates at layer 2 (Data Link) β€” it resolves IP (L3) to MAC (L2), so it straddles layers but is encapsulated as a frame and never leaves the broadcast domain.

Lesson 2/73 β€” IPv4 addressing: classes, private/public, broadcast vs multicast

Why it matters

An IPv4 address is not just a number β€” it carries a network prefix and a host suffix. The boundary between the two, set by the subnet mask, controls:

Poor planning wastes addresses (too large a mask = unused space) or forces renumbering later (too small = run out of host IPs).

The 32-bit structure

Every IPv4 address is a 32‑bit integer displayed in dotted‑decimal:

192.168.1.10 β†’ 11000000.10101000.00000001.00001010
 <--- network portion (mask) ---> <------- host portion ------->

Legacy classes

Classful addressing is obsolete β€” CIDR replaced it in 1993 β€” but the ranges still appear in route‑origin policies and legacy discussions.

ClassFirst octetDefault maskCIDROriginal purpose
A1 – 126255.0.0.0/8~16 million hosts
B128 – 191255.255.0.0/16~65,000 hosts
C192 – 223255.255.255.0/24254 usable hosts
D224 – 239β€”β€”Multicast group addresses
E240 – 255β€”β€”Experimental / reserved

Note: 127.0.0.0/8 is loopback β€” packets to any 127.x.x.x never leave the host.

Private vs. public (RFC 1918)

Three blocks cannot be routed on the public Internet. Border routers drop traffic with a private source IP unless NAT is active:

RangeCIDRScope
10.0.0.0 – 10.255.255.25510.0.0.0/8Enterprise / campus
172.16.0.0 – 172.31.255.255172.16.0.0/12Mid-size
192.168.0.0 – 192.168.255.255192.168.0.0/16SOHO / lab

Other reserved: 169.254.0.0/16 (APIPA β€” Windows self‑assigns when DHCP fails). 100.64.0.0/10 (Carrier‑Grade NAT, RFC 6598).

Broadcast & the mathematics

Every subnet has a broadcast address: all host bits set to 1. Sending to it reaches every host on that subnet.

Example: 10.10.0.0/16

Network:    00001010.00001010.00000000.00000000  = 10.10.0.0
Mask:       11111111.11111111.00000000.00000000  (16 bits fixed)
Broadcast:  00001010.00001010.11111111.11111111  = 10.10.255.255 (flip host bits)
--------------------
Usable hosts: 2^(32βˆ’16) βˆ’ 2 = 65,536 βˆ’ 2 = 65,534

Two types:
Limited broadcast (255.255.255.255) β€” never forwarded by a router.
Directed broadcast (10.10.255.255) β€” can be forwarded unless no ip directed‑broadcast is set, which is the default on modern IOS.

Multicast

Class D addresses (224.0.0.0 – 239.255.255.255) send to a group, not a single host or all hosts. Routers use PIM to build distribution trees; hosts join groups with IGMP.

Reserved addressGroup
224.0.0.1All hosts on subnet
224.0.0.2All multicast routers
224.0.0.5 / .6OSPF (all routers / DR-BDR)
224.0.0.9EIGRP
224.0.0.10HSRP version 2

No router forwards multicast by default β€” ip multicast‑routing must be enabled.

unicast1 sender β†’ 1 host broadcast1 sender β†’ all hosts multicast1 sender β†’ groupdestination = group IPreceivers subscribe anycast1 sender β†’ nearest (routing)

Common pitfall

Symptom: Two hosts on the same switch cannot ping.
Check: One has 169.254.1.25 (APIPA β€” no DHCP), the other is 192.168.1.10. Different subnets, no router between them.
Fix: Static IP on same subnet, or restore DHCP server reachability.

IOS verification commands

Router# show ip interface brief
Interface     IP-Address          OK? Method Status Protocol
Gig0/0        192.168.1.1/24      YES manual up     up

Router# show ip interface gig0/0
  Broadcast address is 255.255.255.255
  Directed broadcast forwarding is disabled
  1. Question 1. What is the broadcast address for 172.20.0.0/19? Show the binary.
    Reveal answer 1
    /19 mask = 19 bits fixed β†’ 13 host bits
    172.20.0.0  = 10101100.00010100.00000000.00000000
    broadcast   = 10101100.00010100.00011111.11111111  (flip all host bits)
                = 172.20.31.255
  2. Question 2. A host 10.0.5.25/8 pings 10.255.255.255. Is the destination a directed broadcast or a unicast address from this host's perspective?
    Reveal answer 2

    Directed broadcast for the 10.0.0.0/8 network. The host sees 10.255.255.255 β€” all host bits are 1. The packet will reach all hosts on the 10.0.0.0/8 subnet if the intermediate routers permit directed‑broadcast forwarding (disabled by default).

  3. Question 3. Multicast group 239.1.1.1 β€” is it routable on the public Internet? What protocol pair makes it work inside an enterprise?
    Reveal answer 3

    No. 239.x.y.z is in the Administratively Scoped range (239.0.0.0/8) β€” it is never routed beyond an organization's boundary. Within the enterprise: IGMP (hosts tell the router they want the group) and PIM (routers build a distribution tree toward the source or the Rendezvous Point).

Lesson 3/73 β€” Subnetting: binary math, /24 slicing, usable host ranges

Why it matters

A /24 (255.255.255.0) gives 254 hosts. Most LANs need far fewer, so you subnet it to create multiple smaller networks. Every subnet consumes address space β€” the math must be exact or you run out of addresses or route table memory.

Subnet binary math

A /24 means 24 fixed network bits; the remaining 8 host bits can vary.

Mask /24 = 11111111.11111111.11111111.00000000

Split one /24 into four /26s (borrow 2 host bits):

Mask /26 = 11111111.11111111.11111111.11000000
                ^-- 2 borrowed bits = 2^(32-26) = 64 addresses per subnet
                2 subnets worth? Actually 4 subnets (192,193,194,195 high octet slices):
                192.168.0.0/26  (hosts .0 - .63,   bcast .63)
                192.168.0.64/26  (hosts .64 - .127,  bcast .127)
                192.168.0.128/26 (hosts .128 - .191, bcast .191)
                192.168.0.192/26 (hosts .192 - .255, bcast .255)

Usable hosts = 2^(host bits) βˆ’ 2 (subtract network & broadcast). So /26 β†’ 64 βˆ’ 2 = 62 usable hosts per subnet.

The 5-step subnetting algorithm

  1. Determine required hosts β†’ use the smallest power of 2 block that fits (add β‰₯50% headroom for growth).
  2. Compute host bits *h*: find smallest *h* where 2^h βˆ’ 2 β‰₯ required.
  3. Mask = 32 βˆ’ h. First subnet's network = 0 in host octets.
  4. Subnet size = 2^h. Increment each subsequent subnet by that size.
  5. Broadcast = first IP + (size βˆ’ 1). Usable range = network+1 … broadcastβˆ’1.
192.168.1.0 /26 net 192.168.1.0usable .1 .. .62broadcast .63 Increment = 2^(4) = 64 β†’ next net 192.168.1.64

Worked example

Given network 10.0.0.0/24, create 7 subnets for 7 VLANs. Each VLAN hosts 20 devices.

Step 1: need 20 hosts. 2^h βˆ’ 2 β‰₯ 20 β†’ h = 5 (30 hosts). 7 subnets needed.
Step 2: 2^3 = 8 β‰₯ 7 β†’ borrow 3 bits. Mask = 32βˆ’5 = /27.
Step 3: block size = 2^5 = 32.
        Subnet 1: 10.0.0.0/27   (hosts .1–.30,  bcast .31)
        Subnet 2: 10.0.0.32/27  (hosts .33–.62, bcast .63)
        Subnet 3: 10.0.0.64/27  (hosts .65–.94, bcast .95)
        Subnet 4: 10.0.0.96/27  (hosts .97–.126,bcast .127)
        Subnet 5: 10.0.1.0/27   (hosts .1–.30)
        Subnet 6: 10.0.1.32/27  (hosts .33–.62)
        Subnet 7: 10.0.1.64/27  (hosts .65–.94)

IOS verification

Switch# show ip interface brief
Switch# show running-config interface vlan 10
Switch# ping 10.0.0.1 source vlan 10
  1. Question 1. Given 172.16.0.0/16, you must create subnets that each support at least 500 hosts. What is the new mask in dotted-decimal?
    Reveal answer 1
    500 hosts β†’ h where 2^h βˆ’ 2 β‰₯ 500 β†’ h = 9 (510 hosts).
    Mask = 32 βˆ’ 9 = /23
    /23 dotted = 255.255.254.0
  2. Question 2. For subnet 192.168.10.0/27, what are the usable host range and the broadcast address?
    Reveal answer 2

    Mask /27 β†’ block 32. Network = 192.168.10.0. Broadcast = 192.168.10.0 + 31 = 192.168.10.31. Usable range 192.168.10.1 – 192.168.10.30.

  3. Question 3. A network admin needs 5 subnets from a /24. They choose a /29 mask. How many subnets does this actually create, and is the design valid for 5 subnets?
    Reveal answer 3

    /29 β†’ borrow 5 bits β†’ 2^5 = 32 subnets, each holding 6 hosts (2^3βˆ’2). Valid count (32 β‰₯ 5) but only 6 hosts per subnet β€” too small for most VLANs. The admin over-subnetted. A /28 would give 6 usable hosts; a /27 gives 14 hosts β€” check host needs first.

Lesson 4/73 β€” VLSM: variable-length subnet masks, real-world address plans

Why it matters

VLSM = allocate subnets of different sizes from the same block. Fixed subnetting (one mask) wastes addresses. VLSM is the backbone of an efficient RFC 1918 plan and of route summarization.

Core principle

Allocate largest subnet first, then carve the remainder. Order by decreasing block size β€” otherwise you create fragmentation holes your next subnet can't use.

Worked example

Block 10.0.0.0/24 must serve:

1) 100 hosts β†’ /25 (block 128) β€” 10.0.0.0/25 β†’ usable .1–.126, bcast .127
2) 50 hosts  β†’ /26 (block 64)  β€” 10.0.0.128/26 β†’ .129–.190
3) 20 hosts  β†’ /27 (block 32)  β€” 10.0.0.192/27 β†’ .193–.222
   Remainder from .224 is two /29s (block 8):
4) P2P (2 h) β†’ /30 (block 4)  β€” 10.0.0.224/30 β†’ .225–.226
   remaining .228–.255 = six /30s available for future P2Ps
   loopbacks: use /32s from the tail: 10.0.0.253 - 255

Summarization with VLSM

Route summarization collapses many subnets into one shorter prefix. Rule: the block must align on a power‑of‑two boundary matching the summary.

Summarize 10.0.0.0/25, 10.0.0.128/26, 10.0.0.192/27
 β†’ 10.0.0.0/25 covers .0–.127 ❌ does NOT cover .128+
 β†’ Use 10.0.0.0/24 = whole block. Summary = 10.0.0.0/24.

Common mistake: summarizing 172.16.1.0/24 + 172.16.2.0/24 as 172.16.0.0/23 β€” valid only if 172.16.0.0/24 doesn't exist or is also summarized.

IOS

Router# show ip route
R    10.0.0.0/24 is subnetted, 4 subnets
     10.0.0.0/25 is subnetted
     10.0.0.128/26 is subnetted
S    10.0.0.0/24 [1/0] via 192.168.1.1   ← static summary
Router# show ip protocol
Routing Protocol is "ospf 1"
   Area 0  Summary routes:
   10.0.0.0/24  (summary network)
  1. Question 1. Block 192.168.10.0/24. Subnet A needs 120 hosts, B needs 60, C needs 28. Draw the VLSM plan with masks + ranges.
    Reveal answer 1
    A: 120 hosts β†’ /25 block 128 β†’ 192.168.10.0/25 (.1–.126, bcast .127)
    B: 60 hosts  β†’ /26 block 64  β†’ 192.168.10.128/26 (.129–.190, bcast .191)
    C: 28 hosts  β†’ /27 block 32  β†’ 192.168.10.192/27 (.193–.222, bcast .223)
    Remainder 192.168.10.224/27 is free reserve / /30s.
  2. Question 2. Which single summary covers 10.4.8.0/24 through 10.4.15.0/24 with the smallest prefix length?
    Reveal answer 2

    Cover 8 subnets (/24) β†’ need 3 borrowed bits β†’ /21. Verify alignment: 10.4.8.0 is divisible by 8 in the third octet (8 = 0b1000) β†’ aligned. Summary = 10.4.8.0/21 (covers .8.0–.15.255).

  3. Question 3. An OSPF area has three /24s: 172.16.0.0/24, 172.16.1.0/24, 172.16.2.0/24. A fourth link needs 172.16.3.0/24. Why should you summarize the first three β€” and at which device?
    Reveal answer 3

    Summarizing reduces the OSPF LSDB and SPF domain: one inter-area (type‑3) LSA instead of three. Summarize at the ABR connecting this area to the backbone. The ABR advertises 172.16.0.0/22, hiding .0/.1/.2 specifics. The new .3 link is included in that same summary since 172.16.0.0/22 already spans .0–.3.

Lesson 5/73 β€” CIDR, supernetting, route summarization

Why it matters

CIDR (Classless Inter‑Domain Routing) killed the rigid class system (A/B/C) in 1993. It lets you express any prefix length β€” e.g. /19 instead of just /8, /16, /24. Supernetting aggregates multiple smaller subnets into a single larger route, shrinking routing tables globally. Without CIDR, the Internet's BGP table would collapse under its own weight.

CIDR notation

A CIDR block is network/length. Length = number of fixed bits (the mask).

10.0.0.0/8   β†’ mask 255.0.0.0        (8 fixed + 24 host)
10.10.0.0/16 β†’ mask 255.255.0.0      (16 fixed)
10.10.10.0/24 β†’ mask 255.255.255.0   (24 fixed)
10.10.10.0/25 β†’ mask 255.255.255.128 (25 fixed β†’ 2 subnets of 126 hosts)

The shorter the prefix (smaller /N), the more hosts AND the broader the route β€” a /8 covers 16M hosts, a /30 covers only 2.

Supernetting (route aggregation)

Supernetting = combine contiguous subnets into one shorter summary route. The summary must start on a binary boundary matching the aggregate block size.

Rule: the first address of the summary must be a multiple of the block size.

192.168.0.0/24.0.x 192.168.1.0/24.1.x 192.168.2.0/24.2.x 192.168.3.0/24.3.x 192.168.0.0/22 (summary)

Four /24s from .0 through .3 β†’ summary is 192.168.0.0/22. Verify alignment: block size = 2^(24βˆ’22) = 4 β†’ 0 is divisible by 4 β†’ aligned.

Worked example β€” BGP aggregation

ISP advertises customer prefixes: 203.0.113.0/25, 203.0.113.128/26, 203.0.114.0/24.

1) 203.0.113.0/25    (covers .0 – .127)
2) 203.0.113.128/26  (covers .128 – .191)
3) 203.0.114.0/24     (covers .0 – .255 in 114 octet)

Combine 1+2 = 203.0.113.0/24 already perfect (covers .0–.255).
Now 203.0.113.0/24 + 203.0.114.0/24 β†’ 203.0.112.0/22? No β€” 113 decimal: 0x71 β†’ odd. Block size 2 β†’ must start at even.
Better: 203.0.112.0/20 (16 subnets) would cover .112–.127 β€” too broad (leakage).
Correct: no tighter summary than /22? Let's check: 112/24 binary β†’ 0x70 β†’ even. 112+0 = 0x70, 112+1 = 0x71, 112+2 = 0x72, 112+3 = 0x73 = .115.
Does NOT cover 113/24 and 114/24? Actually .113/24 = 0x71, .114 = 0x72. Block size 4 with start 112 = 112, .113, .114, .115 β†’ YES 203.0.112.0/22 covers .112–.115.
But we only have .113 & .114, not .112 & .115 β€” potential leakage. In BGP use aggregate-address 203.0.112.0 255.255.252.0 summary-only β€” accept leakage, it's still a valid route.

Common pitfall

Symptom: Traffic to a newly‑added subnet gets blackholed.
Root cause: The upstream router's summary 10.0.0.0/13 already covers the new subnet 10.6.0.0/16, but your edge router has no more‑specific route pointing to the new location.
Fix: Ensure the edge router advertises 10.6.0.0/16 explicitly BEFORE the summary route takes effect, or use BGP unsuppress‑map to leak the new /16 through the summary filter.

  1. Question 1. Which single summary route covers 172.16.0.0/24, 172.16.1.0/24, 172.16.2.0/24, 172.16.3.0/24 using the tightest prefix?
    Reveal answer 1

    172.16.0.0/22. Block size = 4. Starting address 172.16.0.0 is divisible by 4 in the 3rd octet β†’ aligned. Covers .0.0–.3.255.

  2. Question 2. An ISP receives 192.0.2.0/24 and 192.0.3.0/24 from customer. Is 192.0.2.0/23 a valid summary?
    Reveal answer 2

    Yes. Block size = 2. Starting address 192.0.2.0 aligns on an even boundary (192.0.2.0 / 192.0.3.0). The /23 covers both.

  3. Question 3. A route reflector advertises 10.1.0.0/16. Two specific /24s exist: 10.1.7.0/24 and 10.1.8.0/24. The link to 10.1.8.0/24 fails. Does the /16 summary still attract traffic for 10.1.8.0/24? What BGP action fixes this?
    Reveal answer 3

    Yes β€” the /16 covers both, so even after the /24 fails, the /16 remains in the table and traffic is forwarded (blackholed). Fix: use BGP conditional advertisements or unsuppress‑map to withdraw the /16 when none of the constituent /24s exist, or avoid summarization entirely when specific routes are critical.

Lesson 6/73 β€” IPv6 addressing: global unicast, link-local, EUI-64, SLAAC

Why it matters

IPv4 exhaustion is real β€” the last /8 blocks were allocated years ago. IPv6 gives 3.4 Γ— 1038 addresses, enough for every atom on Earth. But IPv6 is not just "more addresses" β€” it changes how hosts configure themselves (SLAAC vs DHCP), how addresses are formed (EUI-64), and how neighbors are found (NDP replaces ARP). Every modern network has IPv6 traffic whether you plan it or not: Android and iOS prefer IPv6 when it exists.

IPv6 address structure β€” 128 bits, 8 hextets

Written as 8 groups of 4 hex digits, separated by colons:

2001:0db8:85a3:0000:0000:8a2e:0370:7334

Rules:
1. Leading zeros per hextet can be dropped β†’ 0db8 β†’ db8
2. One (and only one) double-colon :: compresses consecutive zero hextets
   2001:0db8:85a3:0000:0000:8a2e:0370:7334
   β†’ 2001:db8:85a3::8a2e:370:7334

3. :: must appear only once β€” otherwise the address is ambiguous.
2001:db8:85a3::8a2e:370:7334 (compressed) Global prefix /48 Subnet /64 Interface ID (64 bits) β€” EUI-64 Prefix = first 64 bits = global routing + subnetInterface ID = last 64 bits = derived from MAC (EUI-64) or random (privacy) Global unicast: 2000::/3 Link-local: fe80::/10 (always present)

Address types you must know

TypePrefixPurpose / notes
Global unicast (GUA)2000::/3Routable on the Internet. Assigned by ISP/RIR.
Link-localfe80::/10Automatically generated on every interface. Never routed. Used for neighbor discovery, OSPFv3, default gateway.
Unique local (ULA)fc00::/7IPv6's answer to RFC 1918 β€” private, not routable on the Internet.
Multicastff00::/8Replaces IPv4 broadcast. No broadcast in IPv6.
Loopback::1/128Equivalent to 127.0.0.1.
Unspecified::/128Used as source during Duplicate Address Detection.

EUI-64 β€” MAC to interface ID

Algorithm: split the 48-bit MAC in half, insert fffe in the middle, flip the U/L bit (7th bit of first octet) β€” the universal/local bit.

MAC:       00:1A:2B:3C:4D:5E
Step 1:    001A:2B   FF:FE   3C:4D:5E      (insert FFFE)
Step 2:    flip U/L bit: 0x00 β†’ 0x02 (bit 1 = 0β†’1)
Result:    021A:2BFF:FE3C:4D5E  β†’  interface ID

Full GUA:  2001:db8:1:10::21a:2bff:fe3c:4d5e/64

SLAAC β€” Stateless Address Autoconfiguration

Host gets prefix from Router Advertisement (RA), builds interface ID itself, no DHCP needed:

  1. Router sends RA every 200s (or in response to Router Solicitation) on the link.
  2. RA carries: prefix, prefix length, default gateway (RA source = link-local), lifetime.
  3. Host forms address = prefix + EUI-64/random ID.
  4. Duplicate Address Detection (DAD) β€” sends NS for its own address, if a reply comes, address is in use.

DHCPv6 is optional (stateful) β€” RA can set M-flag ("get address from DHCPv6") or O-flag ("get other info like DNS from DHCPv6"). SLAAC itself does not provide DNS β€” you need RDNSS in the RA (RFC 8106) or DHCPv6.

IOS configuration β€” real syntax

! Enable IPv6 routing (needed for routing protocols, forwarding)
Router(config)# ipv6 unicast-routing

! Static GUA on an interface
Router(config)# interface gigabitethernet0/0
Router(config-if)# ipv6 address 2001:db8:1:10::1/64
Router(config-if)# ipv6 address fe80::1 link-local        ! custom link-local
Router(config-if)# no shutdown

! EUI-64 form β€” interface ID auto-derived from MAC
Router(config-if)# ipv6 address 2001:db8:1:20::/64 eui-64

! Default route via RA / gateway
Router(config)# ipv6 route ::/0 2001:db8:1:1::1

! Verification β€” ALWAYS use these
Router# show ipv6 interface brief
Router# show ipv6 route
Router# ping ipv6 2001:db8:1:10::2
Router# show ipv6 neighbors

Healthy output sample:

Router# show ipv6 interface brief
GigabitEthernet0/0    [up/up]
    FE80::1
    2001:DB8:1:10::1
GigabitEthernet0/1    [up/up]
    FE80::2
    2001:DB8:1:20::21A:2BFF:FE3C:4D5E

Common pitfall β€” "Ping works from router, fails from PC"

Symptom: Hosts on the same VLAN can't ping each other or the gateway, yet routers see the interface up.

Root cause: IPv6 has no ARP. Neighbor Discovery (NDP) β€” ICMPv6 types 135/136 (NS/NA) β€” does the job. If a switch port has ICMPv6 filter applied, or NDP rate-limiting is too aggressive, neighbor discovery fails and the neighbor cache stays empty.

Fix:

! On the switch β€” never block ICMPv6; permit NDP explicitly
Switch(config)# ipv6 access-list PERMIT-NDP
Switch(config-ipv6-acl)# permit icmp any any nd-na
Switch(config-ipv6-acl)# permit icmp any any nd-ns
Switch(config-ipv6-acl)# permit ipv6 any any

! Router-side check
Router# show ipv6 neighbors
Interface    Age   Link-layer Addr   State
Gi0/0          5   001a.2b3c.4d5e   STALE
Router# debug ipv6 icmp

Quiz β€” test yourself

  1. ❓ QUIZ 1: A host has MAC 00:11:22:33:44:55. What EUI-64 interface ID does it produce, and which bit changes?
  2. ❓ QUIZ 2: Why can an IPv6 host reach its default gateway without knowing the gateway's global address? Which address type makes this work?
  3. ❓ QUIZ 3: RA carries a /64 prefix but no DNS server. Which two mechanisms can still deliver DNS to a SLAAC host?
Reveal answer 1

Insert fffe: 0211:22ff:fe33:4455. The U/L bit (bit 1 of first octet, 0x00 β†’ 0x02) flips to mark the address as locally unique. If the U/L bit were not flipped, the address would claim universal uniqueness.

Reveal answer 2

Link-local (fe80::/10). The RA's source address is the router's link-local address, so the host installs the default route toward fe80:: β€” no global address needed. OSPFv3 also peers over link-local.

Reveal answer 3

1) RDNSS option in the RA (RFC 8106) β€” stateless, no DHCP. 2) Stateful DHCPv6 (M or O flag set) which delivers DNS. Without either, SLAAC hosts have addresses but no name resolution.

Lesson 7/73 β€” Ethernet: frames, MAC addresses, duplex, cabling standards

1. Core concept β€” why Ethernet matters

Ethernet is the dominant LAN technology (IEEE 802.3). It solves one problem: how do many devices share a local wire and reliably deliver data to the right receiver? It does this with three mechanisms:

Why it matters in real networks: the vast majority of wired access ports, switch uplinks, and data-center fabric links run Ethernet. If you cannot read a frame and interpret a MAC address, you cannot troubleshoot switching, STP, or ARP β€” the layers built on top of it.

2. Ethernet frame structure

Standard Ethernet II frame (IEEE 802.3), minimum 64 bytes, maximum 1518 bytes (without preamble/SFD):

FieldSizePurpose
Preamble7 bytesSynchronization (not part of frame)
SFD1 byteStart Frame Delimiter (not part of frame)
Destination MAC6 bytesReceiver address
Source MAC6 bytesSender address
EtherType2 bytesPayload protocol (0x0800 = IPv4, 0x0806 = ARP, 0x86DD = IPv6)
Payload46–1500 bytesUpper-layer data (IP packet)
FCS4 bytesCRC-32 error detection
Preamble 7B SFD DST MAC 6B SRC MAC 6B Type 2B Payload (46–1500B) IPv4 / ARP / IPv6 FCS 4B

Minimum frame size 64 bytes exists so a sender is still transmitting when a collision is detected β€” required for CSMA/CD to work on legacy shared media. Modern full-duplex links keep the same size for compatibility.

3. MAC addresses β€” worked example

MAC = 48 bits, written as 6 hex octets. Each hex digit = 4 bits, so two hex digits = 1 byte.

Example: 00:1A:2B:3C:4D:5E

Calculation step by step:

2^10 = 1,024
2^20 = 1,048,576
2^30 = 1,073,741,824
2^40 = 1,099,511,627,776
2^48 = 2^40 Γ— 2^8
     = 1,099,511,627,776 Γ— 256
     = 281,474,976,710,656 possible MAC addresses

Special bits in first octet:

4. Duplex β€” half vs full

Half-duplexFull-duplex
Transmit/receiveOne direction at a time (shared medium, hub)Both directions simultaneously (switch↔device point-to-point)
CollisionsPossible β€” CSMA/CD + backoffImpossible β€” separate TX/RX pairs
Effective throughput on 100 Mbps≀ 100 Mbps total (shared)200 Mbps aggregate (100 each way)
Modern useLegacy hubs onlyStandard on all switched links

Auto-negotiation (IEEE 802.3u) sets speed and duplex automatically. If it fails, both ends may pick the same speed but different duplex β€” that is a duplex mismatch.

5. Cabling standards

CableCategorySpeedMax lengthConnector
Twisted pairCat5e1 Gbps100 mRJ-45
Twisted pairCat6 / Cat6a1–10 Gbps100 m (Cat6a: 10G to 100 m)RJ-45
Fiber multimodeOM3/OM410–100 Gbps100–550 mLC (SFP/SFP+)
Fiber single-modeOS1/OS210–400 Gbpskm+ (e.g. 10 km, 40 km)LC (SFP/SFP+)

Twisted pair: straight-through cable (T568A/B both ends) connects unlike devices (PC↔switch); crossover connects like devices (PC↔PC, switch↔switch) β€” though modern auto-MDIX handles this automatically. TIA/EIA-568 defines pinouts. Fiber beats copper for distance, EMI immunity, and speed.

6. Real-world scenario β€” duplex mismatch pitfall

Symptom: a link shows up but throughput crawls; interface counters show CRC errors, runts, and late collisions; intermittent timeouts on the PC.

Typical cause: one side hard-coded duplex full, other side left on auto-negotiation (fails to negotiate β†’ falls back to half-duplex). The full-duplex side sends while the half-duplex side is transmitting β†’ late collisions, retransmits, severe slowdown.

Fix:

! Check both ends first
show interfaces GigabitEthernet0/1

! Set both ends identically β€” either both auto, or both hard-coded:
interface GigabitEthernet0/1
 speed 100
 duplex full

Rule: never hard-code one end only. Hard-code both ends or leave both on auto. On modern 1G/10G links, always use auto-negotiation β€” it also negotiates flow control and master/slave clocking.

7. CLI configuration and verification

Configure speed/duplex on a Cisco IOS switch port:

Switch(config)# interface GigabitEthernet0/1
Switch(config-if)# speed 100
Switch(config-if)# duplex full
Switch(config-if)# no shutdown
Switch(config-if)# end

Verification:

Switch# show interfaces GigabitEthernet0/1
GigabitEthernet0/1 is up, line protocol is up (connected)
  Hardware is Gigabit Ethernet, address is 0050.7966.6800 (bia 0050.7966.6800)
  MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec
  Full-duplex, 100Mb/s, media type is 10/100/1000BaseTX
  Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0
  5 minute input rate 12000 bits/sec, 10 packets/sec
  5 minute output rate 18000 bits/sec, 15 packets/sec
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 output errors, 0 collisions, 0 interface resets

Healthy output = Full-duplex, expected speed, 0 CRC, 0 collisions. Any CRC/collision counter climbing = physical or duplex problem.

MAC address table check:

Switch# show mac address-table dynamic
          Mac Address Table
-------------------------------------------
Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
   1    0050.7966.6800    DYNAMIC     Gi0/1
   1    00e0.b4c1.2a10    DYNAMIC     Gi0/2

8. Quiz

  1. ❓ QUIZ 1 (easy): How many bits are in a MAC address, and how many bytes?
  2. Reveal answer 1

    48 bits = 6 bytes. Each octet is 8 bits; 6 octets Γ— 8 = 48 bits.

  3. ❓ QUIZ 2 (medium): A link shows "Half-duplex, 10Mb/s" while the switch port is hard-coded to 100/full. Name the problem and the two counters that will climb.
  4. Reveal answer 2

    Duplex mismatch. The full-duplex side transmits while the half-duplex side is transmitting β†’ late collisions and CRC errors on the half-duplex side, interface resets on both. Fix: match configuration on both ends (both auto, or both hard-coded same speed/duplex).

  5. ❓ QUIZ 3 (hard): Given MAC 01:00:5E:0A:0B:0C, what does the I/G bit (LSB of first octet) tell you, and which EtherType is this MAC most likely associated with?
  6. Reveal answer 3

    First octet 0x01 β†’ LSB = 1 β†’ multicast (I/G bit set). 01:00:5E is the IPv4 multicast OUI range (EtherType 0x0800, IPv4 multicast traffic, e.g. OSPF 224.0.0.5/224.0.0.6, IGMP).

Lesson 8/73 β€” ARP, ICMP, ping/traceroute mechanics

These three protocols are the nervous system of IP networking: ARP maps Layer-3 addresses to Layer-2 addresses, ICMP carries control/error messages, and ping/traceroute are the diagnostic tools built on ICMP. If you cannot read ARP and ICMP, you cannot troubleshoot anything beyond the interface level.

ARP β€” Address Resolution Protocol (RFC 826)

IP is a logical addressing scheme. Frames on Ethernet need a 48-bit MAC address to reach the destination NIC. ARP's job: given a known IP, find the MAC. Why: without ARP, every frame would have to be flooded like a broadcast, destroying switch efficiency.

ICMP β€” Internet Control Message Protocol (RFC 792)

ICMP is the control-plane messaging protocol of IP. It never carries user data; it reports errors and provides diagnostics. ICMP lives inside IP packets (IP protocol number 1).

ping mechanics

Host A                          Host B
  |----- Echo Request (Type 8, id=0x0001, seq=1, TTL=64) ----->|
  |<---- Echo Reply (Type 0, same id, same seq, TTL=64) -------|

ping sends one Echo Request per second by default, each with a fresh sequence number and an identifier (the process ID on Unix). Round-trip time = time between request and matching reply. Reply must echo the same identifier + sequence, or it is discarded (that's how you know a reply matches your ping, not another host's).

traceroute mechanics

traceroute exploits the TTL field: each router that decrements TTL to 0 drops the packet and sends back ICMP Type 11 (Time Exceeded). By sending probes with TTL 1, then 2, then 3..., the source collects the address of every hop in the path.

Worked example β€” ping path, full packet walk

Host A: 192.168.1.10/24  MAC aa:aa:aa:aa:aa:01
Router: 192.168.1.1/24 (LAN), 10.0.0.1/30 (WAN)
Host B: 10.0.0.2/30  MAC bb:bb:bb:bb:bb:02

Step 1 β€” Host A pings 10.0.0.2. Destination is NOT on the local subnet (different network), so Host A needs the MAC of the gateway 192.168.1.1.

Host A sends ARP request: "who has 192.168.1.1?" (broadcast)
Router replies: "192.168.1.1 is at cc:cc:cc:cc:cc:01" (unicast)
Host A caches entry, TTL 4h.

Step 2 β€” Host A builds the Echo Request. IP header TTL=64. Frame: dst MAC = router MAC, src MAC = Host A MAC, payload = ICMP Type 8.

Step 3 β€” Router receives frame, strips L2, decrements TTL to 63, checks destination 10.0.0.2 β€” directly connected. Needs B's MAC: sends ARP "who has 10.0.0.2?" on the WAN segment, gets bb:bb:bb:bb:bb:02, re-encapsulates frame (new dst/src MAC), forwards.

Step 4 β€” Host B receives, replies Echo Reply with TTL=64. The reply traverses the same path back. Round-trip = 4 frame hops total.

Key calculation β€” TTL decrement: each router subtracts 1. A ping from Host A to Host B crosses 1 router β†’ TTL seen at B = 64 βˆ’ 1 = 63. If B's reply shows TTL 63, the path had exactly one router hop. You can estimate hop count from received TTL: 255 β†’ ≀1 hop from Cisco gear, 128 β†’ ≀1 hop from Windows, 64 β†’ ≀1 hop from Linux.

Worked example β€” traceroute TTL walk

Host A -- R1 -- R2 -- Host B

traceroute 10.0.0.2
probe TTL=1 β†’ R1 drops, sends ICMP Type 11 β†’ source records R1's address
probe TTL=2 β†’ R2 drops, sends ICMP Type 11 β†’ source records R2's address
probe TTL=3 β†’ reaches Host B, answers ICMP Type 3 Code 3 (UDP mode) β†’ trace ends

Each TTL level gets 3 probes; output shows RTT per probe. Hops = number of lines in the trace = 2 routers + 1 destination.

CLI β€” verification commands

! View the ARP table
Router# show ip arp
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet  10.0.0.1                -   cc:cc:cc:cc:cc:01  ARPA   GigabitEthernet0/0
Internet  10.0.0.2                2   bb:bb:bb:bb:bb:02  ARPA   GigabitEthernet0/0

! Clear stale ARP entries (first thing to try on "ping works to IP, fails to MAC" issues)
Router# clear arp-cache

! ping with extended options
Router# ping 10.0.0.2 repeat 100 timeout 1
Type escape sequence to abort.
Sending 100, 100-byte ICMP Echos to 10.0.0.2, timeout is 1 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (100/100), round-trip min/avg/max = 1/2/4 ms

! traceroute
Router# traceroute 10.0.0.2
Type escape sequence to abort.
Tracing the route to 10.0.0.2
  1 10.0.0.1 1 msec 1 msec 1 msec
  2 10.0.0.2 1 msec 2 msec 1 msec

The ! in ping output = successful reply; . = timeout; U = destination unreachable; Q = source quench.

Real-world pitfall β€” "ping works but traceroute shows * * *"

Symptom: ping to a remote server succeeds, but traceroute shows * * * at the first or second hop, and the trace never completes cleanly. Fix: intermediate routers often rate-limit or filter ICMP Type 11 (and some filter all ICMP), so they silently drop expired probes. The path is fine β€” the router just refuses to report. Verify with a ping to the final destination (if it succeeds, the path works) and treat * * * as "device silent", not "link dead". On Cisco, increase the probe count or switch to ICMP mode: traceroute 10.0.0.2 probe 5 or traceroute 10.0.0.2 icmp.

Host A 192.168.1.10 Host B 192.168.1.20 ARP REQ (broadcast) who has 192.168.1.20? ARP REPLY (unicast) 192.168.1.20 is at bb:..:02 Host A ARP table 192.168.1.20 β†’ bb:bb:bb:bb:bb:02 Host B ARP table 192.168.1.10 β†’ aa:aa:aa:aa:aa:01

Quiz

  1. ❓ QUIZ 1 (easy): Which ICMP message type does a router send when it decrements a packet's TTL to 0, and what field of the original packet does traceroute manipulate to trigger it?
  2. Reveal answer 1

    ICMP Type 11, Time Exceeded (Code 0). Traceroute manipulates the TTL field, starting at 1 and incrementing by 1 per probe round.

  3. ❓ QUIZ 2 (medium): Host A (10.0.0.1/24) pings 10.0.0.2/24 for the first time. Walk the exact frame exchange that must happen BEFORE the first Echo Request can be sent, and state which frames are broadcast vs unicast.
  4. Reveal answer 2

    ARP request for 10.0.0.2 sent as broadcast (dst MAC FF:FF:FF:FF:FF:FF); Host B answers with ARP reply, unicast to Host A. Only after the reply populates Host A's ARP cache can Host A build the Echo Request frame with B's MAC. Same exchange occurs in reverse for the reply.

  5. ❓ QUIZ 3 (hard): A ping from your host to a remote server returns replies with TTL=62. How many routers did the packets cross, assuming the server runs Linux (default TTL 64)? The return path is symmetric. Show the arithmetic.
  6. Reveal answer 3

    Reply left the server with TTL=64 and lost 2 decrements before reaching you β†’ exactly 2 routers crossed in the return direction. With a symmetric path, the forward path also crosses 2 routers (server sees your probes at TTL 62). 64 βˆ’ 62 = 2 hops.

Lesson 9/73 β€” Switch forwarding: MAC address table, CAM, flooding

The switch is the Ethernet forwarding engine. Unlike a hub (which repeats every frame out every port) or a router (which forwards by IP), a switch forwards frames by destination MAC address, using a hardware table called the CAM table. Why this matters: it gives you wire-speed, isolated, full-duplex forwarding between ports β€” but only if the table is populated and correct. Every switching exam question and every real-world "slow network" mystery comes back to CAM, learning, and flooding.

Layer-2 forwarding decision tree

When a frame arrives on a switch port, the switch runs exactly three checks, in order:

This is called store-and-forward behavior at the table level: the switch never needs to know the full path, only "which port owns this MAC right now".

Frame arrives LEARN src MAC + port CAM lookup dst MAC present? YES Forward unicast NO FLOOD all ports in same VLAN, except ingress port BPDU/broadcast/multicast β†’ always flooded

CAM vs MAC table β€” same thing, different lens

Worked example β€” frame-by-frame learning

Host A (MAC aa:aa:aa:aa:aa:01) -- Gi0/1 -- [SW1] -- Gi0/2 -- Host B (MAC bb:bb:bb:bb:bb:02)

1. A sends frame to B. SW1:
   - LEARN: aa:aa:aa:aa:aa:01 on Gi0/1  β†’ CAM: {aa:...:01 β†’ Gi0/1, VLAN 10}
   - LOOKUP dst bb:bb:bb:bb:bb:02 β†’ not found
   - ACTION: flood out Gi0/2 (and any other access ports in VLAN 10)

2. B replies. SW1:
   - LEARN: bb:bb:bb:bb:bb:02 on Gi0/2  β†’ CAM: {aa:...:01 β†’ Gi0/1, bb:...:02 β†’ Gi0/2}
   - LOOKUP dst aa:aa:aa:aa:aa:01 β†’ FOUND on Gi0/1
   - ACTION: forward unicast out Gi0/1 only β€” no flooding.

3. Every later frame A↔B: both entries present β†’ pure unicast, wire-speed.

First frame in each direction is flooded; the reply teaches the switch the reverse mapping. This is why ARP (which triggers the first frame) and CAM learning are tightly coupled β€” your ARP cache and CAM table fill up together.

CAM aging, timers, and sizing

Exact CLI β€” IOS/IOS-XE

! Show the full table
SW1# show mac address-table
          Mac Address Table
-------------------------------------------
Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
  10    aaaa.aaaa.aa01    DYNAMIC     Gi0/1
  10    bbbb.bbbb.bb02    DYNAMIC     Gi0/2
  10    0100.0ccc.cccc    STATIC      CPU        (STP BPDUs, CDP, VTP)
Total Mac Addresses for this criterion: 3

! Look for ONE MAC (e.g. the server on Gi0/24)
SW1# show mac address-table address 0050.7966.6800
! Find which port a MAC is on β€” the #1 troubleshooting command
SW1# show mac address-table | include 0050.7966

! Per-interface learned MACs
SW1# show mac address-table interface gigabitethernet 0/24

! Table statistics
SW1# show mac address-table count

! Static entry (example: pin server MAC to port)
SW1(config)# mac address-table static 0050.7966.6800 vlan 10 interface gi0/24

! Change aging time (global)
SW1(config)# mac address-table aging-time 600

Healthy output pattern: DYNAMIC entries on access ports, STATIC entries pointing at CPU (protocol MACs), no unexpected MACs on trunk ports, counts well under platform limit.

Flooding behavior β€” exactly what gets flooded and why

Real-world scenario β€” the "one slow server" mystery

Symptom: client-to-server traffic fast, but server responses crawl. You check the server NIC β€” fine. You check CPU β€” fine. Then show mac address-table shows the server MAC flapping between Gi0/24 and Gi0/5, or worse, the server MAC is missing entirely while a switch with a full CAM has stolen its entries.

Root causes, in order of likelihood:

  1. CAM table overflow on an upstream/edge switch β†’ new server MAC never learned β†’ every server response flooded β†’ server sees its own flooded frames, switch sees duplicate MACs β†’ flapping. Fix: reduce CAM pressure (fewer VLANs, port security limits, check for loops/ARP storms), or increase aging.
  2. MAC flapping (same MAC seen on two ports) β†’ usually a loop or a misconfigured port-channel / VM with NIC teaming. Fix: verify STP, verify EtherChannel consistency; on IOS-XE show etherchannel summary.
  3. Spanning-tree blocking changed the path β†’ traffic now takes a worse path. Fix: check show spanning-tree root placement.

The fastest triage: show mac address-table count (is the table full?) + show mac address-table address <server-MAC> (is it learned, and on which port?). Two commands answer 90% of L2 forwarding problems.

Pitfall β€” relying on flooding as a design

Broadcast storms, ARP floods, and unknown-unicast flooding scale horribly. In a flat 2000-host VLAN, one ARP request reaches 1999 hosts. Design rules: keep VLANs sized sensibly (RFC 1918 + /24 per VLAN is a common norm), enable port security and storm-control on access ports, and use IGMP snooping for multicast. On NX-OS, the same concepts exist but the CLI differs slightly (show mac address-table works; TCAM usage is show system internal tcam on some platforms).

Quick reference table

EventCAM actionForwarding
Frame with known dst MACRefresh src entryUnicast out one port
Frame with unknown dst MACLearn srcFlood VLAN
Broadcast dst FF:FF:FF:FF:FF:FFLearn srcFlood VLAN
Multicast dst 01:00:5E:xxLearn srcFlood unless IGMP snooping
Frame from unknown src MACLearn srcThen lookup dst as above

Quiz

  1. ❓ QUIZ 1 (easy): A switch receives a frame with destination MAC 00:11:22:33:44:55 that is NOT in the CAM table. What does the switch do with the frame, and out which ports?
  2. Reveal answer 1

    It floods the frame out ALL ports in the same VLAN except the ingress port β€” because the destination is unknown (unknown unicast flooding). It also learns the source MAC and its ingress port.

  3. ❓ QUIZ 2 (medium): Host A sends the first frame to Host B on the same switch, VLAN 10. After A's frame, the CAM table holds only A's MAC. After B's reply, what entries exist and why did the reply go directly to A?
  4. Reveal answer 2

    After B's reply the table holds both A's MAC (learned from the first frame, port X) and B's MAC (learned from the reply, port Y). The reply went directly to A because by then the switch had A's entry from step 1 β€” so it forwarded unicast to A's port, no flooding.

  5. ❓ QUIZ 3 (hard): A /24 VLAN has 200 hosts. The switch CAM fills up and the server's MAC entry ages out and never re-learns. Describe exactly what happens to a client's request to the server, and name the two show commands that reveal the failure.
  6. Reveal answer 3

    Client request reaches server fine only if the client's MAC was learned before the table filled; the server's reply is unknown-unicast β†’ flooded to all 199 other ports β†’ server receives its own flooded frames (duplicate MAC on many ports), performance collapses, and the server MAC flaps or never appears in CAM. Commands: show mac address-table count (table full?) and show mac address-table address <server-MAC> (is it learned, on which port).

Lesson 10/73 β€” VLANs and 802.1Q trunking

Core concept β€” why VLANs exist

Flat L2 network = one broadcast domain. Every broadcast (ARP, DHCP, unknown unicast flood) reaches every host. Problems: wasted bandwidth, weak isolation, hard to move users between buildings/security zones.

VLAN (Virtual LAN) = logical partition of a switch, each VLAN is its own broadcast domain. Traffic in VLAN 10 never crosses into VLAN 20 unless routed (L3 = inter-VLAN routing, later lesson). Benefits: security (segment finance vs guests), smaller failure domains, flexibility β€” user location no longer tied to logical grouping.

VLAN 10 β€” Sales PC PC PC VLAN 20 β€” Guest PC PC PC broadcast domain A broadcast domain B one switch, two isolated VLANs

How frames carry VLAN info β€” 802.1Q tag

Two switches need to know which VLAN a frame belongs to. Trunk port inserts a 4-byte tag after the Source MAC:

12 bits β†’ 2^12 = 4096 possible IDs (0–4095). Usable: 1–1005 (normal), 1006–4094 (extended). Reserved: 0 (priority frames), 4095 (unused), 1 = default/native.

Switch recalculates FCS after inserting tag β€” frame is not forwarded with a stale checksum.

DMAC 6B SMAC 6B TPID0x8100 TCIPCP DEI VID payload FCS +4 bytes tag (after SMAC) untagged frame MTU 1518 β†’ tagged 1522 bytes

Native VLAN

Trunk frames for the native VLAN are sent untagged (default native = VLAN 1). Both ends must agree on native VLAN. CDP/management/STP BPDUs typically ride VLAN 1 untagged.

Pitfall: native VLAN mismatch β€” switch A native 1, switch B native 10. Frames mislabeled β†’ traffic leaks between VLANs or dies silently. Symptom: show interfaces trunk shows "native vlan mismatch" on one side; inter-switch hosts unreachable but ports stay up. Fix: set matching native VLAN on both ends, ideally an unused VLAN for security.

Worked example β€” VLAN numbering and port math

CLI configuration β€” IOS/IOS-XE

! create VLANs
vlan 10
 name SALES
vlan 20
 name GUEST

! access port β€” carries ONE untagged VLAN
interface GigabitEthernet0/1
 switchport mode access
 switchport access vlan 10

! trunk port β€” carries MANY tagged VLANs
interface GigabitEthernet0/24
 switchport mode trunk
 switchport trunk native vlan 99
 switchport trunk allowed vlan 10,20,99

Tagged trunk default: all VLANs allowed. Narrow with switchport trunk allowed vlan for security and to stop unknown-VLAN floods crossing the trunk.

Verification

SW1# show vlan brief
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Gi0/1
10   SALES                            active    Gi0/2, Gi0/3
20   GUEST                            active    Gi0/4
99   NATIVE                           active

SW1# show interfaces trunk
Port        Mode         Encapsulation  Status        Native vlan
Gi0/24      on           802.1q         trunking      99

Port        Vlans allowed on trunk
Gi0/24      10,20,99

Port        Vlans allowed and active in management domain
Gi0/24      10,20,99

Healthy output signs: port Status = trunking, allowed list matches design, native VLAN matches on both ends. Wrong encapsulation on Cisco legacy ISL gear shows "encapsulation isl" β€” ISL is obsolete, use 802.1q.

Real-world scenario

Office moved switches. Two access switches cabled together, users in VLAN 10 on each side. PCs see each other's ARP but no ping works, show interfaces trunk on one side: Port Vlans allowed on trunk empty. Root cause: switchport trunk allowed vlan left over from old design allowing only VLAN 20. Fix: switchport trunk allowed vlan add 10. Verify: show interfaces trunk then ping across.

Quiz

  1. ❓ QUIZ: How many usable VLAN IDs exist on an 802.1Q switch, and which two IDs are reserved?
    Reveal answer 1

    4094 usable (1–4094). Reserved: 0 and 4095. 12-bit VID β†’ 2^12 = 4096 total, minus 2 reserved.

  2. ❓ QUIZ: A host sends a 1518-byte Ethernet frame. The switch trunk-ports it with an 802.1Q tag. What is the frame size on the trunk, and why?
    Reveal answer 2

    1522 bytes. The 4-byte tag (TPID + TCI) is inserted after the Source MAC, and FCS is recalculated over the new content.

  3. ❓ QUIZ: Switch A trunk native VLAN = 1, switch B native VLAN = 10. A host in VLAN 10 on B pings a host in VLAN 10 on A. Describe what happens to the frames and the failure symptom.
    Reveal answer 3

    B sends VLAN 10 frames untagged (its native). A reads untagged frames as VLAN 1 and floods them into VLAN 1, not VLAN 10 β€” traffic leaks into the wrong VLAN or drops. Symptom: native VLAN mismatch line in show interfaces trunk, hosts unreachable, ports stay up. Fix: match native VLAN on both ends (use an unused VLAN).

Lesson 11/73 β€” DTP, VTP, access vs trunk port config

1. Core concept β€” three Cisco switch-port mechanisms

This lesson covers the three Cisco-proprietary mechanisms that govern how VLANs travel between switches and how ports decide their mode. They solve different problems:

SW1 VLANs 10,20,30 VTP server rev 5 SW2 VLANs 10,20,30 VTP client learns from SW1 802.1Q trunk (tagged frames) VTP advertisement: VLAN 10/20/30, rev 5 PC VLAN 10 (untagged) PC VLAN 10 (untagged)

Both DTP and VTP are Cisco proprietary. Neither exists on non-Cisco gear. VTPv1/v2 only syncs over trunk links. DTP only runs on trunk-capable ports (never on access ports by default).

2. Port modes β€” the full matrix

ModeMeaningDTP frames sent?Result
accessPermanent access port, one untagged VLANNoNever becomes trunk
trunkPermanent trunk, all VLANs tagged except nativeYes (by default)Always trunk
dynamic autoWaits for peer to askYes (passive)Trunk only if peer sends DTP desirable/trunk
dynamic desirableActively asks peerYes (active)Trunk with auto, desirable, or trunk peer
nonegotiateManual mode, DTP frames suppressedNoMode set by you, no negotiation

Worked example β€” will a trunk form?

SW1 portSW2 portTrunk forms?
dynamic desirabledynamic autoβœ… Yes β€” desirable asks, auto agrees
dynamic autodynamic auto❌ No β€” both passive, nobody asks
dynamic desirabledynamic desirableβœ… Yes
trunkdynamic autoβœ… Yes β€” trunk advertises itself
accessdynamic desirable❌ No β€” access ignores DTP
trunk + nonegotiatetrunk + nonegotiateβœ… Yes β€” both manually set to trunk, DTP off
trunkaccess❌ No β€” access wins, both stay access

3. VTP β€” modes, domain, revision number

Revision number mechanics β€” the critical part. Each switch stores a VTP revision number (starts 0, increments by 1 per config change). Advertisement carries domain name + revision + VLAN list. Rule: if received revision > local revision AND domain matches, the switch overwrites its entire VLAN database with the advertised one. Higher wins, period. That is why a switch with a stale high revision joining a network wipes VLANs.

Worked example β€” revision logic:

VTP versions: v1/v2 (CCNA scope) sync only over trunk; v3 adds features (offered on newer IOS-XE, not on CCNA exam core). VTP pruning (optional) prunes unused VLANs from trunks to save bandwidth β€” off by default.

4. Exact CLI configuration

! --- Access port (typical end-host port) ---
interface GigabitEthernet0/1
 switchport mode access
 switchport access vlan 10
 switchport voice vlan 110      ! optional: IP phone on 110, data on 10
 no shutdown

! --- Trunk port (switch-to-switch) ---
interface GigabitEthernet0/2
 switchport mode trunk
 switchport trunk native vlan 99          ! untagged VLAN on this trunk
 switchport trunk allowed vlan 10,20,30   ! prune: only these cross the trunk
 switchport nonegotiate                   ! kill DTP on a real trunk (security)

! --- DTP negotiation (default-ish) ---
interface GigabitEthernet0/3
 switchport mode dynamic desirable       ! actively negotiate
 switchport mode dynamic auto            ! passively wait

! --- VTP ---
vtp domain CCNA
vtp mode server        ! default; client | transparent also valid
vtp version 2
show vtp status        ! verify: domain, mode, revision, pruning

Verification commands with healthy output:

SW1# show vlan brief
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Gi0/1
10   SALES                            active    Gi0/2
20   ENG                              active    Gi0/2

SW1# show interfaces trunk
Port        Mode         Encapsulation  Status        Native vlan
Gi0/2       on           802.1q         trunking      99

Port        Vlans allowed on trunk
Gi0/2       10,20,30

SW1# show dtp interface gi0/2
DTP information for GigabitEthernet0/2:
 TOS/TAS/TNS:                     TRUNK/TRUNK/TRUNK
 TOT/TAT/TNT:                     ANY/ANY/ANY

SW1# show vtp status
VTP Version capable             : 1 to 3
VTP version running             : 2
VTP Domain Name                 : CCNA
VTP Pruning Mode                : Disabled
VTP Traps Generation            : Disabled
Device ID                       : 0011.2233.4455
Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00
Local updater ID is 0.0.0.0 (no valid interface found)
VTP Operating Mode              : Server
Maximum VLANs supported locally : 1005
Number of existing VLANs        : 5
Configuration Revision          : 5

Router-on-a-stick (trunk to router) β€” the standard inter-VLAN routing pattern:

! Router side
interface GigabitEthernet0/0.10
 encapsulation dot1Q 10
 ip address 192.168.10.1 255.255.255.0
interface GigabitEthernet0/0.20
 encapsulation dot1Q 20
 ip address 192.168.20.1 255.255.255.0
! physical Gi0/0 stays up with no IP; subinterfaces tag traffic

5. Real-world scenario / pitfall

Scenario: VTP revision-number wipe. New engineer connects an old, pre-owned switch (VTP server, domain CCNA, rev 120, empty VLAN DB) to a production trunk. Within seconds every switch in domain deletes all VLANs. Symptoms: end hosts lose connectivity everywhere, show vlan brief shows only VLAN 1 on all switches, phones reboot. This is silent β€” no error logged.

Fix (defense in depth):

Second common pitfall: native VLAN mismatch on trunk. If SW1 native = 99 and SW2 native = 1, trunk comes up but untagged traffic crosses into wrong VLAN. show interfaces trunk flags "NATIVE VLAN MISMATCH" β€” fix by matching native VLANs on both ends.

6. Quiz

  1. ❓ QUIZ 1: What command turns a port into a permanent access port, and what is the default access VLAN if switchport access vlan is not configured?
  2. Reveal answer 1

    switchport mode access. Default access VLAN is VLAN 1. Port carries VLAN 1 untagged until changed.

  3. ❓ QUIZ 2: SW1 port is dynamic auto, SW2 port is dynamic auto. Do they form a trunk, and why? Give the one-word answer plus reason.
  4. Reveal answer 2

    No. Both are passive β€” neither sends an active DTP request, so neither port becomes a trunk. They stay in access mode (VLAN 1).

  5. ❓ QUIZ 3: A VTP transparent switch (rev 50) receives a VTP advertisement (domain CCNA, rev 200, VLANs 10/20/30) from a server. What does the transparent switch do with the advertisement, and does its VLAN database change?
  6. Reveal answer 3

    It forwards the advertisement out other trunk ports but ignores the contents β€” no VLAN database change. Transparent switches never sync, regardless of revision. The higher-revision overwrite rule only applies to server/client modes.