Shallow read DHCP relay proxy

Source: Internet
Author: User
Tags rfc

The content of the DHCP relay proxy has always been the focus of our attention, so through this understanding, we can further deepen the learning of DHCP. Here we will explain this knowledge. 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 router connecting to each subnet must comply with the BOOTP/DHCP relay proxy capabilities 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. When you configure a vro impractical or impossible to support DHCP/BOOTP relay, you can configure a computer running Windows NT Server 4.0 or later to act as a relay proxy by installing the DHCP relay proxy 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 DHCP 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. The following example shows how client C on subnet 2 obtains a DHCP address lease from DHCP server 1 on subnet 1.

1. DHCP Client C uses the well-known UDP server port 67 on subnet 2 to broadcast the DHCP/BOOTP exploration message (DHCPDISCOVER) in the form of User Datagram Protocol (UDP) datagram ), server port 67 is reserved and shared for communication between the BOOTP and DHCP servers.

2. the relay proxy checks the IP address field of the Gateway in the DHCP/BOOTP message header when DHCP/BOOTP allows the relay router. If this field has an IP address of 0.0.0.0, the proxy program fills in the IP address of the relay proxy or router and forwards the message to the remote subnet 1 of the DHCP server.

3. When DHCP server 1 on the remote subnet receives the message, it checks the IP address field of the gateway IP address used by the DHCP server to provide the IP address lease.

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

For example, if the IP address (GIADDR) field of the Gateway has an IP address of 10.0.0.2, the DHCP server checks the set of available IP address scopes in the IP address ranges, the IP address range matches A Class a ip network that contains the gateway address of 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.

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

6. 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, and the DHCPACK message is forwarded from the server to the client.

The content of the DHCP relay proxy is described here. I hope you can have a reference.

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.