Discussion:
[Dnsmasq-discuss] IPv6 constructor option - confused!
Kevin Darbyshire-Bryant
2013-05-01 15:26:21 UTC
Permalink
Hi Simon,

I find myself confused by the use of the constructor option for building
DHCPv6 address ranges.

edited dnsmasq.conf file:

enable-ra
dhcp-range=tag:br0,::1, ::FFFF, constructor:br0, ra-names, 12h

Now on my Tomato based router this picks up then (tunnelled) ipv6 LAN
address on the BR0 interface, which happens to be ISP_PREFIX::1 It
builds a range ISP_PREFIX::1 -> ISP_PREFIX::FFFF and all is well.

However, others do not have a nice neat '::1' they have (presumably
because it's been delegated to them by their ISP) something like
ISP_PREFIX::DEAD:BEEF:F00D. Now there are two problems as I see it
with this:

1) I now need to specify my starting IP address range as DEAD:BEEF:F00D
otherwise dnsmasq doesn't find the prefix and doesn't serve an IPv6
addresses at all. In which case why am I even bothering to tell it the
interface in the constructor?

2) The range parameter (:FFFF) implies I can define a range from
DEAD:BEEF:F00D to DEAD:BEEF:FFFF only with nothing lower than F00D.

I'm sure I'm being stupid here, please educate me.... again :-)


Kevin
Simon Kelley
2013-05-02 08:36:33 UTC
Permalink
Post by Kevin Darbyshire-Bryant
Hi Simon,
I find myself confused by the use of the constructor option for building
DHCPv6 address ranges.
enable-ra
dhcp-range=tag:br0,::1, ::FFFF, constructor:br0, ra-names, 12h
Now on my Tomato based router this picks up then (tunnelled) ipv6 LAN
address on the BR0 interface, which happens to be ISP_PREFIX::1 It
builds a range ISP_PREFIX::1 -> ISP_PREFIX::FFFF and all is well.
However, others do not have a nice neat '::1' they have (presumably
because it's been delegated to them by their ISP) something like
ISP_PREFIX::DEAD:BEEF:F00D. Now there are two problems as I see it
1) I now need to specify my starting IP address range as DEAD:BEEF:F00D
otherwise dnsmasq doesn't find the prefix and doesn't serve an IPv6
addresses at all. In which case why am I even bothering to tell it the
interface in the constructor?
2) The range parameter (:FFFF) implies I can define a range from
DEAD:BEEF:F00D to DEAD:BEEF:FFFF only with nothing lower than F00D.
I'm sure I'm being stupid here, please educate me.... again :-)
I think the root confusion is between a DHCP address lease, and a prefix
delegation. DHCP leases as we all know them are for an IP address, so
could indeed be ISP_PREFIX::DEAD:BEEF:F00D. But constructed ranges are
intended for use with prefix delegation. Here, the ISP leases you not an
address but a whole prefix: ISP_PREFIX::/64

The prefix size doesn't have to be a /64, but it usually is, and that's
the only size dnsmasq supports so let's simplify and assume it is.

A prefix delegation of ISP_PREFIX::/64 gives you the use of the whole
range, ISP_PREFIX::0 to ISP_PREFIX::ffff:ffff:ffff:ffff. You want to use
this range on a network, so you need to configure the interface in the
router with an address on the range, but all the addresses are
available: it's a local choice which one(s) to use, nothing to do with
the ISP which delegated the prefix.

What chooses the address is the DHCP client which gets the prefix
delegation, it has to do something with the delegation once it has it,
in the same way that a DHCP client has to configure an interface once it
has an address lease. In the case of a prefix delegation, the client has
to configure an address on the _internal_ interface, (ie not the one to
the ISP, where the lease came from) with an address of its choice in the
delegated range, and maybe set up routing to get packets in the prefix
to the correct interface.


Cheers,

