You can configure the Juniper Networks EX Series switch to act as a Dynamic Host Configuration Protocol (DHCP) or Bootstrap Protocol (BOOTP) relay agent. This means that a locally attached host can issue a DHCP or BOOTP request as a broadcast message. If the EX Switch sees this broadcast message, it relays the message to a specified DHCP or BOOTP server. To configure an EX Series switch with support for ELS, refer to Configuring a DHCP Relay Agent on EX Series Switches .
This article details the steps to configure a legacy EX-series switch to act as a DHCP/BOOTP relay agent.
You can configure the router or an interface to act as a Dynamic Host Configuration Protocol (DHCP) or Bootstrap Protocol (BOOTP) relay agent. This means that a locally attached host can issue a DHCP or BOOTP request as a broadcast message. If the switch or an interface sees this broadcast message, it relays the message to a specified DHCP or BOOTP server.
You should configure the interface to be a DHCP/BOOTP relay agent if you have locally attached hosts and a distant DHCP or BOOTP server. To configure the router to act as a DHCP/BOOTP relay agent, include the bootp statement at the [edit forwarding-options helpers] hierarchy level.
bootp
[edit forwarding-options helpers]
The following step is used to configure the EX-Series switch as a DHCP Relay Agent.
To specify the IP address of the DHCP server and the interface on the switch where the server is connected, use:
[edit forwarding-options helpers bootp] user@switch# set interface ge-0/0/0 server 10.0.0.10
The following steps will set the DHCP Relay function under a routed virtual interface (RVI), so that a DHCP client's request from a VLAN will be forwarded to the connected DHCP server.
Create a virtual interface associated with the DHCP relay.
user@switch>set vlans Sales vlan-id 1
user@switch>set interface vlan unit 1 family inet address 10.0.0.1/24
Associate a virtual interface with a VLAN where the DHCP client’s machines will be connected.
user@switch>set vlan default l3-interface vlan.1
Associate a virtual interface with the DHCP server under bootp.
[edit forwarding-options helpers bootp] user@switch@> set interface vlan.1 server 10.10.10.10
Verifying DHCP Relay Operations on EX Switches
To display the address bindings for extended DHCP relay agent clients:
user@host> show dhcp relay binding
To display extended DHCP relay agent statistics:
user@host> show dhcp relay statistics
To clear the binding state of DHCP relay agent clients:
user@host> clear dhcp relay binding
To clear all extended DHCP relay agent statistics:
user@host> clear dhcp relay statistic
2022-03-11: Modified article title to reflect legacy platforms, and the respective product categories. Article is still relevant.