How to configure the DHCP Relay in TP-Link Switch

Configuration Guide
Updated 06-27-2022 09:01:25 AM 256990
This Article Applies to: 

Generally, the clients get IP by broadcasting the DHCP packets in the LAN, and the server will response clients’ request. As this way, it is necessary to keep the DHCP server and clients in the same LAN. When you need more than one DHCP subnets, you will need more than one DHCP server in the same LAN with each subnets which could increase the cost of network and is hard to manage.

The function of DHCP Relay is used to solve this problem. It can transmit different subnets’ DHCP packets. So all the subnets can share the same DHCP server. Then how to configure the DHCP Relay in TP-Link Switch? Here is the guide.

Topology:

We need a DHCP server which can allocate more than one subnets. Here we take a L2+ switch of TP-Link, T2600G-28TS as the DHCP server. And another switch T1600G-28TS takes the part of DHCP Relay. We plan to give two different subnets to the clients connected to the T1600G-28TS, 192.168.10.0/24 and 192.168.20.0/24. So this is the real topology below:

Equipment: T2600G-28TS, T1600G-28TS, PCs

Topology Introduction: The T2600G-28TS is DHCP server which connected to the T1600G-28TS by the port 1/0/2; the client are divided into two different VLANs: VLAN10 and VLAN20. VLAN10 includes the port 1/0/4, 1/0/6, 1/0/8 while the VALN20 includes port 1/0/3, 1/0/5, 1/0/7.

Step 1:

Login the T2600G-28TS, enable DHCP server and set up two IP Address Pools.

Follow the Routing >> DHCP Server >> DHCP Server, then enable it.

Follow the Routing >> DHCP Server >> Pool Setting, input the Network Address, also the Subnet Mask. Lease Time and Default Gateway are needed. Then click Create.

Follow the same step above and set another IP Address Pool. You will get two IP Address Pools on the pool table.

Note: The reason we take T2600G-28TS as the DHCP server is it can allocate different subnets, that’s what we need to show how the DHCP Relay work.

Step 2:

Create a Static Routing in the T2600G-28TS. A static routing is used to tell the T2600G-28TS how to send the packets back to the clients.

Follow the Routing >> Static Routing. Input the Destination subnet and Subnet Mask. Here we set the 192.168.0.10 as the Next Hop of the routing, because it is the interface of the T1600G-28TS.

There are two subnets, so there should have two static routes in the table.

Till now, the configuration on the DHCP Server is over.

Step 3:

First step of the setting in T1600G-28TS is giving it another Interface, because it was conflict with the one in T2600G-28TS (192.168.0.1).

Follow the Routing >> Interface. Change the interface of VLAN1 to 192.168.0.10.

After that, we will be able to login the switch by the IP 192.168.0.10.

Step 4:

Then, the different subnets should be divided into different VLANs, so we need to create two VLANs. As we planned before, we add port 1/0/4, 1/0/6, 1/0/8 in VLAN10, and port 1/0/3, 1/0/5, 1/0/7 in VLAN20. The uplink port 1/0/2 should be added into each VLANs.

Note: When we add ports to the VLANs, as default, the PVID of the ports are 1. To make the date transmit into their own VLAN. It is needed to change the PVID of port 1/0/4, 1/0/6, 1/0/8 to 10, while the PVID of port 1/0/3, 1/0/5, 1/0/7 to 20 manually.

Step 5:

After create VLANs, we should configure the Interface for each VLANs. The same step as setting for the VALN1 Interface, like 192.168.10.1 for VLAN10.

Step 6:

Enable the DHCP Relay. Follow the Routing >> DHCP Relay >> Global Config.

The DHCP Server setting is used to specify DHCP server for the VLANs.

Both of the DHCP Server for the VLANs is at 192.168.0.1, so there should have two lists in the table.

Till now, all the configuration about the DHCP Relay is done. Let’s check if it does work.

Step 7:

Connect the PC to the ports belong to different VLANs, for example PC1 to port 1/0/4 and PC2 to 1/0/3. Then run the CMD, input the command: ipconfig/release and ipconfig/renew. The result shows like below in the different PCs.

The clients get IP from the DHCP server correctlly.

Is this faq useful?

Your feedback helps improve this site.

Recommend Products

Community

TP-Link Community

Still need help? Search for answers, ask questions, and get help from TP-Link experts and other users around the world.

Visit the Community >

From United States?

Get products, events and services for your region.