>
>как выглядит конфиг mpd?
>авторизация какая, логин скрипт и тд
Так начнем - FreeBSD 5.2.1 (клиент) собрано ядро с настройками:
options NETGRAPH
options NETGRAPH_ASYNC
options NETGRAPH_BPF
options NETGRAPH_ECHO
options NETGRAPH_CISCO
options NETGRAPH_ETHER
options NETGRAPH_HOLE
options NETGRAPH_IFACE
options NETGRAPH_KSOCKET
options NETGRAPH_L2TP
options NETGRAPH_LMI
options NETGRAPH_MPPC_ENCRYPTION
options NETGRAPH_ONE2MANY
options NETGRAPH_PPP
options NETGRAPH_PPPOE
options NETGRAPH_PPTPGRE
options NETGRAPH_RFC1490
options NETGRAPH_SOCKET
options NETGRAPH_TEE
options NETGRAPH_TTY
options NETGRAPH_UI
options NETGRAPH_VJC
Mpd версии 3.18 -
mpd.conf:
default:
load multi
multi:
new -i ng0 multi usr1 usr2
set iface route default
set iface disable on-demand
set iface idle 900
set bundle authname login
set bundle disable compression
set ipcp ranges 0.0.0.0/0 193.232.8.68/24
set ipcp yes vjcomp
set link disable chap pap
set link accept chap pap
set link yes acfcomp protocomp
link usr1
set modem script DialPeer
set modem var $Telephone "p29280"
link usr2
set modem script DialPeer
set modem var $Telephone "p29162"
open iface
mpd.links:
usr1:
set link type modem
set modem speed 57600
set modem device /dev/cuaa0
set modem var $DialPrefix "DT"
usr2:
set link type modem
set modem speed 57600
set modem device /dev/cuaa1
set modem var $DialPrefix "DT"
mpd.scripts:
DialPeer:
if $Telephone == "00000" goto DialNullModem
set $optimize $OptimizeNextTime
set $OptimizeNextTime "no"
if $optimize == "yes" goto DialPeer2
call ModemFind
if $ErrorMsg == "" goto DialPeer1
log $ErrorMsg
failure
DialPeer1:
set $ModTelephone $Telephone
call ModemIdent
if $ModemDescription != "" goto DialPeer2
log "The modem is not responding."
failure
DialPeer2:
log "Detected $ModemDescription."
call $ModemSetupFunc
log "Dialing server at $Telephone..."
call ModemDial
if $dialResult == "OK" goto DialPeerOK
set $optimize "no"
failure
DialPeerOK:
if $ConnectionSpeed == "" log "Connected at an unknown speed."
if $ConnectionSpeed == "" goto DialPeer3
log "Connected at $ConnectionSpeed."
Ну и mpd.secrets - там логин пароль.
FreeBSD 4.5 (сервер, собирал не я) в ядре просто прописанно options NETGRAPH (может из-за этого?)
mpd версия 3.6
mpd.conf:
default:
load TVC
load log-minimal
open
TVC:
set login AdminLogin
new -i ng0 TVC L29280 L29162
set bundle authname TVC
set bundle enable multilink
# set iface addrs 193.232.8.68 193.232.214.1
set iface route 193.232.214.0/24
set iface route 193.232.29.0/24
set iface idle 900
set ipcp ranges 0.0.0.0/0 193.232.29.1/0
set ipcp yes vjcomp
set link no chap
set link enable pap
set link yes acfcomp protocomp
set link keep-alive 10 60
# set modem idle-script AnswerCall
log-normal:
log +bund +link +chat +lcp +auth +fsm +phys +ipcp
log-minimal:
log -all +bund +link +auth
mpd.links:
L29162:
set link type modem
set modem device /dev/cuaa0
set modem speed 115200
set link latency 100000
set link bandwidth 33600
set modem watch -cd
set link yes acfcomp protocomp
set link no chap
set link enable pap
set modem script answer-ring
set modem var $InitString "B0M0S0=4S2=0S10=100"
set modem var $Timeout 600
L29280:
set link type modem
set modem device /dev/cuaa1
set modem speed 115200
set link latency 100000
set link bandwidth 33600
set modem watch -cd
set link yes acfcomp protocomp
set link no chap
set link enable pap
set modem script answer-ring
set modem var $InitString "B0M0S0=4S2=0S10=100"
set modem var $Timeout 600
mpd.script:
answer-ring:
log "calling answer-ring..."
set $moreInit "S0=4"
call InitModem
log "waiting for ring..."
call GetRing
failure
ну и стандартный mpd.secrets
Рабочий конфиг с FreeBSD 3.2 (клиент) (работает не через ng а через tun)
версия mpd 1.0b5 :)
mpd.conf:
default:
load SR2
SR2:
load log-normal
set login AdminLogin
new SR1 LINE0 LINE1
set bundle authname VPK
set bundle enable multilink
# set bundle disable compression
set bundle disable bw-manage
set bundle idle 0
# set iface addrs 193.232.214.69 193.232.8.68
set iface route default
set ipcp yes vjcomp
set ipcp ranges 0.0.0.0/0 193.232.8.68/24
#set ccp yes pred1
open
mpd.links:
LINE1:
set link type modem
set link device /dev/cuaa0
set modem speed 115200
set link latency 100000
set link bandwidth 33600
set modem watch +cd
set link yes acfcomp protocomp
set link accept pap
set link no chap
set modem script direct-dial
set modem var $InitString "B1M1X7&R2&H0S10=100&N0"
set modem var $Telephone "29280"
set modem var $Timeout 600
#set ccp yes pred1
LINE0:
set link type modem
set link device /dev/cuaa1
set modem speed 115200
set link latency 100000
set link bandwidth 33600
set modem watch +cd
set link yes acfcomp protocomp
set link accept pap
set link no chap
set modem script direct-dial
set modem var $InitString "B1M1X7&R2&H0S10=100&N0"
set modem var $Telephone "29162"
set modem var $Timeout 600
#set ccp yes pred1
mpd.script:
direct-dial:
if $Timeout == "" set $Timeout 50
log "initializing modem..."
set $moreInit ""
call InitModem
log "dialing peer at $Telephone..."
call DialModem
failure
и mpd.secrets