Get the App
SLTechnology News&Howtos  ›  Servers  › 

Use DHCP trunks to allocate IP across network segments

Shulou Source: shulou.com Published: 2022-06-02 19:51:55 09月30日 Update

Experimental purpose:

Through DHCP relay, a DHCP server can automatically assign IP addresses across network segments, which avoids the need of a DHCP server for each network segment and greatly reduces the use of resources.

The diagram of the lab topology is as follows:

The steps of the experiment:

First of all, set the network card of 172.21.51.1 to NAT mode, the network card of 172.21.52.1 to host-only mode, and cancel the DHCP of VMware.

Open Server Manager, click roles, then add roles, check DHCP server, and then click next.

Select the next step, this experiment does not need dns, so ignore, until the location of the configuration scope, click add scope, create a new scope as shown in the figure, and click next.

Think that this lab does not need to use IPv6's DHCP, so choose to disable it here, and then choose to install it next, waiting for the installation to complete.

You can view the status of the DHCP scope in the administrative tool-DHCP, as shown in the figure.

Next, build a routing and remote access server, open the server manager, click roles, then add roles, check network policies and access services, and then click next.

Select the routing and remote access service here and proceed to the next step until the installation is complete.

Open routing and remote access in the administrative tool, right-click the server, select configuration, and enable routing and remote access.

Select next in the pop-up box, select the custom configuration here and click next.

Next, select the LAN route, and then click next.

Finally, we chose to enable the service, and we finished building it.

The following is to configure DHCP relay

Open routing and remote access, expand the relevant options, right click General in IPv4, and select the new routing protocol.

two。 Select the DHCP relay agent in the pop-up dialog box and determine.

Right-click in the right space of the DHCP relay agent and click add Interface

In the pop-up dialog box, select the network card in the same segment with the network segment that needs to be relayed. Here is the local connection 2, click OK, the packet defaults, and then OK.

Right-click DHCP Relay Agent-Properties enter the location of the DHCP server here and click add, and then determine

At this point, we have finished the configuration. Let's open the client to see if we can get the IP address automatically.

Open the CMD window in the client and use the ipconfig / renew command to re-obtain the IP address, and find that it has been obtained successfully.

Tags: Selection service server routing relay address lab configuration role role management network segment network card agent location client client dialog box tool mode Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Apple MySQL OPPO Reno Xiaomi