On Tue, Mar 17, 2026 at 08:32:25PM +0100, Kisp??l Zsolt wrote:
> Hello,
> 
> I try to configure OpenBSD 7.8 to act as DHCP relay with multiple
> interfaces.
> 
> I have the following setup: one Internet facing gateway as well as DHCP
> server (hostname: apu4d4) and an internal router (hostname:alix2c3)
> 
> ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? vlan4_192 168.4.254/24
> ??/
> ?? ?? ?? ?? ?? ?? ?? +-----------+ ??+------------------+/
> ?? ?? ?? ?? ?? ?? ?? |?? ?? ?? ?? ?? ??|?? ??192.168.1.0/24?? | |
> INTERNET------+?? APU4D4?? ??+-------------------+vr1?? ALIX2C3
> ??vr0+----vlan5_192.168.5.126/25
> ?? ?? ?? ?? ?? ?? ?? |GW&DHCPsrv |.254?? ?? ?? ?? ?? ?? ??.1| Internal 
> router?? |
> ?? ?? ?? ?? ?? ?? ?? +-----------+ ??+------------------+\
> ??\
> ?? vlan6_192.168.5.254/25
> 
> Config looks like this:
> 
> alix2c3$ cat /etc/hostname.vr1
> media autoselect
> -inet6
> inet 192.168.1.1 255.255.255.0 192.168.1.255
> description ===VLAN_1===
> !route -n add -nostatic -priority 2 default 192.168.1.254
> up
> 
> alix2c3$ cat /etc/hostname.vr0
> media autoselect
> -inet6
> -inet
> description ===Virtualization_VLANs===
> up
> 
> alix2c3$ cat /etc/hostname.vlan4
> inet 192.168.4.254 255.255.255.0 192.168.4.255 parent vr0 vnetid 4
> description ===Interface_VLAN4===
> up
> 
> alix2c3$ cat /etc/hostname.vlan5
> inet 192.168.5.126 255.255.255.128 192.168.5.127 parent vr0 vnetid 5
> description ===Interface_VLAN5===
> up
> 
> alix2c3$ cat /etc/hostname.vlan6
> inet 192.168.5.254 255.255.255.128 192.168.5.255 parent vr0 vnetid 6
> description ===Interface_VLAN6===
> up
> alix2c3$
> 
> I would like to use alix2c3 as DHCP relay for the subnets on vlan4, vlan5
> and vlan6. I found forum posts where more interfaces was provided to
> dhcrelay but I still get an error message:
> 
> alix2c3$ doas dhcrelay -d -i vlan4 -i vlan5 -i vlan6 192.168.1.254
> usage: dhcrelay [-dor] [-C circuit-id] [-R remote-id] -i interface
> ?? ?? ?? ?? destination ...
> 
> Same if I give the interface name instead of the destination DHCP server IP
> 
> alix2c3$ doas dhcrelay -d -i vlan4 -i vlan5 -i vlan6 vr1
> usage: dhcrelay [-dor] [-C circuit-id] [-R remote-id] -i interface
> ?? ?? ?? ?? destination ...
> alix2c3$
> 
> If I give only one interface as then there is no issue.
> 
> What do I do wrong? Does OpenBSD dhcrelay support multiple interfaces at
> all?

no, you have a run a dhcrelay per interface.

cheers,
dlg

Reply via email to