[Kea-users] [EXTERNAL] Kea Server Docker on Windows Host doesn't lease to private LAN network

Payyappattu Raghuram Payyappattu.Raghuram at matrixteam.com
Wed Jul 10 21:59:22 UTC 2024


The MAC address, e4:5f:01:fb:9a:93  of the Pi device is in the kea log
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.leases/8.140498538904376] DHCP4_DISCOVER [hwtype=1 e4:5f:01:fb:9a:93], cid=[no info], tid=0x5a44650b: server is processing DHCPDISCOVER with hint=(no hint)
I’d tried ipvlan but it didn’t help.

Thanks,
Raghu


From: Kea-users <kea-users-bounces at lists.isc.org> On Behalf Of Xiao, Yu (CCI-Atlanta) via Kea-users
Sent: Tuesday, July 9, 2024 5:20 PM
To: Kea user's list <kea-users at lists.isc.org>
Cc: Xiao, Yu (CCI-Atlanta) <yu.xiao at cox.com>
Subject: Re: [Kea-users] [EXTERNAL] Kea Server Docker on Windows Host doesn't lease to private LAN network


CAUTION: This is an email from an external sender. Use caution when clicking on links, opening attachments or responding.
What is the MAC address of the Pi device? Are you able to see it in the kea logs? I remember the kea document asks us to create ipvlan0 network to avoid leasing on the host network for potential conflicts. But I think in your case, you will need to use bridge network instead of ipvlan0. Can you change that and try again?



Best Regards,
Yu


From: Kea-users <kea-users-bounces at lists.isc.org<mailto:kea-users-bounces at lists.isc.org>> on behalf of Payyappattu Raghuram <Payyappattu.Raghuram at matrixteam.com<mailto:Payyappattu.Raghuram at matrixteam.com>>
Date: Tuesday, July 9, 2024 at 5:36 PM
To: Kea user's list <kea-users at lists.isc.org<mailto:kea-users at lists.isc.org>>
Subject: [EXTERNAL] [Kea-users] Kea Server Docker on Windows Host doesn't lease to private LAN network

Hi everyone,

Has anyone successfully used the Kea Docker image (version 2.6.0) on Docker Desktop running on a Windows laptop? I'm facing issues with a simple scenario: my host machine has a network card connected to a device (Raspberry Pi) that needs to lease an IP from the Kea Server. Unfortunately, the Raspberry device is not getting the IP. I would appreciate any help or advice on troubleshooting this setup.

Also, if this seems to be a bug, how can I report it to ISC to get in touch and possibly have it resolved in a future release?
Network card (Windows Firewall is turned off)

[cid:image002.png at 01DAD2E7.98FD0CD0]
[cid:image003.png at 01DAD2E7.98FD0CD0]

The docker-compose file is as follows, note that the , the driver used as ‘bridge’ because as I am running docker on Windows:
  kea4:
    image: docker.cloudsmith.io/isc/docker/kea-dhcp4:2.7.0
    restart: always
    ports:
      - "67:67/udp"
    networks:
      kea-10-ipvlan:
        ipv4_address: 10.0.0.2 # ip for kea4 server
    cap_add:
      - NET_ADMIN
      - NET_RAW
    volumes:
      - type: bind
        source: ./config/kea # configuration files
        target: /etc/kea
      - kea4-var:/var/lib/kea
      - ./kea-data:/tmp   # New volume mapping for kea-leases4.csv

networks:
  kea-10-ipvlan: # network that binds container to host network interface.
    name: kea-10-ipvlan
    driver: bridge
    #driver_opts:
      #parent: "eth0" #  host interface that kea containers will use
    ipam:
      config:
        - subnet: 10.0.0.0/24
          #gateway: 10.0.0.1
volumes:
  pulsardata:
  pulsarconf:
  kea4-var:
  kea6-var:

Kea DHCP4 configuration :
{
  "Dhcp4": {
    "interfaces-config": {
      "interfaces": ["*"], // Update this to change Network interface
       "service-sockets-require-all": true
    },
    "option-def": [
    ],
    "lease-database": {
        "type": "memfile",
        "persist": true,
        "name": "/tmp/kea-leases4.csv",
        "lfc-interval": 1800,  // Update this to change the period to flush out DHCP server file which keeps track of IPs offered
        "max-row-errors": 100
    },
    // The following configures logging. It assumes that messages with at
    // least informational level (info, warn, error and fatal) should be
    // logged to stdout.
    "loggers": [
        {
            "name": "kea-dhcp4",
            "output-options": [
                {
                    "output": "stdout"
                }
            ],
            "severity": "DEBUG",
            "debuglevel": 99
        }
    ],
    "subnet4": [
      {
        "id": 1,  // Unique identifier for this subnet
        "subnet": "10.0.0.0/24", // Alter this to change the range of IPs offering from DHCP server
        "pools": [
          {
            "pool": "10.0.0.10 - 10.0.0.100"  // Alter this to change the pool of IPs offering from DHCP server
          }
        ],
        "valid-lifetime": 86400,  // Lease time in seconds (86400 seconds = 24 hours)
        "renew-timer": 600,
        "rebind-timer": 900,
         "option-data": [
          {
            "name": "routers",
            "data": "10.0.0.1"
          },
          {
            "name": "domain-name-servers",
            "data": "10.0.0.1"
          }
        ]
      }
    ]
  }
}

Here is the log :

