Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

5.1.2. IPv4 vs. IPv6 and Secure Protocols

💡 First Principle: IP addressing and routing are the infrastructure that makes all network communication possible — and also the infrastructure that attackers exploit to redirect, intercept, or block that communication. The security properties of IP are weak by design: IP packets carry no authentication of the source address, enabling spoofing. Routing protocols are trusted between peers, enabling route injection. Understanding these architectural weaknesses explains why overlay security (TLS, IPsec) is necessary.

IPv4 addressing review:
ClassRangeDefault SubnetTypical Use
A1.0.0.0 – 126.x.x.x/8Large organizations
B128.0.0.0 – 191.255.x.x/16Medium organizations
C192.0.0.0 – 223.255.255.x/24Small organizations
D224.0.0.0 – 239.255.255.255N/AMulticast
E240.0.0.0 – 254.255.255.255N/AReserved/experimental

Private (RFC 1918) addresses — not routable on the internet:

  • 10.0.0.0/8 (Class A private)
  • 172.16.0.0/12 (Class B private: 172.16.0.0 – 172.31.255.255)
  • 192.168.0.0/16 (Class C private)

CIDR (Classless Inter-Domain Routing): Modern addressing uses variable-length subnet masks (VLSM), not classful boundaries. /24 = 256 addresses; /25 = 128; /26 = 64; /27 = 32.

IPv6 security implications:
FeatureIPv4IPv6Security Note
Address space32-bit (~4.3B)128-bit (340 undecillion)IPv6 scanning impractical; enables privacy extensions
IPsecOptionalMandatory in spec (often optional in practice)IPv6 was designed with IPsec integration; doesn't guarantee use
NATWidely deployedNot needed (sufficient addresses)No NAT means every device can be globally routable — security boundary changes
AutoconfigurationDHCPSLAAC (Stateless Address Auto-Config)SLAAC can expose MAC address in address; privacy extensions randomize
ARPARP (Layer 2 broadcast)NDP (Neighbor Discovery Protocol)NDP is susceptible to its own spoofing attacks

IPv6 transition threats: Dual-stack systems (running both IPv4 and IPv6) may have IPv4 security controls but incomplete IPv6 controls — attackers use IPv6 to bypass IPv4-only security monitoring and firewalls.

Routing protocol security:
ProtocolTypeSecurity RiskMitigation
RIP v1Distance vectorNo authentication; accepts any route updateReplace with RIPv2 or migrate to OSPF/BGP
RIP v2Distance vectorMD5 authentication availableEnable authentication; still consider replacing
OSPFLink stateCan authenticate with MD5 or SHA (OSPFv3 uses IPsec)Enable authentication; validate neighbor relationships
BGPPath vectorNo built-in authentication; BGP hijacking via route injectionBGPsec (RPKI) route origin validation; MD5 TCP session authentication

BGP hijacking is one of the most significant internet-scale attack vectors. By announcing more specific routes (longer prefix = more specific = preferred) for legitimate address blocks, an attacker can redirect internet traffic through their infrastructure. Notable incidents include YouTube outage (Pakistan Telecom, 2008) and cryptocurrency theft via BGP hijacking (2018). RPKI (Resource Public Key Infrastructure) provides cryptographic validation of route origin authority, but adoption remains incomplete.

⚠️ Exam Trap: IP spoofing — forging the source IP address in packets — is trivially possible because IP has no source authentication. However, replies to spoofed packets go to the spoofed address, not the attacker. This limits spoofing utility to: reflection/amplification DDoS attacks (sending requests with victim's IP, replies flood victim) and one-way DoS attacks. TCP sessions cannot be spoofed without a MITM position because the attacker needs to see the sequence numbers in the SYN-ACK response.

Reflection Question: A BGP route for 8.8.8.0/24 (Google DNS) is normally announced by Google's AS. An attacker announces 8.8.8.0/25 and 8.8.8.128/25 (two more specific /25 prefixes covering the same space). What happens to traffic destined for 8.8.8.8, why does this work, and what cryptographic mechanism does RPKI use to prevent it?

Alvin Varughese
Written byAlvin Varughese
Founder15 professional certifications