This part of the series on traffic diversion and the man in the middle follows VLAN hopping, the part on attacks across virtual local area networks (), and leaves the switch's own tables behind. The methods so far lied about who owns an address or which port a frame belongs to. The two in this part lie earlier and more broadly: they tell a host, at the moment it joins the network, which router to use and which resolver to ask. The Dynamic Host Configuration Protocol () does that for Internet Protocol version 4 (IPv4), and the Router Advertisement (RA) of Internet Protocol version 6 (IPv6), with DHCP for IPv6 () beside it, does it for the newer protocol. Neither authenticates the answer. After reading, you can read a DHCP offer and an RA field by field, tell a legitimate one from a rogue one in a capture, explain why a host on an IPv4-only network can still be diverted over IPv6, and say which defence (, RA Guard, , host settings, monitoring) answers which variant. How a lease normally works is in the DHCP lease lifecycle and BOOTP and DHCP options, which covers the Bootstrap Protocol (BOOTP) that DHCP extends; how IPv6 hosts configure themselves is in stateless address autoconfiguration and DHCPv6 and Neighbor Discovery. This part assumes them and looks only at what happens when the wrong party answers.

What a host believes when it joins

A host that boots without configuration knows nothing about the network: not its own address, not the router, not the resolver. DHCP, defined in (RFC) 2131 by Ralph Droms in March 1997, solves that with four messages: the client broadcasts a DHCPDISCOVER, servers answer with DHCPOFFER, the client broadcasts a DHCPREQUEST naming the server it chose, and that server confirms with DHCPACK. The RFC is explicit that the choice is the client's and that the rule is loose. The client "collects DHCPOFFER messages over a period of time, selects one DHCPOFFER message from the (possibly many) incoming DHCPOFFER messages (e.g., the first DHCPOFFER message or the DHCPOFFER message from the previously used server)", and "The time over which the client collects messages and the mechanism used to select one DHCPOFFER are implementation dependent" (RFC 2131, section 4.4.1).

What the client takes from the chosen offer is not only an address. The options of RFC 2132 carry the subnet mask (option 1), the routers (option 3), the domain name servers (option 6) and the domain name (option 15); RFC 3442 of December 2002 adds option 121, classless static routes, so a server can install routes to specific destinations as well as a default. Every one of those values steers traffic. The router decides where every packet for another network goes; the resolver decides what every name means.

The authors knew. Section 7 of RFC 2131 begins with a sentence that has stood unchanged for almost thirty years: "DHCP in its current form is quite insecure." It continues: "Unauthorized DHCP servers may be easily set up. Such servers can then send false and potentially disruptive information to clients such as incorrect or duplicate IP addresses, incorrect routing information (including spoof routers, etc.), incorrect domain nameserver addresses (such as spoof nameservers), and so on. Clearly, once this seed information is in place, an attacker can further compromise affected systems" (RFC 2131, section 7). The opener quotes the same passage; the point here is the phrase "seed information". A does not intercept anything by itself. It plants the configuration that makes every later packet and every later name lookup go where it wants.

RFC 3118 of June 2001 defined an authentication option for DHCP messages, and it is the honest answer to section 7. It has not been deployed: the Internet Engineering Task Force's () own problem statement on rogue IPv6 advertisements, ten years later, notes that "actual use of Authenticated DHCP in typical networks is currently minimal" (RFC 6104, section 5.2). The defences that work are therefore outside the protocol, in the switch and in the host.

A false offer, field by field

The clearest way to see a rogue offer is beside a legitimate one. The example below is a small office network, 10.20.30.0/24, where the router at 10.20.30.1 also runs the DHCP server. A second machine on the same segment, 10.20.30.66, answers the same DHCPDISCOVER. The addresses are illustrative; the option codes and encodings are the standards'.

Field or optionLegitimate DHCPOFFERRogue DHCPOFFERWhat it changes
Transaction ID (xid)Copied from the client's DISCOVERCopied from the same DISCOVER, which was broadcastNothing: the xid matches because everyone heard the question
yiaddr (your address)10.20.30.5710.20.30.200The client's own address
Option 53, message type35 01 02 (OFFER)35 01 02 (OFFER)Nothing
Option 54, server identifier36 04 0A 14 1E 01 (10.20.30.1)36 04 0A 14 1E 42 (10.20.30.66)Which server the client will name in its REQUEST
Option 51, lease time33 04 00 01 51 80 (86,400 s, one day)33 04 00 00 0E 10 (3,600 s, one hour)How soon the client asks again
Option 1, subnet mask01 04 FF FF FF 0001 04 FF FF FF 00Nothing
Option 3, router03 04 0A 14 1E 0103 04 0A 14 1E 42The default gateway becomes the rogue host
Option 6, domain name server06 04 0A 14 1E 0106 04 0A 14 1E 42Every name lookup goes to the rogue host