kea4-1  | 2024-07-09 21:29:32.470 INFO  [kea-dhcp4.packets/8.140498538904376] DHCP4_PACKET_RECEIVED [hwtype=1 e4:5f:01:fb:9a:93], cid=[no info], tid=0x5a44650b: DHCPDISCOVER (type 1) received from 10.0.0.1 to 10.0.0.2 on interface eth0
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.packets/8.140498538904376] DHCP4_QUERY_DATA [hwtype=1 e4:5f:01:fb:9a:93], cid=[no info], tid=0x5a44650b, packet details: local_address=10.0.0.2:67, remote_address=10.0.0.1:39802,
kea4-1  | msg_type=DHCPDISCOVER (1), trans_id=0x5a44650b,
kea4-1  | options:
kea4-1  |   type=012, len=011: "raspberrypi" (string)
kea4-1  |   type=053, len=001: 1 (uint8)
kea4-1  |   type=055, len=013: 1(uint8) 28(uint8) 2(uint8) 3(uint8) 15(uint8) 6(uint8) 119(uint8) 12(uint8) 44(uint8) 47(uint8) 26(uint8) 121(uint8) 42(uint8)
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.dhcpsrv/8.140498538904376] DHCPSRV_SUBNET4_SELECT_NO_RAI_OPTIONS No RAI options found to use for subnet selection.
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.dhcpsrv/8.140498538904376] DHCPSRV_SUBNET4_SELECT_NO_RELAY_ADDRESS Relay address (giaddr) in client packet is empty.
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.dhcpsrv/8.140498538904376] DHCPSRV_CFGMGR_SUBNET4_ADDR selected subnet 10.0.0.0/24 for packet received by matching address 10.0.0.1
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.packets/8.140498538904376] DHCP4_SUBNET_SELECTED [hwtype=1 e4:5f:01:fb:9a:93], cid=[no info], tid=0x5a44650b: the subnet with ID 1 was selected for client assignments
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.packets/8.140498538904376] DHCP4_SUBNET_DATA [hwtype=1 e4:5f:01:fb:9a:93], cid=[no info], tid=0x5a44650b: the selected subnet details: 10.0.0.0/24
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.hosts/8.140498538904376] HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER get one host with IPv4 reservation for subnet id 1, identified by hwaddr=E45F01FB9A93
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.hosts/8.140498538904376] HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts with reservations using identifier: hwaddr=E45F01FB9A93
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.hosts/8.140498538904376] HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using identifier hwaddr=E45F01FB9A93, found 0 host(s)
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.hosts/8.140498538904376] HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER_NULL host not found using subnet id 1 and identifier hwaddr=E45F01FB9A93
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.dhcp4/8.140498538904376] DHCP4_CLASS_ASSIGNED [hwtype=1 e4:5f:01:fb:9a:93], cid=[no info], tid=0x5a44650b: client packet has been assigned to the following class: UNKNOWN
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.dhcp4/8.140498538904376] DHCP4_CLASSES_ASSIGNED_AFTER_SUBNET_SELECTION [hwtype=1 e4:5f:01:fb:9a:93], cid=[no info], tid=0x5a44650b: client packet has been assigned to the following classes: ALL, UNKNOWN
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.leases/8.140498538904376] DHCP4_DISCOVER [hwtype=1 e4:5f:01:fb:9a:93], cid=[no info], tid=0x5a44650b: server is processing DHCPDISCOVER with hint=(no hint)
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.ddns/8.140498538904376] DHCP4_CLIENT_HOSTNAME_PROCESS [hwtype=1 e4:5f:01:fb:9a:93], cid=[no info], tid=0x5a44650b: processing client's Hostname option
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.ddns/8.140498538904376] DHCP4_CLIENT_HOSTNAME_DATA [hwtype=1 e4:5f:01:fb:9a:93], cid=[no info], tid=0x5a44650b: client sent Hostname option: raspberrypi
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.ddns/8.140498538904376] DHCP4_CLIENT_HOSTNAME_DATA [hwtype=1 e4:5f:01:fb:9a:93], cid=[no info], tid=0x5a44650b: client sent Hostname option: raspberrypi
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.ddns/8.140498538904376] DHCP4_RESPONSE_HOSTNAME_DATA [hwtype=1 e4:5f:01:fb:9a:93], cid=[no info], tid=0x5a44650b: including Hostname option in the server's response: raspberrypi
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.dhcpsrv/8.140498538904376] DHCPSRV_MEMFILE_GET_HWADDR obtaining IPv4 leases for hardware address hwtype=1 e4:5f:01:fb:9a:93
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.alloc-engine/8.140498538904376] ALLOC_ENGINE_V4_OFFER_NEW_LEASE allocation engine will try to offer new lease to the client [hwtype=1 e4:5f:01:fb:9a:93], cid=[no info], tid=0x5a44650b
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.hosts/8.140498538904376] HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS4 get one host with reservation for subnet id 1 and IPv4 address 10.0.0.10
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.hosts/8.140498538904376] HOSTS_CFG_GET_ALL_SUBNET_ID_ADDRESS4 get all hosts with reservations for subnet id 1 and IPv4 address 10.0.0.10
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.hosts/8.140498538904376] HOSTS_CFG_GET_ALL_SUBNET_ID_ADDRESS4_COUNT using IPv4 subnet 1 and IPv4 address 10.0.0.10, found 0 host(s)
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.hosts/8.140498538904376] HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS4_NULL host not found using subnet id 1 and address 10.0.0.10
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.dhcpsrv/8.140498538904376] DHCPSRV_MEMFILE_GET_ADDR4 obtaining IPv4 lease for address 10.0.0.10
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.hosts/8.140498538904376] HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS4 get one host with reservation for subnet id 1 and IPv4 address 10.0.0.11
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.hosts/8.140498538904376] HOSTS_CFG_GET_ALL_SUBNET_ID_ADDRESS4 get all hosts with reservations for subnet id 1 and IPv4 address 10.0.0.11
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.hosts/8.140498538904376] HOSTS_CFG_GET_ALL_SUBNET_ID_ADDRESS4_COUNT using IPv4 subnet 1 and IPv4 address 10.0.0.11, found 0 host(s)
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.hosts/8.140498538904376] HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS4_NULL host not found using subnet id 1 and address 10.0.0.11
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.dhcpsrv/8.140498538904376] DHCPSRV_MEMFILE_GET_ADDR4 obtaining IPv4 lease for address 10.0.0.11
kea4-1  | 2024-07-09 21:29:32.470 INFO  [kea-dhcp4.leases/8.140498538904376] DHCP4_LEASE_OFFER [hwtype=1 e4:5f:01:fb:9a:93], cid=[no info], tid=0x5a44650b: lease 10.0.0.11 will be offered
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.dhcp4/8.140498538904376] DHCP4_CLASSES_ASSIGNED [hwtype=1 e4:5f:01:fb:9a:93], cid=[no info], tid=0x5a44650b: client packet has been assigned on DHCPDISCOVER message to the following classes: ALL, UNKNOWN
kea4-1  | 2024-07-09 21:29:32.470 DEBUG [kea-dhcp4.options/8.140498538904376] DHCP4_PACKET_PACK [hwtype=1 e4:5f:01:fb:9a:93], cid=[no info], tid=0x5a44650b: preparing on-wire format of the packet to be sent
kea4-1  | 2024-07-09 21:29:32.471 INFO  [kea-dhcp4.packets/8.140498538904376] DHCP4_PACKET_SEND [hwtype=1 e4:5f:01:fb:9a:93], cid=[no info], tid=0x5a44650b: trying to send packet DHCPOFFER (type 2) from 10.0.0.2:67 to 10.0.0.11:68 on interface eth0
kea4-1  | 2024-07-09 21:29:32.471 DEBUG [kea-dhcp4.packets/8.140498538904376] DHCP4_RESPONSE_DATA [hwtype=1 e4:5f:01:fb:9a:93], cid=[no info], tid=0x5a44650b: responding with packet DHCPOFFER (type 2), packet details: local_address=10.0.0.2:67, remote_address=10.0.0.11:68,
kea4-1  | msg_type=DHCPOFFER (2), trans_id=0x5a44650b,
kea4-1  | options:
kea4-1  |   type=001, len=004: 4294967040 (uint32)
kea4-1  |   type=003, len=004: 10.0.0.1
kea4-1  |   type=006, len=004: 10.0.0.1
kea4-1  |   type=012, len=011: "raspberrypi" (string)
kea4-1  |   type=051, len=004: 86400 (uint32)
kea4-1  |   type=053, len=001: 2 (uint8)
kea4-1  |   type=054, len=004: 10.0.0.2
kea4-1  |   type=058, len=004: 600 (uint32)
kea4-1  |   type=059, len=004: 900 (uint32)


