Multi-host establishment and configuration of DHCP servers

Source: Internet
Author: User

For DHCP servers, we can set multiple hosts. So how can I use a multi-host DHCP server to connect to multiple independent subnets? Next we will mainly explain this problem.

1) use a multi-host DHCP server to connect to multiple independent subnets.

/NIC1: 192.168.1.1 --- vswitch group 1 --- subnet 1

DHCP server/

\ NIC2: 10.0.0.1 --- vswitch group 2 --- subnet 2

2) use DHCP relay

If the DHCP server has Multiple DHCP scopes, the addresses in the IP address field of the Gateway (GIADDR) will identify the DHCP scope from which the IP address lease will be provided.

That is to say, when the client of subnet A requests an IP address from the DHCP server of subnet B, it will send A broadcast of 255.255.255.255 to the local subnet A. The port of the router or the NIC of the DHCP relay server will receive the broadcast, add the packet to the GIADDR segment, that is, the router adds the port address of the received packet to the packet, and the DHCP relay server adds its own IP address to the packet ), finally, the packet is forwarded to the DHCP server of subnet B. The DHCP server assigns the IP address of the subnet scope to the client based on GIADDR.

Understand that the relay proxy is a small program that transfers DHCP/BOOTP messages between clients and servers on different subnets. According to the RFC, a standard document describing protocol design and related operations, DHCP/BOOTP relay agents are part of DHCP and BOOTP standards and functions.

DHCP/BOOTP vro support

In a TCP/IP network, a router is used to connect hardware and software used on different physical network segments called "subnets" and forward IP packets between each subnet. To support and use the DHCP service on multiple subnetworks, the routers connecting to each subnet must comply with the DHCP/BOOTP relay proxy function described in RFC 1542.

To comply with RFC 1542 and provide relay Proxy Support, each vro must be able to identify BOOTP and DHCP protocol messages and process them accordingly. Because the vrodhcp interprets a DHCP message as a BOOTP message, for example, a UDP message sent using the same UDP port number and containing the shared message structure ), DHCP packets and any BOOTP packets sent from the transit network of a vro with the BOOTP relay proxy capability.

If the router cannot run as a DHCP/BOOTP relay proxy, each subnet must have a DHCP server or another computer running as a relay proxy on this subnet. If the vro supports DHCP/BOOTP relay, you can configure a computer running Windows NT Server 4.0 or later to act as a relay agent by installing the DHCP relay agent service.

In most cases, routers support DHCP/BOOTP relay. If your vro is not supported, contact the vro manufacturer or supplier to check whether software or firmware upgrades provide support for this function.

How relay proxy works

The relay proxy forwards DHCP/BOOTP messages broadcast on one of its physical interfaces, such as NICs, to other remote subnets connected to other physical interfaces. It shows how client C on subnet 2 obtains a DHCP address lease from DHCP server 1 on subnet 1.

DHCP Client C uses the well-known UDP server port 67 to broadcast DHCP/BOOTP query messages (DHCPDISCOVER) with the "User Datagram Protocol (UDP)" datagram on subnet 2 ). Port 67 is reserved and shared by BOOTP and DHCP servers.

The relay proxy checks the IP address field of the Gateway in the DHCP/BOOTP message header when DHCP/BOOTP allows the router to relay. If this field has an IP address 0.0.0.0, the proxy file will fill in the IP address of the relay proxy or router, and then forward the message to the remote subnet 1 where the DHCP server is located.

When DHCP server 1 on the remote subnet 1 receives this message, it checks the IP address field of the gateway IP address for the DHCP scope that the DHCP server can use to provide an IP address lease.

If DHCP server 1 has Multiple DHCP scopes, the addresses in the IP address field of the Gateway (GIADDR) will identify which DHCP scope will provide the IP address lease.

For example, if the gateway IP address (GIADDR) field has an IP address of 10.0.0.2, the DHCP server checks whether the available address scope set has an address scope that matches the Class a ip network that contains the gateway address as the host. In this case, the DHCP server checks the address scopes between 10.0.0.1 and 10.0.0.254. If a matching scope exists, the DHCP server selects an available address from the matching scope for use when the IP address lease of the client is provided.

When DHCP server 1 receives the DHCPDISCOVER message, it processes the IP address lease (DHCPOFFER) and sends it directly to the relay proxy identified in the gateway IP address (GIADDR) field.

The router then forwards the address lease (DHCPOFFER) to the DHCP client.

The Client IP address is still unknown, so it must be broadcast on the local subnet. Similarly, according to RFC 1542, The DHCPREQUEST message is forwarded from the client to the server, while the DHCPACK message is forwarded from the server to the client.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.