Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to figure out the best way to have the wifi adapter reconnect to a wireless network after it's been disconnected.

When the wifi connection is lost (due to the AP rebooting, or a weak signal, etc.), I have to manually reconnect the wifi connection (via ifdown, then ifup). If I'm really lazy, I just turn off the machine and turn it back on (there's no monitor or keyboard attached to it). I'm wondering if there's an automated way to do this, without having to log in everytime? e.g. is there some sort of daemon that actively checks for a wifi/lan/internet connection, then reconnects to the wifi AP?

I've looked on google for a solution but every solution seems to be a graphical interface, and I'm not running a graphical interface; I'm simply running a (debian) server that I remotely ssh into. In other words, I'm looking for a command-line only solution.

share|improve this question

closed as off topic by Chopper3, womble, mulaz, Dave M, Jacob Jul 9 '12 at 15:39

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

1 Answer

A cronjob, run every minute, to ping the default gateway and jiggle the interface if the ping fails would be a suitably low-tech way of doing the job.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.