FS#23933 - [dhcp] Separate v4 and v6 configuration files
Attached to Project:
Arch Linux
Opened by Andrej Podzimek (andrej) - Monday, 25 April 2011, 16:13 GMT
Last edited by Isenmann Daniel (ise) - Monday, 13 July 2015, 21:17 GMT
Opened by Andrej Podzimek (andrej) - Monday, 25 April 2011, 16:13 GMT
Last edited by Isenmann Daniel (ise) - Monday, 13 July 2015, 21:17 GMT
|
Details
Description:
DHCPv4 and DHCPv6 settings cannot coexist in one file. It would be fine to include two configuration files by default and also set the corresponding -cf option in /etc/conf.d/dhcp. (Or perhaps there are compile-time options that could select the configuration files according to the -4 or -6 option.) Additional info: * package version(s) dhcp 4.2.1.1-1 |
This task depends upon
Closed by Isenmann Daniel (ise)
Monday, 13 July 2015, 21:17 GMT
Reason for closing: Fixed
Additional comments about closing: In newest package there are two conf files, one for dhcp4 (/etc/dhcpd.conf) and one for dhcp6 (/etc/dhcpd6.conf). Both files are referred in the corresponding systemd files.
Monday, 13 July 2015, 21:17 GMT
Reason for closing: Fixed
Additional comments about closing: In newest package there are two conf files, one for dhcp4 (/etc/dhcpd.conf) and one for dhcp6 (/etc/dhcpd6.conf). Both files are referred in the corresponding systemd files.
Please give some more description, because I don't see any necessity to change this behavior at the moment.
Currently, neither dhcpd4.service nor dhcpd6.service specify the -cf option. systemd does not honor /etc/conf.d/dhcp. This means in both cases there is no -cf option and dhcpd will try to use the default configuration file location, which is /etc/dhcpd.conf.
Example:
Put only the following statement in /etc/dhcpd.conf:
subnet6 2001:0000:0000:0000::/64 { }
Then run
dhcpd -4 -pf /run/dhcpd6.pid
like dhcpd4.service does. Result:
Internet Systems Consortium DHCP Server 4.2.5
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
unable to create icmp socket: Operation not permitted
/etc/dhcpd.conf line 17: subnet6 statement is only supported in DHCPv6 mode.
subnet6
^
Configuration file errors encountered -- exiting
Now put only the following in /etc/dhcpd.conf:
subnet 10.0.0.0 netmask 255.255.255.0 { }
Then run
dhcpd -6 -pf /run/dhcpd6.pid
like dhcpd6.service does. Result:
Internet Systems Consortium DHCP Server 4.2.5
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Wrote 0 leases to leases file.
subnet_number():inet.c:53: Addr/mask length mismatch.
The "Addr/mask length mismatch" results from dhcpd trying to parse 10.0.0.0 as an IPv6 adress. Report on this behavior: http://www.yaleman.org/2013/03/06/isc-dhcpd-with-ipv6-subnet_numberinet-c53-addrmask-length-mismatch/
A solution would be to include "-cf /etc/dhcpd4.conf" in dhcpd4.service and "-cf /etc/dhcpd6.conf" in dhcpd6.service.
Here someone ran into the same problem: http://www.blackcatstudios.org/content/configuring-dhcpd6-arch-linux