Reading the bytes is mechanical. Each option is a code, a length and the value: 03 04 0A 14 1E 42 is option 3, four bytes long, carrying 0A.14.1E.42, which is 10.20.30.66 in decimal (0x0A is 10, 0x14 is 20, 0x1E is 30, 0x42 is 66). Option 54 is 0x36 in hexadecimal and option 51 is 0x33; 86,400 seconds is 0x00015180 and 3,600 seconds is 0x00000E10.

Nothing in the rogue offer is malformed. It carries the transaction ID of the client's own question because the question was broadcast to every host on the segment. If the client takes it, by whatever rule its implementation uses, it broadcasts a DHCPREQUEST whose server identifier is 10.20.30.66, and RFC 2131 says the servers not selected "use the message as notification that the client has declined that server's offer" (RFC 2131, section 3.1). The legitimate server steps back politely. The client now sends every packet for another network to 10.20.30.66 and asks 10.20.30.66 what every name means; a rogue host that forwards the traffic onward keeps the network working, which is why the victim notices nothing.

The capture shows the attack in one place: two DHCPOFFERs answering one transaction ID, with different server identifiers and different routers. That is what the (Adversarial Tactics, Techniques, and Common Knowledge) knowledge base names as the observable for its technique T1557.003, DHCP Spoofing: "multiple competing DHCP OFFERs from non-authorized servers", and DHCP offers "assigning unexpected DNS or gateway values" (MITRE ATT&CK, T1557.003, version 1.1, last modified 3 November 2026).

Option 121: routes the VPN did not expect

The router option sets the default route. Option 121 goes further, because it can install routes that are more specific than any default. RFC 3442 encodes each route as a destination descriptor (one byte for the mask width, then only the significant bytes of the network number) followed by the four bytes of the router. Its own table gives the encodings: 10.0.0.0/8 is 8.10, 10.229.0.128/25 is 25.10.229.0.128, and the default route 0.0.0.0/0 is a single 0 (RFC 3442, Classless Route Option Format). A width of 1 to 8 needs one significant byte, so the two halves of the IPv4 address space, 0.0.0.0/1 and 128.0.0.0/1, encode as 1.0 and 1.128.

Written out for a router of 10.20.30.66, the option is:

79 0C   01 00   0A 14 1E 42   01 80   0A 14 1E 42
^  ^    ^  ^    ^             ^  ^    ^
|  |    |  |    router        |  |    router 10.20.30.66
|  |    |  network 0          |  network 128
|  |    width /1              width /1
|  length 12 bytes
code 121

Two /1 routes together cover everything a /0 covers, and each is more specific than a /0, so a host that follows longest-prefix matching (see static routes and longest match) prefers them to any default route, including the one a virtual private network () client installed to pull all traffic into its tunnel. RFC 3442 states the risk in its own security considerations: the option "can be used to misdirect network traffic by providing incorrect IP addresses for routers", either as denial of service or "to set up a attack by providing the IP address of a potential snooper", and adds that "This is not a new problem" (RFC 3442, Security Considerations). It also says that when a server returns both option 121 and a router option, "the DHCP client MUST ignore the Router option", which makes option 121 the stronger of the two (same source).

In May 2024 Lizzie Moratti and Dani Cronce of Leviathan Security Group published the consequence for VPNs as TunnelVision. A DHCP server on the local network uses option 121 to push routes that are more specific than the VPN's, and traffic the user believes is in the tunnel leaves by the physical interface instead; because the option cannot name an interface, the route lands wherever the operating system puts it (Leviathan Security Group, TunnelVision, 6 May 2024). The (Common Vulnerabilities and Exposures) record, CVE-2024-3661, reads: "DHCP can add routes to a client's routing table via the classless static route option (121). VPN-based security solutions that rely on routes to redirect traffic can be forced to leak traffic over the physical interface", with a Common Vulnerability Scoring System () 3.1 base score of 7.6 and the weakness classes "Missing Authentication for Critical Function" and "Trust Boundary Violation" (CVE Program, CVE-2024-3661, published 6 May 2024). Leviathan reported that every operating system whose DHCP client implements option 121 was affected, naming Windows, Linux, iOS and macOS, and that Android was not, because it does not implement the option; it also noted that others had described the effect of option 121 on VPNs as far back as 2015 (same source).

