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

    DHCP relay not working in 2.1.1-RELEASE

    Scheduled Pinned Locked Moved DHCP and DNS
    12 Posts 4 Posters 3.4k 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.
    • J
      jkarras
      last edited by

      I had the same issue on two machines when I updated to 2.1.2. I was forced to roll back. Both were using NanoBSD installs.

      1 Reply Last reply Reply Quote 0
      • C
        cmb
        last edited by

        Our office uses DHCP relay no problem, formerly on 2.1.1, on 2.1.2 since before any other system in the world. No issues. Something somehow specific to what you're doing. Can you describe your setup? It looks like maybe it's putting "wan" (friendlyifname I'm guessing) instead of the NIC name (em0, em1_vlan50, etc.) in the dhcrelay command, but I'm not seeing anywhere in the code where it would do that.

        1 Reply Last reply Reply Quote 0
        • J
          jkarras
          last edited by

          I can confirm your observation with the -i wan. I can confirm it does this on my old 2.1.1 setup as well. I rolled back. The only change between the two was to upgrade using the auto updater from 2.1.1 to 2.1.2.

          We have a couple of VLAN interfaces which are our inside, we have a physical interface which is our outside. The vlan interfaces are setup in the dhcprelay the wan interface is not. We  also run the captive portal on the inside interfaces if that makes a difference.

          I noticed that if I tried manually to start dhcprelay without the -i wan statement it launches but doesn't perform its job.

          1 Reply Last reply Reply Quote 0
          • P
            phil.davis
            last edited by

            These pull requests fix at least 1 problem scenario:
            https://github.com/pfsense/pfsense/pull/1078
            https://github.com/pfsense/pfsense/pull/1079

            If the DHCP Relay server is not on any local subnet, and not on any subnet that has an internal static route, but is somewhere that no specific route is known, then this code finds the default gateway and uses that in the DHCP relay "-i" parameter. The current code gets just the interface name (like "wan", "opt1"). But DHCP Relay command needs to be fed the actual device name "vr0", "vr1" etc.
            To break this I simply enabled DHCP Relay, select "LAN" interface, and put Destination Server 1.2.3.4
            Making this changed fixed it.

            As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
            If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

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

              I attach a network diagram, screen log functional relay in version 2.1 and functionless relay in version 2.1.2 and config. pfSense running in VMware. According to the messages in the log I would guess an error when compiling the kernel.

              ![network diagram.PNG](/public/imported_attachments/1/network diagram.PNG)
              ![network diagram.PNG_thumb](/public/imported_attachments/1/network diagram.PNG_thumb)
              config-fw-edu.int-20140414110938.txt

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

                2.1 screen OK

                2.1_relay-OK_services.PNG
                2.1_relay-OK_services.PNG_thumb
                2.1_relay-OK_DHCPlog.PNG
                2.1_relay-OK_DHCPlog.PNG_thumb

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

                  2.1.2 screen Fail

                  2.1.2_relay-Fail_services.PNG
                  2.1.2_relay-Fail_services.PNG_thumb
                  2.1.2_relay-Fail_DHCPlog.PNG
                  2.1.2_relay-Fail_DHCPlog.PNG_thumb

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

                    I guess the kernel compile error by:
                    https://www.freebsd.org/doc/faq/networking.html#idp68375216

                    I tried to repair using MAKEDEV, but this command is missing in pfSense  :( :
                    http://www.unixguide.net/freebsd/faq/12.23.shtml

                    1 Reply Last reply Reply Quote 0
                    • P
                      phil.davis
                      last edited by

                      Don't mess with trying to compile anything. The network diagram you have drawn is exactly the sort of case that has the problem. Your DHCP server is reached across the pfSense WAN (which is an unusual but not invalid configuration). The fix is for exactly that, when the DHCP is to be relayed out the default gateway.
                      https://github.com/pfsense/pfsense/pull/1078/files
                      Make that 1-line change to /etc/inc/services.inc and it should work.

                      As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                      If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

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

                        Thank you very much. It works.

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