Tuesday 12 March 2013

DHCP Rely Agent

DHCP Rely Agent:

If you have multiple subnets in your network, and do not have a DHCP server on every subnet, determine whether your current routers (Software\Hardware) relay DHCPmessages.

The DHCP relay agent relays DHCP message traffic between the DHCP-enabled clients on the local network and a remote DHCP server located on another physical network by using the IP address of the remote DHCP server.


How relay agents work

A relay agent relays DHCP messages which were broadcasted by NIC's on the network.

The following illustration shows how client C on Subnet 2 obtains a DHCP address lease from DHCP server 1 on Subnet 1.

Image result for dhcp relay agent

1. Client C generated a broadcast message when it turned in the networ. It will use UDP protocal for this generation on the port 67 (the port number reserved and shared for DHCP server communication).

2. In this case DHCP relay agent willtake the broadcasted message from the network and check for the gateway in the DHCP message header. If it did not find any gateway information it will fill that with router IP and sent it to Subnet 1 where DHCP server is located.

3. When the DHCP server recives the message, it will check the gateway IP and will check the DHCP scope where the router IP has beed configured.

4. After that it will check the DHCP scope and will release an IP from the scope and will to the DHCP relay with the IP configuration.

5. Then, DHCP realy agent will send that informatino to the client and it will take DHCPREQUEST from the client and will send it to server.

6. Again, it will receive DHCPACK packet from the server and will forward that to the client.


 Configure the DHCP Relay Agent

•Add the DHCP Relay Agent
•Configure global DHCP Relay Agent properties
•Enable the DHCP Relay Agent on a router interface
Add the DHCP Relay Agent
  1. Open Routing and Remote Access.
  2. In the console tree, click General.
    Where?
    • Routing and Remote Access/server name/IP Routing/General
  3. Right-click General, and then click New Routing Protocol.
  4. In the Select Routing Protocol dialog box, click DHCP Relay Agent, and then click OK.
Configure global DHCP Relay Agent properties
  1. Open Routing and Remote Access.
  2. In the console tree, click DHCP Relay Agent.
    Where?
    • Routing and Remote Access/server name/IP Routing/DHCP Relay Agent
  3. Right-click DHCP Relay Agent, and then click Properties.
  4. On the General tab, in Server address, type the IP address of your DHCP server, and then click Add.
  5. Repeat step 4 for each DHCP server you need to add, and then click OK.
Enable the DHCP Relay Agent on a router interface
  1. Open Routing and Remote Access.
  2. In the console tree, click DHCP Relay Agent.
    Where?
    • Routing and Remote Access/server name/IP Routing/DHCP Relay Agent
  3. Right-click DHCP Relay Agent, and then click New Interface.
  4. Click the interface you want to add, and then click OK.
  5. In the DHCP Relay Properties dialog box, on the General tab, verify that the Relay DHCP packets check box is selected.
  6. If needed, in Hop-count threshold and Boot threshold (seconds), click the arrows to modify the thresholds.

No comments:

Post a Comment