The researchers' own conclusions are worth reading for their framing. They write that "VPNs do not secure you from local network attacks on the physical despite common VPN marketing material" (LAN being the local area network), that network namespaces on Linux fix the behaviour, that firewall rules dropping traffic to the physical interface mitigate it at the cost of a side channel, and that organizations that control their networks "should review the switches they use and enable features such as DHCP snooping and protections" (same source). The ARP poisoning part covers the second of those.

The race, and why the switch must referee

A rogue server and a legitimate one answer the same broadcast, and which offer wins depends on timing and on the client's rule. Bojan Zdrnja of the SANS Internet Storm Center described it in December 2008 when he wrote up malware that installed its own DHCP server on infected Windows machines: "it's about a race between the rogue DHCP server and the legitimate one", and "once a machine has been poisoned it is impossible to detect how it actually got poisoned in the first place", and that "you will have to analyze network traffic to see the of those DHCP Offer packets" (SANS Internet Storm Center, Rogue DHCP servers, 4 December 2008), the Media Access Control (MAC) address being the sender's hardware address. A race is not something a host can win on its own, because the host cannot tell the two answers apart. Something that sees where each answer came from has to decide.

That something is the access switch. DHCP snooping, as the vendors describe it, sorts the switch's ports into trusted and untrusted and refuses server messages on the untrusted ones:

  • Cisco's description for its Catalyst switches: DHCP snooping "is a security feature used to check DHCP traffic"; it "acts as a firewall between untrusted user ports and DHCP server ports on the network"; it "works with the concept of trusted and untrusted interfaces", and "untrusted interfaces block DHCP Server packets", meaning "a packet from a DHCP server, such as a DHCPOFFER, DHCPACK, DHCPNAK, or DHCPLEASEQUERY packet" (Cisco, Operate and Troubleshoot DHCP Snooping, document 217055, updated 12 June 2024).
  • Juniper's: it "Filters and blocks ingress Dynamic Host Configuration Protocol (DHCP) server messages on untrusted ports, and builds and maintains a database of DHCP lease information"; it is "not enabled in the default configuration", and when enabled "access ports are untrusted, and trunk ports are trusted" (Juniper Networks, Overview of Port Security).

The second half of the feature matters as much as the first. While it filters, the switch records each lease it sees pass from a trusted port to a client: the client's hardware address, the address it was given, the lease time, the VLAN and the port. Cisco's document shows the table with exactly those columns and states that "The binding database is also used by other IOS security features such as and " (Cisco, document 217055). That is why the opener calls the switch the place to "vouch for the binding": the same table that stops the rogue server also lets the switch check every ARP reply (ARP poisoning) and every source address that leaves an access port. The access-port features are tabulated, by vendor, in keeping rogue devices off the network.

Three practical points follow from the vendors' own pages:

  • Trust exactly the ports that lead to real servers or relays. On Juniper's defaults trunks are trusted, so a rogue server reachable through a trunk from another switch is not filtered; the uplinks that matter are the ones towards the DHCP server or the relay. How the relay agent forwards requests is in the DHCP relay agent.
  • Option 82 can surprise. A switch doing snooping may insert the relay agent information option (RFC 3046) into requests; Cisco's sample output shows a configuration with "Insertion of option 82 is disabled", and its configuration steps list enabling insertion as a separate choice (Cisco, document 217055). A server that receives option 82 from a device that is not a relay may drop the request; the relay article explains what the option carries and why servers check it.
  • Rate-limit the untrusted ports. Cisco lists "Configure DHCP rate limiting on each untrusted port" as an optional step (same source); 's same technique page records the other abuse of DHCP, the exhaustion attack, in which a client floods DISCOVER messages to empty the pool (MITRE ATT&CK, T1557.003).

There is a narrower control inside Windows domains. Microsoft's guide to installing the DHCP Server role says a server must be authorized in , and that "Unauthorized DHCP servers that are installed in Active Directory domains can't function properly and don't lease IP addresses to DHCP clients. The automatic disabling of unauthorized DHCP servers is a security feature that prevents unauthorized DHCP servers from assigning incorrect IP addresses to clients on your network" (Microsoft Learn, Quickstart: Install and configure DHCP Server, updated 21 April 2025). The words "installed in Active Directory domains" are the limit: the check governs Windows DHCP servers that take part in the domain. A laptop running another DHCP daemon, or malware speaking raw frames, never asks Active Directory for permission. It is a guard against an administrator's mistake, not against a rogue host.

The cases on the record

