Questions for a dhclient using DHCPv6

k.fujinaga k.fujinaga at sdy.co.jp
Thu Jun 14 00:55:25 UTC 2012


Sorry.

Because an indent collapsed, it is hard to read the previous email.
So, I re-send fixed email.

---
Hi all,

I have two questions for a dhclient using DHCPv6 (dhcp-4.2.4 on ubuntsu 
11.04).
Does anyone know answer of these questions.

-- 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 IA prefix.
But, the dhclient didn't set IP address to ethernet.
# So, ifconfig's outputs didn't change.

The dhclient send/received 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 IA prefix completely.

The dhclient 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 the dhclient set IP address to ethernet using IA_PD mode?

Finally, I write more information.
- 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 set "Option Request" option to DHCPv6 messages except SOLICIT.
If the dhclient use follow config file, 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.



More information about the dhcp-users mailing list