Simon.
Kevin Darbyshire-Bryant
2013-05-02 12:02:21 UTC
Permalink
Post by Simon Kelley
Post by Kevin Darbyshire-Bryant
Hi Simon,
I find myself confused by the use of the constructor option for building
DHCPv6 address ranges.
enable-ra
dhcp-range=tag:br0,::1, ::FFFF, constructor:br0, ra-names, 12h
Now on my Tomato based router this picks up then (tunnelled) ipv6 LAN
address on the BR0 interface, which happens to be ISP_PREFIX::1 It
builds a range ISP_PREFIX::1 -> ISP_PREFIX::FFFF and all is well.
However, others do not have a nice neat '::1' they have (presumably
because it's been delegated to them by their ISP) something like
ISP_PREFIX::DEAD:BEEF:F00D. Now there are two problems as I see it
1) I now need to specify my starting IP address range as DEAD:BEEF:F00D
otherwise dnsmasq doesn't find the prefix and doesn't serve an IPv6
addresses at all. In which case why am I even bothering to tell it the
interface in the constructor?
2) The range parameter (:FFFF) implies I can define a range from
DEAD:BEEF:F00D to DEAD:BEEF:FFFF only with nothing lower than F00D.
I'm sure I'm being stupid here, please educate me.... again :-)
I think the root confusion is between a DHCP address lease, and a
prefix delegation. DHCP leases as we all know them are for an IP
address, so could indeed be ISP_PREFIX::DEAD:BEEF:F00D. But
constructed ranges are intended for use with prefix delegation. Here,
the ISP leases you not an address but a whole prefix: ISP_PREFIX::/64
The prefix size doesn't have to be a /64, but it usually is, and
that's the only size dnsmasq supports so let's simplify and assume it is.
A prefix delegation of ISP_PREFIX::/64 gives you the use of the whole
range, ISP_PREFIX::0 to ISP_PREFIX::ffff:ffff:ffff:ffff. You want to
use this range on a network, so you need to configure the interface in
the router with an address on the range, but all the addresses are
available: it's a local choice which one(s) to use, nothing to do with
the ISP which delegated the prefix.
Okay, I get all the above however my router is behaving not quite as I
expect. Some examples:

Non-working:

***@Router:/tmp/home/root# ifconfig br0
br0 Link encap:Ethernet HWaddr 20:4E:7F:B7:4A:C0
inet addr:192.168.235.1 Bcast:192.168.235.255
Mask:255.255.255.0
inet6 addr: fe80::224e:7fff:feb7:4ac0/64 Scope:Link
inet6 addr: 2001:470:1f09:100::100/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1998 errors:0 dropped:0 overruns:0 frame:0
TX packets:1565 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:461488 (450.6 KiB) TX bytes:998389 (974.9 KiB)

dnsmasq.conf (extract)

enable-ra
dhcp-range=tag:br0,::1, ::FFFF:FFFF:FFFF:FFFF, constructor:br0,
ra-names, 12h
dhcp-option=option6:24,"internal"
dhcp-option=252,"\n"
#log-dhcp


syslog:

