Answer the question
In order to leave comments, you need to log in
How to make a PPPoE connection automatically reconnect on disconnect in ubuntu server?
There is a problem, sometimes the PPPoE connection breaks either because of the connection session, or because of the instability of PPPoE.
How to actually make the connection connect automatically back.
And if it is possible to do something so that the remote host also pongs every half hour, and if there is no response from the server, then reconnect.
Well, if possible, then so that the local interface eth0 also pings the local address of the provider's server and if there is no answer, restart the connection interface.
Added on 08/24/2014 at 22:20 "+2"
#!/bin/bash
# Пингуем нужный сайт, на всякий случай 3 раза
ping -c3 www.ru &>/dev/null
# Если все три пинга провалились
if [ "$?" -ne "0" ]; then
# То опускаем все имеющиеся ppp соединения
poff -a
# И поднимаем нужное
pon providername
fi
# Выходим из скрипта
exit 0
Answer the question
In order to leave comments, you need to log in
Add to pppd config:
persist
lcp-echo-interval 10
lcp-echo-failure 3
Add a view construct to the crontab
Instead of 8.8.8.8 your pinged host, instead of echo "Restart PPPoE" - the command to raise PPPoE
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question