The problem: DHCP does not work if the client is in a certain VLAN on the switch
I have a software router (it has 6 Ethernet, one is WAN, the rest in the bridge are LAN)
I decided to move it to another place. I bought two RB260GS switches and configured VLANs for the provider and LAN
The scheme is simple: the provider is in VLAN 10 (Untag port 5), the remaining ports are LAN (Untag vlan 3). The first port of the switch is PoE and uplink to another switch (i.e. on the first port: 3 Untag, 10 Tag). On the second switch, the settings are similar (10 Untag VLAN on port 5, the WAN port of the router goes to it).
Everything works fine, there are PING everywhere. Except DHCP on clients. The DHCP server is located on the router (bind to interface br0). If the client connects directly to one of the router ports, then the DHCP works correct. But if reconnect a client to any other LAN port of the switch (where VLAN id: 3), then it cannot finally get DHCP address. In the logs I have:
Code: Select all
Sep 18 00:02:32 ubuntu dhcpd[128309]: DHCPDISCOVER from 94:de:80:0d:81:fb via br0
Sep 18 00:02:32 ubuntu dhcpd[128309]: DHCPOFFER on 192.168.1.3 to 94:de:80:0d:81:fb via br0
Sep 18 00:02:34 ubuntu dhcpd[128309]: DHCPDISCOVER from 94:de:80:0d:81:fb via br0
Sep 18 00:02:34 ubuntu dhcpd[128309]: DHCPOFFER on 192.168.1.3 to 94:de:80:0d:81:fb via br0
Sep 18 00:02:38 ubuntu dhcpd[128309]: DHCPDISCOVER from 94:de:80:0d:81:fb via br0
Sep 18 00:02:38 ubuntu dhcpd[128309]: DHCPOFFER on 192.168.1.3 to 94:de:80:0d:81:fb via br0
But here are the logs when directly to the router
Code: Select all
Sep 18 08:26:52 ubuntu dhcpd[128309]: DHCPDISCOVER from 94:de:80:0d:81:fb via br0
Sep 18 08:26:52 ubuntu dhcpd[128309]: DHCPOFFER on 192.168.1.3 to 94:de:80:0d:81:fb via br0
Sep 18 08:26:52 ubuntu dhcpd[128309]: DHCPREQUEST for 192.168.1.3 (192.168.1.1) from 94:de:80:0d:81:fb via br0
Sep 18 08:26:52 ubuntu dhcpd[128309]: DHCPACK on 192.168.1.3 to 94:de:80:0d:81:fb via br0
I tried different versions of the DHCP server (dnsmasq and isc-dhcpd) - the result is the same.
At the same time, everything works fine with static ip-addresses. I can see ARP of any device on the LAN. IPv6 worked and still works fine.
On desktop computers, of course, I can set static ip-addresses, but what to do with WiFi? WiFi clients cannot connect (at the stage of obtaining an address from DHCP)
Does anyone know what the problem might be?