CCNA 200-301 BOOTCAMP · CHAPTER 12

HSRP, QoS, access security, route selection, OSPF, IPv6 and WLAN

Seven exam topics that meet in real networks: what happens when the gateway fails, how traffic is prioritized, who gets onto the network and why a router picks one route over another.

18 min readVideos: Day 2, part 4 (7 videos)Level: intermediate3.0 IP Connectivity

From point A to point B

Point A: You know the isolated pieces of each topic (a gateway, an ACL, a route), but you cannot yet say what happens when the gateway fails, how a router chooses between two routes or how a wireless network is protected. Point B: You will be able to configure and verify HSRP, describe the QoS chain (classify, mark, queue), explain AAA with 802.1X, predict which route a router installs using longest prefix and administrative distance, read OSPF states, abbreviate IPv6 and build an EUI-64, and compare 802.11 standards, WLAN architectures and WPA2/WPA3.

This chapter covers Day 2, Part 4. Two notes: NAT with overload was covered in chapter 11 and returns in chapter 13. And on the current exam (v1.1, valid until 2 February 2027) these topics are still in the blueprint; differences from v1.0 are small: the controllers item was generalized (it no longer names specific products) and management access now includes cloud-managed devices.

HSRP: a virtual gateway that does not go down

Hosts in a VLAN have one default gateway configured, for example 192.168.1.1. If you add a second router (192.168.2.1 or 192.168.1.3) for high availability, hosts cannot use two gateways: if the first one fails, someone would have to reconfigure 200 or 20,000 devices by hand. First hop redundancy protocols (FHRPs) solve this: two or more routers share a virtual IP and a virtual MAC, and hosts point to that IP.

In HSRP (Hot Standby Router Protocol, Cisco proprietary) one router is Active and answers for the virtual IP; another is Standby and listens. They exchange hello messages every 3 s (hold time 10 s) over UDP 1985, to 224.0.0.2 in version 1 or 224.0.0.102 in version 2, which is why the routers must be in the same VLAN. The router with the highest priority (default 100) is Active; a tie is won by the highest IP. If the Active router fails, Standby takes over the IP and virtual MAC (0000.0C07.ACxx in v1, where xx is the group in hex) and hosts notice nothing. The states are Initial, Learn, Listen, Speak, Standby and Active.

How the VLAN sees the redundant gatewayHosts use the virtual IP; R1 is Active and R2 is Standby and takes over if R1 fails.Hostsgateway 192.168.1.1Virtual IP/MACgroup 1, 192.168.1.1R1 Activepriority 110, .2R2 Standbypriority 100, .3

Hosts never change gateway: what changes is the router that answers for the virtual IP.

R1(config)# interface GigabitEthernet0/0
R1(config-if)# ip address 192.168.1.2 255.255.255.0
R1(config-if)# standby version 2
R1(config-if)# standby 1 ip 192.168.1.1
R1(config-if)# standby 1 priority 110
R1(config-if)# standby 1 preempt
R1(config-if)# no shutdown

R2(config)# interface GigabitEthernet0/0
R2(config-if)# ip address 192.168.1.3 255.255.255.0
R2(config-if)# standby version 2
R2(config-if)# standby 1 ip 192.168.1.1

R1# show standby brief
Interface   Grp  Pri P State   Active          Standby         Virtual IP
Gi0/0       1    110 P Active  local           192.168.1.3     192.168.1.1

R1 as Active (priority 110, with preempt) and R2 as Standby

ProtocolStandardLoad sharing
HSRPCisco proprietaryOne active router per group
VRRPIETF (RFC 5798)One active router per group
GLBPCisco proprietaryYes, several routers forward at once
Exam. Preempt is disabled by default: if R1 fails and comes back, it does not retake the Active role unless it has standby 1 preempt. HSRP roles are called Active and Standby (not master/slave). For the CCNA it is enough to understand the purpose and to know that VRRP is the open standard and GLBP adds per-host load balancing.

QoS: classify, mark and queue

Without QoS, an interface sends packets in arrival order (FIFO): an HTTP download can delay voice. As a Cisco design guideline, voice needs one-way delay ≤ 150 ms, jitter ≤ 30 ms and loss ≤ 1%. The scheme is always the same: classify (what traffic is it), mark (label it for the whole network), queue (who leaves first) and, when needed, avoid congestion and limit the rate.

QoS chain on an interfaceTraffic is classified, marked, queued and sent; congestion avoidance acts on the queues.Classifyclass-map / NBARMarkDSCP in the IP packetQueueLLQ, CBWFQAvoid congestionWREDPolicing / shapinglimit the rate

Each step is independent: you can classify without marking or queue without congestion avoidance.

PHB / classDSCPTypical use
Default / BE0Default traffic (best effort)
CS324Signaling
AF1110Low-priority data
AF2118Transactional data
AF3126Critical data or video
AF4134Interactive video
EF46Voice (Expedited Forwarding)

The mark lives in the ToS field of the IP header: of its 8 bits, 6 are DSCP (64 values) and 2 are ECN (RFC 2474). Each DSCP value maps to a PHB (per-hop behavior), the treatment each router gives the packet: EF (DSCP 46) for low-latency voice; AFxy with x = queue class (1 to 4) and y = drop precedence (1 to 3), DSCP = 8x + 2y (AF31 = 26); and CS for compatibility with IP precedence. In IOS you configure it with MQC: class-map (what), policy-map (what to do) and service-policy (where). Classification by application uses NBAR (match protocol).

class-map match-all RTP
 match protocol rtp
class-map match-all VOZ
 match dscp ef
class-map match-all WEB
 match protocol http
!
policy-map MARCAR-ENTRADA
 class RTP
  set dscp ef
!
policy-map SALIDA-WAN
 class VOZ
  priority percent 20
 class WEB
  bandwidth percent 50
 class class-default
  fair-queue
!
interface GigabitEthernet0/1
 service-policy input MARCAR-ENTRADA
 service-policy output SALIDA-WAN

MQC: mark voice on ingress and give it a priority queue on egress

Exam. Congestion management (FIFO, WFQ, CBWFQ, LLQ) acts once a queue exists; congestion avoidance (RED, WRED) drops packets before the queue fills to slow down TCP senders. Policing drops or re-marks the excess; shaping holds it in a queue. LLQ = CBWFQ + a strict-priority queue (priority) for voice.

Two-tier campus, WAN, PoE and VPN

In a collapsed core (two-tier) design the core and distribution layers are merged into one set of switches; access stays separate. It costs less and suits a small building or campus. The three-tier design (access, distribution, core) scales better across buildings. For Metro Ethernet WAN services you must tell three types apart, and a typical question is whether a point-to-point connection can be bought as E-LAN (no: that is E-Line):

ServiceTopologyDescription
E-LinePoint-to-pointJoins two sites, like a leased line
E-LANMultipoint (full mesh)All sites see each other as in a LAN
E-TreeRooted multipoint (hub and spoke)Leaves talk to the root, not to each other
StandardTypePort power (PSE)Pairs used
802.3afType 1 (PoE)15.4 W2
802.3atType 2 (PoE+)30 W2
802.3btType 360 W4
802.3btType 4100 W4

PoE powers phones, APs and cameras over the network cable. The device that supplies power is the PSE and the one that receives it is the PD; the higher the standard, the more power and the more cable pairs in use. The power available to the device is slightly less than the port power because of cable losses.

A VPN extends a private network over the Internet with four services: confidentiality (encryption), integrity, authentication and anti-replay. A site-to-site IPsec VPN joins two networks with a tunnel between two routers or firewalls; a remote-access VPN connects an individual user, usually with TLS/SSL. Besides IPsec, harden your trunks: the default native VLAN is VLAN 1; move it to a VLAN that you do not use on any access port, and make it the same at both ends of the trunk.

SW1(config)# vlan 999
SW1(config-vlan)# name NATIVA-SIN-USO
SW1(config-vlan)# exit
SW1(config)# interface GigabitEthernet0/1
SW1(config-if)# switchport mode trunk
SW1(config-if)# switchport trunk native vlan 999

SW1# show interfaces trunk

Change the native VLAN to an unused VLAN

Device access, AAA and 802.1X

There are three levels of access control to the console or VTY lines: line password, local login (the router's user database) and RBAC, which assigns privilege levels (0 to 15) or views so each user can run only certain commands. For large environments you use AAA: Authentication (who are you?), Authorization (what can you do?) and Accounting (what did you do?), centralized on a RADIUS or TACACS+ server.

username admin privilege 15 secret Cl4ve-Larga-2021
!
line vty 0 4
 login local
 transport input ssh
!
aaa new-model
radius server RAD1
 address ipv4 10.0.0.50 auth-port 1812 acct-port 1813
 key MiClaveCompartida
aaa authentication login default group radius local
aaa authorization exec default group radius local
aaa accounting exec default start-stop group radius

Local login and AAA against a RADIUS server, with local fallback

FeatureRADIUSTACACS+
TransportUDP 1812/1813TCP 49
EncryptionPassword onlyEntire packet body
AAAAuthentication and authorization togetherAll three functions separate
StandardOpen (RFC 2865)Cisco origin (RFC 8907)
  • Something you know: a password or PIN.
  • Something you have: a token, card or code-generator app.
  • Something you are: fingerprint, iris or face. Combining two or more is multifactor authentication.
802.1X rolesThe supplicant asks for access, the authenticator relays the request to the RADIUS server, which queries the directory.SupplicantPC, phone or WLAN clientAuthenticatorswitch or AP / WLCRADIUS serverdecides: Accept / RejectDirectoryusers and passwords

Until it authenticates, the port only passes EAPOL.

Fact. 802.1X is not a single protocol but a framework for port-based access control that uses EAP (RFC 3748) between the supplicant and the authenticator, and RADIUS between the authenticator and the server. It is the basis of WPA Enterprise on wireless networks, the topic that closes this chapter.

How the router chooses: prefix, distance and metric

  1. It checks the frame's FCS; if it fails, the frame is dropped.
  2. It de-encapsulates the layer 2 frame and reads the destination IP.
  3. It looks up the routing table for the best match for that IP.
  4. It encapsulates the packet with a new layer 2 header and trailer for the next hop.
  5. It sends it out the egress interface (on Cisco, the CEF forwarding plane).
Tie-breakers for installing a routeFirst the longest prefix, then administrative distance, then metric and, if all tie, load balancing.Longest prefix/28 beats /27 and /26Admin distancebetween different protocolsMetricwithin the same protocolECMPbalancing, 4 paths by default

They are evaluated in this order, and each criterion is only used if the previous one ties.

Route sourceAdministrative distance
Connected interface0
Static route1
eBGP20
EIGRP90
OSPF110
IS-IS115
RIP120
External EIGRP170
iBGP200
Unknown (not used)255

Example 1. The router has 10.1.1.0/26 by static route (AD 1), 10.1.1.0/27 by RIP (AD 120) and 10.1.1.0/28 by OSPF (AD 110). For destination 10.1.1.10 all three match, but OSPF /28 wins: the longest prefix is the most specific and AD is never consulted. Example 2. The same prefix, 203.0.113.0/28, arrives by eBGP from the provider (AD 20) and by OSPF as external (AD 110): with equal mask length, the one with the lower AD is installed, the eBGP one. Example 3. If the same protocol offers two routes, it compares the metric: hops in RIP, cost in OSPF (reference bandwidth 100 Mbps by default), a composite of bandwidth and delay in EIGRP. If everything ties, the router load-balances across up to 4 equal-cost paths (the IOS default for OSPF and EIGRP, changeable with maximum-paths).

R1(config)# ip route 10.1.1.0 255.255.255.192 192.168.1.2
R1(config)# ip route 0.0.0.0 0.0.0.0 192.0.2.1
R1(config)# ip route 0.0.0.0 0.0.0.0 198.51.100.1 130

R1# show ip route
S     10.1.1.0/26 [1/0] via 192.168.1.2
O     10.1.1.0/28 [110/2] via 192.168.1.9, 00:03:12, GigabitEthernet0/2
S*    0.0.0.0/0 [1/0] via 192.0.2.1

A static route with a modified AD works as a backup route (floating static)

Exam. AD is only compared when the prefix is identical. A route with AD 255 is never installed. Memorize at least connected 0, static 1, eBGP 20, EIGRP 90, OSPF 110 and RIP 120; iBGP 200 and external EIGRP also show up.

OSPF: states, DR/BDR and LSA types

OSPF rides directly on IP (protocol 89, not TCP or UDP), uses 224.0.0.5 for all routers and 224.0.0.6 for DR and BDR, has a cost metric, and supports null (type 0), plain-text (type 1) and MD5 (type 2) authentication. Its network type depends on the medium: a point-to-point serial interface does not elect a DR; Ethernet is a broadcast type and does. A neighbor goes through these states until it forms an adjacency:

Path to adjacencyInit, 2-Way, ExStart and Exchange, Loading and Full.InitI get the neighbor's hello2-Wayit sees me in its helloExStart / Exchangemaster and descriptorsLoadingrequest LSAs and run SPFFulldatabases synchronized

Only routers that form an adjacency reach Full.

StateWhat happens
DownNo hellos received.
AttemptOnly on NBMA networks (Frame Relay), with a manually configured neighbor.
InitA hello arrived from the neighbor, but my router ID is not in it yet.
2-WayBidirectional communication; this is where DR/BDR is elected.
ExStartMaster and slave and the initial sequence number are decided.
ExchangeDatabase descriptors (DBD) are exchanged.
LoadingMissing LSAs are requested (LSR/LSU) and SPF is calculated.
FullFull adjacency: identical databases.

On a broadcast network routers form a Full adjacency only with the DR and the BDR; between two DROthers the stable state is 2-Way, and that is normal: they are neighbors, not adjacent. The DR is chosen by the highest priority (default 1; priority 0 = does not participate) and, on a tie, by the highest router ID (manual, else highest loopback, else highest physical IP). The election is not preemptive: a new router with a better priority does not displace the current DR.

R1(config)# router ospf 1
R1(config-router)# router-id 1.1.1.1
R1(config-router)# network 10.0.0.0 0.0.0.255 area 0
R1(config)# interface GigabitEthernet0/0
R1(config-if)# ip ospf priority 100

R1# show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/DR         00:00:33    10.0.0.2        Gi0/0
3.3.3.3           1   2WAY/DROTHER    00:00:35    10.0.0.3        Gi0/0

Raise the priority on the router we want as DR and verify neighbor states

TypeNameOriginated byIn the routing table
1RouterAll routersO
2NetworkThe DRO
3SummaryAn ABRO IA
4ASBR SummaryAn ABR-
5ExternalAn ASBRO E1 / O E2
7NSSA ExternalAn ASBRO N1 / O N2

IPv6: abbreviating addresses and EUI-64

An IPv6 address has 128 bits, written as 8 groups of 16 bits (hextets) in hexadecimal separated by colons; each hex digit is worth 4 bits (a nibble). To read and speak it, you abbreviate with three rules (RFC 5952):

  1. In each group, drop the leading zeros, never the trailing ones (0DB8 = db8, but 0D80 is not d8).
  2. A run of groups made only of zeros is replaced by ::, and this can be done only once in an address; if there are two runs, shorten the longest. The zeros still exist, they are just omitted when writing.
  3. Write it in lowercase (preferred); the address is still the same.
2001:0DB8:0000:0000:0000:0000:0000:0001  ->  2001:db8::1
2001:0DB8:00A0:0000:0000:0000:0000:0010  ->  2001:db8:a0::10
FE80:0000:0000:0000:0202:B3FF:FE1E:8329  ->  fe80::202:b3ff:fe1e:8329
2001:db8::a::1   <- INVALID

Abbreviation examples

Building the EUI-64 identifierThe MAC is split in two, FFFE is inserted and the seventh bit is flipped; it is joined to the /64 prefix.48-bit MAC00:1A:2B:3C:4D:5ESplit 24 + 24OUI | NICInsert FFFE00:1A:2B:FF:FE:3C:4D:5EFlip U/L bit00 becomes 02Prefix + ID2001:db8:acad:1:21a:2bff:fe3c:4d5e

MAC 001A.2B3C.4D5E with prefix 2001:db8:acad:1::/64.

EUI-64 turns the 48 bits of the MAC into 64 bits. The seventh bit of the first byte is the U/L (universal/local) bit: it is flipped; since 00 (0000 0000) has that bit at 0, it becomes 02 (0000 0010), which is why the address starts with 021A:2BFF:FE3C:4D5E, abbreviated 21a:2bff:fe3c:4d5e. The router advertises the /64 prefix in an RA (stateless autoconfiguration, SLAAC) and the host fills in the other 64 bits; on the router, the interface gets a global address and an FE80:: link-local one with the same identifier.

R1(config)# ipv6 unicast-routing
R1(config)# interface GigabitEthernet0/0
R1(config-if)# ipv6 address 2001:db8:acad:1::/64 eui-64
R1(config-if)# no shutdown

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

Configure a global address with EUI-64 on a router interface

TypePrefix
Global unicast2000::/3
Link-localFE80::/10
Unique localFC00::/7
MulticastFF00::/8

WLAN: 802.11 standards, architectures and security

StandardYearBandMax theoretical rate
802.1119972.4 GHz2 Mbps
802.11b19992.4 GHz11 Mbps
802.11a19995 GHz54 Mbps
802.11g20032.4 GHz54 Mbps
802.11n (Wi-Fi 4)20092.4 / 5 GHz600 Mbps
802.11ac (Wi-Fi 5)20135 GHz6.9 Gbps
802.11ax (Wi-Fi 6)20212.4 / 5 GHz9.6 Gbps

Speed grew by combining bands, more spatial streams (MIMO) and wider channels: 802.11n (high throughput, HT) bonds two 20 MHz channels into a 40 MHz one; 802.11ac (very high throughput, VHT) reaches 80 and 160 MHz in 5 GHz only; 802.11ax (high efficiency, Wi-Fi 6) makes better use of the medium with many clients (OFDMA). An AP can run in several ways:

Split-MAC with CAPWAPThe lightweight AP builds two CAPWAP tunnels to the controller: one for control and one for data.Client802.11Lightweight APradio and real timeCAPWAP tunnelUDP 5246 control / 5247 dataWLCmanagement, security, roaming

With a lightweight AP in local mode the switch port is an access port: no trunk to the AP is needed.

ArchitectureHow it works
AutonomousThe AP is configured on its own and needs a trunk to the switch for several VLANs.
Cloud-basedAPs managed from a cloud dashboard.
Split-MAC with centralized WLCThe AP hands management to the WLC and talks to it over CAPWAP.
Embedded controllerThe WLC runs inside an access switch; for small and medium campuses.
Mobility ExpressOne AP takes on controller functions for the others; for small branches.
MethodEncryptionCurrent status
Open authenticationNoneNo authentication or encryption: anyone can listen to your traffic.
WEPRC4Broken for over 20 years: do not use.
WPATKIP (RC4)Stopgap from 2003: avoid.
WPA2AES-CCMP802.11i standard; today the minimum acceptable.
WPA3SAE + CCMP/GCMPReplaces PSK with SAE, requires management frame protection.
Exam. Each method has two modes: Personal (pre-shared key, PSK, what almost every home uses) and Enterprise (802.1X with RADIUS or PKI X.509 certificates, one credential per user or device). Open authentication does not encrypt: anyone within range of the AP can capture traffic (sniffing) and associate.

Class videos

Recorded live in 2021; Spanish audio with Spanish, English, French and Portuguese subtitles. When you play it, the video loads from YouTube. Day 2 playlist on YouTube

Test what you learned

1. Two routers share a VLAN and the hosts' gateway is 192.168.1.1, the HSRP virtual IP. The primary router fails and comes back up. What must be configured so that it regains the Active role?

Answer. The standby 1 preempt command with a priority higher than the other router's. By default HSRP does not preempt, so the router that became Active keeps the role until it fails itself.

2. Which DSCP value corresponds to the EF class and what type of traffic is it applied to?

Answer. DSCP 46, voice traffic that requires low latency and jitter. In LLQ it is combined with a strict-priority queue (priority), so it leaves first even if HTTP traffic is waiting.

3. The router receives 10.1.1.0/28 by OSPF (AD 110) and 10.1.1.0/26 by a static route (AD 1). The destination is 10.1.1.9. Which route does it use?

Answer. The OSPF /28 route. The longest prefix is applied first, being more specific; administrative distance is only used if the prefix is identical, so the static route's AD 1 does not count.

4. On an Ethernet, a DROther has another DROther and the DR as neighbors. What state does it reach with each one?

Answer. With the DR it reaches Full; with the other DROther it stays in 2-Way. This is expected: only the DR and BDR form an adjacency with everyone, which limits LSA updates on the broadcast network.

5. Why is WPA3 preferable to WPA2-Personal, and what protocol does a lightweight AP use to talk to the WLC?

Answer. WPA3-Personal uses SAE instead of the WPA2 PSK exchange, which makes offline dictionary attacks harder, and it requires management frame protection. The lightweight AP uses CAPWAP tunnels: UDP 5246 for control and UDP 5247 for data.

Key takeaways

  • HSRP creates a virtual gateway (virtual IP and MAC) with one Active and one Standby router; it requires the same VLAN, and preempt is not enabled by default.
  • QoS = classify, mark (DSCP, 6 bits of ToS), queue and avoid congestion; EF = 46 for voice, AFxy = 8x + 2y.
  • Collapsed core = two tiers; E-Line is point-to-point, E-LAN multipoint and E-Tree rooted. PoE: 15.4 W (af), 30 W (at), 60 W and 100 W (bt).
  • AAA separates authentication, authorization and accounting; RADIUS (UDP) encrypts only the password and TACACS+ (TCP 49) the whole body; 802.1X is a framework with supplicant, authenticator and server.
  • Route selection: longest prefix, then AD between protocols, then metric, then balancing across up to 4 equal-cost paths.
  • OSPF: Down, Init, 2-Way, ExStart, Exchange, Loading, Full; between DROthers it stays in 2-Way; the DR is chosen by priority, then router ID.
  • IPv6: drop leading zeros and use :: only once; EUI-64 inserts FFFE and flips the U/L bit. In WLAN use WPA2/WPA3 and discard open, WEP and WPA.

Official resources

Source and credits. Chapter written from the CCNA 200-301 Bootcamp that Jesús Espinoza recorded live in 2021, on the v1.0 syllabus; the current exam is v1.1. Text drafted with AI assistance and reviewed; original diagrams by The House of Routing. Technical data and configuration were checked against Cisco's official documentation, IETF RFCs and IEEE standards.

Navigate