2

my first question here.

I'm currently using the 'dhcp-helper' program to do dhcp relay, works fine, but I want to switch to using the systemd-networkd 'RelayTarget' function in the *.network file. I've tried every option I can think of, but can't seem to get it working.

  • Running current Debian stable "bookworm 12" 6.1.0-13-amd64
  • Debian stable runs systemd 252 (252.17-1~deb12u1)

I've tried every option I can think of, no luck yet.

/etc/systemd/network/02-port2-lan0-static.network:

# /etc/systemd/network/02-port2-lan0-static.network # configures lan0 with static ip address # [Match] Name=lan0 [Network] Address=172.16.1.1/24 # do not set gateway or dns, will inherit from system [DHCPServer] ServerAddress=172.16.11.2/24 RelayTarget=172.16.11.2 BindToInterface=no 

Anyone have this working in Debian stable? I realize Debian stable does not run the latest systemd version. This is a production router, so upgrading to testing is not an option.

Thanks

0

2 Answers 2

1

Remove ServerAddress and add this:

[Network] DHCPServer=yes 
0

With this ServerAddress=, you're telling networkd to become 172.16.11.2 and to relay all DHCP requests back to itself. Do not set ServerAddress= at all, or set it to 172.16.1.1/24 (i.e. the router's own address).

1
  • I've tried every combo I can think of, started with just the RelayTarget line, then added the others, none of it worked. Commented Nov 6, 2023 at 17:13

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.