The malware that brought its own server, 2008 and 2009. The December 2008 diary describes a variant of the DNSChanger family that installed a packet driver, NDISProt, to send and receive raw frames, "'simulates' a DHCP server", watched for DHCPDISCOVER packets and answered "with its own DHCP Offer packet" whose lease "will contain malicious DNS servers"; earlier members of the family had changed the resolver settings of the infected computer itself and then of home routers and modems, typically to servers in 85.255.112.0 to 85.255.127.255 (SANS Internet Storm Center, 4 December 2008). In March 2009 Johannes Ullrich reported a new version found on a reader's network: it set the lease time to one hour, sent its offers to the broadcast hardware address and pointed clients at two Domain Name System (DNS) servers outside the network; his advice was to "monitor connections to DNS servers other then the approved one pushed out by your DHCP server" (SANS Internet Storm Center, new rogue-DHCP server malware, 16 March 2009). MITRE cites the 2009 diary and Symantec's of the variant, W32.Tidserv.G, as its examples for T1557.003 (MITRE ATT&CK, T1557.003). The DNSChanger name returned in November 2011, when federal prosecutors in New York charged seven men over a scheme that, in the Federal Bureau of Investigation's (FBI) words, used "rogue" DNS servers and malware that altered the DNS settings of more than four million computers in over 100 countries, earning at least US$14 million from advertising fraud; the court appointed the Internet Systems Consortium to run replacement servers so the victims would not lose their connections (FBI New York, 9 November 2011). The press release describes the malware changing the settings of infected computers; the rogue DHCP server was the variant that carried the same change to the machines next to them.

The accidental servers. Most rogue configuration on real networks is not malicious, and the IETF says so. RFC 6104 (Tim Chown and Stig Venaas, February 2011) records that a laptop with Windows Internet Connection Sharing (ICS) enabled can turn itself into a 6to4 router and announce IPv6 to the whole segment, and that "This service can also cause IPv4 problems, as it will typically start a 'rogue' DHCPv4 server on the host"; it also records users plugging cables into the wrong sockets and bridging two subnets (RFC 6104, section 2.2). A home router plugged into an office port with its default settings does the same thing. The defence is the same either way, which is one reason DHCP snooping is uncontroversial: it stops the accident and the attack with one rule.

TunnelVision, 2024. Described above. Its CVE record lists advisories from the vendors of VPN products, among them Cisco, Palo Alto Networks, Fortinet, F5, Citrix and WatchGuard, an indication of how many products depended on the routing table behaving (CVE Program, CVE-2024-3661).

IPv6: the router that announces itself

IPv6 hosts do not wait to be offered a gateway. Routers announce themselves in Router Advertisements, Internet Control Message Protocol for IPv6 () messages of type 134, sent periodically to the all-nodes multicast address and in answer to Router Solicitations (RFC 4861, section 4.2). A host adopts the sender of an RA with a non-zero Router Lifetime as a default router, learns on-link prefixes and, with stateless address autoconfiguration (), builds its own addresses from them. The full mechanism, with the five Neighbor Discovery (ND) messages and their timers, is in Neighbor Discovery; reading a real advertisement is in SLAAC and DHCPv6.

Three fields of the RA matter for diversion:

  • Router Lifetime, 16 bits, "The lifetime associated with the default router in units of seconds"; "A Lifetime of 0 indicates that the router is not a default router and SHOULD NOT appear on the default router list" (RFC 4861, section 4.2).
  • Prf, the two-bit default router preference added by RFC 4191 (Richard Draves and Dave Thaler, November 2005): 01 is High, 00 Medium (the default), 11 Low, and 10 reserved (RFC 4191, section 2.1). A host that implements it "primarily prefers reachable routers over non-reachable routers and secondarily uses the router preference values" (section 3.2).
  • The Recursive DNS Server () option, type 25, defined in RFC 8106 of March 2017, which hands the host resolver addresses inside the RA itself, with its own lifetime (RFC 8106, section 5.1).

Each RFC states its own risk in its security considerations. RFC 4191: "A malicious node could send Router Advertisement messages, specifying a High Default Router Preference or carrying specific routes, with the effect of pulling traffic away from legitimate routers. However, a malicious node could easily achieve this same effect in other ways" (RFC 4191, section 6). RFC 8106: "an attacker could send an RA with a fraudulent RDNSS address, misleading IPv6 hosts into contacting an unintended DNS server for DNS name resolution" (RFC 8106, section 7.1). And RFC 6104 notes the difference in speed from DHCP: "In the case of multicast rogue RAs, however, the impact is potentially immediate to all hosts, while the rogue DHCP server's impact will depend on lease timers for hosts" (RFC 6104, section 5.2).

