Purpose

This is a little script which keeps the Internet connection up using 2 alternate and independant ISPs/connections.

Because the main Internet connection (ISP, local line, backbone, peering, whatever) might fail, it will

  1. dial a backup connection in case the main link goes down,
  2. constantly try to re-establish the main connection while the backup connection is up,
  3. close the backup, after the main connection came back online.

It tries to be careful while doing that, to allow unattended operation. It is intended for a computer at home, which must stay connected automatically, to be accessible remotely during a travel of its owner, even in the case of problems with the (main) ISP.

Assumptions

I wrote it for my case, and it thus assumes the following:

However, I think I wrote it so that changing the logic of the program is faily easy, so changing most of the above assumptions should be possible for anybody knowing the basics of Java (or any language roughly like C).

If somebody wants to adopt / extend / generalize the program, feel free to ask me.

Usage

  1. You need a Java VM, compatible with JRE 1.4. (Maybe only 1.1, if you hack the source by reducing functionality.)
  2. Download the source
  3. Edit
  4. Compile it using javac org/bucksch/tools/joffline/JOffline.java
  5. Run it using java org.bucksch.tools.joffline.JOffline under a user account allowed to run the link start/shutdown scripts

Name

Why is it called J-Offline? 2 reasons: