I believe you have a preliminary understanding of the use of the DHCP server. Therefore, we need to study this part in depth. This time, let's talk about BOOTP/DHCP Relay Agents. Next let's take a look at the specific introduction.
If you need to create multiple DHCP servers, but the DHCP server and the client are located in different network segments, your IP Router must comply with RFC1542, DHCP/BOOTP Relay Agent is required.
Relay agent is a small program that broadcasts certain types of information from one CIDR block to another. DHCP relay agent is a hardware or program that forwards DHCP/BOOTP broadcast information from one CIDR block to another.
How does Relay Agents work?
You can use an instance to describe how BOOTP/DHCP Relay Agents works:
(BOOTP/DHCP Relay Agents) Client C in subnet 2 obtains an IP address lease from DHCP Server1 in subnet 1.
DHCP Client C broadcasts the DHCP/BOOTP discover message (DHCPDISCOVER) on subnet 2. The broadcast sends the message through port 67 in the form of a User datainprotocol packet.
When the relay agent is a vro with DHCP/BOOTP relayAgent function in this example) receives the message, it checks the gateway IP address contained in the message header, if the IP address is 0.0.0.0, replace it with the IP address of the relay agent or vro and forward it to the subnet 1 of the DHCP server.
When DHCPServer1 in subnet 1 receives this message, it checks whether the gateway IP address in the message is included in the DHCP range and determines whether it can provide an IP address lease.
If DHCP Server1 indicates Multiple DHCP ranges, the gateway IP address (GIADDR) in the message is used to determine the IP addresses selected from the DHCP range and provide them to the customer.
DHCP server 1 sends the IP address lease (DHCPOFFER) provided by the server to the relay agent.
The router forwards the lease to the DHCP client in the form of broadcast.
BOOTP/DHCP Relay Agents configuration. Note: If you want to configure multiple DHCP servers, it is best to place them in different network segments, and each DHCP server should establish an independent address pool, the IP address of each network segment should be included in the address pool.