DHCPv6 server

Answered Question
Feb 1st, 2012

It possible to assign multiple IPv6 addresses to the same client with DHCPv6 server?

I have this problem too.
0 votes
Correct Answer by zhenningx about 2 years 2 months ago

Hello, I think this should work:

multiple IPv6 addresses to the same client with one DHCPv6 server.

I tested it on c3750 switch. The switch itself is configured as DHCPv6 server.

Switch configurations:

ipv6 dhcp pool TEST

address prefix FD00:1000::/64

address prefix FD00:2000::/64

dns-server 2001:1000::1

interface Vlan2                       

no ip address

ipv6 address FE80::1 link-local

ipv6 nd managed-config-flag

ipv6 dhcp server TEST

After connect a Win7 laptop to vlan2:

On c3750 switch:

#sh ipv6 dhcp binding

Client: FE80::39CB:5A96:A02:C016 (Vlan2)

  DUID: 0001000113B59669A4BADBCB2897

  IA NA: IA ID 0x0EA4BADB, T1 43200, T2 69120

    Address: FD00:1000::4D25:5436:B52E:E6BC

            preferred lifetime 86400, valid lifetime 172800

            expires at Feb 03 2012 02:13 PM (172446 seconds)

   Address: FD00:2000::3023:9BDF:3382:7DC4

            preferred lifetime 86400, valid lifetime 172800

            expires at Feb 03 2012 02:13 PM (172446 seconds)

On Win7 laptop:

ipconfig:

IPv6 Address. . . . . . . . . . . : fd00:1000::4d25:5436:b52e:e6bc

  IPv6 Address. . . . . . . . . . . : fd00:2000::3023:9bdf:3382:7dc4

  Link-local IPv6 Address . . . . . : fe80::39cb:5a96:a02:c016%10

  Autoconfiguration IPv4 Address. . : 169.254.192.22

  Subnet Mask . . . . . . . . . . . : 255.255.0.0

  Default Gateway . . . . . . . . . : fe80::1%10

Is this what you are looking for?

Correct Answer by Calin Chiorean about 2 years 2 months ago

Hello,

DHCP use client ID / MAC to unique identify a client. Internally a DHCP server built a table of IP address <-> MAC, so 1 MAC = 1 IP address, not matter IPv4 / IPv6.

Now, I've seen stories about unsupported hacks that may overcome DHCP specification, but you don't want to do this in a productive environment. For IPv4 DNSmasq was used for this kind of tricks, but for IPv6 is not working.

Dnsmasq supports IPv6 for DNS and TFTP, but not DHCP.

HTH,

Calin

  • 1
  • 2
  • 3
  • 4
  • 5
Average Rating: 4.7 (3 ratings)
Correct Answer
Calin Chiorean Wed, 02/01/2012 - 05:45

Hello,

DHCP use client ID / MAC to unique identify a client. Internally a DHCP server built a table of IP address <-> MAC, so 1 MAC = 1 IP address, not matter IPv4 / IPv6.

Now, I've seen stories about unsupported hacks that may overcome DHCP specification, but you don't want to do this in a productive environment. For IPv4 DNSmasq was used for this kind of tricks, but for IPv6 is not working.

Dnsmasq supports IPv6 for DNS and TFTP, but not DHCP.

HTH,

Calin

Pavel Doronin Wed, 02/01/2012 - 17:53

Interesting. We all know that all IPv6 hosts supports multiple IPv6 addresses on the same interface. So, if we need two or more IP addresses on the same interface how we can achieve this goal? One IP = One DHCPv6 server, 2 IP = 2 DHCPv6 servers ?

Calin Chiorean Thu, 02/02/2012 - 00:04

You can add manually multiple IP addresses to an interface, but when it comes to DHCP the story it's a little bit different.

When you add manually one or more IP / IPv6, L2 to L3 mapping is done through mechanism like ARP to know where to forward traffic and to built the ARP table.

DHCP will have it's own table that will map mac address to IP address. This is done to avoid problems like assigning multiple IP addresses to the same mac address. To have what you want, you need somehow to overcome the DHCP specifications.

Usually multiple IP / one interface it's used in case of servers. And talking about server and DHCP in the same phrase is not something very common.

Cheers,

Calin

Pavel Doronin Thu, 02/02/2012 - 00:20

Unfortunally multiple IP is used not with servers, but with v6 multihomming also.

So you think 2 IP = 2 DHCPv6 servers will not work? You tested it?

Calin Chiorean Thu, 02/02/2012 - 01:28

Never test it.

The question is the following. Let's assume that you have 2 DHCP servers, not synchronized. The IPv6 device send a DHCP request, one of the servers replies and the "transaction" is done. IPv6 device has an IP address now. Now the device should ask again for another IP. I don't know if this will work.

Under Linux machine at least in theory, if you have one physical ethernet interface splited into multiple subinterfaces (like eth0:0, eth0:1) it may work.

Maybe I have time to test this in the next days.

HTH,

Calin

Correct Answer
zhenningx Mon, 02/06/2012 - 10:50

Hello, I think this should work:

multiple IPv6 addresses to the same client with one DHCPv6 server.

I tested it on c3750 switch. The switch itself is configured as DHCPv6 server.

Switch configurations:

ipv6 dhcp pool TEST

address prefix FD00:1000::/64

address prefix FD00:2000::/64

dns-server 2001:1000::1

interface Vlan2                       

no ip address

ipv6 address FE80::1 link-local

ipv6 nd managed-config-flag

ipv6 dhcp server TEST

After connect a Win7 laptop to vlan2:

On c3750 switch:

#sh ipv6 dhcp binding

Client: FE80::39CB:5A96:A02:C016 (Vlan2)

  DUID: 0001000113B59669A4BADBCB2897

  IA NA: IA ID 0x0EA4BADB, T1 43200, T2 69120

    Address: FD00:1000::4D25:5436:B52E:E6BC

            preferred lifetime 86400, valid lifetime 172800

            expires at Feb 03 2012 02:13 PM (172446 seconds)

   Address: FD00:2000::3023:9BDF:3382:7DC4

            preferred lifetime 86400, valid lifetime 172800

            expires at Feb 03 2012 02:13 PM (172446 seconds)

On Win7 laptop:

ipconfig:

IPv6 Address. . . . . . . . . . . : fd00:1000::4d25:5436:b52e:e6bc

  IPv6 Address. . . . . . . . . . . : fd00:2000::3023:9bdf:3382:7dc4

  Link-local IPv6 Address . . . . . : fe80::39cb:5a96:a02:c016%10

  Autoconfiguration IPv4 Address. . : 169.254.192.22

  Subnet Mask . . . . . . . . . . . : 255.255.0.0

  Default Gateway . . . . . . . . . : fe80::1%10

Is this what you are looking for?

Pavel Doronin Mon, 02/06/2012 - 17:36

Great! Thank you very match!

My test was incorrect. I used 2 DHCP servers with every server assign one address to the client - so the client chooses one DHCPv6 server and recieve one ipv6 address. Your test was correct - one server two DHCPv6 pools.

Actions

Login or Register to take actions

This Discussion

Posted February 1, 2012 at 12:15 AM
Stats:
Replies:9 Avg. Rating:4.66667
Views:948 Votes:0
Shares:0
Tags: No tags.

Discussions Leaderboard