Problem to set up DHCP for ipv6 - subnet_number():inet.c:45: Addr/mask length mismatch

Graham Clinch g.clinch at lancaster.ac.uk
Fri May 27 10:52:59 UTC 2016


Hi Reed,

> /root/dhcp-4.3.4/srver/dhcpd -6 -cf dhcpd.conf eth0
> 
> And will have logs:
> 
>     Internet Systems Consortium DHCP Server 4.3.4
>     Copyright 2004-2016 Internet Systems Consortium.
>     All rights reserved.
>     For info, please visit https://www.isc.org/software/dhcp/
>     Config file: /etc/dhcpd.conf
>     Database file: /var/db/dhcpd6.leases
>     PID file: /var/run/dhcpd6.pid
>     Wrote 0 NA, 0 TA, 0 PD leases to lease file.
>     Bound to *:547
>     Listening on Socket/5/eth0/2001::/64
>     Sending on   Socket/5/eth0/2001::/64
>     No subnet6 declaration for dhcp.conf (no IPv6 addresses).
>     ** Ignoring requests on dhcp.conf.  If this is not what
>        you want, please write a subnet6 declaration
>        in your dhcpd.conf file for the network segment
>        to which interface dhcp.conf is attached. **
> 
>     No subnet6 declaration for –cf (no IPv6 addresses).
>     ** Ignoring requests on –cf.  If this is not what
>        you want, please write a subnet6 declaration
>        in your dhcpd.conf file for the network segment
>        to which interface –cf is attached. **

This is very strange because dhcpd isn't parsing the '-cf' argument.  My
best guess is that you've copied the command line from a fancy text
editor and ended up with a subtly different dash character (an en-dash?)
rather than the standard hyphen.

This might be a red herring, but when I copy the characters from the
above log message into 'od -t xC' (which outputs the hex bytes that make
up that character), I get:

for the '-' in '2004-2016': 0x2d
for the '–' in 'declaration for –cf': 0xe2  0x80  0x93

0x2d is the 'old school' ASCII 'HYPHEN-MINUS',
0xe28093 is the Unicode 'EN DASH'.

It'd really help if you could copy and paste the exact command line
you're running - the lack of an e in 'srver' is making me believe you're
retyping them, but that makes it much harder for us to spot these sorts
of character substitution errors.

Perhaps you could try copying and pasting these, which are what's
running in production here...

dhcpd -user dhcpd -group dhcpd -f -4 -cf /etc/dhcp/dhcpd.conf

dhcpd -user dhcpd -group dhcpd -f -6 -cf /etc/dhcp/dhcpd6.conf

Graham


More information about the dhcp-users mailing list