Set a specific reply address

Glenn Satchell glenn.satchell at uniq.com.au
Thu Apr 26 13:13:50 UTC 2012


> Hi,
>  Is there a way to configure DHCPD to use a specific source IP
> address for replies? I have 4 IP addresses in my server and want to
> use one of them only for DHCP traffic. All the clients in my network
> are behind routers, which are relays pointing to the right IP address.
> The problem is that DHCPD is replying with the wrong IP address (the
> primary on the interface).
>
> Regards,
>  Diego
>
> --
> Diego Woitasen

I think "server-identifier" might be what you want. It fills in the
server's IP address in the right field in the DHCP packet, so that clients
will reply to that address.

       The server-identifier statement

          server-identifier hostname;

          The server-identifier statement can be used  to  define
          the  value  that  is sent in the DHCP Server Identifier
          option for a given scope.   The value specified must be
          an  IP  address for the DHCP server, and must be reach-
          able by all clients served by a particular scope.

          The use  of  the  server-identifier  statement  is  not
          recommended  -  the only reason to use it is to force a
          value other than the default value to be sent on  occa-
          sions where the default value would be incorrect.   The
          default value is the first IP address  associated  with
          the  physical  network  interface  on which the request
          arrived.

          The usual case where  the  server-identifier  statement
          needs  to be sent is when a physical interface has more
          than one IP address, and the one being sent by  default
          isn't  appropriate  for  some  or all clients served by
          that interface.  Another common case is when  an  alias
          is  defined  for  the purpose of having a consistent IP
          address for the DHCP server, and it is desired that the
          clients use this IP address when contacting the server.

There is also "local-address" which changes the behaviour somewhat, but
may also help. Note that the code is in older versions, but was only added
to the man page more recently.

regards,
-glenn




More information about the dhcp-users mailing list