Security and Quality of Service in IPv6
Open in the Padhaiko app3.1 Network threats and vulnerabilities in IPv6
While IPv6 eliminates certain IPv4 flaws (such as broadcast storms and forced NAT complexity) and improves compatibility with end-to-end encryption, its new header model, autoconfiguration protocols, and transition mechanisms introduce distinct security vulnerabilities.
Major IPv6 Threat Categories
- Reconnaissance and Predictable Addressing: Although brute-force scanning of a
/64subnet (2^64 hosts) is infeasible, attackers target predictable low host IDs (::1,::2,::80), DNS records, or Modified EUI-64 addresses whose embedded MAC reveals vendor hardware and tracks a roaming device across networks. - Neighbor Discovery Protocol (NDP) and SLAAC Attacks: Because standard NDP messages are unauthenticated:
- Rogue Router Advertisement (RA) Spoofing: An attacker on the LAN sends fake Type 134 RAs advertising itself as the default gateway (Man-in-the-Middle) or pushing rogue prefixes/DNS servers (RDNSS).
- Neighbor Spoofing / Cache Poisoning: Forged Neighbor Advertisements (Type 136) poison victims' neighbor caches (IPv6 equivalent of ARP spoofing).
- DAD Denial-of-Service: An attacker answers every Duplicate Address Detection NS with a fake NA, preventing legitimate hosts from configuring any IPv6 address.
- Extension Header Evasion and Fragmentation Attacks: Attackers chain unusually long sequences of Extension Headers so stateless firewalls or ASICs fail to reach the upper-layer TCP/UDP ports, or send overlapping/tiny IPv6 fragments (mitigated by RFC 5722 and RFC 6946). Deprecated Routing Header Type 0 (RH0) allowed amplification/bypass loops until banned by RFC 5095.
- ICMPv6 Abuse and PMTUD Manipulation: Spoofed ICMPv6 Type 2 (Packet Too Big) messages claiming tiny MTUs force senders into severe performance degradation or fragmentation; conversely, blindly blocking all ICMPv6 creates PMTUD black holes.
- Dual-Stack and Transition Surface Blind Spots: Many networks run IPv6 enabled by default on OSes while security teams only monitor IPv4. Attackers exploit unmonitored IPv6 interfaces, 6to4/Teredo automatic tunnels, or rogue DHCPv6 servers to bypass IPv4 firewalls.
- Multicast Amplification: Sending spoofed requests to link-local
ff02::1(All-Nodes) orff02::2(All-Routers) triggers amplified responses across the local segment.
3.2 Security techniques
Securing an IPv6 network combines Layer 2 first-hop hardening, cryptographic neighbor validation, privacy-preserving addressing, and ingress filtering.
| Security Technique | Standard / RFC | Vulnerability Addressed | How It Works |
|---|---|---|---|
| SEND (Secure Neighbor Discovery) | RFC 3971 / RFC 3972 | Rogue RA, NS/NA spoofing, DAD DoS | Replaces raw NDP with Cryptographically Generated Addresses (CGAs) bound to a public/private key pair plus RSA Signature, Timestamp, and Nonce options; routers prove authorization via X.509 certificates. |
| RA Guard & DHCPv6 Guard | RFC 6105 / RFC 7610 | Rogue RA and Rogue DHCPv6 servers on LAN switches | Layer 2 switch drops RA (Type 134) and DHCPv6 server messages arriving on untrusted access ports, permitting them only on designated router uplink ports. |
| Privacy Extensions & Stable Opaque IDs | RFC 8981 / RFC 7217 | Device tracking and reconnaissance via EUI-64 MAC addresses | Replaces EUI-64 with temporary random interface IDs (RFC 8981) for outbound clients and cryptographically hashed stable-per-network IDs (RFC 7217) instead of raw MACs. |
| Hop Limit = 255 Verification | RFC 4861 | Off-link NDP spoofing | Every NDP receiver must discard RS/RA/NS/NA/Redirect packets whose Hop Limit is less than 255 (since any router decrement lowers it below 255). |
| BCP 38 / uRPF Filtering | RFC 2827 / RFC 3704 | Source IPv6 address spoofing and DDoS reflection | Edge routers validate that a packet's source IPv6 prefix matches the customer's assigned prefix or the reverse routing table interface (Unicast RPF). |
| IPv6 Fragment Hardening | RFC 5722 / RFC 6980 | Fragment overlap and RA fragmentation evasion | Strictly forbids overlapping IPv6 fragments (RFC 5722) and prohibits fragmenting NDP messages across multiple packets (RFC 6980). |
3.3 IPSEC framework
IPsec (Internet Protocol Security, RFC 4301) is a suite of open protocols operating at the Network Layer (Layer 3) to secure IP traffic end-to-end or gateway-to-gateway. Unlike application-layer TLS, IPsec protects all IP traffic (TCP, UDP, ICMPv6) transparently without modifying individual applications.
Security Services Provided by IPsec
- Confidentiality: Encrypts packet payloads (and inner headers in Tunnel mode) using symmetric ciphers such as AES-GCM or AES-CBC.
- Data Integrity & Origin Authentication: Verifies via cryptographic Message Authentication Codes (e.g., HMAC-SHA-256) that packets were not altered in transit and truly came from the claimed peer.
- Anti-Replay Protection: Uses monotonically increasing 32-bit or 64-bit Sequence Numbers with a sliding receive window to reject captured and replayed packets.
AH vs. ESP and Transport vs. Tunnel Modes
IPsec implements protection using two extension headers—AH (Next Header = 51) and ESP (Next Header = 50)—each usable in either Transport Mode or Tunnel Mode.
| Aspect | Authentication Header (AH, Next Header 51) | Encapsulating Security Payload (ESP, Next Header 50) |
|---|---|---|
| Confidentiality (Encryption) | No (payload remains plaintext) | Yes (encrypts upper-layer payload, and inner IP header in Tunnel mode) |
| Integrity & Authentication | Authenticates payload plus immutable outer IPv6 header fields (Source, Destination, Version, Payload Length) | Authenticates ESP header, encrypted payload, and ESP trailer (does not authenticate outer IP header) |
| NAT Compatibility | Fails across IPv4 NAT (because header address rewriting invalidates AH ICV) | Works across NAT via UDP encapsulation (NAT-T), and natively over end-to-end IPv6 |
| Common Usage | Rare today unless encryption is disallowed/unnecessary | Standard choice for VPNs, site-to-site tunnels, and host-to-host security |
- Transport Mode (End-to-End): Protects communication directly between two endpoints. Inserts the AH or ESP header between the original IPv6 header and the upper-layer TCP/UDP header. No new IP header is added.
- Tunnel Mode (Gateway-to-Gateway / Remote Access VPN): Encapsulates the entire original IPv6 packet (including its original IPv6 header) inside AH or ESP, and prepends a new outer IPv6 header whose endpoints are the security gateways. Hides internal topology and source/destination addresses from external observers.
Original IPv6 Packet:
[ Orig IPv6 Hdr ] [ TCP Hdr | Data ]
ESP Transport Mode (protects host-to-host payload):
[ Orig IPv6 Hdr (NH=50) ] [ ESP Hdr | IV ] [ TCP Hdr | Data | Pad | NH=6 ] [ ESP ICV ]
|<-------- Encrypted -------->|
|<--------------- Authenticated -------------->|
ESP Tunnel Mode (protects entire inner packet between gateways):
[ Outer IPv6 Hdr (NH=50) ] [ ESP Hdr | IV ] [ Orig IPv6 Hdr | TCP | Data | Pad | NH=41 ] [ ESP ICV ]
|<-------------- Encrypted --------------->|
|<--------------------- Authenticated --------------------->|Security Associations (SA), SPD, SAD, and IKEv2
- Security Association (SA): A unidirectional (one-way) logical security contract between two peers specifying algorithms, keys, and lifetimes. Each SA is uniquely identified by the 3-tuple:
(SPI, Destination IP Address, Security Protocol [AH or ESP]), where SPI is a 32-bit Security Parameter Index carried inside the AH/ESP header. Two-way traffic requires at least two SAs (inbound and outbound). - Security Policy Database (SPD): Rule table consulted for every packet specifying one of three actions: PROTECT (apply IPsec), BYPASS (send plaintext), or DISCARD (drop).
- Security Association Database (SAD): Stores active SA parameters (keys, SPI, sequence counter, mode, lifetimes).
- IKEv2 (Internet Key Exchange v2, RFC 7296): Runs over UDP port 500 (or 4500 for NAT-T) to mutually authenticate peers (via certificates or pre-shared keys), perform Diffie-Hellman key agreement, and dynamically negotiate IKE SAs and Child (IPsec) SAs with automatic key rotation.
3.4 Basic firewall and filtering concepts
A firewall enforces network security boundaries by inspecting packet headers (and optionally state or application payloads) against an ordered policy table.
Firewall Filtering Architectures
- Stateless Packet Filter (ACLs): Inspects each packet independently based on 5-tuple fields (Source/Destination IPv6 prefix, Next Header, TCP/UDP ports, Interface). Fast in hardware, but cannot tell whether an incoming packet belongs to an established outbound session.
- Stateful Inspection Firewall: Maintains a dynamic connection state table (tracking TCP handshakes and UDP/ICMPv6 pseudo-sessions). Automatically permits return packets matching valid outbound flows while blocking unsolicited inbound connections.
- Application-Layer / Next-Generation Firewall (NGFW): Performs deep packet inspection, TLS/DNS filtering, and intrusion prevention alongside IPv6-aware stateful rules.
IPv6-Specific Firewall Filtering Rules
Deploying an IPv6 firewall requires three practices beyond standard IPv4 rulesets:
- Dual-Stack Policy Parity: Every security zone (DMZ, internal LAN, guest Wi-Fi) must enforce equivalent filtering on both IPv4 and IPv6; leaving IPv6 open while locking down IPv4 creates an instant bypass.
- Extension Header Inspection & Validation:
- Drop deprecated Routing Header Type 0 (RH0) packets.
- Enforce reasonable limits on Extension Header chain depth so attackers cannot hide TCP/UDP headers past a firewall's parse window.
- Reject overlapping IPv6 fragments (RFC 5722) and fragmented NDP packets (RFC 6980).
- RFC 4890 ICMPv6 Filtering Policy: Because IPv6 depends on ICMPv6 for link operation and Path MTU Discovery, firewalls must follow RFC 4890:
- Always Permit (Transiting & Local): Error messages Type 1 (Destination Unreachable), Type 2 (Packet Too Big), Type 3 (Time Exceeded), and Type 4 (Parameter Problem).
- Permit Locally Only (Do Not Forward Across Router): NDP Types 133–137 (only when
Hop Limit == 255) and MLD Types 130–132, 143. - Rate-Limit / Selectively Allow: Echo Request/Reply (
128/129).
3.5 Zero trust networking
Traditional perimeter ("castle-and-moat") security assumed everything inside the corporate LAN could be trusted once past the border firewall. Lateral movement by malware, remote work, and cloud SaaS rendered perimeter-only trust obsolete.
Zero Trust Architecture (ZTA — NIST SP 800-207)
Zero Trust Networking operates on the axiom "Never trust, always verify." Network location (inside vs. outside a corporate subnet) confers zero implicit trust. Every access request is explicitly authenticated, authorized, and encrypted on a per-session basis using user identity, device health/posture, and least-privilege context.
Core Principles and Logical Components
- Core Principles:
- Continuous Verification: Evaluate identity, device compliance, and risk score before and during every session.
- Least-Privilege Access & Micro-Segmentation: Restrict each host/workload strictly to the exact services it needs (down to
/128host or workload level rather than broad/16subnets). - Assume Breach: Minimize blast radius with end-to-end encryption (mTLS / IPsec) and granular telemetry.
- NIST ZTA Logical Components:
- Policy Engine (PE): Decides whether to grant, deny, or revoke access based on identity, device posture, and threat intelligence.
- Policy Administrator (PA): Signals the enforcement point to open or tear down the encrypted communication path.
- Policy Enforcement Point (PEP): The data-plane proxy or gateway enabling, monitoring, and terminating connections between subject and enterprise resource.
How IPv6 Strengthens Zero Trust: In IPv4, NAT hides thousands of clients behind one gateway IP, breaking per-device identity at Layer 3. IPv6 gives every endpoint, container, and IoT sensor a globally unique IPv6 address (without NAT), enabling clean end-to-end IPsec/mTLS, fine-grained micro-segmentation, and unambiguous audit logging.
3.6 QoS concept in IPv6
Quality of Service (QoS) manages network resources so delay-sensitive or mission-critical traffic receives predictable performance during congestion across four metrics: Bandwidth (throughput), Delay/Latency (end-to-end transit time), Jitter (variation in packet arrival delay), and Packet Loss.
IntServ vs. DiffServ
| Aspect | Integrated Services (IntServ) | Differentiated Services (DiffServ) |
|---|---|---|
| Granularity | Per-flow end-to-end resource reservation | Coarse class-based aggregates (Per-Hop Behaviors) |
| Signaling Protocol | RSVP (Resource Reservation Protocol) reserves state on every router | No per-flow signaling; packets are marked at the edge |
| Scalability | Poor in Internet core (routers cannot store millions of flow states) | High scalability; core routers inspect a single header field |
| Service Classes | Guaranteed Service, Controlled-Load Service | Expedited Forwarding (EF), Assured Forwarding (AF), Best Effort (BE) |
IPv6 QoS Header Mechanisms: Traffic Class and Flow Label
IPv6 provides two dedicated fields in the 40-byte base header to support DiffServ and stateless flow classification:
- Traffic Class (8 bits): Identical in layout to modern IPv4's updated ToS byte:
- Bits 0–5 (6 bits — DSCP, Differentiated Services Code Point): Selects 1 of 64 Per-Hop Behaviors (e.g., EF = 46 for low-latency voice; AF41 = 34 for interactive video; CS0 = 0 for Best Effort).
- Bits 6–7 (2 bits — ECN, Explicit Congestion Notification, RFC 3168): Allows ECN-capable routers to set bits
11(Congestion Experienced) instead of dropping packets, prompting TCP/QUIC senders to slow down without retransmission delay.
- Flow Label (20 bits, RFC 6437):
- Set by the source host (or edge router) to a pseudo-random non-zero value constant across all packets of a single connection/stream.
- Crucial IPv6 Advantage: In IPv4, routers inspect TCP/UDP port numbers (5-tuple) for load balancing (ECMP) and QoS. When packets are encrypted with IPsec ESP, transport ports are hidden! In IPv6, intermediate routers classify and load-balance flows statelessly using the 3-tuple
(Source IPv6, Destination IPv6, Flow Label)without decrypting ESP or parsing Extension Header chains.
3.7 QoS in multimedia and real-time applications
Multimedia and real-time applications (VoIP telephony, video conferencing, telemedicine, live streaming, cloud gaming) have tight temporal budgets compared to elastic web or file-transfer traffic.
| Application | One-Way Latency Target | Jitter Target | Packet Loss Target | Recommended DSCP |
|---|---|---|---|---|
| Interactive Voice (VoIP) | <= 150 ms | <= 30 ms | <= 1% | EF (46) |
| Video Conferencing | <= 150 ms | <= 30 ms | <= 1% | AF41 (34) |
| Live Streaming Video | <= 4–5 s (buffered) | Tolerated via jitter buffer | <= 1–2% | AF31 (26) |
| Bulk Data / File Transfer | Elastic | Elastic | Handled by TCP | DF / Best Effort (0) |
Core QoS Mechanisms for Multimedia over IPv6
- Classification and Marking: Edge switches/routers classify RTP/UDP multimedia streams (or match the IPv6 3-tuple with Flow Label) and mark Traffic Class DSCP (e.g.,
EF = 46for voice,AF41 = 34for video). - Policing and Shaping (Token Bucket):
- Policing: Drops or re-marks excess traffic above a Committed Information Rate (CIR) immediately (hard cutoff, zero added delay).
- Shaping: Buffers excess bursts in a queue to smooth output rate (avoids drops, adds slight buffering delay—avoid shaping on strict real-time voice).
- Congestion Management (Queuing & Scheduling):
- FIFO / Best Effort: Causes head-of-line blocking when large file packets delay small VoIP frames.
- WFQ / CBWFQ (Class-Based Weighted Fair Queuing): Guarantees minimum bandwidth shares per traffic class.
- LLQ (Low-Latency Queuing): Combines CBWFQ with a strict priority queue for DSCP EF voice packets so voice is always transmitted immediately without waiting behind bulk downloads (policed to prevent starving other classes).
- Congestion Avoidance (WRED & ECN): Weighted Random Early Detection drops/marks lower-priority TCP packets early before queues overflow completely, preventing TCP global synchronization and protecting real-time UDP/RTP queues.
Worked Examples
1
An IPv6 host generates a 1000-byte TCP segment (20-byte TCP header + 980-byte payload), resulting in a 1040-byte original IPv6 packet (40-byte base IPv6 header + 1000-byte TCP segment). Suppose this traffic is protected using IPsec ESP with AES-128-CBC (16-byte IV and 16-byte cipher block size) and HMAC-SHA-256 (16-byte ICV trailer). The ESP header itself is 8 bytes (4-byte SPI + 4-byte Sequence Number), and the ESP trailer requires 2 mandatory bytes (Pad Length + Next Header) before padding to a 16-byte multiple.
Calculate the total transmitted packet size and overhead in bytes under:
- ESP Transport Mode
- ESP Tunnel Mode (between two IPv6 security gateways)
1. ESP Transport Mode Calculation: In Transport Mode, the original 40-byte IPv6 header stays on the outside, and ESP encrypts the 1000-byte TCP segment plus trailer:
- Data before padding =
1000 (TCP) + 2 (Pad Length + Next Header) = 1002 bytes. - Round
1002up to the next multiple of16:16 x 63 = 1008 bytes(requiring6padding bytes). - Total ESP Transport Mode packet size:
40 (IPv6 Hdr) + 8 (ESP Hdr) + 16 (IV) + 1008 (Encrypted Payload+Trailer) + 16 (ICV) = 1088 bytes - Overhead added over original 1040-byte packet =
1088 - 1040 = 48 bytes.
2. ESP Tunnel Mode Calculation: In Tunnel Mode, the entire 1040-byte original IPv6 packet is encrypted inside ESP, and a new 40-byte outer IPv6 header is prepended:
- Data before padding =
1040 (Inner IPv6 Packet) + 2 (Pad Length + Next Header) = 1042 bytes. - Round
1042up to the next multiple of16:16 x 66 = 1056 bytes(requiring14padding bytes). - Total ESP Tunnel Mode packet size:
40 (Outer IPv6 Hdr) + 8 (ESP Hdr) + 16 (IV) + 1056 (Encrypted Block) + 16 (ICV) = 1136 bytes - Overhead added over original 1040-byte packet =
1136 - 1040 = 96 bytes.
- ESP Transport Mode: Total size = 1088 bytes (overhead = 48 bytes).
- ESP Tunnel Mode: Total size = 1136 bytes (overhead = 96 bytes).
2
An IPv6 enterprise network deploys VoIP over IPv6 using G.711 audio (64 kbps codec generating 160 bytes of voice payload every 20 ms = 50 packets/sec). Each packet carries an 18-byte Ethernet header/FCS, 40-byte IPv6 base header, 8-byte UDP header, and 12-byte RTP header. Voice packets are marked with DSCP EF (46) and ECN 10 (ECT(0)).
- Compute the exact 8-bit IPv6 Traffic Class byte in binary, decimal, and hexadecimal.
- Calculate the Layer 2 bandwidth required per VoIP call (in kbps) and the minimum LLQ priority queue bandwidth needed for 25 simultaneous calls (in kbps and Mbps).
1. Computing the 8-Bit IPv6 Traffic Class Field:
- The 6-bit DSCP value
46in binary is101110(32 + 8 + 4 + 2 = 46). - Appending the 2-bit ECN code
10(decimal 2) yields the 8-bit byte:10111010 - Converting
10111010to decimal:(46 x 4) + 2 = 184 + 2 = 186. - Converting
1011 1010to hexadecimal:1011 = B,1010 = A->0xBA.
2. Calculating Bandwidth per Call and Total LLQ Bandwidth:
- Total Layer 2 frame size per voice packet:
18 (Ethernet) + 40 (IPv6) + 8 (UDP) + 12 (RTP) + 160 (Voice) = 238 bytes = 1904 bits - At
50 packets/sec:Bandwidth per call = 238 bytes x 8 bits/byte x 50 pkt/s = 95,200 bps = 95.2 kbps - For
25simultaneous calls:Total LLQ bandwidth = 25 x 95.2 kbps = 2380 kbps = 2.38 Mbps
- IPv6 Traffic Class:
10111010(binary) = 186 (decimal) =0xBA(hex). - Bandwidth per VoIP call: 95.2 kbps; Total LLQ priority bandwidth for 25 calls: 2380 kbps (2.38 Mbps).
3
(Exam-style Design & Troubleshooting) A university campus enables dual-stack IPv6 on its student Wi-Fi and wired labs. Shortly after deployment, three incidents occur:
- Several lab PCs suddenly lose Internet connectivity because their default gateway changes to a student laptop's link-local address.
- Encrypted site-to-site IPsec ESP video streams experience severe jitter during peak hours because core routers cannot inspect UDP ports to prioritize them.
- Large HTTPS downloads stall indefinitely after a security engineer blocks all ICMPv6 types at the campus edge firewall.
Identify the root cause of each incident and specify the exact IPv6 protocol mechanism or policy fix.
Diagnosing Incident 1 (Default Gateway Hijack):
- Root Cause: Rogue Router Advertisement (RA) Spoofing (either malicious or misconfigured Internet Connection Sharing on a student laptop). Standard NDP accepts unauthenticated ICMPv6 Type 134 RAs from any host on the link.
- Fix: Enable RA Guard (RFC 6105) on all access-layer Ethernet switches (and wireless controllers) so RAs are permitted only on trusted router uplink ports, optionally paired with SEND (RFC 3971) on critical infrastructure links.
Diagnosing Incident 2 (Jitter on IPsec ESP Streams):
- Root Cause: IPsec ESP encrypts the TCP/UDP header, preventing intermediate core routers from performing 5-tuple port-based QoS classification.
- Fix: Configure the originating hosts or edge IPsec gateways to copy/mark DSCP (e.g.,
AF41/EF) in the outer IPv6 Traffic Class field and populate a unique, consistent 20-bit Flow Label (RFC 6437) per stream. Core routers then classify and load-balance using the outer 3-tuple(Src IPv6, Dst IPv6, Flow Label)and DiffServ LLQ/CBWFQ without needing to decrypt ESP.
Diagnosing Incident 3 (Stalled Large HTTPS Downloads):
- Root Cause: PMTUD Black Hole caused by blindly blocking ICMPv6 Type 2 (Packet Too Big) at the firewall. Servers sending 1500-byte TCP segments across a smaller-MTU path never receive the Type 2 feedback needed to reduce segment sizes.
- Fix: Apply RFC 4890 ICMPv6 filtering guidelines: explicitly allow ICMPv6 error messages (Types 1, 2, 3, and 4) through the transit firewall while keeping NDP restricted to local links (
Hop Limit == 255).
- Incident 1: Rogue RA attack -> deploy RA Guard (RFC 6105) on access switches (and SEND where supported).
- Incident 2: Encrypted UDP ports inside IPsec ESP -> mark outer IPv6 Traffic Class (DSCP) and 20-bit Flow Label for stateless core DiffServ/ECMP QoS.
- Incident 3: PMTUD black hole from blocking ICMPv6 -> adopt RFC 4890 firewall rules permitting ICMPv6 error types 1–4 (especially Type 2 Packet Too Big).
Exercises
Practice Exercises — Security and Quality of Service in IPv6
Explain three Neighbor Discovery Protocol (NDP) vulnerabilities in IPv6 (Rogue RA, Neighbor Spoofing, and DAD DoS) and describe how RA Guard and SEND (Secure Neighbor Discovery) mitigate them.
Three NDP Vulnerabilities:
- Rogue Router Advertisement (RA): Any node on the LAN can send an unauthenticated ICMPv6 Type 134 RA advertising itself as default router or distributing rogue prefixes/DNS, enabling Man-in-the-Middle interception or DoS.
- Neighbor Spoofing: An attacker replies to Neighbor Solicitations (or sends unsolicited Type 136 NAs) mapping a victim's IPv6 address to the attacker's MAC address, poisoning neighbor caches.
- DAD Denial-of-Service: An attacker listens for DAD NS probes (source
::) and immediately replies with a forged NA claiming every tentative address is already taken, blocking hosts from joining the network.
Mitigations via RA Guard and SEND:
- RA Guard (RFC 6105): Configured on Layer 2 switches to filter out ICMPv6 Type 134 RA packets arriving on untrusted client access ports, allowing RAs only from legitimate router ports.
- SEND (RFC 3971): Secures NDP cryptographically using Cryptographically Generated Addresses (CGAs) (binding the interface ID to a public key hash), RSA digital signatures, Timestamp/Nonce anti-replay options, and X.509 router authorization certificates.
Unauthenticated NDP is vulnerable to Rogue RAs (gateway hijacking), Neighbor Spoofing (cache poisoning), and DAD DoS (blocking address assignment). RA Guard (RFC 6105) blocks unauthorized RAs at Layer 2 switch ports, while SEND (RFC 3971) uses CGAs, RSA signatures, timestamps/nonces, and router certificates to cryptographically authenticate all NDP messages.
Compare IPsec Authentication Header (AH) and Encapsulating Security Payload (ESP), and explain the difference between Transport Mode and Tunnel Mode in IPv6. Also define a Security Association (SA) and the roles of SPD, SAD, and IKEv2.
AH vs. ESP and Transport vs. Tunnel Mode:
- AH (
Next Header = 51): Provides integrity, origin authentication, and anti-replay across the payload and immutable outer IPv6 header fields, but no encryption. - ESP (
Next Header = 50): Provides encryption (confidentiality) plus integrity, authentication, and anti-replay for its payload/trailer (does not authenticate the outer IPv6 header). - Transport Mode: Protects host-to-host upper-layer payloads using the original IPv6 header.
- Tunnel Mode: Encapsulates the entire original IPv6 packet inside AH/ESP and adds a new outer IPv6 header between security gateways.
SA, SPD, SAD, and IKEv2:
- Security Association (SA): Unidirectional contract uniquely identified by
(SPI, Destination IP, Protocol [AH/ESP]). - SPD (Security Policy Database): Defines whether matching traffic is Protected, Bypassed, or Discarded.
- SAD (Security Association Database): Holds active SA cryptographic keys, algorithms, and sequence numbers.
- IKEv2: Automatically authenticates peers and negotiates/rotates SA keys over UDP port 500/4500.
AH authenticates the packet and outer IPv6 header without encryption, whereas ESP encrypts and authenticates the encapsulated payload. Transport Mode protects end-host payloads under the original header, while Tunnel Mode wraps the entire IPv6 packet inside a new outer header. IPsec enforces policies via the SPD, tracks one-way SAs (SPI, Dest IP, AH/ESP) in the SAD, and negotiates keys automatically via IKEv2.
An original IPv6 packet consists of a 40-byte base IPv6 header and a 1200-byte UDP datagram. It is secured with IPsec ESP using an 8-byte ESP header, 16-byte IV, 16-byte AES block alignment (with 2-byte Pad Length + Next Header trailer), and 16-byte ICV. Compute the exact total packet size under:
- ESP Transport Mode
- ESP Tunnel Mode
1. ESP Transport Mode:
- Payload + trailer before padding =
1200 + 2 = 1202 bytes. - Next multiple of 16 >= 1202 is
16 x 76 = 1216 bytes(14bytes padding). - Total size =
40 (IPv6) + 8 (ESP Hdr) + 16 (IV) + 1216 (Encrypted) + 16 (ICV) = 1296 bytes.
2. ESP Tunnel Mode:
- Inner original packet =
40 + 1200 = 1240 bytes. - Inner packet + trailer before padding =
1240 + 2 = 1242 bytes. - Next multiple of 16 >= 1242 is
16 x 78 = 1248 bytes(6bytes padding). - Total size =
40 (Outer IPv6) + 8 (ESP Hdr) + 16 (IV) + 1248 (Encrypted) + 16 (ICV) = 1328 bytes.
- ESP Transport Mode: 1296 bytes
- ESP Tunnel Mode: 1328 bytes
What is Zero Trust Networking (ZTA) and how does it differ from traditional perimeter security? Explain the roles of the Policy Engine (PE), Policy Administrator (PA), and Policy Enforcement Point (PEP), and state how IPv6 facilitates Zero Trust deployment.
Zero Trust vs. Perimeter Security: Traditional perimeter security trusts all hosts inside a corporate firewall/VPN ("castle-and-moat"), allowing attackers who compromise one endpoint to move laterally. Zero Trust (NIST SP 800-207) enforces "never trust, always verify"—requiring continuous identity/device authentication, least-privilege access, and micro-segmentation for every request regardless of network location.
ZTA Components and IPv6 Synergy:
- Policy Engine (PE): Evaluates identity, device health, and context to make access decisions.
- Policy Administrator (PA): Commands the PEP to establish or terminate a session.
- Policy Enforcement Point (PEP): Proxies, monitors, and enforces access on the data path.
- Role of IPv6: Eliminates NAT ambiguity so every workload/device has a globally unique address for clean end-to-end IPsec/mTLS,
/128micro-segmentation, and accurate audit telemetry.
Zero Trust ("never trust, always verify") replaces implicit LAN trust with continuous per-session verification and micro-segmentation. The PE decides access, the PA configures the session, and the PEP enforces it on the data plane; IPv6 aids ZTA by giving every endpoint a unique non-NATed identity for end-to-end encryption and granular segmentation.
Explain how the Traffic Class and Flow Label fields in the IPv6 header support DiffServ QoS and multimedia real-time applications (even when IPsec ESP is active). If a video-conferencing stream is marked with DSCP AF41 (34) and ECN 00, calculate the resulting 8-bit Traffic Class value in binary, decimal, and hexadecimal.
Role of Traffic Class and Flow Label in Real-Time Multimedia QoS:
- Traffic Class (8 bits): Carries a 6-bit DSCP value (allowing DiffServ routers to place voice in strict-priority LLQ queues and video in CBWFQ/AF queues) plus 2-bit ECN (enabling congestion signaling without packet drops).
- Flow Label (20 bits): Uniquely identifies a stream in the unencrypted base header so core routers can classify, queue, and ECMP load-balance real-time flows statelessly via
(Src IPv6, Dst IPv6, Flow Label)even when IPsec ESP encrypts TCP/UDP ports.
Calculating Traffic Class for DSCP AF41 (34) and ECN 00:
34in 6-bit binary is100010(32 + 2 = 34).- Appending ECN
00gives the 8-bit Traffic Class:10001000. - Decimal:
(34 x 4) + 0 = 136. - Hexadecimal (
1000 1000):0x88.
Traffic Class carries 6-bit DSCP (for DiffServ LLQ/CBWFQ queuing) and 2-bit ECN, while the 20-bit Flow Label allows stateless flow classification and ECMP even over encrypted IPsec ESP. For DSCP 34 (AF41) and ECN 00, Traffic Class = 10001000 (binary) = 136 (decimal) = 0x88 (hex).