DHCP server also acting as relay

Thread Tools Search this Thread
Special Forums IP Networking DHCP server also acting as relay
# 1  
Old 08-20-2009
DHCP server also acting as relay


I want to use the DHCP server that comes with vxWorks 6.4.
The DHCP server implementation has a table that contains addresses of DHCP servers that will receive a copy of all the client requests that the local server gets, thus the server acts as a dhcp relay at the same time.

Can anyone explain to me what is the use of this and how exactly does it work?
When the DHCP servers gets a request, it will answer it. If an address is defined in the table mentioned above, a copy of the request will be sent to another DHCP server, which I assume will also reply to it.

What happens now? which reply does the client chose and why? How is this mechanism useful?


Last edited by tomwolf; 08-20-2009 at 11:09 AM..
# 2  
Old 08-23-2009
When a system (client) boots up, a DHCP lease negotiation occurs between a DHCP server and the client. Four messages are sent between the client and the DHCP server:

- DHCPDISCOVER Broadcast message sent by client to request an IP address lease from a DHCP server.
- DHCPOFFER Sent by one or more DHCP servers in response to the DHCPDISCOVER message.
- DHCPREQUEST Sent by client to first DHCP server that responded to its request for an IP address.
- DHCPACK Sent by DHCP server to client acknowledging the request. Contains assigned IP address, lease details and more.

Because a DHCPDISCOVER message is a broadcast message it is limited to the segment of the network. This means that a DHCP server must be located on the network segment unless the DHCP messages are routed to a DHCP server. One way is to configure the router to forward DHCP/BOOTP messages. Another way is to use a DHCP relay agent and is commonly used if a router does not support forwarding of DHCP/BOOTP messages.

In summary if your network has multiple segments, you have to do one of the following:

- Place a DHCP server on each segment.
- Place a DHCP Relay Agent on each segment.
- Configure your routers to forward DHCP broadcast messages.
# 3  
Old 08-24-2009
How would the following scenario work?

Thanks for the answer. I still have some questions :-)

A client sends a DHCPDISCOVER to the router that acts both as a server and a relay. The server responds with a DHCPOFFER to the client and forwards the broadcast to the server specified in the relay, which also responds with a DHCPOFFER.
If the time difference between the arrival of the the DHCPOFFER messages from the two servers to the client is negligible, which one would the client use?
If the time difference is not negligible, then by the time the client gets the DHCPOFFER from the farther server, it will already have negotiated a lease with the server in it's segment.
I am still having trouble understanding what is the point of having both server and relay in the same machine.
# 4  
Old 08-24-2009
I am still having trouble understanding what is the point of having both server and relay in the same machine
In a word, redundancy.

If the time difference between the arrival of the the DHCPOFFER messages from the two servers to the client is negligible, which one would the client use?
The first one processed. The DHCPREQUEST sent by the client is broadcast so that all other DHCP servers that received the DHCPDISCOVER broadcast message from the client can reclaim the IP addresses that they offered to the client.
# 5  
Old 08-24-2009
It seems (to me) that using both server and relay on the same machine opens more room for potential problems than solving any.
But it's good to know why and how it can be used anyways.

Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. HP-UX

Unable to receive mails from email relay server

Hi, I have reports that are generated in one server (, hostname l28bi01. These reports are supposedly sent to a group of email addresses hourly via an email relay server. However, this is not happening. In sendmail.cf in bi01, the DS Smart Relay Host ip address is: ... (3 Replies)
Discussion started by: anaigini45
3 Replies

2. UNIX for Advanced & Expert Users

Need an help in configuring Postfix mail relay server

Hello, We have 2 servers, server A and Server B in same domain. I have already configured the Serevr A to send an email to the internet (outside domain) by opening the port 25 to the internet. Now I need to send an email to the outside domain from Server B using server A. I have opened the... (1 Reply)
Discussion started by: sathishbabu89
1 Replies

3. Red Hat

Relay mail server

Hi, I have a postfix mail server on centos 6. (mailserver.mydomain.com ) I want to send mail through my mail server from other linux server ( server1 ), so that it will use mail server IP address. I have tried. myhostname = server1.mydomain.com relayhost = mailserver.mydomain.com... (2 Replies)
Discussion started by: Priy
2 Replies

4. IP Networking

Get DHCP relay interfaces IP address using DHCP

Hi All , please view the set up below: ------------------------------------------------------------------- | DHCP Server |-----------| ROUTER & |-----------| Clients | | | - -<eth1>| DHCP-RELAY|<eth2>-- | 192.168.88.X | ... (2 Replies)
Discussion started by: gdangoor
2 Replies

5. Linux

Configure Postfix to relay to Exchange Server with NTLM authentication

Hello I have a shell script, which should send email, if any error occurred. This script is running in Red Hat Linux 4.6, and want to configure postfix so it can relay to an Exchange Server. The Authorization method of Exchange server, I guess is: 250-AUTH NTLM. So I have: Server A ( Red... (1 Reply)
Discussion started by: viktor1985
1 Replies

6. AIX

Relay to Exchange Server

AIX 5.3 Domain: domainna Exchange Server: ex05.domainname.com Our emails that are generated from Unix going to the "outside world" are now being rejected by most hosts. The current relay is listed as user@domainna. Here is a snippet from the log... 1356561:Aug 21 08:04:05 domainna... (0 Replies)
Discussion started by: andrewsc
0 Replies
Login or Register to Ask a Question