Доброго времени суток. Есть у нас чудо провайдер, который использует DHCP(с привязкой к MAC адресу)+ PPTP аутентификацию.
Настройки с которыми windows XP подключается к провайдеру:
Тип сервера: PPP
Транспорты: TCP/IP
Проверка подлинности: PAP
Сжатие:(нет)
IP-адресе сервера:10.128.4.3
IP-адресе клиента:10.64.77.81Freebsd: FreeBSD 8.0-RELEASE-p1, ядро с options NETGRAPH и прочим NETGRAPH_*
mpd-5.4, mpd.conf:
startup:
# configure mpd users
set user foo bar admin
set user foo1 bar1
# configure the console
set console self 127.0.0.1 5005
set console open
# configure the web server
set web self 0.0.0.0 5006
set web open
default:
load pptp_client
pptp_client:
create bundle static B1
set mppc no compress
set bundle no compression
set iface up-script /usr/local/etc/mpd5/if-up.sh
set iface down-script /usr/local/etc/mpd5/if-down.sh
create link static L1 pptp
set link action bundle B1
set auth authname LOGIN
set auth password PASS
set link yes acfcomp protocomp
set link disable chap pap
set link accept chap pap
set link enable no-orig-auth
set link max-redial 0
set link mtu 1460
set link keep-alive 20 75
set pptp peer matrix.vpn
set pptp disable windowing
open
cat /usr/local/etc/mpd5/if-up.sh
#!/bin/sh
default_route_old=`route -n get default 2>&1 | grep gateway | awk '{print $2}'`
if [ $default_route_old ]; then
echo $default_route_old > /var/tmp/default_route_old
route -nq change default $4
else
rm -f /var/tmp/default_route_old
route -nq add default $4
fi
cat /usr/local/etc/mpd5/if-down.sh
#!/bin/sh
# Returning old default gateway from file /var/tmp/default_route_old
if [ -r /var/tmp/default_route_old ]; then
default_route_old=`cat /var/tmp/default_route_old`
rm -f /var/tmp/default_route_old
route -nq change default $default_route_old
else
route -nq delete default
fi
При запуске mpd5, происходит подключение:
[B1] IPCP: LayerUp
[B1] 10.64.77.81 -> 10.128.4.7
[B1] IFACE: Up event
при этом интернета нету, 10.128.4.7 не пингуеться.
ifconfig:
ng0: flags=88d1<UP,POINTOPOINT,RUNNING,NOARP,SIMPLEX,MULTICAST> metric 0 mtu 1460
inet 10.64.77.81 --> 10.128.4.7 netmask 0xffffffff
$netstat -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 10.128.4.7 UGS 0 27374 ng0
10.0.25.0/24 link#1 U 0 0 re0
10.0.25.71 link#1 UHS 0 0 lo0
10.64.77.81 link#5 UHS 0 0 lo0
10.128.4.7 link#5 UH 0 42 ng0
127.0.0.1 link#4 UH 0 0 lo0
192.168.203.0/24 link#2 U 3 23174 em0
192.168.203.7 link#2 UHS 0 0 lo0
Проходит 1-3 минуты и соединение в mpd отваливаться:
[L1] LCP: rec'd Terminate Request #2 (Opened)
[L1] LCP: state change Opened --> Stopping
[L1] Link: Leave bundle "B1"
[B1] Bundle: Status update: up 0 links, total bandwidth 9600 bps
[B1] IPCP: Close event
[B1] IPCP: state change Opened --> Closing
[B1] IPCP: SendTerminateReq #8
[B1] IPCP: LayerDown
[B1] IFACE: Down event
[B1] IPCP: Down event
[B1] IPCP: LayerFinish
[B1] Bundle: No NCPs left. Closing links...
[B1] IPCP: state change Closing --> Initial
[L1] LCP: SendTerminateAck #6
[L1] LCP: LayerDown
[L1] LCP: state change Stopping --> Stopped
[L1] LCP: LayerFinish
[L1] PPTP call terminated
[L1] Link: DOWN event
[L1] LCP: Down event
[L1] LCP: state change Stopped --> Starting
[L1] LCP: LayerStart
И пошел реконект. Подключился, подержал канал 1-3 минуты и отвалился, и так в цикле.
Буду благодарен за любые идеи.