Ключевые слова:isdn, modem, freebsd, (найти похожие документы)
From: Sergey Shumov <shs@rs.net.ua>
Date: Mon, 23 Feb 2004 14:31:37 +0000 (UTC)
Subject: Кратко о настройке ISDN под FreeBSD
Оригинал: http://shs.sumy.ua/doc/isdn.html
Sergey Shumov, E-mail: shs@rs.net.ua
Кратко о настройке ISDN под FreeBSD
В kernel ядра прописываем поддержку ISDN
## ISDN Hardware driver
# ISA Teles
#options TEL_S0_16_3
#device isic0 at isa? port 0xd80 irq 5 flags 3
#device iwic
#device ifpi
#device ifpnp
#device "ifpi2"
device itjc
И поддержку протоколов стека ISDN
pseudo-device "i4bq921"
pseudo-device "i4bq931"
pseudo-device "i4b"
pseudo-device "i4bctl"
pseudo-device "i4bcapi" 2
pseudo-device "i4btrc" 4
pseudo-device "i4brbch" 4
pseudo-device "i4btel" 4
pseudo-device "i4bipr" 4
pseudo-device "i4bisppp" 4
После сборки ядра стоит сделать:
cd /dev
./MAKEDEV i4b
Настройка isdnd.rc из /etc/isdn
system
acctall = off # generate info for everything
acctfile = /var/log/isdnd.acct # name & location of accounting file
useacctfile = off # generate accouting info to file
isdntime = on
Описываем отдельно каждый B канал:
entry
name = userppp0
usrdevicename = rbch
usrdeviceunit = 0
isdncontroller = 0
isdnchannel = -1
local-phone-incoming = 200107 # you phone
remote-phone-incoming = *
local-phone-dialout = 200107 # This *MUST* be your local number
remote-phone-dialout = 200107 # ppp(8) will override this
remdial-handling = first
dialin-reaction = ignore
dialout-type = normal
b1protocol = hdlc
idletime-incoming = 900 # Should be larger than ppp's timeout
idletime-outgoing = 900 # Should be larger than ppp's timeout
unitlength = 0
unitlengthsrc = conf
dialretries = 1
dialrandincr = on
recoverytime = 1 # Should be smaller than ppp's redial
usedown = off
downtries = 2
downtime = 30
entry
name = userppp1
usrdevicename = rbch
usrdeviceunit = 1
isdncontroller = 0
isdnchannel = -1
local-phone-incoming = 200107 # you secondary phone
remote-phone-incoming = *
local-phone-dialout = 200107 # This *MUST* be your local number
remote-phone-dialout = 200107 # ppp(8) will override this
remdial-handling = first
dialin-reaction = accept
dialout-type = normal
b1protocol = hdlc
idletime-incoming = 900 # Should be larger than ppp's timeout
idletime-outgoing = 900 # Should be larger than ppp's timeout
unitlength = 0
unitlengthsrc = conf
dialretries = 1
dialrandincr = on
recoverytime = 1 # Should be smaller than ppp's redial
usedown = off
downtries = 2
downtime = 30
Собственно этого достаточно Осталось только описать запуск isdnd при
старте системы в /etc/rc.conf
### ISDN interface options: ###
isdn_enable="YES" # Enable the ISDN subsystem (or NO).
isdn_fsdev="/dev/ttyva" # Output device for fullscreen mode (or NO for d
isdn_flags="-dn -d0x1f9" # Flags for isdnd
стоит не забыть в /etc/ttys заблокировать консоль используемую isdnd
(в моем случае /dev/ttyva)
ttyva "/usr/libexec/getty Pc" cons25 off unsecure
_________________________________________________________________
Для соеденения я использую user-level PPP с таким вот примерно
конфигом ppp.conf:
isdn:
set phone 219000 # номер телефона для дозвона
set authname XXXXXXX # Логин
set authkey XXXXXXX # Пароль
enable lqr
set reconnect 3 5
set redial 3 10
set lqrperiod 45
disable pred1 deflate mppe
deny pred1 deflate mppe
set dial
set login
set logout
set hangup
set device /dev/i4brbch0 /dev/i4brbch1
set speed sync
enable dns
add! default hisaddr
set mrru 1500 # Multilink mode please
set mru 1504 # Room for the MP header
clone 1,2 # Two new links
link deflink rm # And get rid of the original one
link * set mode ddial
В такой конфигурации ppp поднимает _оба_ интерфейса в multilink-ppp.
теперь осталось запустить это при старте системы в /etc/rc.conf:
ppp_enable="YES" # Start user-ppp (or NO).
ppp_mode="ddial" # Choice of "auto", "ddial", "direct" or "dedicated".
# For details see man page for ppp(8). Default is auto.
ppp_nat="NO" # Use PPP's internal network address translation or NO.
ppp_profile="isdn" # Which profile to use from /etc/ppp/ppp.conf.
ppp_user="root" # Which user to run ppp as
или запустить вручную: ppp -ddial isdn