DHCPv6 - dhclient

Network related discussions (including general TCP/IP stuff, routing, etc).

DHCPv6 - dhclient

Postby r00t » 07 Aug 2009, 11:20

Hi everyone!

I'm trying to assign IPV6 addresses on my network with dhcpd.
I have a freebsd machine acting as a dhcp server and it is working well : a windows client gets its IPv6 address from the server.

But I can't get a freebsd client to get its address.

I'm wondering if dhclient supports IPv6 or if I should find some other client.

NOTE: When I manually assign two IPv6 addresses, communication does work. Really seems like dhclient is not doing what it should.

Hope someone can help!
Thanks!
r00t
Junior Member
 
Posts: 14
Joined: 02 Jul 2009, 12:57

Postby brd@ » 09 Aug 2009, 03:30

Try using the rtsol command instead like this:
Code: Select all
rtsol [i]interface[/i]

When you set `ipv6_enable="YES"' in /etc/rc.conf, the rtsol client is used instead of dhclient. So give this a shot.
User avatar
brd@
Member
 
Posts: 284
Joined: 01 Oct 2007, 22:53
Location: Denver, CO, USA

[Solved]

Postby r00t » 10 Aug 2009, 12:27

brd@ wrote:Try using the rtsol command instead like this:
Code: Select all
rtsol [i]interface[/i]

When you set `ipv6_enable="YES"' in /etc/rc.conf, the rtsol client is used instead of dhclient. So give this a shot.


Thanks but that was not the problem!
I was trying to set up DHCPv6 stateful, therefore rtsol had nothing to do with it since I'm not using autoconfiguration.

The problem is that my system was using dhclient located in /sbin and should've been using the dhclient in /usr/local/sbin -> It's a FreeBSD system. The latter is the most recent and takes the "-6" option to startup in IPv6 mode whereas the first doesn't.
r00t
Junior Member
 
Posts: 14
Joined: 02 Jul 2009, 12:57

Postby brd@ » 10 Aug 2009, 12:31

Aha, that makes more sense. I was not even thinking rtsol was for autoconfiguration. On my IPv6 networks it is just "the way." :)
User avatar
brd@
Member
 
Posts: 284
Joined: 01 Oct 2007, 22:53
Location: Denver, CO, USA

DHCPv6 - dhclient

Postby paravpandit » 14 Aug 2009, 15:10

Hi,

With reference to this I am referring to the HEAD code base of dhclient.
It doesn't seem to take -6 as the argument for IPv6 DHCP functionality. Here is the snippet.
Even in the code, doesn't find any reference to IPv6 packet formatting, parsing, using UDP different UDP port numbers for IPv6 etc.

Code: Select all
   while ((ch = getopt(argc, argv, "bc:dl:qu")) != -1)
      switch (ch) {
      case 'b':
         immediate_daemon = 1;
         break;
      case 'c':
         path_dhclient_conf = optarg;
         break;
      case 'd':
         no_daemon = 1;
         break;
      case 'l':
         path_dhclient_db = optarg;
         break;
      case 'q':
         quiet = 1;
         break;
      case 'u':
         unknown_ok = 0;
         break;
      default:
         usage();
      }
paravpandit
Junior Member
 
Posts: 7
Joined: 11 Aug 2009, 17:01

Postby paravpandit » 14 Aug 2009, 15:13

Even man page also doesn't say anything about v6.
http://www.freebsd.org/cgi/man.cgi?query=dhclient&sektion=8

Do you mean IPv6 DHCP is handled fully in rtsol?
http://www.isc.org's dhclient seems to have both of them in one daemon, of course not at the same time unlike dhclient and rtsol as separate daemons?
paravpandit
Junior Member
 
Posts: 7
Joined: 11 Aug 2009, 17:01

Postby SirDice » 14 Aug 2009, 15:22

AFAIK rtsol is used to listen to router advertisements done by rtadvd. Of course it's only able to get an IP address and a route that way. No way of setting DNS. I more or less solved that by using MDNS.

Currently my own network is still using both IPv4 and IPv6 protocols.
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
User avatar
SirDice
Old Fart
 
Posts: 16149
Joined: 17 Nov 2008, 16:50
Location: Rotterdam, Netherlands

Postby r00t » 17 Aug 2009, 14:17

I think the dhclient I'm using with the -6 option is the ISC one (located in /usr/local/sbin). The base dhclient does not take that option as you mentioned.

From what I understand, you can configure IPv6 addresses in two ways:

- stateless : no DHCP to assign addresses. IP addresses are built by using autoconfiguration and by having routers announce the IP addresses of machines in the network. Therefore, rtsol is needed to 'solicitate' that info from routers.

- stateful : DHCP is used to assign addresses. An IPv6 compatible dhclient is needed, no autoconfiguration occurs, rtsol is no needed.

Of course, some mixtures are possible. For example, using autoconfiguration to get IPv6 addresses AND using dhcp to get other information, such as DNS servers addresses, etc.. But this was not the intended functionality in the original post.

Correct me if I'm wrong.

Regards.
r00t
Junior Member
 
Posts: 14
Joined: 02 Jul 2009, 12:57

Postby paravpandit » 18 Aug 2009, 08:36

Yes you are right. Using mix of stateless and stateful was not the intention.
paravpandit
Junior Member
 
Posts: 7
Joined: 11 Aug 2009, 17:01


Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest