Всем привет
Вопрос по настройке сети, но не в убунте... Просто привычный форум.
Короче пытаюсь сделать замену роутеру. Использую материнку с двумя сетевухами, на борту arm проц, система самосборная, buildroot. Подключаюсь к прову через pptp, в роли которого использую pptp-linux. Суть такая: подключение устанавливается, всё работает, но раз в 10 минут работать перестаёт. Долго бился в поисках, в итоге обнаружил вот что. Пров выдаёт dhcp настройки сроком на 600 секунд. В итоге раз в 10 минут отрабатывает udhcp. И когда отрабатыват, ставит дефолтный маршрут на eth1 вместо ppp0. Как объяснить этому уроду, что этого делать не надо?
ifconfig -abr0 Link encap:Ethernet HWaddr 00:50:C2:27:0B:D1
inet addr:192.168.1.254 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:166256 errors:0 dropped:62 overruns:0 frame:0
TX packets:254792 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11640182 (11.1 MiB) TX bytes:339137551 (323.4 MiB)
eth0 Link encap:Ethernet HWaddr 00:50:C2:27:0B:D1
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:156145 errors:0 dropped:0 overruns:0 frame:0
TX packets:245067 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13145725 (12.5 MiB) TX bytes:332367111 (316.9 MiB)
eth1 Link encap:Ethernet HWaddr 00:50:C2:27:0B:D2
inet addr:10.26.33.68 Bcast:10.26.33.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:247165 errors:0 dropped:0 overruns:0 frame:0
TX packets:167202 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:332274286 (316.8 MiB) TX bytes:17632757 (16.8 MiB)
Interrupt:240 Base address:0x6000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:306 errors:0 dropped:0 overruns:0 frame:0
TX packets:306 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:18686 (18.2 KiB) TX bytes:18686 (18.2 KiB)
mon.wlan0 Link encap:UNSPEC HWaddr F0-7D-68-63-92-AE-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1032 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:125005 (122.0 KiB) TX bytes:0 (0.0 B)
ppp0 Link encap:Point-to-Point Protocol
inet addr:95.xxx.xxx.xxx P-t-P:10.251.0.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1496 Metric:1
RX packets:89410 errors:0 dropped:0 overruns:0 frame:0
TX packets:58057 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:124244413 (118.4 MiB) TX bytes:4027705 (3.8 MiB)
wlan0 Link encap:Ethernet HWaddr F0:7D:68:63:92:AE
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10202 errors:0 dropped:0 overruns:0 frame:0
TX packets:10146 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1466826 (1.3 MiB) TX bytes:7018463 (6.6 MiB)
eth0 смотрит в локалку, объединён в мост с wlan0. eth1 смотрит в провайдера. настройки IP от прова. Через него же работает pptp.
/etc/ppp/peers/gorodtv maxfail 0
defaultroute
pty "pptp vpn.gorodtv.net --timeout 10 --nolaunchpppd"
name vpnXXXXXX
remotename PPTP
file /etc/ppp/options.pptp
ipparam gorodtv
require-mppe-128
/etc/ppp/options.pptplock
noauth
nobsdcomp
nodeflate
persist
refuse-pap
refuse-eap
refuse-chap
refuse-mschap
debug
idle 0
iptables -t nat -L -vChain PREROUTING (policy ACCEPT 3186 packets, 353K bytes)
pkts bytes target prot opt in out source destination
Chain INPUT (policy ACCEPT 993 packets, 152K bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 777 packets, 56004 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 459 packets, 37041 bytes)
pkts bytes target prot opt in out source destination
1683 116K MASQUERADE all -- any ppp0 anywhere anywhere
route -n нормальная таблица маршрутов
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
10.26.33.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
10.251.0.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 br0
192.168.211.28 10.26.33.1 255.255.255.255 UGH 0 0 0 eth1
192.168.211.34 10.26.33.1 255.255.255.255 UGH 0 0 0 eth1
route -n после обновления ip
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.26.33.1 0.0.0.0 UG 0 0 0 eth1
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
10.26.33.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
10.251.0.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 br0
192.168.211.28 10.26.33.1 255.255.255.255 UGH 0 0 0 eth1
192.168.211.34 10.26.33.1 255.255.255.255 UGH 0 0 0 eth1
кусок логаFeb 2 01:31:50 emb3500 daemon.notice pptp[2649]: anon log[decaps_gre:pptp_gre.c:430]: buffering packet 129793 (expecting 129697, lost or reordered)
Feb 2 01:31:51 emb3500 daemon.notice pptp[2649]: anon log[decaps_gre:pptp_gre.c:430]: buffering packet 129794 (expecting 129697, lost or reordered)
Feb 2 01:31:51 emb3500 daemon.notice pptp[2649]: anon log[decaps_gre:pptp_gre.c:430]: buffering packet 129795 (expecting 129697, lost or reordered)
Feb 2 01:31:51 emb3500 daemon.notice pptp[2649]: anon log[decaps_gre:pptp_gre.c:430]: buffering packet 129796 (expecting 129697, lost or reordered)
Feb 2 01:31:51 emb3500 daemon.notice pptp[2649]: anon log[decaps_gre:pptp_gre.c:430]: buffering packet 129797 (expecting 129697, lost or reordered)
Feb 2 01:31:51 emb3500 daemon.notice pptp[2649]: anon log[decaps_gre:pptp_gre.c:430]: buffering packet 129798 (expecting 129697, lost or reordered)
Feb 2 01:31:52 emb3500 daemon.notice pptp[2649]: anon log[decaps_gre:pptp_gre.c:430]: buffering packet 129799 (expecting 129697, lost or reordered)
Feb 2 01:32:30 emb3500 auth.info sshd[3430]: Failed password for root from 222.186.21.90 port 2997 ssh2
Feb 2 01:32:30 emb3500 auth.info sshd[3430]: Failed password for root from 222.186.21.90 port 2997 ssh2
Feb 2 01:32:31 emb3500 auth.info sshd[3430]: Failed password for root from 222.186.21.90 port 2997 ssh2
Feb 2 01:32:31 emb3500 auth.info sshd[3430]: Failed password for root from 222.186.21.90 port 2997 ssh2
Feb 2 01:32:32 emb3500 auth.info sshd[3430]: Failed password for root from 222.186.21.90 port 2997 ssh2
Feb 2 01:32:32 emb3500 daemon.info hostapd: wlan0: STA 4c:0f:6e:ef:26:46 WPA: group key handshake completed (RSN)
Feb 2 01:32:32 emb3500 daemon.info hostapd: wlan0: STA e0:2c:b2:b9:61:c4 WPA: group key handshake completed (RSN)
Feb 2 01:32:32 emb3500 auth.crit sshd[3430]: fatal: Read from socket failed: Connection reset by peer [preauth]
Feb 2 01:32:32 emb3500 daemon.info hostapd: wlan0: STA 80:61:8f:00:d5:fb WPA: group key handshake completed (RSN)
Feb 2 01:32:46 emb3500 auth.info sshd[3440]: Failed password for root from 222.186.21.90 port 3906 ssh2
Feb 2 01:32:47 emb3500 auth.info sshd[3440]: Failed password for root from 222.186.21.90 port 3906 ssh2
Feb 2 01:32:47 emb3500 auth.info sshd[3440]: Failed password for root from 222.186.21.90 port 3906 ssh2
Feb 2 01:32:48 emb3500 auth.info sshd[3440]: Failed password for root from 222.186.21.90 port 3906 ssh2
Feb 2 01:32:48 emb3500 auth.info sshd[3440]: Failed password for root from 222.186.21.90 port 3906 ssh2
Feb 2 01:32:49 emb3500 auth.crit sshd[3440]: fatal: Read from socket failed: Connection reset by peer [preauth]
Feb 2 01:32:50 emb3500 daemon.info udhcpc[2451]: Sending renew...
Feb 2 01:33:42 emb3500 daemon.info dnsmasq[226]: reading /etc/resolv.conf
Feb 2 01:33:42 emb3500 daemon.info dnsmasq[226]: using nameserver 192.168.10.21#53
Feb 2 01:33:42 emb3500 daemon.info dnsmasq[226]: using nameserver 193.107.102.17#53
Feb 2 01:34:05 emb3500 daemon.info udhcpc[2451]: Sending renew...
Feb 2 01:34:37 emb3500 daemon.info dnsmasq[226]: reading /etc/resolv.conf
Feb 2 01:34:37 emb3500 daemon.info dnsmasq[226]: using nameserver 192.168.10.21#53
Feb 2 01:34:37 emb3500 daemon.info dnsmasq[226]: using nameserver 193.107.102.17#53
Feb 2 01:34:40 emb3500 daemon.info dnsmasq[226]: reading /etc/resolv.conf
Feb 2 01:34:40 emb3500 daemon.info dnsmasq[226]: using nameserver 192.168.10.21#53
Feb 2 01:34:40 emb3500 daemon.info dnsmasq[226]: using nameserver 193.107.102.17#53
Feb 2 01:34:42 emb3500 daemon.info udhcpc[2451]: Sending renew...
Feb 2 01:34:43 emb3500 daemon.info udhcpc[2451]: Lease of 10.26.33.68 obtained, lease time 600
Feb 2 01:34:46 emb3500 daemon.info dnsmasq[226]: reading /etc/resolv.conf
Feb 2 01:34:46 emb3500 daemon.info dnsmasq[226]: using nameserver 192.168.10.21#53
Feb 2 01:34:46 emb3500 daemon.info dnsmasq[226]: using nameserver 193.107.102.17#53
Feb 2 01:34:52 emb3500 daemon.info dnsmasq[226]: reading /etc/resolv.conf
Feb 2 01:34:52 emb3500 daemon.info dnsmasq[226]: using nameserver 192.168.10.21#53
Feb 2 01:34:52 emb3500 daemon.info dnsmasq[226]: using nameserver 193.107.102.17#53
Feb 2 01:35:12 emb3500 daemon.info dnsmasq[226]: reading /etc/resolv.conf
Feb 2 01:35:12 emb3500 daemon.info dnsmasq[226]: using nameserver 192.168.10.21#53
Feb 2 01:35:12 emb3500 daemon.info dnsmasq[226]: using nameserver 193.107.102.17#53
И вот после Sending renew... ломается таблица маршрутов...