Re: [Dnsmasq-discuss] DHCPv6 with IPv4 address in last 32 bits of IPv6 address: ideas?

2020-04-23 Thread Simon Kelley



On 23/04/2020 20:49, Simon Kelley wrote:
> 

> According to RFC 4291 Para 2.2, a mixed representation is possible, for
> instance ipv6-mapped IPv4 addresses can be written as
> 
> ::.1.2.3.4
> 
> So you could use something like 2a01:ac00::$something:98.98.98.98
> 
> and not have problems if octets in your address are greater than 99.
> 
> Dnsmasq uses the standard libc address-parsing functions which should
> support this format, BUT the option parsing code may have difficulty
> recognizing such addresses as IPv6 addresses, I shall take a look..
> 
> 


Replying to myself, the mixed-mode IPv6 address representation works in
dhcp-host, so

dhcp-host=hostname,98.98,98.98,[2a01:ac00::$something:98.98.98.98]

works fine.

Such addresses don't work in dhcp-option, but I just pushed a patch to
the git repo which addresses that.


Cheers,

Simon.

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] DHCPv6 with IPv4 address in last 32 bits of IPv6 address: ideas?

2020-04-23 Thread Simon Kelley



On 21/04/2020 14:58, William Edwards wrote:
> Hello,
> 
> I am working on replacing static IP addresses in our network by static
> DHCP leases (which is in turn preparation for PXE). For IPv4, this is
> easily doable, but for IPv6 this is a bit of a challenge because of the
> following:
> 
> In our case, all services directly attached to the internet are
> dual-stack. We make IPv6 addresses easy to remember by placing
> corresponding /32s in the last 32 bits of /128s. For example,
> 98.98.98.98's dual-stack IPv6 address would become
> 2a01:ac00::$something:98:98:98:98. That way, we only have to remember
> our prefix and the IPv4 address, increasing IPv6 adoption rates.
> 
> Of course, when providing our network with IPv6 addresses by DHCP, this
> will become a bit of a challenge. I would not expect dnsmasq to support
> this very specific way of assigning IPv6 addresses, but I am wondering
> if others on the mailing list use a similar address format, and if so,
> how they have automated this. Especially as I would have to link the
> IPv6 and IPv4 addresses on the DHCP side.
> 
> Ideas are welcome.
> 


According to RFC 4291 Para 2.2, a mixed representation is possible, for
instance ipv6-mapped IPv4 addresses can be written as

::.1.2.3.4

So you could use something like 2a01:ac00::$something:98.98.98.98

and not have problems if octets in your address are greater than 99.

Dnsmasq uses the standard libc address-parsing functions which should
support this format, BUT the option parsing code may have difficulty
recognizing such addresses as IPv6 addresses, I shall take a look..



Simon.




Dnsmasq uses that standard libc address parsing functions, so such addresses

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] DHCPv6 with IPv4 address in last 32 bits of IPv6 address: ideas?

2020-04-22 Thread john doe
On 4/22/2020 9:08 AM, William Edwards wrote:
>
>> Op 22 apr. 2020 om 08:41 heeft Olaf Hering  het volgende 
>> geschreven:
>>
>> Am Tue, 21 Apr 2020 15:58:25 +0200
>> schrieb "William Edwards" :
>>
>>> Ideas are welcome.
>>
>> You did not say how hosts are identified, nor did you say why exactly 
>> addresses matter in your setup.
>> If it is done based on their MAC addresses, just give each host a name.
>>
>> host-record=hostname,hostname.${dns_domain},${ipv4},${ipv6_prefix}::0323:45ff:feab:cdef
>> dhcp-host=01:23:45:ab:cd:ef,set:hostname,hostname,216000
>>
>> After all this project is called DNSmasq, not DHCPmasq...
>
> Your position is clear. What I’ll probably do is write a config file in 
> dnsmasq.d/ with dhcp-host directive from my dhcp-script, after handing out a 
> v4 lease and replacing . with :.
>

You could also use the corresponding directory option for dhcp-host.

--
John Doe

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] DHCPv6 with IPv4 address in last 32 bits of IPv6 address: ideas?

2020-04-22 Thread William Edwards

> Op 22 apr. 2020 om 08:41 heeft Olaf Hering  het volgende 
> geschreven:
> 
> Am Tue, 21 Apr 2020 15:58:25 +0200
> schrieb "William Edwards" :
> 
>> Ideas are welcome.
> 
> You did not say how hosts are identified, nor did you say why exactly 
> addresses matter in your setup.
> If it is done based on their MAC addresses, just give each host a name.
> 
> host-record=hostname,hostname.${dns_domain},${ipv4},${ipv6_prefix}::0323:45ff:feab:cdef
> dhcp-host=01:23:45:ab:cd:ef,set:hostname,hostname,216000
> 
> After all this project is called DNSmasq, not DHCPmasq...

Your position is clear. What I’ll probably do is write a config file in 
dnsmasq.d/ with dhcp-host directive from my dhcp-script, after handing out a v4 
lease and replacing . with :.

> 
> Olaf
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] DHCPv6 with IPv4 address in last 32 bits of IPv6 address: ideas?

2020-04-22 Thread Olaf Hering
Am Tue, 21 Apr 2020 15:58:25 +0200
schrieb "William Edwards" :

> Ideas are welcome.

You did not say how hosts are identified, nor did you say why exactly addresses 
matter in your setup.
If it is done based on their MAC addresses, just give each host a name.

host-record=hostname,hostname.${dns_domain},${ipv4},${ipv6_prefix}::0323:45ff:feab:cdef
dhcp-host=01:23:45:ab:cd:ef,set:hostname,hostname,216000

After all this project is called DNSmasq, not DHCPmasq...

Olaf


pgpzJJQmKL2eN.pgp
Description: Digitale Signatur von OpenPGP
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] DHCPv6 with IPv4 address in last 32 bits of IPv6 address: ideas?

2020-04-21 Thread William Edwards

Hello,

I am working on replacing static IP addresses in our network by static DHCP 
leases (which is in turn preparation for PXE). For IPv4, this is easily doable, 
but for IPv6 this is a bit of a challenge because of the following:

In our case, all services directly attached to the internet are dual-stack. We 
make IPv6 addresses easy to remember by placing corresponding /32s in the last 
32 bits of /128s. For example, 98.98.98.98's dual-stack IPv6 address would 
become 2a01:ac00::$something:98:98:98:98. That way, we only have to remember 
our prefix and the IPv4 address, increasing IPv6 adoption rates.



Of course, when providing our network with IPv6 addresses by DHCP, this will 
become a bit of a challenge. I would not expect dnsmasq to support this very 
specific way of assigning IPv6 addresses, but I am wondering if others on the 
mailing list use a similar address format, and if so, how they have automated 
this. Especially as I would have to link the IPv6 and IPv4 addresses on the 
DHCP side.


Ideas are welcome.


Met vriendelijke groeten,

William Edwards
T. 040 - 711 44 96
E. wedwa...@cyberfusion.nl





___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss