Problem with multiple DHCP servers
-
Hello,
I have a problem related to multiple DHCP servers.
I have 3 LAN interfaces:
- Interface X:
- network 192.168.255.0/24
- DHCP pool 192.168.255.100-192.168.255.254
- access to internet and one one home network resource only
- Interface Y:
- network 10.1.1.0/24
- DHCP pool 10.1.1.100-10.1.1.254
- isolated network with no internet access, access to one home network resource only
- Interface Z:
- network 10.1.2.0/24
- DHCP pool 10.1.2.100-10.1.2.254
- isolated network with no internet access, access to one home network resource only
My problem is that sometimes the hosts are receiving IP addresses from different interfaces. For example host from network X receives IP address from DHCP from interface Y.
How can I prevent this situation? How can I force the hosts to receive the IP addresses only from pool from the interface there are connected to?
-
Sounds like a L2 issue with your switches.
Do you virtualise pfSense ?
I'd do a packet capture using wireshark and look at the DHCP requests & replies.
-
pfSense is virtualized on VMware ESXi. There are 4 network interfaces connected to the pfSense:
- The WAN interface with IP address from home network subnet
2, 3, 4) Virtual interfaces created on ESXi, but not connected to Default switch (default switch is mapped to physical NIC) but to custom switch which is not being mapped to physical NIC.
I would like to mention that I have no problems with isolating the trafic between the subnets, subnet from internet etc. My only issue is that with DHCP.
And writing this message, after reading your message, I probably know where the problem is... I am going to test it and I confirm it.
- The WAN interface with IP address from home network subnet
-
You have all these layer3 networks going to the same vswitch? That's a strange way of doing it. Normally, you create a vswitch for each network and then map one or more physical interfaces to it.
-
I confirm. All virtual NICs were connected to one switch, this switch was not connected to physical NIC of course.
Now I have recreated the setup. Each virtual NIC is connected to separate virtual switch. Problem is gone.
Thank you for your help!