Different dhcp-relay configurations for different interfaces


I am looking for a solution for the following problem:
I have a vyos-router with several vlan’s which should get their IP’s over unchanging dhcp servers.
I find only the dhcp relay service, which I can assign several interfaces.
So I should be able to start several dhcp-relay services.
Does anyone have an idea how I can realize with Vyos?

Best regards


If you have your interfaces configured correctly you should be able to add multiple DHCP servers to your DHCP relay config;
For example:

VLAN1 = (eth0 & eth2)
VLAN2 = (eth1 & eth3)
DHCP servers: (VLAN1) & (VLAN2)

Clients connected to eth2 (VLAN1) should have their DHCP requests answered by and VLAN2 clients on eth3 by respectively.
Please report back if this is working for you, i will add this as an additional example to the DHCP relay wiki article then.


the answer does not quite meet my problem.
I have the following configuration:

eht0 = (default-route)
eth1.11 =
eth1.12 =

DHCP Server1:
DHCP Server2:

So I need two “dhcrelay” processes and would configure this if this is going through VYOS.

As an alternative I found the file “/opt/vyatta/etc/config/scripts/vyatta-postconfig-bootup.script”.
Here I can configure the DHCP Relays

nohup /usr/sbin/dhcrelay -d -i eth1.11 & nohup /usr/sbin/dhcrelay -d -i eth1.12 &
I would like to avoid this path.
I would like to find a solution like the Cisco IOS where I can configure dhcp-server for each interface (ip helper-address)

Best regards