I'm currently building a homebrew router, with some changes from my previous builds for more flexibility. I'm running an ubuntu server minimal base, network interfaces managed by netplan ,firewalld for firewall management and am trying to use kea for dhcp
The hardware is a mini PC with 5 ports - 2 10 gig, and 3 2.5G. I've had it configured in netplan such that the 2 10 gig ports are named wan and lan, and the 3 2.5 gig pots named eth0-2 to match the physical labels on the hardware. My eventual intended goal is to set up kea to have lan, and ports eth0 and eth1 serving one subnet and eth2 serving a different subnet.
I've tested that with static IPs on clients- setting the router side IP as the default gateway, this works, so I'm fairly certain my firewall rules are sound - I'd be happy to share any settings as needed. I've also gotten this working with a single interface, but I'd like to use more than one. In theory I could bridge them, but i want to get a single subnet working before trying to add a second one on another interface.
For testing purposes, and to try to get a minimal viable product, I'm trying to get lan and eth0 working first.
I've configured lan as 10.0.0.1 and eth0 as 10.0.0.2
I've shared minimal snippets of the kea-dhcp4 conf file below but the full version is here
I've a few issues here. Firstly if I add more than one interface like so
"interfaces-config": {
"interfaces": [ "lan", "eth0" ]
},
It serves only lan, and not eth0. In theory I could bridge them, but I want to serve a different range on eth2 later. It works if I only have eth0 OR lan but not both.
It does seem a valid setup though since if I run sudo kea-dhcp4 -t /etc/kea/kea-dhcp4.conf I get
023-09-17 14:16:33.423 INFO [kea-dhcp4.hosts/1824.139761470586496] HOSTS_BACKENDS_REGISTERED the following host backend types are available: mysql postgresql
2023-09-17 14:16:33.423 WARN [kea-dhcp4.dhcpsrv/1824.139761470586496] DHCPSRV_MT_DISABLED_QUEUE_CONTROL disabling dhcp queue control when multi-threading is enabled.
2023-09-17 14:16:33.423 WARN [kea-dhcp4.dhcp4/1824.139761470586496] DHCP4_RESERVATIONS_LOOKUP_FIRST_ENABLED Multi-threading is enabled and host reservations lookup is always performed first.
2023-09-17 14:16:33.423 INFO [kea-dhcp4.dhcpsrv/1824.139761470586496] DHCPSRV_CFGMGR_ADD_IFACE listening on interface lan
2023-09-17 14:16:33.423 INFO [kea-dhcp4.dhcpsrv/1824.139761470586496] DHCPSRV_CFGMGR_ADD_IFACE listening on interface eth0
2023-09-17 14:16:33.423 INFO [kea-dhcp4.dhcpsrv/1824.139761470586496] DHCPSRV_CFGMGR_SOCKET_TYPE_DEFAULT "dhcp-socket-type" not specified , using default socket type raw
2023-09-17 14:16:33.423 INFO [kea-dhcp4.dhcpsrv/1824.139761470586496] DHCPSRV_CFGMGR_NEW_SUBNET4 a new subnet has been added to configuration: 10.0.0.0/24 with params: t1=900, t2=1800, valid-lifetime=3600
The actual subnet settings are probably useful here to so I have shared them below
"subnet4": [
{
// Subnet identifier should be unique for each subnet.
"id": 1,
// This is mandatory parameter for each subnet.
"subnet": "10.0.0.0/24",
//testing explicit interfaces. Can't do more than 1
//"interface": "eth0"
"pools": [ { "pool": "10.0.0.51 - 10.0.0.200" } ],
"option-data": [
{
"name": "routers",
"data": "10.0.0.1, 10.0.0.2"
}
],
"reservations": [
{
"hw-address": "xx:xx:xx:xx:xx:xx",
"ip-address": "10.0.0.50"
}
]
],
Unfortunately my test client system's running windows - but from what I can tell, Its giving out only the first default gateway, and I suspect that's breaking routing.
Is there any way I can use one or more interfaces with the same subnet?