May 2 12:40:14 Router daemon.info dnsmasq[12845]: started, version
2.67test2tomato cachesize 1500
May 2 12:40:14 Router daemon.info dnsmasq[12845]: compile time options:
IPv6 GNU-getopt no-RTC no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP
no-conntrack ipset Tomato-helper auth
May 2 12:40:14 Router daemon.warn dnsmasq[12845]: warning: interface
ppp9 does not currently exist
May 2 12:40:14 Router daemon.warn dnsmasq[12845]: warning: interface
ppp8 does not currently exist
May 2 12:40:14 Router daemon.warn dnsmasq[12845]: warning: interface
ppp7 does not currently exist
May 2 12:40:14 Router daemon.warn dnsmasq[12845]: warning: interface
ppp6 does not currently exist
May 2 12:40:14 Router daemon.warn dnsmasq[12845]: warning: interface
ppp5 does not currently exist
May 2 12:40:14 Router daemon.warn dnsmasq[12845]: warning: interface
ppp4 does not currently exist
May 2 12:40:14 Router daemon.info dnsmasq[12845]: asynchronous logging
enabled, queue limit is 5 messages
May 2 12:40:14 Router daemon.info dnsmasq-dhcp[12845]: DHCP, IP range
192.168.235.21 -- 192.168.235.254, lease time 12h
May 2 12:40:14 Router daemon.info dnsmasq-dhcp[12845]: DHCPv6, IP range
::1 -- ::ffff:ffff:ffff:ffff, lease time 12h, template for br0
May 2 12:40:14 Router daemon.info dnsmasq-dhcp[12845]: DHCPv4-derived
IPv6 names on ::1, template for br0
May 2 12:40:14 Router daemon.info dnsmasq-dhcp[12845]: router
advertisement on ::1, template for br0
May 2 12:40:14 Router daemon.info dnsmasq-dhcp[12845]: IPv6 router
advertisement enabled
May 2 12:40:14 Router daemon.info dnsmasq[12845]: using local addresses
only for domain internal
May 2 12:40:14 Router daemon.info dnsmasq[12845]: reading
/etc/resolv.dnsmasq

Note it hasn't worked out the prefix. However if I change dnsmasq.conf

enable-ra
dhcp-range=tag:br0,::100, ::FFFF:FFFF:FFFF:FFFF, constructor:br0,
ra-names, 12h (ie start at the router's lan IPv6 address)
dhcp-option=option6:24,"internal"
dhcp-option=252,"\n"
#log-dhcp


Then syslog shows:

May 2 12:53:47 Router daemon.info dnsmasq[13434]: started, version
2.67test2tomato cachesize 1500
May 2 12:53:47 Router daemon.info dnsmasq[13434]: compile time options:
IPv6 GNU-getopt no-RTC no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP
no-conntrack ipset Tomato-helper auth
May 2 12:53:47 Router daemon.warn dnsmasq[13434]: warning: interface
ppp9 does not currently exist
May 2 12:53:47 Router daemon.warn dnsmasq[13434]: warning: interface
ppp8 does not currently exist
May 2 12:53:47 Router daemon.warn dnsmasq[13434]: warning: interface
ppp7 does not currently exist
May 2 12:53:47 Router daemon.warn dnsmasq[13434]: warning: interface
ppp6 does not currently exist
May 2 12:53:47 Router daemon.warn dnsmasq[13434]: warning: interface
ppp5 does not currently exist
May 2 12:53:47 Router daemon.warn dnsmasq[13434]: warning: interface
ppp4 does not currently exist
May 2 12:53:47 Router daemon.info dnsmasq[13434]: asynchronous logging
enabled, queue limit is 5 messages
May 2 12:53:47 Router daemon.info dnsmasq-dhcp[13434]: DHCP, IP range
192.168.235.21 -- 192.168.235.254, lease time 12h
May 2 12:53:47 Router daemon.info dnsmasq-dhcp[13434]: DHCPv6, IP range
::100 -- ::ffff:ffff:ffff:ffff, lease time 12h, template for br0
May 2 12:53:47 Router daemon.info dnsmasq-dhcp[13434]: DHCPv4-derived
IPv6 names on ::100, template for br0
May 2 12:53:47 Router daemon.info dnsmasq-dhcp[13434]: router
advertisement on ::100, template for br0
May 2 12:53:47 Router daemon.info dnsmasq-dhcp[13434]: DHCPv6, IP range
2001:470:1f09:100::100 -- 2001:470:1f09:1ac:ffff:ffff:ffff:ffff, lease
time 12h, constructed for br0
May 2 12:53:47 Router daemon.info dnsmasq-dhcp[13434]: DHCPv4-derived
IPv6 names on 2001:470:1f09:100::, constructed for br0
May 2 12:53:47 Router daemon.info dnsmasq-dhcp[13434]: router
advertisement on 2001:470:1f09:100::, constructed for br0
May 2 12:53:47 Router daemon.info dnsmasq-dhcp[13434]: RTR-ADVERT(br0)
2001:470:1f09:100::
May 2 12:53:47 Router daemon.info dnsmasq-dhcp[13434]: IPv6 router
advertisement enabled

Specifying the router's LAN IPv6 address as the start of the range was
not how I anticipated this option to work. And I don't think you do
either based upon your above description.

So is this an oversight or some tomato based wierdness...either way, how
can I help to sort it out?

Kevin
Kevin Darbyshire-Bryant
2013-05-02 12:09:16 UTC
Permalink
Post by Kevin Darbyshire-Bryant
Specifying the router's LAN IPv6 address as the start of the range was
not how I anticipated this option to work. And I don't think you do
either based upon your above description. So is this an oversight or
some tomato based wierdness...either way, how can I help to sort it
out? Kevin
Ahhh! Right, a clue: Changing

enable-ra
dhcp-range=tag:br0,::100, ::FFFF:FFFF:FFFF:FFFF, constructor:br0,
ra-names, 12h

to

enable-ra
dhcp-range=::100, ::FFFF:FFFF:FFFF:FFFF, constructor:br0, ra-names, 12h

makes it work as expected.

Kevin
Kevin Darbyshire-Bryant
2013-05-02 12:36:16 UTC
Permalink
Post by Kevin Darbyshire-Bryant
Ahhh! Right, a clue: Changing
enable-ra
dhcp-range=tag:br0,::100, ::FFFF:FFFF:FFFF:FFFF, constructor:br0,
ra-names, 12h
to
enable-ra
dhcp-range=::100, ::FFFF:FFFF:FFFF:FFFF, constructor:br0, ra-names, 12h
makes it work as expected.
Oooops, ignore that. No it doesn't. Forgotten I'd changed the LAN IP
address to ::100 to test something else. Doh!

Kevin
Simon Kelley
2013-05-02 16:00:00 UTC
Permalink
Post by Kevin Darbyshire-Bryant
Post by Simon Kelley
Post by Kevin Darbyshire-Bryant
Hi Simon,
I find myself confused by the use of the constructor option for building
DHCPv6 address ranges.
enable-ra
dhcp-range=tag:br0,::1, ::FFFF, constructor:br0, ra-names, 12h
Now on my Tomato based router this picks up then (tunnelled) ipv6 LAN
address on the BR0 interface, which happens to be ISP_PREFIX::1 It
builds a range ISP_PREFIX::1 -> ISP_PREFIX::FFFF and all is well.
However, others do not have a nice neat '::1' they have (presumably
because it's been delegated to them by their ISP) something like
ISP_PREFIX::DEAD:BEEF:F00D. Now there are two problems as I see it
1) I now need to specify my starting IP address range as DEAD:BEEF:F00D
otherwise dnsmasq doesn't find the prefix and doesn't serve an IPv6
addresses at all. In which case why am I even bothering to tell it the
interface in the constructor?
2) The range parameter (:FFFF) implies I can define a range from
DEAD:BEEF:F00D to DEAD:BEEF:FFFF only with nothing lower than F00D.
I'm sure I'm being stupid here, please educate me.... again :-)
I think the root confusion is between a DHCP address lease, and a
prefix delegation. DHCP leases as we all know them are for an IP
address, so could indeed be ISP_PREFIX::DEAD:BEEF:F00D. But
constructed ranges are intended for use with prefix delegation. Here,
the ISP leases you not an address but a whole prefix: ISP_PREFIX::/64
The prefix size doesn't have to be a /64, but it usually is, and
that's the only size dnsmasq supports so let's simplify and assume it is.
A prefix delegation of ISP_PREFIX::/64 gives you the use of the whole
range, ISP_PREFIX::0 to ISP_PREFIX::ffff:ffff:ffff:ffff. You want to
use this range on a network, so you need to configure the interface in
the router with an address on the range, but all the addresses are
available: it's a local choice which one(s) to use, nothing to do with
the ISP which delegated the prefix.
Okay, I get all the above however my router is behaving not quite as I
br0 Link encap:Ethernet HWaddr 20:4E:7F:B7:4A:C0
inet addr:192.168.235.1 Bcast:192.168.235.255
Mask:255.255.255.0
inet6 addr: fe80::224e:7fff:feb7:4ac0/64 Scope:Link
inet6 addr: 2001:470:1f09:100::100/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1998 errors:0 dropped:0 overruns:0 frame:0
TX packets:1565 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:461488 (450.6 KiB) TX bytes:998389 (974.9 KiB)
dnsmasq.conf (extract)
enable-ra
dhcp-range=tag:br0,::1, ::FFFF:FFFF:FFFF:FFFF, constructor:br0,
ra-names, 12h
dhcp-option=option6:24,"internal"
dhcp-option=252,"\n"
#log-dhcp
May 2 12:40:14 Router daemon.info dnsmasq[12845]: started, version
2.67test2tomato cachesize 1500
IPv6 GNU-getopt no-RTC no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP
no-conntrack ipset Tomato-helper auth
May 2 12:40:14 Router daemon.warn dnsmasq[12845]: warning: interface
ppp9 does not currently exist
May 2 12:40:14 Router daemon.warn dnsmasq[12845]: warning: interface
ppp8 does not currently exist
May 2 12:40:14 Router daemon.warn dnsmasq[12845]: warning: interface
ppp7 does not currently exist
May 2 12:40:14 Router daemon.warn dnsmasq[12845]: warning: interface
ppp6 does not currently exist
May 2 12:40:14 Router daemon.warn dnsmasq[12845]: warning: interface
ppp5 does not currently exist
May 2 12:40:14 Router daemon.warn dnsmasq[12845]: warning: interface
ppp4 does not currently exist
May 2 12:40:14 Router daemon.info dnsmasq[12845]: asynchronous logging
enabled, queue limit is 5 messages
May 2 12:40:14 Router daemon.info dnsmasq-dhcp[12845]: DHCP, IP range
192.168.235.21 -- 192.168.235.254, lease time 12h
May 2 12:40:14 Router daemon.info dnsmasq-dhcp[12845]: DHCPv6, IP range
::1 -- ::ffff:ffff:ffff:ffff, lease time 12h, template for br0
May 2 12:40:14 Router daemon.info dnsmasq-dhcp[12845]: DHCPv4-derived
IPv6 names on ::1, template for br0
May 2 12:40:14 Router daemon.info dnsmasq-dhcp[12845]: router
advertisement on ::1, template for br0
May 2 12:40:14 Router daemon.info dnsmasq-dhcp[12845]: IPv6 router
advertisement enabled
May 2 12:40:14 Router daemon.info dnsmasq[12845]: using local addresses
only for domain internal
May 2 12:40:14 Router daemon.info dnsmasq[12845]: reading
/etc/resolv.dnsmasq
Note it hasn't worked out the prefix. However if I change dnsmasq.conf
enable-ra
dhcp-range=tag:br0,::100, ::FFFF:FFFF:FFFF:FFFF, constructor:br0,
ra-names, 12h (ie start at the router's lan IPv6 address)
dhcp-option=option6:24,"internal"
dhcp-option=252,"\n"
#log-dhcp
May 2 12:53:47 Router daemon.info dnsmasq[13434]: started, version
2.67test2tomato cachesize 1500
IPv6 GNU-getopt no-RTC no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP
no-conntrack ipset Tomato-helper auth
May 2 12:53:47 Router daemon.warn dnsmasq[13434]: warning: interface
ppp9 does not currently exist
May 2 12:53:47 Router daemon.warn dnsmasq[13434]: warning: interface
ppp8 does not currently exist
May 2 12:53:47 Router daemon.warn dnsmasq[13434]: warning: interface
ppp7 does not currently exist
May 2 12:53:47 Router daemon.warn dnsmasq[13434]: warning: interface
ppp6 does not currently exist
May 2 12:53:47 Router daemon.warn dnsmasq[13434]: warning: interface
ppp5 does not currently exist
May 2 12:53:47 Router daemon.warn dnsmasq[13434]: warning: interface
ppp4 does not currently exist
May 2 12:53:47 Router daemon.info dnsmasq[13434]: asynchronous logging
enabled, queue limit is 5 messages
May 2 12:53:47 Router daemon.info dnsmasq-dhcp[13434]: DHCP, IP range
192.168.235.21 -- 192.168.235.254, lease time 12h
May 2 12:53:47 Router daemon.info dnsmasq-dhcp[13434]: DHCPv6, IP range
::100 -- ::ffff:ffff:ffff:ffff, lease time 12h, template for br0
May 2 12:53:47 Router daemon.info dnsmasq-dhcp[13434]: DHCPv4-derived
IPv6 names on ::100, template for br0
May 2 12:53:47 Router daemon.info dnsmasq-dhcp[13434]: router
advertisement on ::100, template for br0
May 2 12:53:47 Router daemon.info dnsmasq-dhcp[13434]: DHCPv6, IP range
2001:470:1f09:100::100 -- 2001:470:1f09:1ac:ffff:ffff:ffff:ffff, lease
time 12h, constructed for br0
May 2 12:53:47 Router daemon.info dnsmasq-dhcp[13434]: DHCPv4-derived
IPv6 names on 2001:470:1f09:100::, constructed for br0
May 2 12:53:47 Router daemon.info dnsmasq-dhcp[13434]: router
advertisement on 2001:470:1f09:100::, constructed for br0
May 2 12:53:47 Router daemon.info dnsmasq-dhcp[13434]: RTR-ADVERT(br0)
May 2 12:53:47 Router daemon.info dnsmasq-dhcp[13434]: IPv6 router
advertisement enabled
Specifying the router's LAN IPv6 address as the start of the range was
not how I anticipated this option to work. And I don't think you do
either based upon your above description.
It is how I expected it to work, exactly.

DHCP-PD client gets prefix, and assigns <prefix>::1 to LAN interface.

dnsmasq gives addresses between

<prefix>::2 and <prefix>::<whateveryouwant>

to clients on the LAN.
Post by Kevin Darbyshire-Bryant
So is this an oversight or some tomato based wierdness...either way, how
can I help to sort it out?
Suggest an alternative, given that constructing a DHCP range based on
any address in a prefix is not desirable.


Cheers,

Simon.
Post by Kevin Darbyshire-Bryant
Kevin
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Kevin Darbyshire-Bryant
2013-05-02 16:54:06 UTC
Permalink
Post by Simon Kelley
It is how I expected it to work, exactly.
DHCP-PD client gets prefix, and assigns <prefix>::1 to LAN interface.
dnsmasq gives addresses between
<prefix>::2 and <prefix>::<whateveryouwant>
to clients on the LAN.
Which (contrived case) isn't ideal if for some reason the DHCP-PD client
assigns prefix:FFFF:FFFF:FFFF:FFFF to the lan interface,
'cos the constructor has nowhere to go. The constructor will go up from
the lowest address, it doesn't appear to work down,
though it does sort the addresses in syslog from lowest to highest. But
this is VERY contrived :-)
Post by Simon Kelley
Post by Kevin Darbyshire-Bryant
So is this an oversight or some tomato based wierdness...either way, how
can I help to sort it out?
Suggest an alternative, given that constructing a DHCP range based on
any address in a prefix is not desirable.
Hmmmm, what about seeing if the interface in question has an address
inside the DHCP constructed range and if it does then use the prefix?
Or is that excluded by your above statement?

