How to configure the relay agent in One DHCP Server with isc-dhcp-server ipv4?

Glenn Satchell glenn.satchell at uniq.com.au
Tue Nov 5 03:32:07 UTC 2013


In subnet 192.168.2.0 you need to define

  option routers 192.168.2.1;

and in subnet 192.168.3.0 you need to define:

  option routers 192.168.3.1;

so that the clients get a default route back to the dhcp server.

Next things to try after that are:

Is there a firewall on the dhcp relay box? It needs to allow udp port 67
and udp port 68 traffic for all IPs including 255.255.255.255.

Is ip_forwarding enabled on the dhcp relay box? Usually /etc/sysctl.conf
or a subdirectory to set this.

Is there any useful information in the syslog files? Exactly which file
will depend on how syslog is configured on your system, but something like
/var/log/messages or /var/log/syslog.

Next step after that is to sniff packets on the dhcp relay box:

  tcpdump udp port 67 or udp port 68

and see which parts of the handshake you are seeing. My bet is adding the
routers statement will fix it though.

regards,
-glenn

On Tue, November 5, 2013 12:59 pm, banglang huang wrote:
> This picture shows the network topology, A Router( only One eth port) with
> isc-dhcp-server, a PC with 4 ethernet ports and two clients,
>
> [image: ÄÚǶͼƬ 1]
>
> my configuration file on AP(192.168.1.1)
>
> #dhcpd.conf
> authoritative;
>
> subnet 192.168.1.0 netmask 255.255.255.0 {
>   interface eth0;
>   range 192.168.1.10 192.168.1.50
>   default-lease-time 72000;
>   max-lease-time 144000;
> }
>
> subnet 192.168.2.0 netmask 255.255.255.0 {
>   interface eth0;
>   range 192.168.2.10 192.168.2.50
>   default-lease-time 72000;
>   max-lease-time 144000;
> }
>
> subnet 192.168.3.0 netmask 255.255.255.0 {
>   interface eth0;
>   range 192.168.3.10 192.168.3.50
>   default-lease-time 72000;
>   max-lease-time 144000;
> }
>
>
> the ifconfig result on DHCP Relay Agent
> eth0 192.168.1.125
> eth1 192.168.2.1
> eth2  192.168.3.1
>
> And I run the dhcrelay daemon like this
>
>   dhcrelay 192.168.1.1
>
>
> But the above configuration can not work, the two PC clients can not get
> IP, so I really need help.
>
>
>
> 2013/11/4 Glenn Satchell <glenn.satchell at uniq.com.au>
>
>> There is no configuration file for dhcrelay as the options are very
>> simple. Typical usage is
>>
>>   dhcrelay serverip1 serverip2
>>
>> where serveip1 is the fully qualified hostname or ip address of the dhcp
>> server. You can specify multiple servers if you have more than one (eg
>> failover configuration).
>>
>> Full details are in the man page for dhcrelay.
>> regards,
>> -glenn
>>
>> On Mon, November 4, 2013 3:38 pm, banglang huang wrote:
>> > Hi all,
>> >         As I am new to isc-dhcp-server, so I do not know how to
>> configure
>> > the relay agent.
>> >         Is there anyone can tell or show a sample configuration
>> > file(dhcpd.conf or other) to me ??
>



More information about the dhcp-users mailing list