Dhclient - automatically renew ip address, how do I do that?
I'm using pfsense inside a virtual machine (virtualbox as it's lightweight and works !) and have connections to several wifi networks in multi-wan, using windows to take care of the usb connections (as I found pfsense sucked bigstyle with usb in the past). Essentially windows does the connecting part, and pfsense just sees emulated intel lan adapters and takes care of ip stack and dhcp, and works it's magic.
Problem is that sometimes I'll lose connectivity for one reason or another, and pfsense isn't very quick (or doesn't seem to at all) try and get fresh dhcp info, so connection goes down and I lose the connection. I read an article related to an older version of pfsense (1.2.3), where it was suggested to dhclient in cron every 15 mins. Is this a good solution? does anybody else have a different solution ?
I'm using the latest stable version from download site on Intel (Toshiba) core2duo laptop.
Problem is that sometimes I'll lose connectivity for one reason or another, and pfsense isn't very quick (or doesn't seem to at all) try and get fresh dhcp info, so connection goes down and I lose the connection.
Perhaps pfSense isn't told (by Link Down event on the emulated NIC) that WiFi association has been lost. (pfSense won't act on something it isn't told about.) You should check the system log (Status -> System Logs) for Link Down events.
I suspect though that you have come upon a fundamental limitation of your configuration: What is between your WiFi adapter and the emulated NIC? If it is a "virtual switch" then I don't see any reason for the virtual switch to pass a "Link down" notification from the USB WiFi adapter to the pfSense emulated NIC.
The log has provided some useful info, thanks for the suggestion, I will look there when I get similar issue going forward.
The emulated NIC is setup as a "bridged" adapter in Virtualbox, with ip stack switched off in windows, windows takes care of connecting, the virtual machine pfsense doing the ip etc.
I know the arguments for dedicated hardware on 'persistent' connections to the CPU, but I'm working with what I have, an ok laptop usb, pcmcia. The advantage of virtualization is that it's less reliant on any particular hardware, laptop breaks, 15 mins later I'm up and running same VM on my other laptop:)
I have one WAN connection on USB, one on mini-pcie, one on motherboard intel wired lan and another on pcmcia (LAN) - the described problem doesn't seem to care about which connection and it seems that a manual "release" and "renew" in interfaces results in the link coming back up, and seems to be the same problem described elsewhere on v1.2.3. The multi-wan in routing has a 5 second timer for link down, which presumably means it's checking if the link is up, and presumably means it will take some action if the link is down, I'm definitely no expert on any of this, but requesting new dhcp credentials on a dhcp wan connection would seem to me quite reasonable and high up the list of things to do?
Adding a dhclient em0, dhclient em2, dhclient em3 to run every 15 mins in cron seems like a sledgehammer to crack a nut, when there might be something much simpler and elegant to solve ?
I'll keep looking at log and ironing things out I find there, in the meantime any suggestions gratefully received - discussion/solutions are useful going forward for those googling "dhclient pfsense wan" etc or whatever, same as I do when I come up against something !
I'm definitely no expert on any of this, but requesting new dhcp credentials on a dhcp wan connection would seem to me quite reasonable and high up the list of things to do?
Your log file might show signs of dhclient already attempting to do this on at least some of your interfaces.
:)Thanks wallabybob, I'll keep an eye on it …