Здравствуйте, дорогие Линуксойды!
Имеется проблема - раз в неделю отваливается интернет на шлюзе.
Для возобновления требуется ручное вмешательство:
# ifdown eth1 && ifup eth1 && sleep 10 && systemctl restart xl2tpd.service
Аналогично при ручном выдергивание кабеля.
WAN (он же eth1) - поднимается и получает IP.
L2TP сервер провайдера и внутренние DNS-ы пингуются - т.е. route add default gw 10.65.16.1 все еще работает
Команда xl2tp переподключения не спасает: systemctl restart xl2tpd.service
Прошу помощи в лечение данного недуга!
Статус xl2tpd.service выдает следующее:
# systemctl status xl2tpd.service
● xl2tpd.service - LSB: layer 2 tunelling protocol daemon
Loaded: loaded (/etc/init.d/xl2tpd)
Active: active (running) since Wed 2017-03-08 05:47:42 CET; 2min 6s ago
Process: 1580 ExecStop=/etc/init.d/xl2tpd stop (code=exited, status=0/SUCCESS)
Process: 1584 ExecStart=/etc/init.d/xl2tpd start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/xl2tpd.service
├─ 805 /usr/sbin/pppd passive nodetach : name 0895239246 debug file /etc/ppp/options.xl2tp /dev/pts/0
├─1351 /usr/sbin/pppd passive nodetach : name 0895239246 debug file /etc/ppp/options.xl2tp /dev/pts/2
└─1588 /usr/sbin/pppd passive nodetach : name 0895239246 debug file /etc/ppp/options.xl2tp /dev/pts/3
Mar 08 05:48:45 cubieboard2 pppd[1588]: Failed to open /dev/pts/3: No such file or directory
Mar 08 05:48:45 cubieboard2 pppd[1588]: Failed to open /dev/pts/3: No such file or directory
Mar 08 05:48:52 cubieboard2 pppd[805]: Failed to open /dev/pts/0: No such file or directory
Mar 08 05:49:08 cubieboard2 pppd[1351]: Failed to open /dev/pts/2: No such file or directory
А при подключенном соединение:
# systemctl status xl2tpd.service
● xl2tpd.service - LSB: layer 2 tunelling protocol daemon
Loaded: loaded (/etc/init.d/xl2tpd)
Active: active (running) since Wed 2017-03-08 05:51:26 CET; 39s ago
Process: 1766 ExecStop=/etc/init.d/xl2tpd stop (code=exited, status=0/SUCCESS)
Process: 1770 ExecStart=/etc/init.d/xl2tpd start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/xl2tpd.service
├─ 805 /usr/sbin/pppd passive nodetach : name 0895239246 debug file /etc/ppp/options.xl2tp /dev/pts/0
├─1351 /usr/sbin/pppd passive nodetach : name 0895239246 debug file /etc/ppp/options.xl2tp /dev/pts/2
├─1588 /usr/sbin/pppd passive nodetach : name 0895239246 debug file /etc/ppp/options.xl2tp /dev/pts/3
├─1773 /usr/sbin/xl2tpd
└─1774 /usr/sbin/pppd passive nodetach : name 0895239246 debug file /etc/ppp/options.xl2tp /dev/pts/4
Mar 08 05:51:30 cubieboard2 pppd[1774]: sent [IPCP ConfReq id=0x3 <addr 196.44.162.116>]
Mar 08 05:51:30 cubieboard2 pppd[1774]: rcvd [IPCP ConfAck id=0x3 <addr 196.44.162.116>]
Mar 08 05:51:30 cubieboard2 pppd[1774]: replacing old default route to eth1 [10.65.16.1]
Mar 08 05:51:30 cubieboard2 pppd[1774]: local IP address 196.44.162.116
Mar 08 05:51:30 cubieboard2 pppd[1774]: remote IP address 194.186.92.72
Mar 08 05:51:30 cubieboard2 pppd[1774]: Script /etc/ppp/ip-up started (pid 1785)
Mar 08 05:51:30 cubieboard2 pppd[1774]: Script /etc/ppp/ip-up finished (pid 1785), status = 0x0
Mar 08 05:51:38 cubieboard2 pppd[1351]: Failed to open /dev/pts/2: No such file or directory
Mar 08 05:51:45 cubieboard2 pppd[1588]: Failed to open /dev/pts/3: No such file or directory
Mar 08 05:51:52 cubieboard2 pppd[805]: Failed to open /dev/pts/0: No such file or directory
# nano /etc/network/interfaces
auto lo eth0 eth1
iface lo inet loopback
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
iface eth1 inet dhcp
up route add default gw 10.65.16.1
# route при потери соединения:
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.65.16.1 0.0.0.0 UG 0 0 0 eth1
10.0.0.0 10.65.16.1 255.0.0.0 UG 0 0 0 eth1
10.65.16.0 * 255.255.248.0 U 0 0 0 eth1
78.107.196.0 10.65.16.1 255.255.252.0 UG 0 0 0 eth1
172.24.0.144 10.65.16.1 255.255.255.240 UG 0 0 0 eth1
172.24.1.64 10.65.16.1 255.255.255.224 UG 0 0 0 eth1
172.24.1.128 10.65.16.1 255.255.255.224 UG 0 0 0 eth1
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
# route при рабочем интернет соединение:
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default * 0.0.0.0 U 0 0 0 ppp0
10.0.0.0 10.65.16.1 255.0.0.0 UG 0 0 0 eth1
10.65.16.0 * 255.255.248.0 U 0 0 0 eth1
78.107.196.0 10.65.16.1 255.255.252.0 UG 0 0 0 eth1
172.24.0.144 10.65.16.1 255.255.255.240 UG 0 0 0 eth1
172.24.1.64 10.65.16.1 255.255.255.224 UG 0 0 0 eth1
172.24.1.128 10.65.16.1 255.255.255.224 UG 0 0 0 eth1
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
vpn253.Khabarov * 255.255.255.255 UH 0 0 0 ppp0
# ifconfig
eth0 Link encap:Ethernet HWaddr 02:ce:07:c1:b2:47
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::ce:7ff:fec1:b247/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7137385 errors:0 dropped:0 overruns:0 frame:0
TX packets:8203776 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:980240331 (934.8 MiB) TX bytes:2499517236 (2.3 GiB)
Interrupt:48
eth1 Link encap:Ethernet HWaddr 00:00:00:00:22:eb
inet addr:10.65.16.2 Bcast:255.255.255.255 Mask:255.255.248.0
inet6 addr: fe80::200:ff:fe00:22eb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4592884 errors:0 dropped:0 overruns:0 frame:0
TX packets:3957696 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2084286962 (1.9 GiB) TX bytes:649918309 (619.8 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:104 (104.0 B) TX bytes:104 (104.0 B)
ppp0 Link encap:Point-to-Point Protocol
inet addr:196.44.162.116 P-t-P:196.186.92.72 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1456 Metric:1
RX packets:4328 errors:0 dropped:0 overruns:0 frame:0
TX packets:3480 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:5293135 (5.0 MiB) TX bytes:306188 (299.0 KiB)
# cat /etc/xl2tpd/xl2tpd.conf
[global]
access control = yes
[lac beeline]
name = 0895239246
lns = tp.internet.beeline.ru
require pap = no
require chap = yes
require authentication = no
redial = yes
redial timeout = 1
max redials = 1000
pppoptfile = /etc/ppp/options.xl2tp
autodial = yes
ppp debug = yes