A rogue advertisement, written out

Here is the advertisement a rogue host could send, with every field the standards define. Its link-local address is fe80::66 and its hardware address 02:00:00:00:00:66 (a locally administered address); the prefix is from the documentation range 2001:db8::/32 (RFC 3849).

PartFieldValueEncoded
IPv6 headerSourcefe80::66An RA "MUST be the link-local address" of the sending interface
IPv6 headerDestinationff02::1 (all nodes)
IPv6 headerHop Limit255Required; a receiver discards an RA with any other value
ICMPv6Type, Code134, 086 00
ICMPv6Cur Hop Limit6440
ICMPv6M, O, H, Prf, Reserved0, 0, 0, 01 (High), 00008
ICMPv6Router Lifetime1,800 s07 08
ICMPv6Reachable Time, Retrans Timer0, 0 (unspecified)00 00 00 00 00 00 00 00
Option 1Source link-layer address02:00:00:00:00:6601 01 02 00 00 00 00 66
Option 3Prefix information2001:db8:bad::/64, on-link and autonomous flags settype 3, length 4, prefix length 40, flags C0, lifetimes, prefix
Option 25RDNSS2001:db8:bad::66, lifetime 1,800 s19 03 00 00 00 00 07 08 then the 16-byte address

The flags byte is the one to work by hand. RFC 4191 lays it out as M, O, H, two bits of Prf, then three reserved bits. With M, O and H at zero and Prf at 01, the bits read 0 0 0 0 1 0 0 0, which is 0x08; a Low preference, 11, would give 0x18. The RDNSS length is in units of eight bytes, "The minimum value is 3 if one IPv6 address is contained in the option" (eight bytes of header and lifetime plus sixteen of address), hence 19 03 (RFC 8106, section 5.1). 1,800 seconds is 0x0708.

Put this beside the legitimate router's advertisement, Router Lifetime 1,800 with Prf 00, and a host that implements RFC 4191 now has two reachable default routers and prefers the High one. It may also have two global addresses, one from each prefix, which is the "multiaddressed" state RFC 6104 describes (RFC 6104, section 2.1). Nothing is forged in the cryptographic sense: an RA has no signature to forge unless the network runs Secure Neighbor Discovery (SEND), which, as the ND article explains, almost none do.

When the advertisement itself was the exploit

In October 2020 Microsoft fixed CVE-2020-16898, a flaw in which "the Windows stack improperly handles ICMPv6 Router Advertisement packets"; "To exploit this vulnerability, an attacker would have to send specially crafted ICMPv6 Router Advertisement packets to a remote Windows computer" (CVE Program, CVE-2020-16898, made public 13 October 2020). The workaround Microsoft published with it shows where the flaw lived: "Disable ICMPv6 RDNSS", which "disables RA-based DNS configuration", with the note that Windows still supports DHCPv6, which takes precedence (Microsoft Security Response Center, October 2020 security update document, CVE-2020-16898). The National Vulnerability Database () gives it a CVSS 3.1 score of 8.8 with an adjacent-network attack vector (NVD, CVE-2020-16898). It is a different class of problem from diversion, a parsing bug rather than a lie, but it makes the same point from another side: whatever a host accepts from any neighbour on the link is attack surface, and the switch that filters RAs at the port protects against both.

The network that thinks it has no IPv6

The most common IPv6 diversion happens on networks that never deployed IPv6. RFC 6104 warned about it in 2011, in a section titled for IPv4-only networks: where a host announces 6to4 on a subnet "that is not administratively configured with IPv6, some OSes or applications may begin using IPv6 to the 6to4 host (router) rather than IPv4 to the intended default IPv4 router, because they have IPv6 enabled by default and some applications prefer IPv6 by default" (RFC 6104, section 5.3).

The preference is written into the address selection standard. The default policy table of RFC 6724 gives the IPv6 default prefix ::/0 a precedence of 40 and IPv4 addresses, represented as ::ffff:0:0/96, a precedence of 35, so when a name resolves to both an IPv6 and an IPv4 address the host tries IPv6 first (RFC 6724, section 2.1). The IPv6 transition article covers 6to4 and the other mechanisms that create such paths.

