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

banglang huang banglang.huang at gmail.com
Wed Nov 6 11:28:48 UTC 2013


I have another issue now, it is the IPV6 dhcrelay.

My configuration file on AP(2001:aaaa:bbbb:1234::110)

#dhcpd.conf
authoritative;
default-lease-time 72000;
max-lease-time 144000;

.......

subnet6 2001:aaaa:bbbb:1234::/64 {
  interface eth0;
  range6 2001:aaaa:bbbb:1234:: /64;
 /*option routers is unacceptable argument here*/
}

subnet6 2001:aaaa:bbbb:1235::/64 {
  interface eth0;
  range6 2001:aaaa:bbbb:1235:: /64;
}

subnet6 2001:aaaa:bbbb:1236::/64 {
  interface eth0;
  range6 2001:aaaa:bbbb:1236:: /64;
}


the ifconfig result on DHCP Relay Agent  (static ipaddress)
eth0  2001:aaaa:bbbb:1234::1
eth1  2001:aaaa:bbbb:1235::1
eth2  2001:aaaa:bbbb:1236::1

And I run the dhcrelay daemon like this

dhcrelay -6 -u eth0 -l eth1 -l eth2

furthermore, the daemon radvd is runned on DHCP Relay Agent,
below is the configuration file. /etc/radvd.conf

interface eth0
{
AdvSendAdvert on;
AdvManagedFlag off;
AdvOtherConfigFlag off;

prefix 2001:aaaa:bbbb:1234::/64
{
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
};

interface eth1
{
AdvSendAdvert on;
AdvManagedFlag off;
AdvOtherConfigFlag off;

prefix 2001:aaaa:bbbb:1235::/64
{
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
};

interface eth2
{
AdvSendAdvert on;
AdvManagedFlag off;
AdvOtherConfigFlag off;

prefix 2001:aaaa:bbbb:1236::/64
{
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
};



After finishing by above configuration , the Client can get IPv6 address,
but can not ping DHCP Server or the specific ethernet port(the same network)



2013/11/5 banglang huang <banglang.huang at gmail.com>

> Thank you very much, I make it now, the two PC clients can get their ip
> address on the specific network, 192.168.2.x and 192.168.3.x.
>
>
> 2013/11/5 Glenn Satchell <glenn.satchell at uniq.com.au>
>
>> 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 ??
>> >
>>
>> _______________________________________________
>> dhcp-users mailing list
>> dhcp-users at lists.isc.org
>> https://lists.isc.org/mailman/listinfo/dhcp-users
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20131106/d93080b7/attachment.html>


More information about the dhcp-users mailing list