Infrastructure Security · Topic 4 of 4

IPv6 First Hop Security

Describe IPv6 first hop security: RA guard, DHCPv6 guard, the binding table, ND inspection and snooping, and IPv6 source guard on access switches.

  • 5 min
In a nutshell
  • FHS features run on the access switch, close to the hosts.
  • RA guard blocks router advertisements from host ports.
  • DHCPv6 guard blocks server messages from client ports.

What it is

IPv6 first hop security is a set of switch features that protect hosts from rogue or spoofed IPv6 messages on the local link.

IPv6 hosts trust messages on the local link. Router advertisements (RA) tell a host its prefix and default gateway, and neighbour discovery (ND) maps addresses to MAC addresses. A rogue device can send false versions of these messages.

First hop security (FHS) is applied on the access switch, at the first hop between a host and the network. This topic is about describing what each feature does, not detailed configuration.

Rogue devicefake RAarrives atAccess switchFHS policyblocked on host portHostskeep the real gateway

How it works

Each feature stops one type of attack, and most depend on a shared binding table.

The attacks

AttackEffect
Rogue RAHosts take a false default gateway or prefix
Rogue DHCPv6 serverHosts receive false addresses or DNS servers
ND spoofingA device claims another host's address, redirecting traffic
Address spoofingA host sends packets with a source address it does not own

RA guard

RA guard blocks router advertisements that arrive on ports where no router should be. A policy sets the device role of the port, either host or router.

Switch(config)# ipv6 nd raguard policy HOST-PORTS
Switch(config-nd-raguard)# device-role host
Switch(config)# interface GigabitEthernet1/0/5
Switch(config-if)# ipv6 nd raguard attach-policy HOST-PORTS

An RA arriving on a host role port is dropped. Ports that lead to a real router are left as router role, so legitimate RAs pass. The policy can also check things such as the source address and the advertised prefix.

DHCPv6 guard

DHCPv6 guard stops rogue DHCPv6 servers. It blocks server messages, such as Advertise and Reply, on ports where no server should be.

Switch(config)# ipv6 dhcp guard policy CLIENT-PORTS
Switch(config-dhcp-guard)# device-role client
Switch(config)# interface GigabitEthernet1/0/5
Switch(config-if)# ipv6 dhcp guard attach-policy CLIENT-PORTS

Client role ports may send requests but not server replies. A port that faces the real DHCPv6 server uses the server role.

Binding table, ND snooping and ND inspection

The switch watches ND and DHCPv6 messages to learn which addresses sit behind which ports. This is ND snooping (also known as IPv6 snooping or device tracking). It builds the binding table.

A binding table entry links an IPv6 address, a MAC address, a port and a VLAN. Entries age out, and the state shows whether the entry is still valid.

ND inspection then uses the binding table to check ND messages. A neighbour solicitation or advertisement that does not match a known binding is dropped. This stops one host from claiming another host's address.

Switch# show ipv6 neighbor binding
Switch# show device-tracking database

The first command is used on older software. On newer Catalyst software this tracking is part of a feature called SISF, the policy commands are under device-tracking, and the table is shown with the second command. The ideas are the same, and feature names vary by platform and release.

IPv6 source guard

Source guard checks the source address of data packets against the binding table. It drops packets from a port whose source address does not match a binding for that port.

This stops a host from spoofing the source address of other hosts. Source guard depends on a correct binding table, so snooping must be on first.

Hostsends NS and DHCPv6learned byND snoopingbuilds tablebinding tableInspection and source guardcheck ND and data

How the features combine

FeatureLooks atNeeds binding table
RA guardRouter advertisementsNo
DHCPv6 guardDHCPv6 server messagesNo
ND snoopingND and DHCPv6 messagesBuilds it
ND inspectionNS and NA messagesYes
Source guardData packet source addressesYes

RA guard and DHCPv6 guard work by port role and message type. Inspection and source guard compare against learned bindings.

A typical access port policy uses all of them. The uplink toward the router and DHCP server is trusted, and host ports are not.

Exam tip

When a host loses IPv6 connectivity after FHS is enabled, check its entry in the binding table first.

What to remember for the exam

Seven facts cover most questions on this topic.

  • FHS features run on the access switch, close to the hosts.
  • RA guard blocks router advertisements from host ports.
  • DHCPv6 guard blocks server messages from client ports.
  • ND snooping learns addresses and builds the binding table.
  • The binding table links an address, MAC, port and VLAN.
  • ND inspection drops ND messages that do not match a binding.
  • Source guard drops data packets with a source address that does not match a binding.
Watch out

Source guard and ND inspection depend on the binding table. If snooping is off or the table is empty, valid hosts can be blocked.

Common mistakes

These four mistakes appear often.

Applying RA guard to the router uplink. Real router advertisements are blocked, and hosts lose their gateway.

Using DHCPv6 guard with the wrong role. The real server is blocked.

Enabling source guard without snooping. There is no binding to match, so traffic is dropped.

Thinking RA guard stops DHCPv6. Each feature covers one message type.

Check yourself

Work through these three questions.

  • Which feature stops a rogue device from advertising a false default gateway?

    RA guard, which blocks router advertisements on ports with the host role.

  • What does the binding table hold?

    It links an IPv6 address to a MAC address, a port and a VLAN.

  • How does source guard differ from ND inspection?

    Source guard checks the source address of data packets, while ND inspection checks neighbour discovery messages, both against the binding table.

Topic 4 of 4 in Infrastructure Security

Test yourself on Infrastructure Security

The full Cisco CCNP 300-410 ENARSI question bank has 857 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Cisco. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.