Dhclient fails to get IP address



  • I have a new install of PFSense 2.0.1 as a KVM guest. When the VM boots for the first time, em1 (WAN) fails to get an IP address. When I reboot, I get an IP address. I logged into the console and checked dhclient. I've confirmed that dhclient is running and I see dhclient timing out in /var/log/system.log.

    After I rebooted the VM, I noticed that em1 gets an IP address:
    rc.newwanip: Informational is starting em1.
    rc.newwanip: on (IP address: x.x.x.x) (interface: wan) (real interface: em1).

    I can replicate this problem by halting PFSense and than restarting it.
    I can resolve this problem by rebooting PFSense.



  • Try setting the NIC speed and duplex rather than using auto detect.



  • I suspect the requests aren't getting out of KVM somehow, get some packet captures on the host to see.

    @NOYB:

    Try setting the NIC speed and duplex rather than using auto detect.

    I wouldn't do that, it's almost certain to cause problems unless you have specific indicators it's necessary, and you haven't shown anything to indicate that's the case.



  • I had this problem on a PfSense 2.0.1 as Hyper-V guest. Try if it helps to bring the card down and up again:

    ifconfig em1 down
    ifconfig em1 up
    dhclient em1

    If it does, make a script that does that after booting.

    For me that helped; I wrote it up here.


Log in to reply