set protocols dhcp relay interface relay-agent-address
The set protocols dhcp relay interface relay-agent-address command configures the IP address of the DHCP relay agent.
Command Syntax
set protocols dhcp relay interface <vlan-interface-name> relay-agent-address <agent-ipv4-address>
Parameters
Parameter | Description |
interface <vlan-interface-name> | Specifies an L3 VLAN interface name. The value is a string. |
relay-agent-address <agent-ipv4-address> | Specifies the IP address of the DHCP relay agent. The value is in dotted decimal notation. |
Usage Guidelines
In VRRP topology, DHCP relay agent address is a required configuration, when the VRRP Master/Backup devices are used as the DHCP relay agents, you must configure the DHCP relay agent address to the virtual IP address of the VRRP group. The interface name here should be configured with the L3 VLAN interface which is enabled with DHCP relay and VRRP group.
The system supports multiple DHCP relay agent addresses on a switch, one DHCP relay agent address for each VRRP group.
In a non-VRRP topology, but MLAG peer-gateway functionality is enabled, you have to configure a DHCP relay agent address using this command to make DHCP relay work properly. In this case, interface <vlan-interface-name> is the VLAN interface with DHCP relay enabled; relay-agent-address <agent-ipv4-address> needs to be configured as an IP in the same network segment as the VLAN interface but a different value. Note that the DHCP relay agent address should be identical on both MLAG peer devices.
Caution:
Do not configure the DHCP relay agent address when in a non-VRRP topology, and MLAG peer-gateway functionality is not enabled. By default, the system sets the IP address of the L3 VLAN interface that enabled DHCP relay as the DHCP relay agent address.
Example
- Configure a DHCP relay agent address on L3 VLAN interface vlan100.
admin@Xorplus# set protocols vrrp interface vlan100 vif vlan100 vrid 1 ip 192.168.1.5 admin@Xorplus# set protocols dhcp relay interface vlan100 relay-agent-address 192.168.1.5
Copyright © 2025 Pica8 Inc. All Rights Reserved.