Perhaps if I explain what I'm trying to do it may help. I'm trying to
remove the requirement for RADVD in the tomato router
environment. There are a number of potential benefits, not least having
an equivalent local DNS service to the IPv4 dhcp/dns service (privacy
extensions not helping but) My thought was that the 'constructor'
option was ideal, in that I could assign a constructor range of ::0
-::FFFF:FFFF:FFFF:FFFF and it would pick up the prefix and start serving
addresses through RA & DHCPv6. Unfortunately it looks like what I would
like isn't quite what 'constructor' actually gives me.



Kevin
Kevin Darbyshire-Bryant
2013-05-07 07:51:05 UTC
Permalink
Post by Kevin Darbyshire-Bryant
Post by Simon Kelley
Suggest an alternative, given that constructing a DHCP range based on
any address in a prefix is not desirable.
Hmmmm, what about seeing if the interface in question has an address
inside the DHCP constructed range and if it does then use the prefix?
Or is that excluded by your above statement?
I take it that the above idea is daft.

Kevin
Simon Kelley
2013-05-13 16:51:20 UTC
Permalink
Post by Kevin Darbyshire-Bryant
Post by Simon Kelley
It is how I expected it to work, exactly.
DHCP-PD client gets prefix, and assigns<prefix>::1 to LAN interface.
dnsmasq gives addresses between
<prefix>::2 and<prefix>::<whateveryouwant>
to clients on the LAN.
Which (contrived case) isn't ideal if for some reason the DHCP-PD client
assigns prefix:FFFF:FFFF:FFFF:FFFF to the lan interface,
'cos the constructor has nowhere to go. The constructor will go up from
the lowest address, it doesn't appear to work down,
though it does sort the addresses in syslog from lowest to highest. But
this is VERY contrived :-)
Nevertheless, it makes a point. There's nothing to stop dnsmasq using
the constructor is an address appears with either the start or end
addresses, instead of just the start address, as at the moment. That
would address the case where the local address is <prefix>:<highest
usable address plus one>
Post by Kevin Darbyshire-Bryant
Post by Simon Kelley
Post by Kevin Darbyshire-Bryant
So is this an oversight or some tomato based wierdness...either way, how
can I help to sort it out?
Suggest an alternative, given that constructing a DHCP range based on
any address in a prefix is not desirable.
Hmmmm, what about seeing if the interface in question has an address
inside the DHCP constructed range and if it does then use the prefix?
Or is that excluded by your above statement?
Perhaps if I explain what I'm trying to do it may help. I'm trying to
remove the requirement for RADVD in the tomato router
environment. There are a number of potential benefits, not least having
an equivalent local DNS service to the IPv4 dhcp/dns service (privacy
extensions not helping but) My thought was that the 'constructor'
option was ideal, in that I could assign a constructor range of ::0
-::FFFF:FFFF:FFFF:FFFF and it would pick up the prefix and start serving
addresses through RA& DHCPv6. Unfortunately it looks like what I would
like isn't quite what 'constructor' actually gives me.
This goes back to the reason for insisting a particular address appears
on the interface, which is that the interface can easily pick up a SLAAC
address from its OWN router advertisements.


So PD arrives for <Prefix>, local interface gets addresss <prefix>::1,
dnsmasq notices and contructs the range <prefix>::1 to
<prefix>::ffff:ffff:ffff:fff and starts to advertise prefix. The
advertisements are noted in the kernel, which adds
<prefix>:211:25ff:fea1:91c5 SLAAC address as well as <prefix>::1. Later
the lease on <prefix> expires, and the DHCP client removes <prefix>::1
Without the rule that <prefix>::<first address in range> must exist, the
SLAAC address is enough to keep the constructed range in being, and the
prefix never, ever, dies.

Changing the rule to "any address in the range" doesn't help, since that
includes the all the potential SLAAC addresses.


I'm still not clear exactly what address you DHCPv6 client is
constructing for local use from a delegated prefix, and why it can't be
aligned with what dnsmasq is configured to expect.


Cheers,

Simon.
Post by Kevin Darbyshire-Bryant
Kevin
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Loading...