In January 2018 the Dutch security company Fox-IT published a tool, mitm6, built on this behaviour without even advertising a route. Windows, the post explained, has had IPv6 enabled and preferred since Windows Vista, and "every Windows machine since Windows Vista will request this configuration regularly" through DHCPv6; the tool answers those requests, assigns an address and names itself as the IPv6 DNS server, and because of the preference for IPv6 "The IPv6 DNS server will be used to query both for A (IPv4) and (IPv6) records" (Fox-IT, mitm6: compromising IPv4 networks via IPv6, 11 January 2018). From there the post describes answering the client's Web Proxy Auto-Discovery () lookups and relaying the NT LAN Manager () authentication that follows, which is why it belongs beside the next part on WPAD and beside NTLM explained. MITRE cites a 2019 post by Dirk-jan Mollema that uses the same tool and the same chain against Active Directory (Dirk-jan Mollema, The worst of both worlds: Combining NTLM Relaying and Kerberos delegation, 4 March 2019), and its mitigations for T1557.003 add: "block DHCPv6 traffic and incoming router advertisements, especially if IPv6 is not commonly used in the network" (MITRE ATT&CK, T1557.003).

The remedy is contested. Fox-IT's post says the only defence it knew of was "disabling IPv6 if it is not used on your internal network". Microsoft's guidance for Windows says the opposite: "We don't recommend that you disable IPv6 or IPv6 components or unbind IPv6 from interfaces. If you do, some Windows components might not function", and recommends "using Prefer IPv4 over IPv6 in prefix policies instead of disabling IPV6". Disputed Fox-IT and Microsoft

The sources for both positions are Fox-IT, 11 January 2018 and Microsoft Learn, Guidance for configuring IPv6 in Windows for advanced users. The two can be reconciled in practice: an organization that keeps IPv6 enabled on hosts, as Microsoft asks, can still filter DHCPv6 server messages and RAs at the switch, as MITRE asks, so that the only IPv6 configuration a host can receive is the one the network intends (including none).

DHCPv6: an offer that ends the waiting

DHCPv6, now defined by RFC 8415 of November 2018, has its own version of the race. Clients send Solicit messages to the All_DHCP_Relay_Agents_and_Servers multicast address ff02::1:2, listen on User Datagram Protocol (UDP) port 546, and servers and relays listen on 547 (RFC 8415, section 7). Servers answer with Advertise messages, and a client "MUST collect valid Advertise messages for the first RT seconds, unless it receives a valid Advertise message with a preference value of 255", in which case it "immediately begins a client-initiated message exchange" with that server (section 18.2.1). An Advertise without a Preference option counts as preference 0. A rogue server that sets 255 does not need to win a race; the standard tells the client to stop waiting for anyone else.

RFC 8415's security considerations name the rest of the threat plainly: "One attack specific to a DHCP client is the establishment of a malicious server with the intent of providing incorrect configuration information to the client", in order "to mount a 'man in the middle' attack that causes the client to communicate with a malicious server instead of a valid server for some service (such as DNS or )"; a malicious Server Unicast option can make the client "bypass relays and communicate only with the malicious server"; and a forged Reconfigure message must be discarded unless authenticated (section 22). The same section points to the defences: "Many of these attacks by rogue servers can be mitigated by making use of the mechanisms described in [RFC7610] and [RFC7513]" (same source).

Guarding the first hop

The IPv6 answers have the same shape as DHCP snooping, and the vendors build them on the same idea.

RA Guard. RFC 6105 (Eric Levy-Abegnoli and Gunter Van de Velde of Cisco, Csaba Popoviciu and Janos Mohacsi, February 2011) defines filtering in the layer-2 device so that RAs are accepted only on ports where routers are expected (RFC 6105). Cisco's implementation states the default plainly: the device role "default is host", and "In host mode, all router advertisement and router redirect messages are disallowed on the port"; the guard can also compare an RA with configured values, filtering "by the Hop Limit value" and "by the managed address configuration", and "If the RA frame content is not validated, the RA is dropped" (Cisco, Security Configuration Guide, IOS XE Dublin 17.10.x, Catalyst 9300, Configuring IPv6 First Hop Security, 30 November 2022). The Neighbor Discovery article explains why early implementations were evaded with extension headers and fragments and why RFC 7113 requires the guard to parse the whole header chain and drop first fragments that lack it (RFC 7113).

DHCPv6-Shield. RFC 7610 (Fernando Gont, Will Liu and Gunter Van de Velde, August 2015) does for DHCPv6 what snooping does for DHCPv4: "a layer 2 device filters DHCPv6 messages intended for DHCPv6 clients", and "The most basic filtering criterion is that DHCPv6-server messages are discarded by the layer 2 device unless they are received on specific ports of the layer 2 device" (RFC 7610, section 1). It carries the lesson of RFC 7113 from the start: a first fragment that fails to contain the entire IPv6 header chain must be dropped and the drop "ought to" be logged as a security fault, because such packets "could otherwise be leveraged for circumventing DHCPv6-Shield" (section 5). Cisco calls its implementation DHCPv6 Guard: it "blocks reply and advertisement messages that come from unauthorized DHCPv6 servers and relay agents", and "IPv6 DHCP guard can prevent forged messages from being entered in the binding table" (Cisco, Configuring IPv6 First Hop Security).

