I am setting up a 3G connection to be monitored by
wvdial on a headless machine (raspberryPi/raspbian) which I can only access via the 3G connection once it's live.
In short, supervisor keeps wvdial running, with wvdial autoreconnect off (I read somewhere that wvdial's not too good at reconnecting automatically).
The connection stays up without any problem, but the default route is not always set, in which case I can't access the box.
I can't manually set the route with
sudo route add default ppp0, obviously that won't work once live. I could simply run the above in a script, but since it fails if the route already exists I'd need some error handling, and there has to be some clean way of doing it.
Any hints on the missing config option?
My config (I think these are the relevant files):
[Dialer Defaults] Modem Type = Analog Modem ISDN = 0 Phone = *99# Stupid mode=1 Auto Reconnect = off [Dialer myprovider] Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 Baud = 115200 Modem = /dev/gsmmodem Username = xxxx Password = xxxx
noauth name wvdial defaultroute replacedefaultroute
auto eth0 iface eth0 inet static address 192.168.2.10 netmask 255.255.255.0 gateway 192.168.2.1 dns-nameservers 126.96.36.199 188.8.131.52