From: Payyappattu Raghuram
Sent: Wednesday, July 3, 2024 5:01 PM
To: Kea user's list <kea-users at lists.isc.org<mailto:kea-users at lists.isc.org>>
Subject: Kea Server Docker on Windows Host doesn't lease to private LAN network

Hi All -  In my specific scenario, the Kea Server is running on Docker Desktop (WSL) on Windows 11 Pro with the following setup. The Raspberry Pi is directly connected to the “Ethernet” port via a LAN cable on the Windows host machine and is supposed to receive a DHCP offer from the Kea Server. Wireshark shows that the “Ethernet” interface received the DHCP Request when the Raspberry Pi was plugged in, but somehow the Kea Server couldn't pick up this request. Interestingly, when I run the udhcpc client on the Windows host machine using Docker with the command docker run --net kea-10-ipvlan --rm busybox sh -c "udhcpc -i eth0 -v", the Kea Server successfully leases the IP. The windows firewall is turned off . It would be great if you could share any workarounds for this issue
Here is the logs from Kea Server. Unfortunately, the Raspberry is not getting the DHCP Offer. WhereAny have insight on this ?

kea4-1  | 2024-07-03 21:51:52.593 INFO  [kea-dhcp4.dhcp4/8.140404823505720] DHCP4_QUERY_LABEL received query: [hwtype=1 e4:5f:01:fb:9a:93], cid=[01:e4:5f:01:fb:9a:93], tid=0x7c276e99
kea4-1  | 2024-07-03 21:51:52.593 INFO  [kea-dhcp4.packets/8.140404823505720] DHCP4_PACKET_RECEIVED [hwtype=1 e4:5f:01:fb:9a:93], cid=[01:e4:5f:01:fb:9a:93], tid=0x7c276e99: DHCPDISCOVER (type 1) received from 10.0.0.1 to 10.0.0.2 on interface eth0
kea4-1  | 2024-07-03 21:51:52.593 INFO  [kea-dhcp4.leases/8.140404823505720] DHCP4_LEASE_OFFER [hwtype=1 e4:5f:01:fb:9a:93], cid=[01:e4:5f:01:fb:9a:93], tid=0x7c276e99: lease 10.0.0.30 will be offered
kea4-1  | 2024-07-03 21:51:52.593 INFO  [kea-dhcp4.packets/8.140404823505720] DHCP4_PACKET_SEND [hwtype=1 e4:5f:01:fb:9a:93], cid=[01:e4:5f:01:fb:9a:93], tid=0x7c276e99: trying to send packet DHCPOFFER (type 2) from 10.0.0.2:67 to 10.0.0.30:68 on interface eth0

[cid:image004.png at 01DAD2E7.98FD0CD0]


