DHCP relay not working in 2.1.1-RELEASE



  • Hi,

    after upgrade on pfsense 2.1.1 does not work DHCP relay. DHCP Relay service not started. DHCP Relay service not started and in log writes "dhcrelay: Can't attach interface wan to bpf device /dev/bpf0: Device not configured".
    Not sure this is a bug or my ignorance?

    Thanks.



  • same error is also in the 2.1.2 release. In LIVE CD working. HDD does not work. Error occurs in 32bit and 64 bit version. New installation and update.



  • 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.



  • 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.



  • 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.



  • 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.



  • 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



  • 2.1 screen OK






  • 2.1.2 screen Fail






  • 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



  • 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.



  • Thank you very much. It works.


Log in to reply