Questions for a dhclient using DHCPv6

k.fujinaga k.fujinaga at sdy.co.jp
Wed Jun 13 03:57:31 UTC 2012


Hi all,

I have two questions for a dhclient using DHCPv6 (dhcp-4.2.4 on ubuntsu
11.04).

-- Q1. How can dhclient set IP address to ethernet using IA_PD mode?

I tried to get IP address using IA_PD mode.
The dhclient could communicate to DHCPv6 server, and got IP prefix.
But, the dhclient didn't set IP address to ethernet.
# So, ifconfig's outputs didn't change.

The dhclient send/recived solicit, advertise, request, reply messages.
All message was correct, and the dhclient outputs lease file as follows.

- lease file -
default-duid "\000\003\000\001\000!\206+\0039"
lease6 {
interfase "eth0"
ia-pd XX:XX:XX:XX { # sorry. address is masked.
starts 1339469866;
renew 7200;
rebind 10800;
iaprefix 2408:XXX:XXXX:XXX::/56 { # sorry. prefix is masked.
starts 1339469866;
preferred-life 12600;
max-life 14400;
}
option dhcp6.client-id XXXXXXXXXXXXX; # masked.
option dhcp6.server-id XXXXXXXXXXXXX; # masked.
...
}
--

So, the dhclient could get IP prefix completely.

The chclient set environment variable "new_ip6_prefix" for script file.
If "new_ip6_prefix" is defined, 4.2.4's script file
(client/scripts/linux) do nothing.

> # client/scripts/linux line.263.
> if [ x$reason = xBOUND6 ] ; then
> if [ x${new_ip6_address} = x ] || [ x${new_ip6_prefixlen} = x ] ; then
> exit_with_hooks 2;
> fi

How can dhclient set IP address to ethernet using IA_PD mode?

Finaly, I write more informations.
- command option
# ./dhclient -d -6 -P -D LL
-cf /etc/dhcp/dhclient.conf
-lf /var/tmp/lease_file
-pf /var/tmp/pid_file
-sf /var/tmp/dhcp-4.2.4/client/scripts/linux
eth0
# I used 4.2.4's script file.

- config file (/etc/dhcp/dhclient.conf)
send dhcp6.reconf-accept;
request dhcp6.vendor-opts,
dhcp6.sip-servers-addresses,
dhcp6.name-servers,
dhcp6.domain-search,
dhcp6.sntp-servers;
--

-- Q2. How can I select target message-type that is added IPv6 options?

I want to "Option Request" option to DHCPv6 messages except SOLICIT.
If the dhclient use follow config files, the dhclient set "Option
Request" to all message.
Can the dhclient select target message?

- config file (/etc/dhcp/dhclient.conf)
request dhcp6.vendor-opts,
dhcp6.sip-servers-addresses,
dhcp6.name-servers,
dhcp6.domain-search,
dhcp6.sntp-servers;
--

Thanks and best regards.

-- 
Katsuhisa Fujinaga         k.fujinaga at sdy.co.jp
SDY Corporation            TEL:+81-47-401-7210 FAX:+81-47-401-7207



More information about the dhcp-users mailing list