The binding table, again. In IPv6 too the guard features share a table. Cisco's "IPv6 FHS Binding Table is supported through the Switch Integrated Security Feature (SISF)", is "updated through the IPv6 Snooping feature, and through manually added static binding entries", and feeds IPv6 Source Guard, which "validates the source of IPv6 traffic to prevent source address spoofing" (same source). RFC 6104 had already drawn the parallel: "The approach is essentially using a similar model to DHCP message snooping" (RFC 6104, section 5.2).

On the host. Where the switch cannot help (a shared wireless segment, a hotel, a home), the host's own settings are the last line. Linux documents accept_ra, which "also determines whether or not to transmit Router Solicitations", with a value of 0 meaning "Do not accept Router Advertisements" (Linux kernel documentation, IP Sysctl). Windows has the RA-based DNS switch shown in Microsoft's 2020 workaround, and the prefix policy that makes IPv4 preferred. A host firewall that drops inbound DHCPv6 server messages (UDP port 546) and RAs on networks that should have none is the host-side version of MITRE's advice.

Watching. RFC 6104 lists monitoring among the mitigations and names tools: a daemon that watches for incorrect RAs and sends "a deprecating RA with a router lifetime of zero", the KAME rafixd, used "at IETF meetings with some success", its successor ramond, and NDPMon, "which can also detect other undesirable behaviour" (RFC 6104, section 3.8). A deprecating RA works because of the Router Lifetime rule quoted above: an RA from the rogue's address with a lifetime of zero removes it from the hosts' default router lists. It is a cure applied after the fact, and RFC 6104's own comparison table rates it as covering both accidental and malicious cases only as long as the daemon can tell good RAs from bad ones.

VariantWhat the false answer setsInfrastructure defenceHost-side defenceWhat to look for
Rogue DHCPv4 serverDefault gateway, resolver, domain, lease timeDHCP snooping (trusted ports, rate limits), and its binding table for ARP inspection and source guardFew; an explicit resolver and a host firewall limit the damageTwo OFFERs for one transaction ID; a server identifier that is not the known server
Option 121 routes (TunnelVision)Routes more specific than the VPN'sDHCP snoopingVPN clients using network namespaces or firewall rules on the physical interfaceClassless static routes in an offer on a network that does not use them
Rogue RADefault router (with High preference), prefixes, RDNSSRA Guard with full header-chain parsingaccept_ra off where IPv6 is not used; RA-based DNS off on WindowsRAs from an unexpected link-local or hardware address; a new prefix; an RDNSS that is not the network's
Rogue DHCPv6 serverAddresses and DNS servers for IPv6, on networks that think they have noneDHCPv6-Shield (DHCPv6 Guard)Prefix policy preferring IPv4; host firewall on UDP 546Advertise or Reply messages from a non-server; a DNS server with a link-local IPv6 address on an IPv4 network
Accidental servers (ICS, a home router)Any of the aboveThe same controlsUser awarenessThe same signs, usually with a consumer device's hardware address

What it looks like on the wire

Detection rests on knowing what the network's real configuration sources are, because none of these messages is malformed. The signs worth an alert, collected from the sources above:

  • More than one server identifier. A DHCPv4 segment has a known set of servers or relays. An OFFER or ACK whose option 54 names anything else, or whose router (option 3) or resolver (option 6) differ from the scope's, is the clearest single signature. MITRE's detection notes describe exactly this, "anomalous DHCP OFFER/ACK messages assigning unexpected DNS or gateway values" (MITRE ATT&CK, T1557.003).
  • Short leases and broadcast answers. The 2009 malware set one-hour leases and broadcast its offers (SANS Internet Storm Center, 16 March 2009); neither proves an attack, but both differ from a managed scope.
  • Resolver traffic to unapproved servers. The oldest advice still works: hosts that query DNS servers other than the ones the network hands out were configured by something else. Blocking outbound DNS from everything except the resolvers turns that into an alarm.
  • RAs and DHCPv6 messages where there should be none. On an IPv4-only network any RA or DHCPv6 Advertise is suspect; on an IPv6 network, one from an unexpected source is. Switches running RA Guard and DHCPv6 Guard count and can log the drops; RFC 7610 asks for fragment drops to be logged as security faults.
  • Hosts with configuration they should not have. A Windows host showing an IPv6 DNS server on a network without IPv6, or a VPN client whose routing table holds /1 routes it did not install, has met a rogue source.

