[Kea-users] Stateful DHCPv6 with KEA and RADVD
Christoph Markert
maggiv8 at gmail.com
Sun Nov 24 00:55:34 UTC 2024
Hi there,
I am trying a little network setup at home (just for learning for now).
DHVPv4 with KEA is working fine, but I am a bit confused with KEA-DHCPv6
(using ULA for internal DHCPv6 stateful testing purposes).
1. Virtual Machine 'VM HomeServer' (Debian 12):
1.1 IP Address:
enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP
group default qlen 1000
link/ether 52:54:00:26:30:9f brd ff:ff:ff:ff:ff:ff
inet6 fd00:0:0:1::3/64 scope global
valid_lft forever preferred_lft forever
- This VM should act as stateful DHCPv6 router for the private network (in
particular for ‘VM Sandbox’). I am using KEA as DHCPv6 application.
1.2 KEA DHCPv6 configuration:
{
"Dhcp6": {
"interfaces-config": {
"interfaces": [
"enp7s0"
]
},
"lease-database": {
"type": "memfile",
"persist": true,
"name": "/var/lib/kea/kea-leases6.csv"
},
"valid-lifetime": 28800,
"option-data": [
{
"name": "dns-servers",
"data": "2001:4860:4860::8888, 2001:4860:4860::8844"
}
],
"subnet6": [
{
"subnet": "fd00:0000:0000:0001::/64",
"pools": [
{
"pool": "fd00:0000:0000:0001::a - fd00:0000:0000:0001::ffff"
}
]
}
],
"loggers": [
{
"name": "kea-dhcp6",
"severity": "DEBUG",
"output_options": [
{
"output": "/var/log/kea/kea-dhcp6.log",
"maxver": 10
}
]
},
{
"name": "kea-dhcp6.dhcpsrv",
"severity": "DEBUG",
"output_options": [
{
"output": "/var/log/kea/dhcp6-dhcpsrv.log",
"maxver": 10
}
]
},
{
"name": "kea-dhcp6.leases",
"severity": "DEBUG",
"output_options": [
{
"output": "/var/log/kea/dhcp4-leases.log",
"maxver": 10
}
]
}
]
}
}
1.3 RADVD:
interface enp7s0
{
MinRtrAdvInterval 3;
MaxRtrAdvInterval 4;
AdvSendAdvert on;
AdvManagedFlag on;
prefix fd00:0000:0000:0001::/64
{ AdvValidLifetime 14300; AdvPreferredLifetime 14200; AdvAutonomous off; }
;
};
1.4 UFW: active
1.5 VM network adapter is set as bridged on host.
1.6 Status KEA DHCPv6
1.6.1 From ‘/var/log/kea/kea-dhcp6.log’
2024-11-24 09:28:11.052 INFO [kea-dhcp6.hosts/946.139846052082176]
HOSTS_BACKENDS_REGISTERED the following host backend types are available:
mysql postgresql
2024-11-24 09:28:11.054 INFO [kea-dhcp6.dhcp6/946.139846052082176]
DHCP6_CONFIG_COMPLETE DHCPv6 server has completed configuration: added IPv6
subnets: 1; DDNS: disabled
2024-11-24 09:28:11.057 INFO [kea-dhcp6.dhcp6/946.139846052082176]
DHCP6_USING_SERVERID server is using server-id
00:01:00:01:2e:66:39:5e:52:54:00:41:2f:9d and stores in the file
/var/lib/kea/kea-dhcp6-serverid
2024-11-24 09:28:11.058 WARN [kea-dhcp6.dhcp6/946.139846052082176]
DHCP6_MULTI_THREADING_INFO enabled: no, number of threads: 0, queue size: 0
2024-11-24 09:28:11.058 INFO [kea-dhcp6.dhcp6/946.139846052082176]
DHCP6_STARTED Kea DHCPv6 server version 2.2.0 started
1.6.2 From ‘systemctl status kea-dhcp6-server’
kea-dhcp6-server.service - Kea IPv6 DHCP daemon
Loaded: loaded (/lib/systemd/system/kea-dhcp6-server.service; enabled;
preset: enabled)
Active: active (running) since Sun 2024-11-24 09:28:10 AEDT; 35min ago
Docs: man:kea-dhcp6(8)
Main PID: 946 (kea-dhcp6)
Tasks: 5 (limit: 9449)
Memory: 11.6M
CPU: 344ms
CGroup: /system.slice/kea-dhcp6-server.service
1.7 Status RADVD
1.7.1 From ‘systemctl status radvd.service’:
radvd.service - Router advertisement daemon for IPv6
Loaded: loaded (/lib/systemd/system/radvd.service; enabled; preset: enabled)
Active: active (running) since Sun 2024-11-24 09:45:22 AEDT; 19min ago
Docs: man:radvd(8)
Process: 2069 ExecStartPre=/usr/sbin/radvd --logmethod stderr_clean
--configtest (code=exited, status=0/SUCCESS)
Process: 2070 ExecStart=/usr/sbin/radvd --logmethod stderr_clean
(code=exited, status=0/SUCCESS)
Main PID: 2071 (radvd)
Tasks: 2 (limit: 9449)
Memory: 464.0K
CPU: 327ms
CGroup: /system.slice/radvd.service
1.7.2 From ‘rdisc6 enp7s0’:
Soliciting ff02::2 (ff02::2) on enp7s0...
Hop limit : 64 ( 0x40)
Stateful address conf. : Yes
Stateful other conf. : No
Mobile home agent : No
Router preference : medium
Neighbor discovery proxy : No
Router lifetime : 12 (0x0000000c) seconds
Reachable time : unspecified (0x00000000)
Retransmit time : unspecified (0x00000000)
Prefix : fd00:0:0:1::/64
On-link : Yes
Autonomous address conf.: No
Valid time : 14300 (0x000037dc) seconds
Pref. time : 14200 (0x00003778) seconds
Source link-layer address: 52:54:00:26:30:9F
from fe80::85f4:b665:fd85:3d1e
Hop limit : 64 ( 0x40)
Stateful address conf. : Yes
Stateful other conf. : No
Mobile home agent : No
Router preference : medium
Neighbor discovery proxy : No
Router lifetime : 12 (0x0000000c) seconds
Reachable time : unspecified (0x00000000)
Retransmit time : unspecified (0x00000000)
Prefix : fd00:0:0:1::/64
On-link : Yes
Autonomous address conf.: No
Valid time : 14300 (0x000037dc) seconds
Pref. time : 14200 (0x00003778) seconds
Source link-layer address: 52:54:00:26:30:9F
from fe80::85f4:b665:fd85:3d1e
2. Virtual Machine 'VM Sandbox' (Debian 12)
2.1 IP Address:
enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP
group default qlen 1000
link/ether 52:54:00:9b:35:94 brd ff:ff:ff:ff:ff:ff
inet6 fe80::5054:ff:fe9b:3594/64 scope link
valid_lft forever preferred_lft forever
2.2 Netplan:
network:
ethernets:
enp1s0:
dhcp4: yes
dhcp6: yes
optional: false
version: 2
renderer: networkd
2.3 UFW: active
2.4 VM network adapter is set as bridged on host.
2.5 Status RADVD
2.5.1 From ‘rdisc6 enp1s0’:
Soliciting ff02::2 (ff02::2) on enp1s0...
Hop limit : 64 ( 0x40)
Stateful address conf. : Yes
Stateful other conf. : No
Mobile home agent : No
Router preference : medium
Neighbor discovery proxy : No
Router lifetime : 12 (0x0000000c) seconds
Reachable time : unspecified (0x00000000)
Retransmit time : unspecified (0x00000000)
Prefix : fd00:0:0:1::/64
On-link : Yes
Autonomous address conf.: No
Valid time : 14300 (0x000037dc) seconds
Pref. time : 14200 (0x00003778) seconds
Source link-layer address: 52:54:00:26:30:9F
from fe80::85f4:b665:fd85:3d1e
Hop limit : 64 ( 0x40)
Stateful address conf. : Yes
Stateful other conf. : No
Mobile home agent : No
Router preference : medium
Neighbor discovery proxy : No
Router lifetime : 12 (0x0000000c) seconds
Reachable time : unspecified (0x00000000)
Retransmit time : unspecified (0x00000000)
Prefix : fd00:0:0:1::/64
On-link : Yes
Autonomous address conf.: No
Valid time : 14300 (0x000037dc) seconds
Pref. time : 14200 (0x00003778) seconds
Source link-layer address: 52:54:00:26:30:9F
from fe80::85f4:b665:fd85:3d1e
3. Additional observations:
If I change the RADVD configuration on ‘VM HomeServer’ to switch off
AdvAutonomous (autonomous address configuration), the client ‘VM Sandbox’
sets it IPv6 IP based on the defined prefix (but obviously autonomously, so
the DHCPv6 server on ‘VM HomeServer’ does not have an entry in its lease
database in ‘/var/lib/kea/kea-leases6.csv’).
4. Questions:
What configuration do I miss to enable stateful DHCPv6?
Thank you so much.
Best,
C.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20241124/42d83fb0/attachment-0001.htm>
More information about the Kea-users
mailing list