[Kea-users] dhcp server as helper server

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Kea-users] dhcp server as helper server

Marcin Romanowski
Hello,
I try to run kea as helper dhcp server. this server will be handled few different networks but requests will be coming from other network. 

this is my config:
{ "Dhcp4":
{
    "interfaces-config": {
        "interfaces": [ "ens4" ],
        "dhcp-socket-type": "udp",
        "outbound-interface": "use-routing",
        "re-detect": true
    },

    "sanity-checks": {
        "lease-checks": "fix-del"
    },
    "lease-database": {
        "type": "memfile",
        "lfc-interval": 3600
    },
    "control-socket": {
        "socket-type": "unix",
        "socket-name": "/tmp/kea4-ctrl-socket"
    },
    "valid-lifetime": 4000,
    "renew-timer": 1000,
    "rebind-timer": 2000,
    "echo-client-id": false,
    "match-client-id": false,
    "authoritative": false,

    "subnet4": [
        {
            "pools": [ { "pool": "192.168.49.2 - 192.168.49.120" } ],
            "subnet": "192.168.49.0/25",
     "option-data": [
        {
            "name": "routers",
            "data": "192.168.49.1"
        }
   ],
   "reservations": [
                    {
                        "hw-address": "0C:F4:65:FE:0A:00",
                        "ip-address": "192.168.49.60"
                    }
                ]
        }
    ],

    "loggers": [
          {
            "name": "kea-dhcp4",
              "output_options": [
                  {
                      "output": "/opt/kea/var/log/kea-dhcp4.log",
                      "pattern": "%d{%y.%m.%d %H:%M:%S.%q} %-5p [%c/%i] %m\n"
                  }
              ],
              "severity": "INFO"
          }
      ]
  }

}


when proxy server sends to it DHCPREQUEST :
20.05.30 17:15:24.327 INFO  [kea-dhcp4.hosts/14898] HOSTS_BACKENDS_REGISTERED the following host backend types are available: postgresql
20.05.30 17:15:24.332 INFO  [kea-dhcp4.dhcpsrv/14898] DHCPSRV_CFGMGR_SOCKET_TYPE_SELECT using socket type udp
20.05.30 17:15:24.332 INFO  [kea-dhcp4.dhcpsrv/14898] DHCPSRV_CFGMGR_ADD_IFACE listening on interface ens4
20.05.30 17:15:24.332 INFO  [kea-dhcp4.dhcpsrv/14898] DHCPSRV_CFGMGR_NEW_SUBNET4 a new subnet has been added to configuration: 192.168.49.0/25 with params: t1=1000, t2=2000, valid-lifetime=4000
20.05.30 17:15:24.332 INFO  [kea-dhcp4.commands/14898] COMMAND_ACCEPTOR_START Starting to accept connections via unix domain socket bound to /tmp/kea4-ctrl-socket
20.05.30 17:15:24.333 INFO  [kea-dhcp4.dhcp4/14898] DHCP4_CONFIG_COMPLETE DHCPv4 server has completed configuration: added IPv4 subnets: 1; DDNS: disabled
20.05.30 17:15:24.333 INFO  [kea-dhcp4.dhcpsrv/14898] DHCPSRV_MEMFILE_DB opening memory file lease database: lfc-interval=3600 type=memfile universe=4
20.05.30 17:15:24.333 INFO  [kea-dhcp4.dhcpsrv/14898] DHCPSRV_MEMFILE_LEASE_FILE_LOAD loading leases from file /opt/kea/var/lib/kea/kea-leases4.csv
20.05.30 17:15:24.333 INFO  [kea-dhcp4.dhcpsrv/14898] DHCPSRV_MEMFILE_LFC_SETUP setting up the Lease File Cleanup interval to 3600 sec
20.05.30 17:15:24.333 WARN  [kea-dhcp4.dhcp4/14898] DHCP4_MULTI_THREADING_INFO enabled: no, number of threads: 0, queue size: 0
20.05.30 17:15:24.333 INFO  [kea-dhcp4.dhcp4/14898] DHCP4_STARTED Kea DHCPv4 server version 1.7.8-git started
20.05.30 17:15:45.803 ERROR [kea-dhcp4.bad-packets/14898] DHCP4_PACKET_NAK_0001 [hwtype=1 0c:f4:65:fe:0a:00], cid=[no info], tid=0xd209bb6a: failed to select a subnet for incoming packet, src 10.249.1.202, type DHCPDISCOVER
20.05.30 17:15:46.805 ERROR [kea-dhcp4.bad-packets/14898] DHCP4_PACKET_NAK_0001 [hwtype=1 0c:f4:65:fe:0a:00], cid=[no info], tid=0xd209bb6a: failed to select a subnet for incoming packet, src 10.249.1.202, type DHCPDISCOVER


kea-server is connected to network with address 10.249.2.203 and to this address all requests will be sending. 

How to configure it properly?

Best Regards
Marcin



_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.

Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] dhcp server as helper server

Marcin Romanowski
Ok, I have found solution

