You are not logged in.

#1 2025-05-08 15:15:25

Derson5
Member
Registered: 2010-07-29
Posts: 35

The computer does not get the correct IP from the KEA server

I bought a minicomputer with 4 ethernet ports and wanted to make a router out of it (dhcp and dns - I don't know anything about it and I wanted to finally learn). I tested this configuration with a laptop and it caught the right ip assigned to the mac address and I was able to do ssh from one machine to another and vice versa. I have now changed the mac address and ip address from the laptop to the second computer from which I would like to make a server and for some reason it does not catch the assigned ip address (it gets a random one) and I am not able to do ssh - when I try to ssh from the router to the server, the router tries to log in to itself and the same with the server - trying to ssh to the server address gives me a login to the server. I have been looking at this configuration for a long time and I do not understand where the problem is now, since it was not there before. I restarted all the machines.

This is my Kea config file /etc/kea/kea-dhcp4.conf

{
    "Dhcp4": {
        "interfaces-config": {
            "interfaces": [ "intern3/11.11.11.253" ],
            "dhcp-socket-type": "raw"
        },
        "loggers": [
          {
            "name": "kea-dhcp4",
            "severity": "DEBUG",
            "debuglevel": 99,
            "output_options": [
              {
                "output": "stdout"
              }
            ]
          }
        ],
        "subnet4": [
            {
                "id": 1,
                "subnet": "11.11.11.0/24",
                "interface": "intern3",
                "pools": [ { "pool": "11.11.11.3 - 11.11.11.199" } ],
                "option-data": [
                    {
                        "name": "routers",
                        "data": "11.11.11.254"
                    },
                    {
                        "name": "domain-name-servers",
                        "data": "1.1.1.1"
                    }
                ],
                "reservations": [
                {
                    "hostname": "server",
                    "client-id": "24:45:2e:43:22:1e",
                    "ip-address": "11.11.11.2"
                }
            ]
            }
        ]
    }
}

ip a from router with KEA

5: intern3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 29:fg:e5:18:h5:28 brd ff:ff:ff:ff:ff:ff
    inet 11.11.11.253/24 brd 11.11.11.255 scope global intern3
       valid_lft forever preferred_lft forever
    inet6 fa80::62de:b4rf:fe37:d539/64 scope link proto kernel_ll
       valid_lft forever preferred_lft forever/

ip a from second computer (server)

3: enp1s0f0u1u3u1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 24:45:2e:43:22:1e brd ff:ff:ff:ff:ff:ff
    altname enx34298f71911d
    inet 11.11.11.5/24 metric 100 brd 11.11.11.255 scope global dynamic enp1s0f0u1u3u1
       valid_lft 6372sec preferred_lft 6372sec
    inet6 fe80::3629:8fff:fe71:911d/64 scope link proto kernel_ll
       valid_lft forever preferred_lft forever

Offline

#2 2025-05-08 16:47:00

-thc
Member
Registered: 2017-03-15
Posts: 890

Re: The computer does not get the correct IP from the KEA server

Kea is a little bit stubborn in those scenarios - there may be some leftovers in the "kea-leases*" files under "/var/lib/kea".

Stop kea and check all leases files for lines that have entries for either the MAC or the IP address and remove them.

Offline

Board footer

Powered by FluxBB