DHCP not working on second interface



  • We have been trying to setup captive portal. It wasn't working so we have gone back to basics and found the DHCP isn't working on the interface.

    I have an allow all rule in on the firewall for the correct interface and have check the other settings e.g DHCP is enabled, The range is correct and still no luck.

    There is nothing relevant showing the DHCP logs.

    If i set a static IP on my machine it all works as it should be.

    Some advice would be greatly appreciated

    Thanks



  • Do you have DHCP specifically enabled for that interface?  Post your DHCP settings for the interface in question, as well as the firewall rules for it.

    You could always sniff the traffic and see if the DHCP handshaking is happening, and which side isn't responding.



  • Thanks for the speedy reply, Yes DHCP is enabled for that interface.

    Please see attached for the settings

    Edit: Here is the output for wireshark. Looks like pfsense isnt responding





    ![Screenshot (1).png](/public/imported_attachments/1/Screenshot (1).png)
    ![Screenshot (1).png_thumb](/public/imported_attachments/1/Screenshot (1).png_thumb)



  • Looks good so far.  What do you get if you capture on pfSense OPT1?  Does it see the request?



  • This is what i got from PFSense

    ![Screenshot (2).png](/public/imported_attachments/1/Screenshot (2).png)
    ![Screenshot (2).png_thumb](/public/imported_attachments/1/Screenshot (2).png_thumb)


  • LAYER 8 Netgate

    That looks like the interface on the client.

    On your router do a Diagnostics > Packet Capture on OPT2 and try to get a DHCP lease again.



  • That was the packet capture from PFSense, Ive imported it into wireshark

    Sam


  • LAYER 8 Netgate

    Stop and restart the DHCP service or reboot I guess.



  • Have tried that, No luck :(


  • LAYER 8 Netgate

    Anything in the advanced config of the DHCP server?



  • … or the general System log?



  • No there is nothing in the advanced config and here is what i have found in the log:

    Oct 8 09:16:01 php-fpm[33740]: /rc.newwanip: The command '/usr/local/sbin/dhcpd -user dhcpd -group _dhcp -chroot /var/dhcpd -cf /etc/dhcpd.conf -pf /var/run/dhcpd.pid igb1 igb0' returned exit code '1', the output was 'Internet Systems Consortium DHCP Server 4.2.8 Copyright 2004-2015 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Wrote 99 leases to leases file. Listening on BPF/igb0/a0:36:9f:22:4a:48/192.168.26.0/24 Sending on BPF/igb0/a0:36:9f:22:4a:48/192.168.26.0/24 Listening on BPF/igb1/a0:36:9f:22:4a:49/192.168.0.0/24 Sending on BPF/igb1/a0:36:9f:22:4a:49/192.168.0.0/24 Can't bind to dhcp address: Address already in use Please make sure there is no other dhcp server running and that there's no entry for dhcp or bootp in /etc/inetd.conf. Also make sure you are not running HP JetAdmin software, which includes a bootp server. If you did not get this software from ftp.isc.org, please get the latest from ftp.isc.org and install that befor


  • LAYER 8 Global Moderator

    Well seems you got something listening on that interface and you can not bind to it..

    Listening on BPF/igb1/a0:36:9f:22:4a:49/192.168.0.0/24
    Sending on BPF/igb1/a0:36:9f:22:4a:49/192.168.0.0/24 Can't bind to dhcp address: Address already in use



  • Thats what i thought, Im trying to bind to "igb0".  "igb1" is the current LAN which works fine.

    I have tried restarting DHCP and changing the IP range with no luck.


  • LAYER 8 Netgate

    DHCP Relay somehow enabled on that interface?

    See if you somehow you got past the GUI logic.  Disable all your DHCP servers and see if DHCP Relay is enabled?  Just a guess.



  • Just checked and the dhcp relay was not enabled.



  • Check the output of 'sockstat -4', it'll show you which process is bound to that port already.


Log in to reply