dhcp relay check mac-address

Syntax

dhcp relay check mac-address

undo dhcp relay check mac-address

View

Interface view

Default level

2: System level

Parameters

None

Description

Use dhcp relay check mac-address to enable MAC address check on the DHCP relay agent.

Use undo dhcp relay check mac-address to disable MAC address check on the DHCP relay agent.

By default, this function is disabled.

With this function enabled, the DHCP relay agent compares the chaddr field of a received DHCP request with the source MAC address field of the frame. If they are the same, the DHCP relay agent decides this request as valid and forwards it to the DHCP server. If not, the DHCP request is discarded.

DHCP relay agents change the source MAC addresses when forwarding DHCP packets. Therefore, you can enable MAC address check only on a DHCP relay agent directly connected to the DHCP clients. Otherwise, valid DHCP packets may be discarded and clients cannot obtain IP addresses.

Examples

# Enable MAC address check on the DHCP relay agent.

<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp relay check mac-address