Detailed description of ppp disconnection redial parameters in FreeBSD
/****** For ease of search, this article is moved from the Forum ********/
I always think that PPP cannot be reset after it is disconnected.
Recently, I have made a router for my friends. Because it is a rural area and the line quality is poor, the most urgent solution is to repeat the disconnection. After reading the PPP man, I found that the router can be replayed, the most important parameters are as follows:
1. In the ddial mode, this is available on the Internet.
2,
Set redial 0 0
This is a parameter for redial, and is a behavior after a dial failure, rather than a control on disconnected redial transfer that is circulating on the Internet. The first parameter is the waiting time before redial. The second parameter is the number of times that the redial operation will be abandoned and will never be performed again. If it is set to 0, the retry will continue.
3,
Set reconnect 10 0
Same as above, this one is to control the reconnection after disconnection, is to detect what is done after disconnection, pay attention to the difference with the above parameters.
4,
Set echoperiod 15
This is the LCP link query package, which is sent once every 30 seconds by default. If a response is received, the ppp connection is valid. If no response is received, the Service may be disconnected, and then try again.
Previously, we thought that the reason for redialing was not possible here: PPP stipulated that we had to retry five times. If no response was received for five times, it would indicate that the line was disconnected and re-dialing was executed. The default interval is 30 seconds, and the maximum number of 6 times is 3 minutes. The general test can't wait for such a long time, so it is changed to query once every 15 seconds for a total of 1 minute and a half minutes, it's basically tolerable. It can also be changed to a smaller value, but frequent queries will waste some resources. I personally think 15 seconds is enough.
5,
Set lqrperiod 15
Same as above, there are two ways to query the connection status of PPP. in the manual, LQR is preferred under normal circumstances, rather than ECHO. Although ECHO is used in all tests, it is the one mentioned above, however, it is not guaranteed that echo is used elsewhere, so the two are both set to safer.
It's just my personal understanding. You are welcome to talk more.