DHCPDv6 and fixed hosts, not appearing in logs

sillysausage sillysausage at privatedemail.net
Sun Nov 15 18:55:47 UTC 2015


Hi,

I'm having trouble with my clients authenticating with my DHCPDv6
server.

For some reason I see no activity on my DHCPv6 logs, I think I might
have not configured it correctly. DHCPv4 works correctly though!

When a user connects on DHCPv4 I see the lease go out in syslog. With
my DHCPv6 instance I see nothing :(

I any case I configured the rc script configurations in /etc/conf.d
correctly as indicated by this:

gateway:~# ps aux |grep dhcpd

1686 dhcp  0:00 /usr/sbin/dhcpd -4 -cf /etc/dhcp/dhcpd.conf
                                -q -pf /var/run/dhcp/dhcpd.pid
                                -lf /var/lib/dhcp/dhcpd.leases
                                -user dhcp -group dhcp eth0

1714 dhcp  0:00 /usr/sbin/dhcpd -6 -cf /etc/dhcp/dhcpdv6.conf
                                   -q -pf /var/run/dhcp/dhcpdv6.pid
                                   -lf /var/lib/dhcp/dhcpdv6.leases
                                   -user dhcp -group dhcp eth0

I'm using Roy Marples's dhcpcd to do prefix delegation, as the ISC
dhcp server doesn't seem to have the PPP patch yet in the main code
base and my distribution (Alpine Linux), hasn't applied it.

More info about that: https://bugs.gentoo.org/show_bug.cgi?id=432652

> gateway:~# cat /etc/dhcpcd.conf
> # Enable extra debugging
> # debug
> 
> # Allow users of this group to interact with dhcpcd via the control
> # socket.
> #controlgroup wheel
> 
> # Inform the DHCP server of our hostname for DDNS.
> hostname gateway
> 
> # Use the hardware address of the interface for the Client ID.
> #clientid
> # or
> # Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as
> # per RFC4361. Some non-RFC compliant DHCP servers do not reply with
> # this set. In this case, comment out duid and enable clientid above.
> duid
> 
> # Persist interface configuration when dhcpcd exits.
> persistent
> 
> # Rapid commit support.
> # Safe to enable by default because it requires the equivalent option
> # set on the server to actually work.
> option rapid_commit
> 
> # A list of options to request from the DHCP server.
> option domain_name_servers, domain_name, domain_search, host_name
> option classless_static_routes
> 
> # Most distributions have NTP support.
> option ntp_servers
> # Respect the network MTU.
> # Some interface drivers reset when changing the MTU so disabled by
> # default.
> #option interface_mtu
> 
> # A ServerID is required by RFC2131.
> require dhcp_server_identifier
> 
> # Generate Stable Private IPv6 Addresses instead of hardware based
> # ones
> # slaac private
> 
> # A hook script is provided to lookup the hostname if not set by the
> # DHCP server, but it should not be run by default.
> nohook lookup-hostname
> 
> # IPv6 Only
> ipv6only
> 
> # Disable solicitations on all interfaces
> noipv6rs
> 
> # Wait for IP before forking to background
> waitip 6
> 
> # Don't install any default routes.
> # PPP has already set a default route
> nogateway
> 
> # Don't touch DNS
> nohook resolv.conf
> 
> # Use the interface connected to WAN
> interface ppp0
>     ipv6rs # enable routing solicitation get the default IPv6 route
>     iaid 1
>     ia_pd 1/::/64 eth0/1/64

This seems to be working great. I can statically set my IP address to
the desired fixed address 2001:0db8:1234:0001::20

The intention is to have DHCPv6 issue me this IP address.

Here is my RADVD. I think it's working correctly.

> gateway:~# cat /etc/radvd.conf
> interface eth0 {
> 
>   # We are sending advertisments (route)
>   AdvSendAdvert on;
> 
>   # When set, host use the administered (stateful) protocol
>   # for address autoconfiguration. The use of this flag is
>   # described in RFC 4862
>   AdvManagedFlag on;
> 
>   # When set, host use the administered (stateful) protocol
>   # for address autoconfiguration. For other (non-address)
>   # information.
>   # The use of this flag is described in RFC 4862
>   AdvOtherConfigFlag on;
> 
>   # Suggested Maximum Transmission setting for using the
>   # Hurricane Electric Tunnel Broker.
>   # AdvLinkMTU 1480;
> 
>   # We have native Dual Stack IPv6 so we can use the regular MTU
>   AdvLinkMTU 1500;
> 
>   prefix 2001:0db8:1234:0001::/64 {
>     AdvOnLink on;
>     AdvAutonomous on;
>     AdvRouterAddr on;
>   };
> };

I seem to get routes to the internet working with this.

I do understand with IPv6 I need radvd to push routes as DHCPv6 cannot
do this.

I'm trying to make it not send me an IP address though. I want DHCPv6
to do this. I'm trying to emulate my IPv4 configuration as much as
possible eg:

> authoritative;
> ddns-update-style interim;
> 
> shared-network home {
>   subnet 192.168.1.0 netmask 255.255.255.0 {
>     range 192.168.1.10 192.168.1.240;
>     option subnet-mask 255.255.255.0;
>     option broadcast-address 192.168.1.255;
>     option routers 192.168.1.1;
>     option ntp-servers 192.168.1.1;
>     option domain-name-servers 192.168.1.1;
>     allow unknown-clients;
>   }
> 
> host my_workstation {
>   hardware ethernet 00:53:00:FF:FF:11;
>   fixed-address 192.168.1.30;
>   option subnet-mask 255.255.255.0;
>   option broadcast-address 192.168.1.255;
>   option routers 192.168.1.1;
>   option host-name "my_workstation";
> }

Finally my DHCPv6 configuration:

> gateway:~# cat /etc/dhcp/dhcpdv6.conf 
> authoritative;
> ddns-update-style interim;
> 
> shared-network home {
>   subnet6 2001:0db8:1234:0001::/64 {
> 
>     # Range for clients to have an address from
>     range6 2001:0db8:1234:0001::10 2001:0db8:1234:0001::254;
> 
>     # Range for temporary address
>     range6 2001:0db8:1234:0001:: temporary;
> 
>     # Additional options
>     allow unknown-clients;
>   }
> }
> 
> host my_workstation {
>   hardware ethernet 00:53:00:FF:FF:22;
>   host-identifier option
>     dhcp6.client-id <DUID removed>
>   fixed-address6 2001:0db8:1234:0001::20;
>   fixed-prefix6 2001:0db8:1234:0001::/64;
>   option dhcp6.name-servers 2001:0db8:1234:0001::1;
>   option dhcp6.sntp-servers 2001:0db8:1234:0001::1;
> }

Now the problem seems to be that my DHCPv6 server isn't getting
when I connect to it.

> info dhcpd: Internet Systems Consortium DHCP Server 4.3.2
> info dhcpd: Copyright 2004-2015 Internet Systems Consortium.
> info dhcpd: All rights reserved.
> info dhcpd: For info, please visit https://www.isc.org/software/dhcp/
> info dhcpd: Config file: /etc/dhcp/dhcpdv6.conf
> info dhcpd: Database file: /var/db/dhcpd6.leases
> info dhcpd: PID file: /var/run/dhcpd6.pid
> 
> info dhcpd: Internet Systems Consortium DHCP Server 4.3.2
> info dhcpd: Copyright 2004-2015 Internet Systems Consortium.
> info dhcpd: All rights reserved.
> info dhcpd: For info, please visit https://www.isc.org/software/dhcp/
> 
> info dhcpd: Internet Systems Consortium DHCP Server 4.3.2
> info dhcpd: Copyright 2004-2015 Internet Systems Consortium.
> info dhcpd: All rights reserved.
> info dhcpd: For info, please visit https://www.isc.org/software/dhcp/
> info dhcpd: Wrote 0 deleted host decls to leases file.
> info dhcpd: Wrote 0 new dynamic host decls to leases file.
> info dhcpd: Wrote 0 NA, 0 TA, 0 PD leases to lease file.
> info dhcpd: Bound to *:547
> info dhcpd: Server starting service.
> 
> debug radvd[1895]: eth0 recvmsg len=16
> debug radvd[1895]: eth0 received a packet
> debug radvd[1895]: eth0 received RS from: fe80::0db8:ffff:ffff:fff5
> debug radvd[1895]: sending RA to ff02::1 on eth0
> debug radvd[1895]: eth0 next scheduled RA in 559.393 second(s)
> debug radvd[1895]: eth0 processed an RS
> debug radvd[1895]: polling for 559.392 second(s), next iface is eth0
> debug radvd[1895]: eth0 recvmsg len=64
> debug radvd[1895]: eth0 received a packet
> debug radvd[1895]: eth0 received RA from: fe80::0db8:ffff:ffff:fff6
> debug radvd[1895]: processed RA on eth0
> debug radvd[1895]: polling for 559.391 second(s), next iface is eth0

> user at my_workstation:~ $ sudo dhcpcd -6
> DUID < DUID REMOVED >
> eth0: IAID < IAID REMOVED >
> eth0: soliciting an IPv6 router
> eth0: Router Advertisement from fe80::ba27:ebff:fe63:46b5
> eth0: adding address 2001:0db8:1234:0001:ffff:ffff:ffff:4444/64
> eth0: adding address 2001:0db8:1234:0001:ffff:ffff:ffff:8888/64
> eth0: adding route to 2001:0db8:1234:0001::/64
> eth0: adding default route via fe80::0db8:ffff:ffff:fff6
> eth0: soliciting a DHCPv6 lease
> timed out
> forked to background, child pid 4873

I know the port is open, because I was able to test it with netcat ie
running nc -6 -u -l 547 on my router and nc -u -v -6
2001:0db8:1234:0001::1 547 on my workstation.



More information about the dhcp-users mailing list