Провайдер установил ограничение на длинну сессии и раз в сутки принудительно рвет связь. Доступ организован через PPPoE, в качестве клиента - mpd5 (FreeBSD 8). Проблема: после обрыва сессии mpd не может подключиться обратно, ошибка: IFACE: Adding IPv4 address to ng0 failed: File existsВот лог mpd
После второй попытки подключаться больше не пытается
Помогите, плз, разобраться, что не так?Mar 27 16:16:36 neo mpd: [B1] IPCP: LayerUp
Mar 27 16:16:36 neo mpd: [B1] 89.112.xxx.xxx -> 81.9.101.116
Mar 27 16:16:36 neo mpd: [B1] IFACE: Up event
Mar 28 17:16:35 neo mpd: [L1] LCP: rec'd Terminate Request #61 (Opened)
Mar 28 17:16:35 neo mpd: [L1] LCP: state change Opened --> Stopping
Mar 28 17:16:35 neo mpd: [L1] Link: Leave bundle "B1"
Mar 28 17:16:35 neo mpd: [B1] Bundle: Status update: up 0 links, total bandwidth 9600 bps
Mar 28 17:16:35 neo mpd: [B1] IPCP: Close event
Mar 28 17:16:35 neo mpd: [B1] IPCP: state change Opened --> Closing
Mar 28 17:16:35 neo mpd: [B1] IPCP: SendTerminateReq #8
Mar 28 17:16:35 neo mpd: [B1] IPCP: LayerDown
Mar 28 17:16:35 neo mpd: [B1] IFACE: Down event
Mar 28 17:16:35 neo mpd: [B1] IPCP: Down event
Mar 28 17:16:35 neo mpd: [B1] IPCP: LayerFinish
Mar 28 17:16:35 neo mpd: [B1] Bundle: No NCPs left. Closing links...
Mar 28 17:16:35 neo mpd: [B1] IPCP: state change Closing --> Initial
Mar 28 17:16:35 neo mpd: [L1] LCP: SendTerminateAck #5
Mar 28 17:16:35 neo mpd: [L1] LCP: LayerDown
Mar 28 17:16:35 neo mpd: [L1] PPPoE: connection closed
Mar 28 17:16:35 neo mpd: [L1] Link: DOWN event
Mar 28 17:16:35 neo mpd: [L1] LCP: Down event
Mar 28 17:16:35 neo mpd: [L1] LCP: state change Stopping --> Starting
Mar 28 17:16:35 neo mpd: [L1] Link: reconnection attempt 1 in 3 seconds
Mar 28 17:16:38 neo mpd: [L1] Link: reconnection attempt 1
Mar 28 17:16:38 neo mpd: [L1] PPPoE: Connecting to ''
Mar 28 17:16:38 neo mpd: PPPoE: rec'd ACNAME "BRAS2"
Mar 28 17:16:38 neo mpd: [L1] PPPoE: connection successful
Mar 28 17:16:38 neo mpd: [L1] Link: UP event
Mar 28 17:16:38 neo mpd: [L1] LCP: Up event
Mar 28 17:16:38 neo mpd: [L1] LCP: state change Starting --> Req-Sent
Mar 28 17:16:38 neo mpd: [L1] LCP: SendConfigReq #6
Mar 28 17:16:38 neo mpd: [L1] PROTOCOMP
Mar 28 17:16:38 neo mpd: [L1] MRU 1492
Mar 28 17:16:38 neo mpd: [L1] MAGICNUM 2d717508
Mar 28 17:16:38 neo mpd: [L1] LCP: rec'd Configure Reject #6 (Req-Sent)
Mar 28 17:16:38 neo mpd: [L1] PROTOCOMP
Mar 28 17:16:38 neo mpd: [L1] LCP: SendConfigReq #7
Mar 28 17:16:38 neo mpd: [L1] MRU 1492
Mar 28 17:16:38 neo mpd: [L1] MAGICNUM 2d717508
Mar 28 17:16:38 neo mpd: [L1] LCP: rec'd Configure Ack #7 (Req-Sent)
Mar 28 17:16:38 neo mpd: [L1] MRU 1492
Mar 28 17:16:38 neo mpd: [L1] MAGICNUM 2d717508
Mar 28 17:16:38 neo mpd: [L1] LCP: state change Req-Sent --> Ack-Rcvd
Mar 28 17:16:39 neo mpd: [L1] LCP: rec'd Configure Request #1 (Ack-Rcvd)
Mar 28 17:16:39 neo mpd: [L1] MRU 1492
Mar 28 17:16:39 neo mpd: [L1] AUTHPROTO CHAP MD5
Mar 28 17:16:39 neo mpd: [L1] MAGICNUM 73c95253
Mar 28 17:16:39 neo mpd: [L1] LCP: SendConfigAck #1
Mar 28 17:16:39 neo mpd: [L1] MRU 1492
Mar 28 17:16:39 neo mpd: [L1] AUTHPROTO CHAP MD5
Mar 28 17:16:39 neo mpd: [L1] MAGICNUM 73c95253
Mar 28 17:16:39 neo mpd: [L1] LCP: state change Ack-Rcvd --> Opened
Mar 28 17:16:39 neo mpd: [L1] LCP: auth: peer wants CHAP, I want nothing
Mar 28 17:16:39 neo mpd: [L1] LCP: LayerUp
Mar 28 17:16:39 neo mpd: [L1] CHAP: rec'd CHALLENGE #2 len: 21
Mar 28 17:16:39 neo mpd: [L1] Name: ""
Mar 28 17:16:39 neo mpd: [L1] CHAP: Using authname "xxx"
Mar 28 17:16:39 neo mpd: [L1] CHAP: sending RESPONSE #2 len: 26
Mar 28 17:16:39 neo mpd: [L1] CHAP: rec'd SUCCESS #2 len: 4
Mar 28 17:16:39 neo mpd: [L1] LCP: authorization successful
Mar 28 17:16:39 neo mpd: [L1] Link: Matched action 'bundle "B1" ""'
Mar 28 17:16:39 neo mpd: [L1] Link: Join bundle "B1"
Mar 28 17:16:39 neo mpd: [B1] Bundle: Status update: up 1 link, total bandwidth 64000 bps
Mar 28 17:16:39 neo mpd: [B1] IPCP: Open event
Mar 28 17:16:39 neo mpd: [B1] IPCP: state change Initial --> Starting
Mar 28 17:16:39 neo mpd: [B1] IPCP: LayerStart
Mar 28 17:16:39 neo mpd: [B1] IPCP: Up event
Mar 28 17:16:39 neo mpd: [B1] IPCP: state change Starting --> Req-Sent
Mar 28 17:16:39 neo mpd: [B1] IPCP: SendConfigReq #9
Mar 28 17:16:39 neo mpd: [B1] IPADDR 10.19.190.206
Mar 28 17:16:39 neo mpd: [B1] COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
Mar 28 17:16:39 neo mpd: [B1] IPCP: rec'd Configure Request #0 (Req-Sent)
Mar 28 17:16:39 neo mpd: [B1] IPADDR 81.9.101.122
Mar 28 17:16:39 neo mpd: [B1] 81.9.101.122 is OK
Mar 28 17:16:39 neo mpd: [B1] IPCP: SendConfigAck #0
Mar 28 17:16:39 neo mpd: [B1] IPADDR 81.9.101.122
Mar 28 17:16:39 neo mpd: [B1] IPCP: state change Req-Sent --> Ack-Sent
Mar 28 17:16:39 neo mpd: [B1] IPCP: rec'd Configure Reject #9 (Ack-Sent)
Mar 28 17:16:39 neo mpd: [B1] COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
Mar 28 17:16:39 neo mpd: [B1] IPCP: SendConfigReq #10
Mar 28 17:16:39 neo mpd: [B1] IPADDR 10.19.190.206
Mar 28 17:16:39 neo mpd: [B1] IPCP: rec'd Configure Nak #9 (Ack-Sent)
Mar 28 17:16:39 neo mpd: [B1] Wrong id#, expecting 10
Mar 28 17:16:39 neo mpd: [B1] IPCP: rec'd Configure Nak #10 (Ack-Sent)
Mar 28 17:16:39 neo mpd: [B1] IPADDR 89.112.xxx.xxx
Mar 28 17:16:39 neo mpd: [B1] 89.112.xxx.xxx is OK
Mar 28 17:16:39 neo mpd: [B1] IPCP: SendConfigReq #11
Mar 28 17:16:39 neo mpd: [B1] IPADDR 89.112.xxx.xxx
Mar 28 17:16:39 neo mpd: [B1] IPCP: rec'd Configure Ack #11 (Ack-Sent)
Mar 28 17:16:39 neo mpd: [B1] IPADDR 89.112.xxx.xxx
Mar 28 17:16:39 neo mpd: [B1] IPCP: state change Ack-Sent --> Opened
Mar 28 17:16:39 neo mpd: [B1] IPCP: LayerUp
Mar 28 17:16:39 neo mpd: [B1] 89.112.xxx.xxx -> 81.9.101.122
Mar 28 17:16:39 neo mpd: [B1] IFACE: Adding IPv4 address to ng0 failed: File exists
Mar 28 17:16:39 neo mpd: [B1] IFACE: IfaceChangeAddr() error, closing IPCP
Mar 28 17:16:39 neo mpd: [B1] IPCP: parameter negotiation failed
Mar 28 17:16:39 neo mpd: [B1] IPCP: state change Opened --> Stopping
Mar 28 17:16:39 neo mpd: [B1] IPCP: SendTerminateReq #12
Mar 28 17:16:39 neo mpd: [B1] IPCP: LayerDown
Mar 28 17:16:39 neo mpd: [L1] LCP: rec'd Terminate Request #3 (Opened)
Mar 28 17:16:39 neo mpd: [L1] LCP: state change Opened --> Stopping
Mar 28 17:16:39 neo mpd: [L1] Link: Leave bundle "B1"
Mar 28 17:16:39 neo mpd: [B1] Bundle: Status update: up 0 links, total bandwidth 9600 bps
Mar 28 17:16:39 neo mpd: [B1] IPCP: Close event
Mar 28 17:16:39 neo mpd: [B1] IPCP: state change Stopping --> Closing
Mar 28 17:16:39 neo mpd: [B1] IPCP: Down event
Mar 28 17:16:39 neo mpd: [B1] IPCP: LayerFinish
Mar 28 17:16:39 neo mpd: [B1] Bundle: No NCPs left. Closing links...
Mar 28 17:16:39 neo mpd: [B1] IPCP: state change Closing --> Initial
Mar 28 17:16:39 neo mpd: [L1] LCP: SendTerminateAck #8
Mar 28 17:16:39 neo mpd: [L1] LCP: LayerDown
Mar 28 17:16:39 neo mpd: [B1] rec'd LCP Terminate Request #4 on MP link! (ignoring)
Mar 28 17:16:39 neo mpd: [L1] PPPoE: connection closed
Mar 28 17:16:39 neo mpd: [L1] Link: DOWN event
Mar 28 17:16:39 neo mpd: [L1] LCP: Down event
Mar 28 17:16:39 neo mpd: [L1] LCP: state change Stopping --> Starting
Mar 28 17:16:39 neo mpd: [L1] Link: reconnection attempt 1 in 1 seconds
Mar 28 17:16:40 neo mpd: [L1] Link: reconnection attempt 1
Mar 28 17:16:40 neo mpd: [L1] PPPoE: Connecting to ''
Mar 28 17:16:40 neo mpd: PPPoE: rec'd ACNAME "GW077-246"
Mar 28 17:16:40 neo mpd: [L1] PPPoE: connection successful
Mar 28 17:16:40 neo mpd: [L1] Link: UP event
Mar 28 17:16:40 neo mpd: [L1] LCP: Up event
Mar 28 17:16:40 neo mpd: [L1] LCP: state change Starting --> Req-Sent
Mar 28 17:16:40 neo mpd: [L1] LCP: SendConfigReq #9
Mar 28 17:16:40 neo mpd: [L1] PROTOCOMP
Mar 28 17:16:40 neo mpd: [L1] MRU 1492
Mar 28 17:16:40 neo mpd: [L1] MAGICNUM 1b5b1d42
Mar 28 17:16:40 neo mpd: [L1] LCP: rec'd Configure Request #207 (Req-Sent)
Mar 28 17:16:40 neo mpd: [L1] MRU 1492
Mar 28 17:16:40 neo mpd: [L1] AUTHPROTO CHAP MD5
Mar 28 17:16:40 neo mpd: [L1] MAGICNUM 493c7ea2
Mar 28 17:16:40 neo mpd: [L1] LCP: SendConfigAck #207
Mar 28 17:16:40 neo mpd: [L1] MRU 1492
Mar 28 17:16:40 neo mpd: [L1] AUTHPROTO CHAP MD5
Mar 28 17:16:40 neo mpd: [L1] MAGICNUM 493c7ea2
Mar 28 17:16:40 neo mpd: [L1] LCP: state change Req-Sent --> Ack-Sent
Mar 28 17:16:40 neo mpd: [L1] LCP: rec'd Configure Ack #9 (Ack-Sent)
Mar 28 17:16:40 neo mpd: [L1] PROTOCOMP
Mar 28 17:16:40 neo mpd: [L1] MRU 1492
Mar 28 17:16:40 neo mpd: [L1] MAGICNUM 1b5b1d42
Mar 28 17:16:40 neo mpd: [L1] LCP: state change Ack-Sent --> Opened
Mar 28 17:16:40 neo mpd: [L1] LCP: auth: peer wants CHAP, I want nothing
Mar 28 17:16:40 neo mpd: [L1] LCP: LayerUp
Mar 28 17:16:40 neo mpd: [L1] CHAP: rec'd CHALLENGE #4 len: 37
Mar 28 17:16:40 neo mpd: [L1] Name: "GW077-246"
Mar 28 17:16:40 neo mpd: [L1] CHAP: Using authname "xxx"
Mar 28 17:16:40 neo mpd: [L1] CHAP: sending RESPONSE #4 len: 26
Mar 28 17:16:41 neo mpd: [L1] CHAP: rec'd SUCCESS #4 len: 4
Mar 28 17:16:41 neo mpd: [L1] LCP: authorization successful
Mar 28 17:16:41 neo mpd: [L1] Link: Matched action 'bundle "B1" ""'
Mar 28 17:16:41 neo mpd: [L1] Link: Join bundle "B1"
Mar 28 17:16:41 neo mpd: [B1] Bundle: Status update: up 1 link, total bandwidth 64000 bps
Mar 28 17:16:41 neo mpd: [B1] IPCP: Open event
Mar 28 17:16:41 neo mpd: [B1] IPCP: state change Initial --> Starting
Mar 28 17:16:41 neo mpd: [B1] IPCP: LayerStart
Mar 28 17:16:41 neo mpd: [B1] IPCP: Up event
Mar 28 17:16:41 neo mpd: [B1] IPCP: state change Starting --> Req-Sent
Mar 28 17:16:41 neo mpd: [B1] IPCP: SendConfigReq #13
Mar 28 17:16:41 neo mpd: [B1] IPADDR 10.19.190.206
Mar 28 17:16:41 neo mpd: [B1] COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
Mar 28 17:16:41 neo mpd: [B1] IPCP: rec'd Configure Reject #13 (Req-Sent)
Mar 28 17:16:41 neo mpd: [B1] COMPPROTO VJCOMP, 16 comp. channels, no comp-cid
Mar 28 17:16:41 neo mpd: [B1] IPCP: SendConfigReq #14
Mar 28 17:16:41 neo mpd: [B1] IPADDR 10.19.190.206
Mar 28 17:16:41 neo mpd: [B1] IPCP: rec'd Configure Nak #14 (Req-Sent)
Mar 28 17:16:41 neo mpd: [B1] IPADDR 89.112.xxx.xxx
Mar 28 17:16:41 neo mpd: [B1] 89.112.xxx.xxx is OK
Mar 28 17:16:41 neo mpd: [B1] IPCP: SendConfigReq #15
Mar 28 17:16:41 neo mpd: [B1] IPADDR 89.112.xxx.xxx
Mar 28 17:16:41 neo mpd: [B1] IPCP: rec'd Configure Ack #15 (Req-Sent)
Mar 28 17:16:41 neo mpd: [B1] IPADDR 89.112.xxx.xxx
Mar 28 17:16:41 neo mpd: [B1] IPCP: state change Req-Sent --> Ack-Rcvd
Mar 28 17:16:41 neo mpd: [B1] IPCP: rec'd Configure Request #184 (Ack-Rcvd)
Mar 28 17:16:41 neo mpd: [B1] IPADDR 81.9.101.117
Mar 28 17:16:41 neo mpd: [B1] 81.9.101.117 is OK
Mar 28 17:16:41 neo mpd: [B1] IPCP: SendConfigAck #184
Mar 28 17:16:41 neo mpd: [B1] IPADDR 81.9.101.117
Mar 28 17:16:41 neo mpd: [B1] IPCP: state change Ack-Rcvd --> Opened
Mar 28 17:16:41 neo mpd: [B1] IPCP: LayerUp
Mar 28 17:16:41 neo mpd: [B1] 89.112.xxx.xxx -> 81.9.101.117
Mar 28 17:16:41 neo mpd: [B1] IFACE: Adding IPv4 address to ng0 failed: File exists
Mar 28 17:16:41 neo mpd: [B1] IFACE: IfaceChangeAddr() error, closing IPCP
Mar 28 17:16:41 neo mpd: [B1] IPCP: parameter negotiation failed
Mar 28 17:16:41 neo mpd: [B1] IPCP: state change Opened --> Stopping
Mar 28 17:16:41 neo mpd: [B1] IPCP: SendTerminateReq #16
Mar 28 17:16:41 neo mpd: [B1] IPCP: LayerDown
Mar 28 17:16:41 neo mpd: [B1] IPCP: rec'd Terminate Ack #16 (Stopping)
Mar 28 17:16:41 neo mpd: [B1] IPCP: state change Stopping --> Stopped
Mar 28 17:16:41 neo mpd: [B1] IPCP: LayerFinish
Mar 28 17:16:41 neo mpd: [B1] Bundle: No NCPs left. Closing links...
Mar 28 17:16:41 neo mpd: [B1] Bundle: closing link "L1"...
Mar 28 17:16:41 neo mpd: [L1] Link: CLOSE event
Mar 28 17:16:41 neo mpd: [L1] LCP: Close event
Mar 28 17:16:41 neo mpd: [L1] LCP: state change Opened --> Closing
Mar 28 17:16:41 neo mpd: [L1] Link: Leave bundle "B1"
Mar 28 17:16:41 neo mpd: [B1] Bundle: Status update: up 0 links, total bandwidth 9600 bps
Mar 28 17:16:41 neo mpd: [B1] IPCP: Close event
Mar 28 17:16:41 neo mpd: [B1] IPCP: state change Stopped --> Closed
Mar 28 17:16:41 neo mpd: [B1] IPCP: Down event
Mar 28 17:16:41 neo mpd: [B1] IPCP: state change Closed --> Initial
Mar 28 17:16:41 neo mpd: [L1] LCP: SendTerminateReq #10
Mar 28 17:16:41 neo mpd: [L1] LCP: LayerDown
Mar 28 17:16:41 neo mpd: [L1] LCP: rec'd Terminate Ack #10 (Closing)
Mar 28 17:16:41 neo mpd: [L1] LCP: state change Closing --> Closed
Mar 28 17:16:41 neo mpd: [L1] LCP: LayerFinish
Mar 28 17:16:41 neo mpd: [L1] Link: DOWN event
Mar 28 17:16:41 neo mpd: [L1] LCP: Down event
Mar 28 17:16:41 neo mpd: [L1] LCP: state change Closed --> Initial
такое может быть когда после первого подключения дефолтный маршрут не удаляется из таблицы.
Т.е. первый раз подключились и получили такой мрашрут:
10.10.0.1 10.10.0.236 UH 0 0 ng1
Линк упал, маршрут еще в таблице, линк поднимается повторно и мпд снова пытается этот маршрут добавить и получает сообщение об ошибке.
Пробуйте удалять маршрут через down-script в мпд.
>такое может быть когда после первого подключения дефолтный маршрут не удаляется из
>таблицы.
>Т.е. первый раз подключились и получили такой мрашрут:
> 10.10.0.1 10.10.0.236
> UH
> 0
> 0 ng1
>Линк упал, маршрут еще в таблице, линк поднимается повторно и мпд снова
>пытается этот маршрут добавить и получает сообщение об ошибке.
>Пробуйте удалять маршрут через down-script в мпд.Забыл сказать сразу, up-down скрипты использую такие:
up.sh
#!/bin/sh
route delete $4
route add $4 GATEWAY
route delete default
route add default $4
echo $4 > /tmp/ipdown.sh
#!/bin/sh
$ip=`cat /tmp/ip`
route delete $ip
route delete default
route add default GATEWAY
rm -f /tmp/ip
>такое может быть когда после первого подключения дефолтный маршрут не удаляется из
>таблицы.
>Т.е. первый раз подключились и получили такой мрашрут:
> 10.10.0.1 10.10.0.236
> UH
> 0
> 0 ng1
>Линк упал, маршрут еще в таблице, линк поднимается повторно и мпд снова
>пытается этот маршрут добавить и получает сообщение об ошибке.
>Пробуйте удалять маршрут через down-script в мпд.здесь проблема не в маршруте, а в том что на момент переподключения на интерфейсе еще существуют настройки предыдущей сессии.
имхо т.с переподключается слишком быстро)))
мпд сам должен обнулить ng0 но почему-то не делает, или не успевает сделать.
>[оверквотинг удален]
>>Линк упал, маршрут еще в таблице, линк поднимается повторно и мпд снова
>>пытается этот маршрут добавить и получает сообщение об ошибке.
>>Пробуйте удалять маршрут через down-script в мпд.
>
>здесь проблема не в маршруте, а в том что на момент переподключения
>на интерфейсе еще существуют настройки предыдущей сессии.
>
>имхо т.с переподключается слишком быстро)))
>мпд сам должен обнулить ng0 но почему-то не делает, или не успевает
>сделать.sleep 5? =)
>[оверквотинг удален]
>>>Пробуйте удалять маршрут через down-script в мпд.
>>
>>здесь проблема не в маршруте, а в том что на момент переподключения
>>на интерфейсе еще существуют настройки предыдущей сессии.
>>
>>имхо т.с переподключается слишком быстро)))
>>мпд сам должен обнулить ng0 но почему-то не делает, или не успевает
>>сделать.
>
>sleep 5? =)set link redial-delay 5 ?