For the DHCP server, the router also plays an important role in it. Here we mainly analyze the specific application of the router in the DHCP server. As we all know, vrouters are used to isolate IP layer broadcasts. However, we usually use many broadcast-based applications.
For example, a DHCP Client searches for a DHCP server through broadcast. After the server responds to this request, it assigns the client an idle IP address in the address pool, which is in the same subnet, there will be no problems, but there will be problems in the environment of multiple subnets, because the routing device will not forward DHCP server requests in this broadcast mode, the DHCP client request times out and fails. See the following example:
There are three subnets in the Network: 192.168.0.0/24, 192.168.1.0/24, and 192.168.2.0/24. They are connected through the Cisco2600 router. The Gateways of each subnet are 192.168.x.1, while the DHCP server is located in the subnet of 192.168.0.0, the IP address is 192.168.0.10.
Only the DHCP client of the subnet 192.168.0.0 can obtain the IP address from the server normally. The other two subnets report that the DHCP server is unavailable. To solve this problem, you can use UDP to broadcast passthrough. The main method is as follows:
First, the DHCP server needs to be configured with Multiple scopes. The address pool of each scope corresponds to different subnets. In this example, the address pool 192.168.0.10-192.168.0.200 of scope A corresponds to subnet 1, b's address pool 192.168.1.10-192.168.1.200) corresponds to subnet 2, and so on.
When the DHCP client of 192.16.1.0 finds the DHCP server in broadcast mode, the router will follow the help address configured in UDP after receiving the broadcast packet, forward the DHCP server request to the DHCP server located in the 192.168.0.0 subnet. The server will retrieve the address from the address pool of the corresponding scope for allocation based on the address of the forwarding gateway. In this example, scope B is used, the address pool is 192.168.1.10-192.168.1.200.