Network/internet connectivity issues, dhcp issues, etc after short power outage.



  • I have the latest PfSense installed in a VM on my ESXi host.  The host is a dell poweredge 860 with two integrated gigabit NIC and one PCI gigabit NIC.  The integrated NICs were LAN(NIC2 192.168.1.x) and LAN2(NIC1 10.0.0.x) and the PCI NIC was WAN.  I have a Linksys WRT54gsv1 plugged in to LAN which runs my home network(the only wired connection to this router is my main rig).  The linksys is configured properly for this.  No DHCP, no NAT, not a gateway, etc.  LAN and WAN IPs for it are 192.168.1.1 and 192.168.1.2.  The IP of PfSense LAN is 192.168.1.3 and the IP of my ESXi host is 192.168.1.4.

    After a several second power outage this morning everything broke apparently.  It's now handing out network/internet connectivity on the LAN port but it's giving me a 10.0.0.x IP.

    Throughout all this crap I've been unable to access the PfSense webGUI(192.168.1.3).  I can access my linksys webGUI and my ESXi host via vSphere if I set a static IP on my rig for 192.168.1.x.  I have rebooted my ESXi host, PfSense, and the linksys numerous times.  The ESXi host and the PfSense VM are configured to boot after outage.

    What happened and how do I fix this?

    ETA:  Somehow throughout my initial PfSense setup it assigned NIC2 as LAN and NIC1 as LAN2.  NIC2 is also my ESXI management network.  Apart from having to do some renaming in vSphere Client in order to have them properly identified, this worked fine.  For whatever reason PfSense is DHCPing in reverse for these connections now and I can't access the PfSense webGUI to see what's going on.



  • Re-assigned all my interfaces via vSphere/PfSense CLI.  Everything is back to working like normal, though I have some questions…

    1.  Why did this happen and is there a way to avoid it?  I don't want to spend an hour messing around with PfSense after every power outage.  ETA:  Yes, I'm aware I need a UPS.  I have an APC SmartUPS-1000 sitting at the office that needs a new pair of batteries which I'll be ordering this weekend.  It shouldn't be needed, though.  PfSense should be able to boot without issues after a power outage.  Something clearly went very wrong.

    2.  Is there an easier way to verify which adapters in PfSense are which?  PfSense names them em0, em1, and em2 but vSphere names them vmnic0, vmnic1, and vmnic2.  PfSense and vSphere also have different MAC addresses for them.



  • @opjohnny:

    Re-assigned all my interfaces via vSphere/PfSense CLI.  Everything is back to working like normal, though I have some questions…

    1.  Why did this happen and is there a way to avoid it?  I don't want to spend an hour messing around with PfSense after every power outage.  ETA:  Yes, I'm aware I need a UPS.  I have an APC SmartUPS-1000 sitting at the office that needs a new pair of batteries which I'll be ordering this weekend.  It shouldn't be needed, though.  PfSense should be able to boot without issues after a power outage.  Something clearly went very wrong.

    2.  Is there an easier way to verify which adapters in PfSense are which?  PfSense names them em0, em1, and em2 but vSphere names them vmnic0, vmnic1, and vmnic2.  PfSense and vSphere also have different MAC addresses for them.

    ESXi should give the physical NICs the names vmnic0, vmnic1 and so on  in the order it discovers them, which is hardware dependent.

    The order of em0, em1, etc is related to the order you assign port group connections to pfSense.  So if you have vmnic0 attached to the LAN port group and that's the port group you first assign to pfSense, then pfSense will see that as em0.

    You can see the MAC address of each vmnic under the network adapters section of the ESXi host Configuration tab but these are not the MAC addresses given to the virtual machines - those are "virtual".

    On the power thing, I think you were lucky that ESXi and your VMs recovered from the power failure without issues.  Depending on the nature of the power outage you might also be lucky that the host recovered.



  • I have the pfSense VM set to power up when ESXi does.  This is an actual server, a dell poweredge 860, so I would expect it to boot back up when power is regained.  This stuff is all built in or configurable.

    The problem here is that they didn't recover without issues.  pfSense required all the interfaces to be reconfigured for some reason, and doing that required moving patch cables between the two LAN ports so I could bounce between being able to connect to vSphere, trying to connect to pfSense webGUI, etc.

    I literally spent 3+ hours trying to get the issue resolved and even though it's all back to normal I still don't know what happened, why it happened, and how I can avoid it happening again.  Hooking up my UPS won't matter because once the batteries in it die during a power outage I'll just have the same issue.  For whatever reason a dirty shutdown/reboot breaks pfSense in some form.



  • In this case, I would advice you to add a UPS to your server (even 2, my PowerEdgeT310 has double power supplies) and the package called NUT.
    Also: my pfSense runs directly my PowerEdge (no Sphere thing).

    This gives me a a solid - 8 years - experience with pfSense.
    And yes, in France, even with a 81 % nuclear driven electric grid, we have power outages.



  • I need to keep it in an ESXi VM because I run other VMs and don't want multiple pieces of hardware running.

    I have an APC smartUPS-1000 that I can use but I need to order batteries for it.  I need to research the ways to get ESXi to perform a graceful shutdown when it is running on battery power.  The problem here is that pfSense still wont be gracefully shut down.  For whatever reason a hard shut down breaks it and I need to know why that is, and how to fix it.


Log in to reply