Hi, I’m attempting to use dhcp relay in order to ask my upstream pfsense box for dhcp addresses. I’ve hardcoded eth1’s (management) IP address as 10.10.0.5. I could also set it to dhcp (client) and get the same ip (static map on pfsense). Regardless, I know I can talk to the dhcp service on pfsense when requesting an ip (as proven by eth1). For eth2-8, I have my workstations plugged in. Currently I only have eth2 plugged in. I want to use dhcp-relay to forward these addresses to request dhcp from the upstream pfsense.
Here’s my interfaces:
Interface IP Address S/L Description
eth1 10.10.0.5/16 u/u management
eth2 - u/u port-mb2
eth3 - u/D port-mb3
…
lo 127.0.0.1/8 u/u
::1/128
Here’s my relay config:
dhcp-relay {
interface eth2
interface eth3
…
interface eth1
relay-options {
hop-count 10
max-size 576
relay-agents-packets discard
}
server 10.10.0.1
}
The pfsense box is located at 10.10.0.1. You can see I’ve also included eth1 on my dhcp-relay as apparently the interface you request dhcp from during a relay also has to be included as the wiki/forums state.
Basically, when I request an IP from my station on eth2 (using dhcpcd on linux), it times out. I could really use some advice here. Also worth noting, I have no dhcp server running configured on the vyos box. Does the dhcp server have to be configured in order for dhcp-relay to work? I’m not using a private subnet (yet).
Other configs:
name-server 10.10.0.1
gateway-address 10.10.0.1
Any advice is appreciated. This is my first vyos setup and I’m really hoping I can get this to work because it’s so simple to work with.
Edit:
After getting some help on the IRC, I’ve updated my settings. I’ve bridged my interfaces (except eth1, the management/internet interface). I’ve also added only eth1 (management) and br0 to the dhcp-relay. I’m still having issues as the station on eth2 can’t get an IP unfortunately
interfaces {
bridge br0 {
aging 300
hello-time 2
max-age 20
priority 0
stp false
}
ethernet eth1 {
address 10.10.0.5/16
description management
duplex auto
hw-id ac:1f:6b:03:3f:ee
smp_affinity auto
speed auto
}
ethernet eth2 {
bridge-group {
bridge br0
}
description port-mb2
duplex auto
hw-id ac:1f:6b:03:3f:ef
smp_affinity auto
speed auto
}
ethernet eth3 {
bridge-group {
bridge br0
}
…
}
…
}
service {
dhcp-relay {
interface br0
interface eth1
relay-options {
hop-count 10
max-size 576
relay-agents-packets discard
}
server 10.10.0.1
}
}
system {
gateway-address 10.10.0.1
}