• DHCP relay service will not start. Running Sept 14, 2020 dev build and DHCrelay works. Update to latest build and DHCrelay stops working. Not sure what info is needed. I've installed Build Sept 14, 2020 in a VM to verify that it works and stops working after updating to latest build. DHCrelay can be started manually from the command line using full syntax. Can stop with GUI via services and will not restart.


  • @BeingMoody2 Check the logs, system and dhcp for clues.


  • Also seeing this issue, nothing in the logs to indicate the service even tried to start.

    2.5.0-DEVELOPMENT (amd64)
    built on Mon Sep 28 07:01:24 EDT 2020
    FreeBSD 12.2-PRERELEASE

    Edit 2:
    Found this in the system log:
    /services_dhcp_relay.php: No suitable upstream interfaces found for running dhcrelay!

    I have DHCP relay configured on 2 VLAN interfaces for my WiFi networks.


  • The error "No suitable upstream interfaces found for running dhcrelay!" seems to come from the function guess_interface_from_ip($ipaddress) not returning a valid interface for whatever reason. I've yet to track the changes to see what borked it.

    Edit 1:
    guess_interface_from_ip($ipaddress) return $false because route_get($ipaddress) returns array(0) for my LAN network.. the investigation continues..

    php > var_dump(route_get('192.168.11.1'));
    array(1) {
      [0]=>
      array(7) {
        ["destination"]=>
        string(12) "192.168.11.1"
        ["gateway"]=>
        string(6) "link#2"
        ["flags"]=>
        string(3) "UHS"
        ["flags_pretty"]=>
        array(3) {
          [0]=>
          string(2) "up"
          [1]=>
          string(4) "host"
          [2]=>
          string(6) "static"
        }
        ["use"]=>
        int(0)
        ["mtu"]=>
        int(16384)
        ["interface-name"]=>
        string(3) "lo0"
      }
    }
    php > var_dump(route_get('192.168.11.18'));
    array(0) {
    }
    

    Edit2:

    This code should probably handle subnets? 192.168.11.18 is in the 192.168.11.0/24 subnet which there is a route for, but the code just checks if the destination matches.

    $result = array();
    	foreach ($rtable[$family] as $item) {
    		if ($item['destination'] == $target) {
    			$result[] = $item;
    		}
    	}
    

    https://github.com/pfsense/pfsense/commit/c428cdf436cc9e407e64fd550be96bb0ecad3fb3#diff-d45d58361f1c16219dd36fc4951f76db


  • Today Oct 14,2020 updated to latest dev build.
    2.5.0-DEVELOPMENT (amd64)
    built on Wed Oct 14 07:02:29 EDT 2020
    dhcrelay now works correctly without needing any additional work arounds. Not sure what changed from Sept 14th to Oct 14th.


  • DHCP relay does not work for me on a new installation.

    Two networks:
    LAN1(gateway there has access to DHCP server)
    LAN2(has no gateway - should run DHCP relay)

    Previously configured DHCP server on LAN2 interface, is now disabled of course.

    Error:
    /services_dhcp_relay.php: No suitable upstream interfaces found for running dhcrelay!

    Version:
    2.5.0-DEVELOPMENT (amd64)
    built on Wed Dec 09 03:04:22 EST 2020

    Edit:
    Starting dhclient from command line seems to work as expected, DHCP gets forwarded to DHCP, and Client(windows 10) gets a IP from DHCP server (although did not test it thoroughly):
    /usr/local/sbin/dhcrelay –i em0 –iu em1 10.1.0.1

    em0 --> LAN2 --> DHCP relay should listen here
    em1 --> LAN1 --> has gateway, DHCP server behind gateway
    10.1.0.1 --> Windows DHCP server


  • @yomark
    Currently running 2.5.0-DEVELOPMENT (amd64)
    built on Mon Nov 30 01:02:20 EST 2020
    And it's been working for some time. I recommend going back to the oldest snapshot you can find. Otherwise you'll have to create a startup script like I did until they correct this.


  • @yomark Just checked my test VM that has Sept 2020 build and upgraded to lastest Dec 9th and DHCrelay works without issue. Your issue could be something else.


  • @beingmoody2 Tnx for the reply.

    Some more info...
    I've added a new interface to pfSense, and put it "directly" in the network/subnet of the DHCP server.
    DHCP relay now starts from the GUI(it will probably use that interface for relaying as it's closest to the DHCP server).
    I recon this is the most used option, so maybe that is why no a lot of people have problems.

    However, I do not want this interface there.
    If i disable this new interface from pfSense gui. DNS resolver won't start anymore.