`How to set up automatic PPPoE reconnection after rebooting the router at the provider?
A
A
Alexander2014-08-15 10:53:24
linux
Alexander, 2014-08-15 10:53:24

How to set up automatic PPPoE reconnection after rebooting the router at the provider?

The situation is somewhat reminiscent of the question Why do pppoe subscribers “leave” in timeout after a session break on the Mikrotik` side?
A small city, there are several providers providing access to the Internet via the PPPoE protocol. We install small gateways on Linux for our clients, the connection is made using pppd.
The following picture is regularly observed for different providers from the outside:
At some point, apparently, the router (or some intermediate equipment) is rebooted at the provider, as a result of which it is visible on the ppp interface that packets are being sent by the gateway, but there are no incoming packets .
On the physical interface (ethernet) you can see that there are outgoing PPPoE session packets, but no incoming PPPoE session packets. Also, on the physical interface, outgoing and incoming packets of various parasitic traffic of neighboring subscribers are visible (someone has IPX, someone has DHCP, SMB, there is a provider's STP, etc.), i.e. the receiving channel is physically operational.
One gets the impression that the provider's router, which is a PPPoE server, after, apparently, rebooting or changing settings, "forgets" the number of an already established PPPoE session and ignores all traffic of this session.
There are two ways to get around this problem: either restarting pppd, or ip link set down and ip link set up on the physical interface (the equivalent of pulling the cable). The interface state change is detected by pppd and it re-establishes the connection itself.
The pppd settings are set to persist, maxfail 0, and holdoff 15. The problem occurs when there is no carrier loss and the interface does not go down. This happens when there are failures on the routers of providers or when there are switches between the PPPoE server and the gateway.
Providers are impenetrable: first they offer to restart the computer, then the "box" (of course, a regular router will establish a new connection after a reboot). It is almost impossible to influence providers even in the case of legal entities. persons with a tariff 50 times more expensive than that of individuals. persons.
I would like to achieve automatic re-establishment of the PPPoE connection in the event of such a situation.
I don't want to use "ping google once a minute and restart pppd" scripts. This is a crutch.
I've seen pppd's active-filter option, but it's meant to determine when to shutdown ("on-demand" mode) - doesn't seem to work.
It is known that there is always some kind of UDP traffic through the ppp interface (from OpenVPN, internal pings every 10 seconds).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Fumoffu, 2014-08-16
@yaka

Maybe you should pay attention to LCP ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question