Docker Compose file :-
  kea4:
    image: docker.cloudsmith.io/isc/docker/kea-dhcp4:2.6.0<https://urldefense.proofpoint.com/v2/url?u=http-3A__docker.cloudsmith.io_isc_docker_kea-2Ddhcp4-3A2.5.2&d=DwMFaQ&c=oDwORbqiAyI2S1E4GXNhG8NHIJckvCGWArFTLM6Zp04&r=54rkX7RWSzO6WcEMXkTB1jsfzuN_Jjp1LCmGpB1MQ-eKAUbHTHFpwAdrDqyktTEx&m=MufEfpqY7wWn5DmupvLv2xMGsJuVA2znh-BwVr9usTHJB8RIJOchWeGvlV6ubFiq&s=tb1bRDk0XZMaG9TIdN3DAMX197f3FOdznwZWadTxwxY&e=>
    restart: always
    ports:
      - "67:67/udp"
    networks:
      kea-10-ipvlan: # network that binds container to host network interface.
        ipv4_address: 10.0.0.2 # ip for kea4 server
    volumes:
      - type: bind
        source: ./config/kea # configuration files
        target: /etc/kea
      - kea4-var:/var/lib/kea
      - ./kea-data:/tmp   # New volume mapping for kea-leases4.csv
 networks:
  kea-10-ipvlan: # network that binds container to host network interface.
    name: kea-10-ipvlan
    driver: bridge
    driver_opts:
      parent: "Ethernet" #  host interface that kea containers will use
    ipam:
      config:
        - subnet: 10.0.0.0/24<https://urldefense.proofpoint.com/v2/url?u=http-3A__10.0.0.0_24&d=DwMFaQ&c=oDwORbqiAyI2S1E4GXNhG8NHIJckvCGWArFTLM6Zp04&r=54rkX7RWSzO6WcEMXkTB1jsfzuN_Jjp1LCmGpB1MQ-eKAUbHTHFpwAdrDqyktTEx&m=MufEfpqY7wWn5DmupvLv2xMGsJuVA2znh-BwVr9usTHJB8RIJOchWeGvlV6ubFiq&s=G3H9AFxJHYCJrFYUHPI0D4nSPr6jhcd_ZVQF_Tj_aYk&e=>
          gateway: 10.0.0.1

Kea Configuration -
{
  "Dhcp4": {
    "interfaces-config": {
      "interfaces": ["eth0"] // Update this to change Network interface
    },
    "lease-database": {
        "type": "memfile",
        "persist": true,
        "name": "/tmp/kea-leases4.csv",
        "lfc-interval": 1800,  // Update this to change the period to flush out DHCP server file which keeps track of IPs offered
        "max-row-errors": 100
    },
    "subnet4": [
      {
        "subnet": "10.0.0.0/24<https://urldefense.proofpoint.com/v2/url?u=http-3A__10.0.0.0_24&d=DwMFaQ&c=oDwORbqiAyI2S1E4GXNhG8NHIJckvCGWArFTLM6Zp04&r=54rkX7RWSzO6WcEMXkTB1jsfzuN_Jjp1LCmGpB1MQ-eKAUbHTHFpwAdrDqyktTEx&m=MufEfpqY7wWn5DmupvLv2xMGsJuVA2znh-BwVr9usTHJB8RIJOchWeGvlV6ubFiq&s=G3H9AFxJHYCJrFYUHPI0D4nSPr6jhcd_ZVQF_Tj_aYk&e=>", // Alter this to change the range of IPs offering from DHCP server
        "pools": [
          {
            "pool": "10.0.0.3 - 10.0.0.100"  // Alter this to change the pool of IPs offering from DHCP server
          }
        ],
        "interface": "eth0",      // Update this to change Network interface
        "valid-lifetime": 86400,  // Lease time in seconds (86400 seconds = 24 hours)
        "renew-timer": 600,
        "rebind-timer": 900,
        "option-data": [
          {
            "name": "routers",
            "data": "10.0.0.1"
          },
          {
            "name": "domain-name-servers",
            "data": "X.X.X.X"
          }
        ]
      }
    ]
  }
}
Thanks in advance for your help!.
--Raghu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20240710/a2a99935/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 3522 bytes
Desc: image002.png
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20240710/a2a99935/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 54679 bytes
Desc: image003.png
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20240710/a2a99935/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 38774 bytes
Desc: image004.png
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20240710/a2a99935/attachment-0005.png>


More information about the Kea-users mailing list