"relay": {
  "ip-addresses": [ "192.1.1.1" ]
},

sob., 30 maj 2020 o 19:25 Marcin Romanowski <[hidden email]> napisał(a):
Hello,
I try to run kea as helper dhcp server. this server will be handled few different networks but requests will be coming from other network. 

this is my config:
{ "Dhcp4":
{
    "interfaces-config": {
        "interfaces": [ "ens4" ],
        "dhcp-socket-type": "udp",
        "outbound-interface": "use-routing",
        "re-detect": true
    },

    "sanity-checks": {
        "lease-checks": "fix-del"
    },
    "lease-database": {
        "type": "memfile",
        "lfc-interval": 3600
    },
    "control-socket": {
        "socket-type": "unix",
        "socket-name": "/tmp/kea4-ctrl-socket"
    },
    "valid-lifetime": 4000,
    "renew-timer": 1000,
    "rebind-timer": 2000,
    "echo-client-id": false,
    "match-client-id": false,
    "authoritative": false,

    "subnet4": [
        {
            "pools": [ { "pool": "192.168.49.2 - 192.168.49.120" } ],
            "subnet": "192.168.49.0/25",
     "option-data": [
        {
            "name": "routers",
            "data": "192.168.49.1"
        }
   ],
   "reservations": [
                    {
                        "hw-address": "0C:F4:65:FE:0A:00",
                        "ip-address": "192.168.49.60"
                    }
                ]
        }
    ],

    "loggers": [
          {
            "name": "kea-dhcp4",
              "output_options": [
                  {
                      "output": "/opt/kea/var/log/kea-dhcp4.log",
                      "pattern": "%d{%y.%m.%d %H:%M:%S.%q} %-5p [%c/%i] %m\n"
                  }
              ],
              "severity": "INFO"
          }
      ]
  }

}


when proxy server sends to it DHCPREQUEST :
20.05.30 17:15:24.327 INFO  [kea-dhcp4.hosts/14898] HOSTS_BACKENDS_REGISTERED the following host backend types are available: postgresql
20.05.30 17:15:24.332 INFO  [kea-dhcp4.dhcpsrv/14898] DHCPSRV_CFGMGR_SOCKET_TYPE_SELECT using socket type udp
20.05.30 17:15:24.332 INFO  [kea-dhcp4.dhcpsrv/14898] DHCPSRV_CFGMGR_ADD_IFACE listening on interface ens4
20.05.30 17:15:24.332 INFO  [kea-dhcp4.dhcpsrv/14898] DHCPSRV_CFGMGR_NEW_SUBNET4 a new subnet has been added to configuration: 192.168.49.0/25 with params: t1=1000, t2=2000, valid-lifetime=4000
20.05.30 17:15:24.332 INFO  [kea-dhcp4.commands/14898] COMMAND_ACCEPTOR_START Starting to accept connections via unix domain socket bound to /tmp/kea4-ctrl-socket
20.05.30 17:15:24.333 INFO  [kea-dhcp4.dhcp4/14898] DHCP4_CONFIG_COMPLETE DHCPv4 server has completed configuration: added IPv4 subnets: 1; DDNS: disabled
20.05.30 17:15:24.333 INFO  [kea-dhcp4.dhcpsrv/14898] DHCPSRV_MEMFILE_DB opening memory file lease database: lfc-interval=3600 type=memfile universe=4
20.05.30 17:15:24.333 INFO  [kea-dhcp4.dhcpsrv/14898] DHCPSRV_MEMFILE_LEASE_FILE_LOAD loading leases from file /opt/kea/var/lib/kea/kea-leases4.csv
20.05.30 17:15:24.333 INFO  [kea-dhcp4.dhcpsrv/14898] DHCPSRV_MEMFILE_LFC_SETUP setting up the Lease File Cleanup interval to 3600 sec
20.05.30 17:15:24.333 WARN  [kea-dhcp4.dhcp4/14898] DHCP4_MULTI_THREADING_INFO enabled: no, number of threads: 0, queue size: 0
20.05.30 17:15:24.333 INFO  [kea-dhcp4.dhcp4/14898] DHCP4_STARTED Kea DHCPv4 server version 1.7.8-git started
20.05.30 17:15:45.803 ERROR [kea-dhcp4.bad-packets/14898] DHCP4_PACKET_NAK_0001 [hwtype=1 0c:f4:65:fe:0a:00], cid=[no info], tid=0xd209bb6a: failed to select a subnet for incoming packet, src 10.249.1.202, type DHCPDISCOVER
20.05.30 17:15:46.805 ERROR [kea-dhcp4.bad-packets/14898] DHCP4_PACKET_NAK_0001 [hwtype=1 0c:f4:65:fe:0a:00], cid=[no info], tid=0xd209bb6a: failed to select a subnet for incoming packet, src 10.249.1.202, type DHCPDISCOVER


kea-server is connected to network with address 10.249.2.203 and to this address all requests will be sending. 

How to configure it properly?

Best Regards
Marcin




--
Marcin Romanowski / nicraM



_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.

Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users