The Brazilian angle

Brazil's Internet registry and its training have taught the IPv6 half of this subject for years. The training material of IPv6.br, the (Núcleo de Informação e Coordenação do Ponto BR) programme for IPv6, in its course on security in networks without network address translation (), lists the defences against attacks on Neighbor Discovery in four lines: IPv6 has "a protocol specific to the problem, called Secure Neighbor Discovery (SEND)" (our translation here and below); tools that monitor the protocol, "for example, NDPmon or RA Guard"; an "intelligent switch able to reject RA messages on ports that do not have a router connected"; and the reminder that "IPv4 has a similar problem, ARP spoofing" (IPv6.br, NIC.br, Training: Security in networks without NAT, part 2 (in Portuguese)). A presentation by Adilson Aparecido Florentino of the Portal do IPv6 at the Grupo de Trabalho em Segurança de Redes (GTS), NIC.br's network security working group, put the parallel this part has drawn in one sentence: "RA Guard and ND Inspection are the IPv6 version of the service known as DHCP Snooping" (GTS 19, Security in IPv6 Networks (in Portuguese)). At GTS in December 2024, Henri Alves de Godoy of the (UNICAMP) listed unauthorized router advertisements, which "may arise accidentally, intentionally or through misconfiguration", and recommended implementing RA Guard or similar controls to stop them spreading (GTS 39, IPv6 as a foundation for cybersecurity (in Portuguese), 9 December 2024).

The IPv4 half has a Brazilian history in home equipment rather than in offices. The DNSChanger family that later brought its own DHCP server began, as the 2008 diary records, by changing the resolver settings of modems and routers (SANS Internet Storm Center, 4 December 2008). A home router's DHCP server is what hands those settings to every device in the house, so a compromised router is a rogue DHCP server with the owner's blessing. The networks booklet of (Centro de Estudos, Resposta e Tratamento de Incidentes de Segurança no Brasil), in the version kept by NIC.br and dated by its file to March 2017, lists among what an attacker can do "break into a network device, change its settings and direct connections to fraudulent sites", and the current edition of August 2024 begins its advice with changing the administration password of the modem and router (CERT.br, Networks booklet (in Portuguese), 2017 edition kept by NIC.br; CERT.br, Networks booklet (in Portuguese), August 2024).

What defenders can do

  • Turn on DHCP snooping on every access switch, trust only the ports towards real servers and relays, rate-limit the untrusted ports, and use the binding table it builds for ARP inspection and source guard.
  • Turn on RA Guard and DHCPv6 Guard (DHCPv6-Shield) on access ports, with the router-facing ports explicitly marked, on IPv4-only networks as much as on IPv6 ones; check that the implementation parses the full header chain and drops incomplete first fragments.
  • Decide what IPv6 configuration hosts should receive and make the network enforce it; if hosts keep IPv6 enabled, as Microsoft recommends for Windows, filter the messages they should not act on rather than relying on the host.
  • Know the legitimate DHCP servers, routers and resolvers, and alert on any other server identifier, router, RA source or RDNSS address.
  • Send DNS only to approved resolvers and block outbound DNS from everything else, so a host configured by a rogue source stands out.
  • For remote users, prefer VPN clients that isolate tunnel traffic from the local routing table (network namespaces on Linux, firewall rules elsewhere), because the local network can always hand out routes.
  • Treat a consumer router or a laptop with connection sharing as a rogue server, because to the hosts it is one.

What to remember

  • DHCP, RAs and DHCPv6 deliver the seed of all later traffic, the gateway and the resolver, and none of them authenticates the sender in practice.
  • A rogue DHCPv4 offer is well formed and carries the client's own transaction ID; the evidence is a second server identifier, not a malformed packet.
  • Option 121 routes beat the router option and, being more specific, beat a VPN's default route: that is TunnelVision, CVE-2024-3661.
  • An RA with High preference and an RDNSS option can take a host's IPv6 gateway and resolver at once, and immediately, on every host on the link.
  • Networks without IPv6 are not immune: hosts prefer IPv6 by default and ask for DHCPv6 configuration on their own.
  • The defence is the switch: DHCP snooping, RA Guard and DHCPv6-Shield all trust ports, not messages, and share a binding table with ARP inspection and source guard.

Sources