DHCP on bridged LAN interface does not work
I'm using the latest snapshot (1.2 BETA from 05-27) and have the following problem of which I don't know if I'm doing something wrong or it is supposed to be so or it is an bug:
WAN interface has v.x.y.z/25 public addresses and is set to v.x.y.1
LAN is bridged to WAN and has ip v.x.y.2
DHCP is enabled on LAN with a range within v.x.y.z/25. Everything seems fine so far.
However, the DHCP server is not serving LAN. If I look at the system logs, then I see that the dhcp server serves my other networks (DMZ and POOL - simply two other NATed networks) but not LAN. Even if I look in /var/dhcpd/etc/dhcpd.conf there is no subnet corresponding to my LAN available.
If I remove the bridge, then everything works again fine (after changing all IPs).
So, is this normal? Somehow is does not make sense to me, to not beeing able to hava an DHCP server on a bridged interface…. please advise.
Thanks and greetz
After reading about everything I could find in this forum about DHCP, I think the observed behaviour is related to this here: http://forum.pfsense.org/index.php/topic,4326.0.html . So, if an Interface gets bridged the dhcp of the bridged interface is removed/deactivated.
However, if I bridge WAN with LAN and don't have any upstream DHCP server, one would need the DHCP server on the bridge (WAN/LAN). So it seems that the fix to the problem in the other thread introduced a new bug.
After finding the ticket number (1281) which lead to breaking the functionality of DHCP on LAN (if bridged) I searched CVS and found the corresponding changes etc/inc/services.inc.
if($dhcpif == "lan" && $ifcfg['bridge']) continue;
By uncommenting these lines, I get a nice DHCP server running on my bridge WAN/LAN interface and happily serving ip addresses to all my clients.
I still think this is not an uncommon scenario, i.e. bridging WAN with LAN (public ips) with NO upstream DHCP server available.
Clearly, removing these lines from etc/inc/services.inc results again in the behaviour as described in the other thread. However, the other thread describes an inconvenience.. with these lines, there is lack of functionality.
Okay, I did a workaround. Please test a snapshot a few hours from now.
thnks very much! I noticed already your checkin-message. I'll update this evening, when people are gone, since I'm running already in a production environment.
I update by now to the new snapshot and everything works as expected: DHCP works also in bridged mode, and I get only a warning in the system logs, that DHCP is enable while in bridge mode. Hence, it works fine.
PS: Better workarround for this would be to check if DHCP is enabled on both interfaces of an bridge; in such a case it woul be usefull to deactivate on instance - implementing this would accomplish also the wishes of the other thread through which this situation was introduced.