IPv6 RA Guard and DHCP Guard
A PC on an access port can send router advertisements and answer as a DHCPv6 server. RA Guard and DHCPv6 Guard share one grammar: a named policy with a device role, optional checks and trusted-port, attached to an interface, EtherChannel or VLAN. RA Guard's default role is host and drops every RA. Apply a host policy to a whole VLAN and the real router's port needs a router policy.
By Arif, founder of Daveth · Updated
The full 4 min walkthrough is in Daveth Pro (Network). See what the plan opens
What this page answers
What is the default IPv6 RA Guard device role?
Host. A host-role policy disallows all router advertisements on the port. DHCPv6 Guard's default policy is device-role client with no trusted-port. Read it in “One grammar, two features”
Why did RA Guard on a VLAN stop the real router?
A host policy attached to the whole VLAN also covers the router's port, so its RAs are dropped. A port facing a router needs its own policy with device-role router. Read it in “The router-facing port needs its own policy”
Where can IPv6 RA Guard and DHCPv6 Guard policies be attached?
To an interface, an EtherChannel or a VLAN. Without a named policy, attach-policy applies the default policy. Read it in “One grammar, two features”
What the role disallows
PC-12 hears from two routers and two DHCPv6 servers. One of each is PC-24, a PC on Gi1/0/24. Which of them should it hear?
This course's reading: every RA reaching PC-12, nothing attached
from arrives on policy result why GW-1 Gi1/0/1 none forwarded no RA Guard policy on this port PC-24 Gi1/0/24 none forwarded no RA Guard policy on this port PC-12 hears routers: GW-1, PC-24
This course's reading: every DHCPv6 advertisement reaching PC-12, nothing attached
from arrives on policy result why DHCP-1 Gi1/0/2 none forwarded no DHCP Guard policy on this port PC-24 Gi1/0/24 none forwarded no DHCP Guard policy on this port PC-12 hears servers: DHCP-1, PC-24
Two features exist for exactly these two claims. What does each one block?
This feature enables the network administrator to block or reject unwanted or rogue Router Advertisement (RA) guard messages that arrive at the network device platform. The IPv6 DHCP Guard feature blocks reply and advertisement messages that come from unauthorized DHCPv6 servers and relay agents.
Start with the role. What does a host-role port do with an RA, and a client-role port with a server message?
In host mode, all router advertisement and router redirect messages are disallowed on the port. client: Default value, specifies that the attached device is a client. Server messages are dropped on this port.
One thing from 4.5.a.ii: a router sets its own preference with ipv6 nd router-preference, and a host keeps a list of routers rather than one. RA Guard can filter on that preference, and a section below is where it does.
One grammar, two features
Both are a named policy with a device-role, optional checks and an optional trusted-port, attached to an interface, an EtherChannel or a VLAN. What happens if you leave the role out?
Specifies the role of the device attached to the port. The default is host. The default policy is, device-role client, no trusted-port.
And if you attach without naming a policy?
The default policy is attached if the attach-policy option is not used.
Look at what trusted-port does in each. In RA Guard it ends the checking; in DHCP Guard it takes the role away:
When configured as a trusted port, all attached devices are trusted, and no further message verification is performed. If you configure a trusted port then the device-role option is not available.
One command for the whole VLAN
RA Guard goes on VLAN 12 in one command, with the default role. GW-1 is on Gi1/0/1, in that VLAN. What happens to its RA?
This course's configuration: RA Guard across VLAN 12
ACC-1# configure terminal ACC-1(config)# ipv6 nd raguard policy ACCESS-HOSTS ACC-1(config-nd-raguard)# device-role host ACC-1(config-nd-raguard)# exit ACC-1(config)# vlan configuration 12 ACC-1(config-vlan-config)# ipv6 nd raguard attach-policy ACCESS-HOSTS ACC-1(config-vlan-config)# end
This course's reading: every RA, host policy on the VLAN
from arrives on policy result why GW-1 Gi1/0/1 ACCESS-HOSTS dropped device-role host: all RAs disallowed PC-24 Gi1/0/24 ACCESS-HOSTS dropped device-role host: all RAs disallowed ACCESS-HOSTS: device-role host PC-12 hears routers: none
PC-24 is stopped, and so is GW-1. The uplink is in the VLAN, so it carries the host policy too. And PC-12's router solicitations?
SISF-based device-tracking forwards router solicitation packets only on interfaces that have the RA guard policy configured and are also designated as router-facing interfaces. If no such interface exists, the router solicitation messages are dropped, which might delay the router discovery for onboarding hosts as they will be unable to discover the router until it sends a periodic unsolicited router advertisement.
This course's reading: where router solicitations go, host policy on the VLAN
port RA Guard role Gi1/0/1 host Gi1/0/2 host Gi1/0/12 host Gi1/0/24 host PC-12's router solicitation is dropped: no router-facing RA Guard port
The symptom is hosts with no router, and the policy looks correct. The instinct is to let GW-1's prefix through with a match clause. What does the guide say a match clause is?
Matches a specified prefix list or access list.
So add one to ACCESS-HOSTS for GW-1's prefix. Does GW-1's RA get through now?
This course's configuration: a match clause added to ACCESS-HOSTS
ACC-1# configure terminal ACC-1(config)# ipv6 prefix-list GW-PREFIXES permit 2001:db8:4:12::/64 le 128 ACC-1(config)# ipv6 nd raguard policy ACCESS-HOSTS ACC-1(config-nd-raguard)# match ra prefix-list GW-PREFIXES ACC-1(config-nd-raguard)# end
This course's reading: every RA, match clause added
from arrives on policy result why GW-1 Gi1/0/1 ACCESS-HOSTS dropped device-role host: all RAs disallowed PC-24 Gi1/0/24 ACCESS-HOSTS dropped device-role host: all RAs disallowed ACCESS-HOSTS: device-role host, match ra prefix-list GW-PREFIXES PC-12 hears routers: none
Still dropped. The host-mode sentence disallows every RA on the port, and the match clause does not change the role. If an RA gets through after a change like that, something else changed too. So the first question is not what the policy matches but where it is attached, and with which role.
The router-facing port needs its own policy
Is a host policy on the access ports enough? The guide answers that directly:
For a network with both host-facing ports and router-facing ports, along with a RA guard policy configured with device-role host on host-facing ports or vlan, it is mandatory to configure a RA guard policy with device-role router on router-facing ports to allow the RA Guard feature to work properly.
This course's configuration: host policy on the access ports, UPLINK-ROUTER on the uplink
ACC-1# configure terminal ACC-1(config)# vlan configuration 12 ACC-1(config-vlan-config)# no ipv6 nd raguard attach-policy ACCESS-HOSTS ACC-1(config-vlan-config)# exit ACC-1(config)# ipv6 nd raguard policy UPLINK-ROUTER ACC-1(config-nd-raguard)# device-role router ACC-1(config-nd-raguard)# exit ACC-1(config)# interface Gi1/0/1 ACC-1(config-if)# ipv6 nd raguard attach-policy UPLINK-ROUTER ACC-1(config-if)# interface Gi1/0/12 ACC-1(config-if)# ipv6 nd raguard attach-policy ACCESS-HOSTS ACC-1(config-if)# interface Gi1/0/24 ACC-1(config-if)# ipv6 nd raguard attach-policy ACCESS-HOSTS ACC-1(config-if)# end
Which RAs reach PC-12 now, and where do its router solicitations go?
This course's reading: every RA, the pairing in place
from arrives on policy result why GW-1 Gi1/0/1 UPLINK-ROUTER forwarded device-role router, every configured check passed PC-24 Gi1/0/24 ACCESS-HOSTS dropped device-role host: all RAs disallowed UPLINK-ROUTER: device-role router ACCESS-HOSTS: device-role host, match ra prefix-list GW-PREFIXES PC-12 hears routers: GW-1
This course's reading: where router solicitations go, the pairing in place
port RA Guard role Gi1/0/1 router Gi1/0/2 no policy Gi1/0/12 host Gi1/0/24 host PC-12's router solicitation goes to Gi1/0/1
Check both halves. GW-1's RA is forwarded and solicitations reach Gi1/0/1; PC-24's RA is still dropped on Gi1/0/24. Seeing only the first half would also fit a switch with no policy at all.
What does a router-role port do with an RA? It compares, then forwards or drops:
The RA guard feature compares configuration information on the Layer 2 device with the information found in the received RA frame. Once the Layer 2 device has validated the content of the RA frame and router redirect frame against the configuration, it forwards the RA to its unicast or multicast destination. If the RA frame content is not validated, the RA is dropped.
To confirm what is configured, read the policy back with show ipv6 nd raguard policy or show ipv6 dhcp guard policy. The guide describes the first this way:
Displays the ND guard policy configuration.
The guide prints no output for either, so none is drawn here, and this page claims no more for them than that description. A policy's configuration does not prove a result: to know what became of an RA, look at the host that should have heard it, and to know where a policy is attached, read the running configuration.
Continue the lesson
The whole lesson, with its drawings and its questions. 6 more sections after the ones above.

