Restrictions for DHCPv6 Guard
-
The DHCPv6 guard feature is not supported on Etherchannel ports.
The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This module describes the Dynamic Host Configuration Protocol version 6 (DHCPv6) Guard feature. This feature blocks DHCP reply and advertisement messages that originate from unauthorized DHCP servers and relay agents that forward DHCP packets from servers to clients. Client messages or messages sent by relay agents from clients to servers are not blocked. The filtering decision is determined by the device role assigned to the receiving switch port, trunk, or VLAN. In addition, to provide a finer level of filter granularity, messages can be filtered based on the address of the sending server or relay agent, or by the prefixes and addresses ranges listed in the reply message. This functionality helps to prevent traffic redirection or denial of service (DoS).
The DHCPv6 guard feature is not supported on Etherchannel ports.
Information About DHCPv6 Guard
The DHCPv6 Guard feature blocks reply and advertisement messages that come from unauthorized DHCP servers and relay agents.
Packets are classified into one of the three DHCP type messages. All client messages are always switched regardless of device role. DHCP server messages are only processed further if the device role is set to server. Further processing of server messages includes DHCP server advertisements (for source validation and server preference) and DHCP server replies (for permitted prefixes).
If the device is configured as a DHCP server, all the messages need to be switched, regardless of the device role configuration.
How to Configure DHCPv6 Guard
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable Example:
|
Enables privileged EXEC mode.
|
Step 2 |
configure terminal Example:
|
Enters global configuration mode. |
Step 3 |
ipv6 access-list access-list-name Example:
|
Defines the IPv6 access list and enters IPv6 access list configuration mode. |
Step 4 |
permit host address any Example:
|
Sets the conditions in the named IP access list. |
Step 5 |
exit Example:
|
Exits IPv6 access list configuration mode and returns to global configuration mode. |
Step 6 |
ipv6 prefix-list list-name permit ipv6-prefix 128 Example:
|
Creates an entry in an IPv6 prefix list. |
Step 7 |
ipv6 dhcp guard policy policy-name Example:
|
Defines the DHCPv6 guard policy name and enters DHCP guard configuration mode. |
Step 8 |
device-role {client | server} Example:
|
Specifies the device role of the device attached to the target (interface or VLAN). |
Step 9 |
match server access-list ipv6-access-list-name Example:
|
(Optional) Enables verification of the advertised DHCP server and relay address in inspected messages from the configured authorized server access list. If not configured, this check will be bypassed. An empty access list is treated as a permit. |
Step 10 |
match reply prefix-list ipv6-prefix-list-name Example:
|
(Optional) Enables verification of the advertised prefixes in DHCP reply messages from the configured authorized prefix list. If not configured, this check will be bypassed. An empty prefix list is treated as a permit. |
Step 11 |
preference min limit Example:
|
(Optional) Enables verification that the advertised preference (in preference option) is greater than the specified limit. If not specified, this check will be bypassed. |
Step 12 |
preference max limit Example:
|
(Optional) Enables verification that the advertised preference (in preference option) is less than the specified limit. If not specified, this check will be bypassed. |
Step 13 |
trusted-port Example:
|
(Optional) Specifies that this policy is being applied to trusted ports. All DHCP guard policing will be disabled. |
Step 14 |
exit Example:
|
Exits DHCP guard configuration mode and returns to global configuration mode. |
Step 15 |
interface type number Example:
|
Specifies an interface and enters interface configuration mode. |
Step 16 |
switchport Example:
|
Puts an interface that is in Layer 3 mode into Layer 2 mode for Layer 2 configuration. |
Step 17 |
exit Example:
|
Exits interface configuration mode and returns to global configuration mode. |
Step 18 |
exit Example:
|
Exits global configuration mode and returns to privileged EXEC mode. |
Step 19 |
show ipv6 dhcp guard policy [policy-name] Example:
|
(Optional) Displays the policy configuration as well as all the interfaces where the policy is applied. |
Configuration Examples for DHCPv6 Guard
The following example displays a sample configuration for DHCPv6 Guard:
Related Topic |
Document Title |
---|---|
Cisco IOS commands |
|
DHCP commands: complete command syntax, command modes, command history, defaults, usage guidelines, and examples |
Cisco IOS IP Addressing Services Command Reference |
DHCP conceptual and configuration information |
Cisco IOS IP Addressing Services Configuration Guide |
Standard |
Title |
---|---|
No new or modified standards/RFCs are supported by this feature. |
— |
MIB |
MIBs Link |
---|---|
No new or modified MIBs are supported by this feature. |
To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL: |
Description |
Link |
---|---|
The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. |
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Feature Name |
Releases |
Feature Information |
---|---|---|
DHCP—DHCPv6 Guard |
The DHCP—DHCPv6 Guard feature blocks DHCP reply and advertisement messages that originate from unauthorized DHCP servers and relay agents that forward DHCP packets from servers to clients. Client messages or messages sent by relay agents from clients to servers are not blocked. The following commands were introduced or modified: device-role , ipv6 dhcp guard attach-policy (DHCPv6 Guard) , ipv6 dhcp guard policy , match reply prefix-list , match server access-list , preference (DHCPv6 Guard) , show ipv6 dhcp guard policy , trusted-port (DHCPv6 Guard) . |