Hi,
I found some problem when using multiple VLANS over one NIC connected to OpenWRT.
Steps to reproduce:
- OpenWRT prepare two VLAN networks, say
VLAN 1
andVLAN 2
- Get a server with single
NIC
and setVLAN 1
andVLAN 2
on it. - In OpenWRT DHCP set
static lease
for serversNIC VLAN 1
, leave VLAN 2 custom. Also forVLAN 1
andVLAN 2
set different IP ranges, say forVLAN 1
10.0.100.x
and forVLAN 2
10.0.110.x
- Connect OpenWRT with the server through LAN trunk port.
Actual result:
every time after around two days (in my case), DHCP on server stop receiving IP address for VLAN 2
. Syslog on the server have message: dhcp lease lost
. In OpenWRT Status page doesn't show IP for VLAN 2
only for VLAN 1
Expected result:
DHCP properly assign ip address for VLAN 1
and VLAN 2
Possible workaround
set different mac address for VLAN 1
and VLAN 2
Extra info
A temporary workaround is unplug the cable from the server and plug it back. Nothing else works like restarting systemd
on the server, resetting netplan and so on.
So it seems that dhcp on OpenWRT got confused that same mac address is connecting from two VLAN
networks which actually shouldn't be a problem imho, or maybe I'm wrong?