I want create a server dhcp6 with alpine
I’m using Kea-dhcp6. The my file config this is:
{ # DHCPv6 configuration starts on the next line "Dhcp6": { # First we set up global values "valid-lifetime": 4000, "renew-timer": 1000, "rebind-timer": 2000, "preferred-lifetime": 3000, # Next we set up the interfaces to be used by the server. "interfaces-config": { "interfaces": [ "eth0" ] }, # And we specify the type of lease database "lease-database": { "type": "memfile", "persist": true, "name": "/var/lib/kea/dhcp6.leases", "lfc-interval": 1800, "max-row-errors": 100 }, "preferred-lifetime": 3000, "valid-lifetime": 4000, "renew-timer": 1000, "rebind-timer": 2000, # Finally, we list the subnets from which we will be leasing addresses. "subnet6": [ { "subnet": "3003::0/112", "pools": [ { "pool": "3003::20-3003::ffff" } ] } ], "reservations": [ { "hw-address": "00:0c:29:60:f8:3d", "ip-addresses": [ "3003::101" ] } ] # DHCPv6 configuration ends with the next line } }
it’s running but the vm with MAC “00:0c:29:60:f8:3d” it returns me this error:
udhcpc6: started, v1.32.1 udhcpc6: sending discover udhcpc6: sending select udhcpc6: no IAADDR option, ignoring packet udhcpc6: sending select udhcpc6: no IAADDR option, ignoring packet udhcpc6: sending select udhcpc6: no IAADDR option, ignoring packet udhcpc failed to get a DHCP lease udhcpc6: sending discover udhcpc6: sending select udhcpc6: no IAADDR option, ignoring packet udhcpc6: sending select udhcpc6: no IAADDR option, ignoring packet udhcpc6: sending select udhcpc6: no IAADDR option, ignoring packet udhcpc failed to get a DHCP lease
can someone help me ???
i ran this cmd:
kea-dhcp6 -d -t /etc/kea/kea-dhcp6.conf
its return was:
Syntax check OK 2021-03-24 15:15:24.408 DEBUG [kea-dhcp6.dhcp6/5324.139712987985184] DHCP6_OPEN_SOCKET opening service sockets on port 0 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command list-commands registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command build-report registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command config-backend-pull registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command config-get registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command config-reload registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command config-test registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command config-write registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command dhcp-disable registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command dhcp-enable registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command leases-reclaim registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command server-tag-get registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command libreload registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command config-set registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command shutdown registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command status-get registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command version-get registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command statistic-get registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command statistic-get-all registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command statistic-reset registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command statistic-reset-all registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command statistic-remove registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command statistic-remove-all registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command statistic-sample-age-set registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command statistic-sample-age-set-all registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command statistic-sample-count-set registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_REGISTERED Command statistic-sample-count-set-all registered 2021-03-24 15:15:24.409 DEBUG [kea-dhcp6.dhcp6/5324.139712987985184] DHCP6_CONFIG_START DHCPv6 server is processing the following configuration: { "interfaces-config": { "interfaces": [ "eth0" ] }, "lease-database": { "lfc-interval": 1800, "max-row-errors": 100, "name": "/var/lib/kea/dhcp6.leases", "persist": true, "type": "memfile" }, "preferred-lifetime": 3000, "rebind-timer": 2000, "renew-timer": 1000, "subnet6": [ { "pools": [ { "pool": "3003::20-3003::ffff" } ], "reservations": [ { "hw-address": "00:0c:29:60:f8:3d", "ip-addresses": [ "3003::101" ] }, { "hw-address": "00:50:56:84:f4:b2", "ip-addresses": [ "3003::102" ] } ], "subnet": "3003::0/112" } ], "valid-lifetime": 4000 } 2021-03-24 15:15:24.409 INFO [kea-dhcp6.hosts/5324.139712987985184] HOSTS_BACKENDS_REGISTERED the following host backend types are available: mysql postgresql 2021-03-24 15:15:24.409 INFO [kea-dhcp6.dhcpsrv/5324.139712987985184] DHCPSRV_CFGMGR_ADD_IFACE listening on interface eth0 2021-03-24 15:15:24.410 INFO [kea-dhcp6.dhcpsrv/5324.139712987985184] DHCPSRV_CFGMGR_NEW_SUBNET6 a new subnet has been added to configuration: 3003::0/112 with params: t1=1000, t2=2000, preferred-lifetime=3000, valid-lifetime=4000, rapid-commit is false 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.hosts/5324.139712987985184] HOSTS_CFG_ADD_HOST add the host for reservations: hwaddr=000C2960F83D ipv6_subnet_id=1 hostname=(empty) ipv4_reservation=(no) siaddr=(no) sname=(empty) file=(empty) key=(empty) ipv6_reservation0=3003::101 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.hosts/5324.139712987985184] HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER get one host with IPv6 reservation for subnet id 1, identified by hwaddr=000C2960F83D 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.hosts/5324.139712987985184] HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts with reservations using identifier: hwaddr=000C2960F83D 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.hosts/5324.139712987985184] HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using identifier hwaddr=000C2960F83D, found 0 host(s) 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.hosts/5324.139712987985184] HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER_NULL host not found using subnet id 1 and identifier hwaddr=000C2960F83D 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.hosts/5324.139712987985184] HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS6 get one host with reservation for subnet id 1 and including IPv6 address 3003::101 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.hosts/5324.139712987985184] HOSTS_CFG_GET_ALL_SUBNET_ID_ADDRESS6 get all hosts with reservations for subnet id 1 and IPv6 address 3003::101 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.hosts/5324.139712987985184] HOSTS_CFG_GET_ALL_SUBNET_ID_ADDRESS6_COUNT using subnet id 1 and address 3003::101, found 0 host(s) 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.hosts/5324.139712987985184] HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS6_NULL host not found using subnet id 1 and address 3003::101 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.hosts/5324.139712987985184] HOSTS_CFG_ADD_HOST add the host for reservations: hwaddr=00505684F4B2 ipv6_subnet_id=1 hostname=(empty) ipv4_reservation=(no) siaddr=(no) sname=(empty) file=(empty) key=(empty) ipv6_reservation0=3003::102 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.hosts/5324.139712987985184] HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER get one host with IPv6 reservation for subnet id 1, identified by hwaddr=00505684F4B2 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.hosts/5324.139712987985184] HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts with reservations using identifier: hwaddr=00505684F4B2 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.hosts/5324.139712987985184] HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using identifier hwaddr=00505684F4B2, found 0 host(s) 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.hosts/5324.139712987985184] HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER_NULL host not found using subnet id 1 and identifier hwaddr=00505684F4B2 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.hosts/5324.139712987985184] HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS6 get one host with reservation for subnet id 1 and including IPv6 address 3003::102 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.hosts/5324.139712987985184] HOSTS_CFG_GET_ALL_SUBNET_ID_ADDRESS6 get all hosts with reservations for subnet id 1 and IPv6 address 3003::102 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.hosts/5324.139712987985184] HOSTS_CFG_GET_ALL_SUBNET_ID_ADDRESS6_COUNT using subnet id 1 and address 3003::102, found 0 host(s) 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.hosts/5324.139712987985184] HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS6_NULL host not found using subnet id 1 and address 3003::102 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.dhcpsrv/5324.139712987985184] DHCPSRV_CFGMGR_ADD_SUBNET6 adding subnet 3003::0/112 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.dhcpsrv/5324.139712987985184] DHCPSRV_TIMERMGR_UNREGISTER_ALL_TIMERS unregistering all timers 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command build-report deregistered 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command config-backend-pull deregistered 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command config-get deregistered 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command config-reload deregistered 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command config-set deregistered 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command config-test deregistered 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command config-write deregistered 2021-03-24 15:15:24.410 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command dhcp-disable deregistered 2021-03-24 15:15:24.411 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command dhcp-enable deregistered 2021-03-24 15:15:24.411 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command leases-reclaim deregistered 2021-03-24 15:15:24.411 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command libreload deregistered 2021-03-24 15:15:24.411 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command server-tag-get deregistered 2021-03-24 15:15:24.411 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command shutdown deregistered 2021-03-24 15:15:24.411 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command statistic-get deregistered 2021-03-24 15:15:24.411 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command statistic-get-all deregistered 2021-03-24 15:15:24.411 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command statistic-remove deregistered 2021-03-24 15:15:24.411 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command statistic-remove-all deregistered 2021-03-24 15:15:24.411 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command statistic-reset deregistered 2021-03-24 15:15:24.411 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command statistic-reset-all deregistered 2021-03-24 15:15:24.411 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command statistic-sample-age-set deregistered 2021-03-24 15:15:24.411 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command statistic-sample-age-set-all deregistered 2021-03-24 15:15:24.411 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command statistic-sample-count-set deregistered 2021-03-24 15:15:24.411 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command statistic-sample-count-set-all deregistered 2021-03-24 15:15:24.411 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command status-get deregistered 2021-03-24 15:15:24.411 DEBUG [kea-dhcp6.commands/5324.139712987985184] COMMAND_DEREGISTERED Command version-get deregistered
it seems to work but the clients are not receiving any ip
help me pls
I changed the conf file to this:
{ # DHCPv6 configuration starts on the next line "Dhcp6": { # First we set up global values # T1 < T2 < preferred lifetime < valid lifetime "renew-timer": 1000, "rebind-timer": 2000, "preferred-lifetime": 3000, "valid-lifetime": 4000, # Next we set up the interfaces to be used by the server. "interfaces-config": { "interfaces": [ "eth1" ] }, # And we specify the type of lease database "lease-database": { "type": "memfile", "persist": true, "name": "/var/lib/kea/dhcp6.leases", "lfc-interval": 1800, "max-row-errors": 100 }, # Finally, we list the subnets from which we will be leasing addresses. "subnet6": [ { "subnet": "fdc1:cc1a::beef:0/64", "pools": [ { "pool": "fdc1:cc1a::beef:20-fdc1:cc1a::beef:ffff" } ], "interface": "eth1", "reservations": [ { "hw-address": "00:0c:29:60:F8:3D", "ip-addresses": [ "fdc1:cc1a::beef:101" ] }, { "hw-address": "00:50:56:84:f4:b2", "ip-addresses": [ "fdc1:cc1a::beef:102" ] } ] } ] # DHCPv6 configuration ends with the next line } }
when i run udhcpc6 in the alpine VM client its return is
udhcpc6: started, v1.32.1 udhcpc6: sending discover udhcpc6: sending select udhcpc6: IPv6 obtained, lease time 4000
but if i run ifconfig i don’t see any ip
solutions ??
Answer
Yea, Alpine was not getting IPv6 from my router that I have only running DHCPv6 to serve IPv6 ip’s.
I was able to get it to work by installing dhcpcd. apk add dhcpcd
Attribution
Source : Link , Question Author : Seguret , Answer Author : Benjamin McGuire