QSCTech/zjunet

ppp0 will disappear

zenozeng opened this issue · 27 comments

xl2tpd version:  xl2tpd-1.3.6
Linux OpenWrt 3.3.8 #74 Sun Jun 23 12:52:20 CST 2013 mips GNU/Linux

好像是因为 ppp dead

在 1.2.5, 1.3.1 以及 1.3.6 重现 (Linux OpenWrt 3.3.8 #74 Sun Jun 23 12:52:20 CST 2013 mips GNU/Linux)

如果尝试换用不同的L2TP服务器,是否还能重现问题?

但是在我的机子上不会有任何问题呀?

对,在我的路由器上也是有这个问题的,换用不同的L2TP服务器似乎才能将就解决。

我试试。

没用呀,小森森。

default 
    nexthop dev ppp0 weight 1 dead
    nexthop dev ppp1 weight 1
10.0.0.0/8 via 10.76.8.1 dev eth0.2 
10.5.1.0/24 via 10.76.8.1 dev eth0.2 
10.5.1.5 dev ppp1  proto kernel  scope link  src 222.205.22.137 
10.10.0.0/24 via 10.76.8.1 dev eth0.2 
10.76.8.0/24 dev eth0.2  proto kernel  scope link  src 10.76.8.61 
10.189.0.0/20 dev wlan1  proto kernel  scope link  src 10.189.5.4 
10.189.128.0/20 dev wlan0-1  proto kernel  scope link  src 10.189.143.227 
58.196.192.0/19 via 10.76.8.1 dev eth0.2 
58.196.224.0/20 via 10.76.8.1 dev eth0.2 
58.200.100.0/24 via 10.76.8.1 dev eth0.2 
192.168.1.0/24 dev br-lan  proto kernel  scope link  src 192.168.1.1 
210.32.0.0/20 via 10.76.8.1 dev eth0.2 
210.32.128.0/19 via 10.76.8.1 dev eth0.2 
210.32.160.0/21 via 10.76.8.1 dev eth0.2 
210.32.168.0/22 via 10.76.8.1 dev eth0.2 
210.32.172.0/23 via 10.76.8.1 dev eth0.2 
210.32.176.0/20 via 10.76.8.1 dev eth0.2 
222.205.0.0/17 via 10.76.8.1 dev eth0.2 

I once came across this problem. Please check the following:

can you see a "10.5.1.5 (or 7 or 9) dev ppp0" route right after dialing up?

This damn auto route causes the problem. All VPN data goes thru this channel, causing some kind of dead loop. I don't know why ZJU L2TP server will cause this kind of route, not happening in other L2TP VPNs.

The solution is:

ip route flush 10.5.1.0/24

immediately after the dialing up!

P.S. This behaviour happens only in some system and some xl2tpd version.

Yeah, I see this right after dialing up:

10.5.1.5 dev ppp1  proto kernel  scope link  src 222.205.22.170 
10.5.1.7 dev ppp0  proto kernel  scope link  src 222.205.111.220 
10.5.6.2 dev ppp6  proto kernel  scope link  src 222.205.26.91 

10.5.1.5 should be fine (kind of peer link in L2TP).

But the 10.5.1.7 is absolutely wrong.

@Hexcles Thanks! It works!

    cache 
    inet 222.205.23.89 peer 10.5.1.5/32 scope global ppp0
    inet 222.205.23.90 peer 10.5.1.5/32 scope global ppp1
10.5.1.5 via 10.76.8.1 dev eth0.2  src 10.76.8.61 
    cache 
10.5.1.7 via 10.76.8.1 dev eth0.2  src 10.76.8.61 
    cache 
10.5.1.9 via 10.76.8.1 dev eth0.2  src 10.76.8.61 
    cache 
    inet 222.205.23.90 peer 10.5.1.5/32 scope global ppp1
10.5.1.5 via 10.76.8.1 dev eth0.2  src 10.76.8.61 
    cache 
10.5.1.7 via 10.76.8.1 dev eth0.2  src 10.76.8.61 
    cache 
10.5.1.9 via 10.76.8.1 dev eth0.2  src 10.76.8.61 
    cache  ipid 0xeb25

又错了,上面那个是ppp0消失分界时的log

local  IP address 222.205.23.90
remote IP address 10.5.1.5
No response to 5 echo-requests
Serial link appears to be disconnected.
Connect time 0.3 minutes.
Sent 0 bytes, received 0 bytes.
Terminating on signal 15
Connection terminated.
Modem hangup

L2TP的log

root@OpenWrt:~# cat /etc/ppp/options
#debug
logfile /dev/null
noipdefault
noaccomp
nopcomp
nocrtscts
lock
maxfail 0
lcp-echo-failure 50
lcp-echo-interval 1

还是挂了,这是这次比较慢。

No response to 50 echo-requests
Serial link appears to be disconnected.
Connect time 1.0 minutes.
Sent 8278 bytes, received 40 bytes.
Terminating on signal 15
Connection terminated.
Modem hangup

看起来还是同一个原因。拨号成功后(即ppp0出现后)把10.5.1.0/24 dev ppp0全都删掉试试看?


Sent from my cellphone.
On 30 Sep 2014 12:31, "Zeno Zeng" notifications@github.com wrote:

No response to 50 echo-requests
Serial link appears to be disconnected.
Connect time 1.0 minutes.
Sent 8278 bytes, received 40 bytes.
Terminating on signal 15
Connection terminated.
Modem hangup


Reply to this email directly or view it on GitHub
#39 (comment).

50%的概率会丢包。而且这个非常奇怪只在播了ppp0再拨ppp1时会发生这个。

现在的路由表:

default 
    nexthop dev ppp2 weight 1
    nexthop dev ppp0 weight 1
10.0.0.0/8 via 10.76.8.1 dev eth0.2 
10.5.1.0/24 via 10.76.8.1 dev eth0.2 
10.10.0.0/24 via 10.76.8.1 dev eth0.2 
10.76.8.0/24 dev eth0.2  proto kernel  scope link  src 10.76.8.61 
10.189.0.0/20 dev wlan1  proto kernel  scope link  src 10.189.5.4 
10.189.128.0/20 dev wlan0-1  proto kernel  scope link  src 10.189.143.227 
58.196.192.0/19 via 10.76.8.1 dev eth0.2 
58.196.224.0/20 via 10.76.8.1 dev eth0.2 
58.200.100.0/24 via 10.76.8.1 dev eth0.2 
192.168.1.0/24 dev br-lan  proto kernel  scope link  src 192.168.1.1 
210.32.0.0/20 via 10.76.8.1 dev eth0.2 
210.32.128.0/19 via 10.76.8.1 dev eth0.2 
210.32.160.0/21 via 10.76.8.1 dev eth0.2 
210.32.168.0/22 via 10.76.8.1 dev eth0.2 
210.32.172.0/23 via 10.76.8.1 dev eth0.2 
210.32.176.0/20 via 10.76.8.1 dev eth0.2 
222.205.0.0/17 via 10.76.8.1 dev eth0.2 

似乎一端时间之后就会好,不知道为什么。

先睡了,四点了,明天再说。

ip route get 10.5.1.5
10.5.1.5 via 10.76.8.1 dev eth0.2  src 10.76.8.61 
    cache 

还是丢包

似乎和网站有关。ping t.cn 就不丢包。

囧 似乎其实已经好了?2 ZJUWLAN 迅雷 1.3 MB/s