0

I have a Linux machine running kernel version 5.15. I have systemd version 250.5+ installed and I have it configured to run a DHCP server on a physical ethernet port. I have a raspberry pi running the latest version as of today. If I connected the raspberry pi directly to the ethernet port, then the pi gets an IP Address and the 2 devices can communicate fine. If I put an unmanaged switch directly between the 2, DHCP does not work and the raspberry pi does not get an IP address. I know the switch works because I can use it between my home router and a different machine. Since it works without the switch, and the switch works with other devices, why does systemd networkd's DHCP Server fail with a switch?

I don't see anything obvious that I am missing in the documentation for systemd-networkd DHCP Server functionality: https://www.freedesktop.org/software/systemd/man/latest/systemd.network.html

Here is the systemd networkd configuration file I am using for the DHCP Server:

cat /etc/systemd/network/eth0.network
[Match]
Name=eth0
Type=ether

[DHCPV4]
DUIDType=link-layer
ClientIdentifier=mac

[Network]
Address=172.1.16.1/24
DHCPServer=yes
#IPMasquerade=ipv4

[DHCPServer]
PoolOffset=1
PoolSize=4

enter image description here

1
  • 1
    Before blaming the DHCP server, do a little test: put a static IP address on your RPi and check that it is able to communicate with your DHCP server (ping, ssh). Also check the auto-negociated speed.
    – xhienne
    Dec 1, 2023 at 22:40

1 Answer 1

0

Turns out I had to make the link 100Mb/s. DHCP works through the switch if I run the following command and then disconnect, and reconnect the clients to the switch:

ethtool -s eth0 speed 100 duplex full autoneg off

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .