Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    DHCP on bridged LAN interface does not work

    Scheduled Pinned Locked Moved DHCP and DNS
    6 Posts 2 Posters 4.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      wacko
      last edited by

      Hi,

      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
      arno

      1 Reply Last reply Reply Quote 0
      • W
        wacko
        last edited by

        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.

        regards
        arno

        1 Reply Last reply Reply Quote 0
        • W
          wacko
          last edited by

          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.

          regards
          Arno

          1 Reply Last reply Reply Quote 0
          • S
            sullrich
            last edited by

            Okay, I did a workaround.  Please test a snapshot a few hours from now.

            1 Reply Last reply Reply Quote 0
            • W
              wacko
              last edited by

              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.

              regards
              Arno

              1 Reply Last reply Reply Quote 0
              • W
                wacko
                last edited by

                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.

                Thanks again!!

                Best regards
                Arno

                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.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.