Configurazione di una connessione ISDN
Configurazione del modulo della scheda ISDN
Debian Sarge
Assicurarsi che sia già installato il pacchetto hotplug, per caricare il modulo giusto:
sudo apt-get install hotplug sudo /etc/init.d/hotplug restart
Se si stà installando la scheda Eicon Diva Pci 2.01, modificare i parametri di carimento del modulo hisax dando il tipo di scheda giusto ed il protocollo EuroIsdn:
Debian Etch & Debian Sarge
sudoedit /etc/modprobe.d/arch/i386 ... options hisax type=11 protocol=2 ...
Ricaricare il modulo hisax:
sudo rmmod hisax sudo modprobe hisax
Il syslog mostrerà:
Jul 7 19:20:29 ergo kernel: HiSax module removed Jul 7 19:20:36 ergo kernel: HiSax: Linux Driver for passive ISDN cards Jul 7 19:20:36 ergo kernel: HiSax: Version 3.5 (module) Jul 7 19:20:36 ergo kernel: HiSax: Layer1 Revision 2.46.2.5 Jul 7 19:20:36 ergo kernel: HiSax: Layer2 Revision 2.30.2.4 Jul 7 19:20:36 ergo kernel: HiSax: TeiMgr Revision 2.20.2.3 Jul 7 19:20:36 ergo kernel: HiSax: Layer3 Revision 2.22.2.3 Jul 7 19:20:36 ergo kernel: HiSax: LinkLayer Revision 2.59.2.4 Jul 7 19:20:36 ergo kernel: HiSax: Total 1 card defined Jul 7 19:20:36 ergo kernel: HiSax: Card 1 Protocol EDSS1 Id=HiSax (0) Jul 7 19:20:36 ergo kernel: HiSax: Eicon.Diehl Diva driver Rev. 1.33.2.6 Jul 7 19:20:36 ergo kernel: PCI: Enabling device 0000:00:09.0 (0004 -> 0006) Jul 7 19:20:36 ergo kernel: ACPI: PCI interrupt 0000:00:09.0[A] -> GSI 11 (level, low) -> IRQ 11 Jul 7 19:20:36 ergo kernel: Diva: IPAC PCI card configured at 0xd4a5f000 IRQ 11 Jul 7 19:20:36 ergo kernel: Diva: IPAC PCI space at 0xd48b3000 Jul 7 19:20:36 ergo kernel: Diva: IPAC version ff Jul 7 19:20:36 ergo kernel: Eicon.Diehl Diva: IRQ 11 count 10816 Jul 7 19:20:36 ergo kernel: Eicon.Diehl Diva: IRQ 11 count 10822 Jul 7 19:20:36 ergo kernel: HiSax: DSS1 Rev. 2.32.2.3 Jul 7 19:20:36 ergo kernel: HiSax: 2 channels added Jul 7 19:20:36 ergo kernel: HiSax: MAX_WAITING_CALLS added
Software di supporto
Installare il software di supporto
sudo apt-get install isdnutils
Accettare i default, ed inserire i parametri relativi alla propria linea ed alla connsessione internet da configurare.
? Does firmware need to be loaded? ? ? ? ? none ?
? What is your ISP's telephone number? ? ? ? ? 7023456789__ ?
? What is your local MSN? ? ? ? ? 0________________________________________________________________________ ? ? ?
? What is the user name for logging into your ISP? ? ? ? ? srgalimberti@tiscali.it_ ?
? What country is this system in? ? ? ? ? other ?
? Enter the ISO two-letter code for your country ? ? ? ? IT__ ?
? What is your local areacode, if applicable? ?
? ?
? 0377________________________________________ ?
Modificare il file per i parametri di dialing:
sudoedit /etc/isdn/isdn.conf ... [GLOBAL] COUNTRYPREFIX = + COUNTRYCODE = 39 AREAPREFIX = 0 AREACODE = 031 ...
Modifica gestione default route
TODO: SE SI USA IPPP2 NON VIENE IMPOSTATA LA DEFAULT ROUTE. CAMBIARE ippp0 in ippp2
sudo mv ipppd.ippp0 ipppd.ippp2 sudo mv device.ippp0 device.ippp2
fare script up/down:
up
PPP_NET=`echo $PPP_LOCAL | sed 's,\.[0-9]*\.[0-9]*$,.0.0/16,'`
case "$PPP_IFACE" in
ippp2) route add default dev $PPP_IFACE # usually necessary
;;
# add more ipppX cases if you need them...
esac
down
<pre>
case "$PPP_IFACE" in
ippp2) #if route -n | grep '^0\.0\.0\.0' | grep -q " $PPP_IFACE" ; then
# only reset default route if the
# current default route is via this interface
route del default dev ippp2
route del default dev $PPP_IFACE
;;
# add more ipppX cases if you need them...
esac
Modificare la modalità di dialing e togliere la linea che dice che non è configurata la connessione:
sudoedit /etc/isdn/device.ippp2 ... DIALMODE=manual # XXX_ other values can be 'on' and 'off' ...
Riavviare i servizi isdn:
sudo /etc/init.d/isdnutils restart * Starting ISDN services... interfaces ipppd isdnlog ...done.
Si dovrà avere:
Jul 7 19:36:29 ergo ipppd[5013]: Terminating on signal 15. Jul 7 19:36:29 ergo ipppd[5013]: closing fd 8 from unit 0 Jul 7 19:36:29 ergo ipppd[5013]: link 0 closed , linkunit: 0 Jul 7 19:36:29 ergo ipppd[5013]: Exit. Jul 7 19:36:29 ergo kernel: ippp_ccp: freeing reset data structure d2a92800 Jul 7 19:36:29 ergo isdnlog: Got signal 15 Jul 7 19:36:29 ergo isdnlog: exit now 7 Jul 7 19:36:29 ergo isdnlog: File /var/run/isdnlog.isdnctrl0.pid removed! Jul 7 19:36:29 ergo isdnlog: File /var/lock/LCK..isdnctrl0 removed! Jul 7 19:36:29 ergo kernel: HiSax: debugging flags card 1 set to 4 Jul 7 19:36:29 ergo isdnlog: isdnlog Version 4.69 starting Jul 7 19:36:29 ergo isdnlog: Error: could not load holidays from /usr/share/isdn/holiday-xx.dat: No such file or directory Jul 7 19:36:29 ergo isdnlog: Dest V1.01: File '/usr/share/isdn/dest.cdb' opened fine - Dest 1.0 int (+h) AT DE NL CH BE Jul 7 19:36:29 ergo isdnlog: Error: could not load rate database from /usr/share/isdn/rate-xx.dat: No such file or directory Jul 7 19:36:29 ergo isdnlog: (ISDN subsystem with ISDN_MAX_CHANNELS > 16 detected, ioctl(IIOCNETGPN) is available) Jul 7 19:36:29 ergo isdnlog: isdn.conf:2 active channels, 0 MSN/SI entries Jul 7 19:36:29 ergo isdnlog: (Data versions: iprofd=0x06 net_cfg=0x06 /dev/isdninfo=0x01) Jul 7 19:36:29 ergo isdnlog: Everything is fine, isdnlog-4.69 is running in full featured mode. Jul 7 19:36:29 ergo kernel: isdn: Verbose-Level is 2 Jul 7 19:36:29 ergo ipppd[5903]: Found 1 device: Jul 7 19:36:29 ergo ipppd[5904]: ipppd i2.2.12 (isdn4linux version of pppd by MH) started Jul 7 19:36:29 ergo ipppd[5904]: init_unit: 0 Jul 7 19:36:29 ergo kernel: ippp, open, slot: 0, minor: 0, state: 0000 Jul 7 19:36:29 ergo kernel: ippp_ccp: allocated reset data structure d2a92800 Jul 7 19:36:29 ergo ipppd[5904]: Connect[0]: /dev/ippp0, fd: 8 Jul 7 19:36:30 ergo kernel: isdn_net: ippp0: dial rejected: interface not in dialmode `auto', signalling dst_link_failure
Caso di linea punto-punto
ATTENZIONE: se la linea isdn usa un centralino, può darsi che sia configurata non nella modalità standard (punto-multipunto) ma sia una punto-punto, spesso assciato ad una numerazione a ricerca automatica.
Se così fosse, quando si fa un dialing, si ottiene l'errore:
Aug 8 11:58:25 firest kernel: ippp0: dialing 1 7027020000... Aug 8 11:58:25 firest kernel: isdn: HiSax,ch0 cause: E001B Aug 8 11:58:34 firest kernel: isdn_net: local hangup ippp0 Aug 8 11:58:34 firest kernel: ippp0: Chargesum is 0
L'errore E001B (man isdncause E001B) indica proprio questa configurazione.
OCCORRE STACCARE TUTTI GLI ALTRI DISPOSITIVI ISDN PER POTER USARE QUESTA LINEA, DATO CHE LA MODALITA' PUNTO-PUNTO PERMETTE DI COLLEGARE UNA SOLA PERIFERICA ALLA BORCHIA ISDN
Per mettere la scheda in modalità point-to-point è sufficiente lanciare il comando:
sudo hisaxctrl HiSax 7 1
Si leggerà in syslog:
Aug 8 12:58:25 firest kernel: HiSax: set card in PTP mode Aug 8 12:58:25 firest kernel: LAYER2 WATCHING ESTABLISH
(naturalmente "sudo hisaxctrl HiSax 7 0" mette in point-multipoint....)
Per mantenere questa modifica al reboot, inserire questa riga in /etc/modutils/actions:
sudoedit /etc/modutils/actions ... post-install hisax hisaxctrl HiSax 7 1 ...
Applicare la configurazione:
sudo update-modules
Verificare:
cat /etc/modules.conf | grep hisax post-install hisax hisaxctrl HiSax 7 1
Oppure inserire in /etc/isdn/device.ippp0 (riga 99):
....
case "$dowhat" in
start)
# Set point-to-point mode
hisaxctrl HiSax 7 1
# XXX_
...
Se non si stacca il centralino o l'altra periferica isdn dalla borchia isdn, si ottiene l'errore E0251
Configurazione del numero da chiamare
Mettere il numero della propria linea SENZA PREFISSO in /etc/isdn/device.ippp0
LOCALMSN='26113644' # XXX_
Oppure lasciare
LOCALMSN='0' # XXX_
Mettere il numero in /etc/isdn/device.ippp2
sudoedit /etc/isdn/device.ippp2 ... REMOTEMSN='7023456789'
Configurare i dati per l'autenticazione
Modificare in /etc/isdn/ipppd.ippp2 :
sudoedit /etc/isdn/ipppd.ippp2 ... name mpgalimberti@galimberti.net # set local name for auth XXX_ noauth defaultroute #ms-get-dns
Inserire le password in /etc/ppp/pap-secrets :
sudoedit /etc/ppp/pap-secrets ... "mpgalimberti\@tiscali.it" "*" "mpgali"
Inserire le password in /etc/ppp/chap-secrets:
sudoedit /etc/ppp/chap-secrets ... "mpgalimberti\@tiscali.it" "*" "mpgali"
Riavviare i servizi
sudo /etc/init.d/isdnutils stop; sudo /etc/init.d/isdnutils start
Collegamento
'ATTENZIONE: se dovessero esserci degli errori, e si rendesse necessario cambiare i files di configurazione, qualsiasi essi siano, è NECESSARIO riavviare isdnutils:
sudo /etc/init.d/isndutils restart
Collegarsi:
sudo isdnctrl dial ippp2
Si avrà:
Jul 7 19:38:53 ergo kernel: ippp0: dialing 1 7027020000... Jul 7 19:38:53 ergo isdnlog: Jul 07 19:38:53 * tei 96 calling ? with '' BEARER: Unrestricted digital information, CCITT standardized coding Jul 7 19:38:53 ergo isdnlog: Jul 07 19:38:53 * tei 96 calling ? with '' 64 kbit/s, Circuit mode Jul 7 19:38:53 ergo isdnlog: Jul 07 19:38:53 * tei 96 calling +39 31/7027020000, Como with '031764171' RING (Data) Jul 7 19:38:53 ergo isdnlog: Jul 07 19:38:53 * tei 96 calling +39 31/7027020000, Como with '031764171' CHANNEL: BRI, B1 needed Jul 7 19:38:55 ergo isdnlog: Jul 07 19:38:55 tei 96 calling +39 31/7027020000, Como with '031764171' COLP *INVALID* -- ignored! Jul 7 19:38:55 ergo isdnlog: Jul 07 19:38:55 tei 96 calling +39 31/7027020000, Como with '031764171' CONNECT (Data) Jul 7 19:38:55 ergo isdnlog: Jul 07 19:38:55 tei 96 calling +39 31/7027020000, Como with '031764171' INTERFACE ippp0 calling 7027020000 Jul 7 19:38:56 ergo kernel: isdn_net: ippp0 connected Jul 7 19:38:56 ergo ipppd[5904]: Local number: 031764171, Remote number: 7027020000, Type: outgoing Jul 7 19:38:56 ergo ipppd[5904]: PHASE_WAIT -> PHASE_ESTABLISHED, ifunit: 0, linkunit: 0, fd: 8 Jul 7 19:38:56 ergo ipppd[5904]: Remote message: Jul 7 19:38:56 ergo ipppd[5904]: MPPP negotiation, He: No We: No Jul 7 19:38:56 ergo ipppd[5904]: local IP address 151.29.249.254 Jul 7 19:38:56 ergo ipppd[5904]: remote IP address 151.6.139.50
Scollegarsi:
sudo isdnctrl hangup ippp2
Si avrà:
Jul 7 19:41:25 ergo kernel: isdn_net: local hangup ippp0 Jul 7 19:41:25 ergo kernel: ippp0: Chargesum is 0 Jul 7 19:41:25 ergo ipppd[5904]: Modem hangup Jul 7 19:41:25 ergo ipppd[5904]: Connection terminated. Jul 7 19:41:25 ergo ipppd[5904]: taking down PHASE_DEAD link 0, linkunit: 0 Jul 7 19:41:25 ergo ipppd[5904]: closing fd 8 from unit 0 Jul 7 19:41:25 ergo ipppd[5904]: link 0 closed , linkunit: 0 Jul 7 19:41:25 ergo ipppd[5904]: reinit_unit: 0 Jul 7 19:41:25 ergo ipppd[5904]: Connect[0]: /dev/ippp0, fd: 8 Jul 7 19:41:25 ergo kernel: ippp_ccp: freeing reset data structure d2a92800 Jul 7 19:41:25 ergo kernel: ippp, open, slot: 0, minor: 0, state: 0000 Jul 7 19:41:25 ergo kernel: ippp_ccp: allocated reset data structure d2a92800 Jul 7 19:41:25 ergo isdnlog: Jul 07 19:41:25 tei 96 calling +39 31/7027020000, Como with '031764171' Normal call clearing (User) Jul 7 19:41:26 ergo isdnlog: Jul 07 19:41:26 tei 96 calling +39 31/7027020000, Como with '031764171' HANGUP ( 0:02:31 I= 56.1Kb O= 69.8Kb) Jul 7 19:41:26 ergo kernel: isdn_net: ippp0: dial rejected: interface not in dialmode `auto', signalling dst_link_failure
PEr evitare collegamenti accidentali:
sudo /etc/init.d/isdnutils stop
Per non far partire il support isdn al boot deseleiona isdnutils:
rcconf
Debug della scheda
Si possono debuggare gli eventi isdn con:
cat /dev/isdnctrl0 77:25.67 Card1 ISAC STAR 48 77:25.67 Card1 ISAC MODE 0 77:25.67 Card1 ISAC ADF2 80 77:25.67 Card1 ISAC ISTA 0 77:25.67 Card1 ISAC CIR0 7c 77:25.67 Card1 HSCX B ISTA 0 77:25.67 Card1 HSCX A ISTA 0 77:25.67 Card1 HSCX B STAR 48 77:25.67 Card1 HSCX A STAR 48 <pre> cd /etc/isdn/ isdncause E001B less /usr/share/doc/isdnutils-base/README.HiSax.gz man isdn_cause man isdnctrl sudo /etc/init.d/isdnutils restart sudo isdnctrl dial ippp0 sudo isdnctrl hangup ippp0 sudo isdnctrl ippp0 secure off sudo isdnctrl ippp0 status sudoedit isdn.conf sudoedit device.ippp0 sudoedit ipppd.ippp0
Jun 29 11:26:51 firecn kernel: HiSax: Linux Driver for passive ISDN cards Jun 29 11:26:51 firecn kernel: HiSax: Version 3.5 (module) Jun 29 11:26:51 firecn kernel: HiSax: Layer1 Revision 2.46.2.5 Jun 29 11:26:51 firecn kernel: HiSax: Layer2 Revision 2.30.2.4 Jun 29 11:26:51 firecn kernel: HiSax: TeiMgr Revision 2.20.2.3 Jun 29 11:26:51 firecn kernel: HiSax: Layer3 Revision 2.22.2.3 Jun 29 11:26:51 firecn kernel: HiSax: LinkLayer Revision 2.59.2.4 Jun 29 11:26:51 firecn kernel: HiSax: Total 1 card defined Jun 29 11:26:51 firecn kernel: HiSax: Card 1 Protocol EDSS1 Id=HiSax (0) Jun 29 11:26:51 firecn kernel: HiSax: Eicon.Diehl Diva driver Rev. 1.33.2.6 Jun 29 11:26:51 firecn kernel: HiSax: DSS1 Rev. 2.32.2.3 Jun 29 11:26:51 firecn kernel: HiSax: 2 channels added Jun 29 11:26:51 firecn kernel: HiSax: MAX_WAITING_CALLS added Jun 29 11:27:12 firecn kernel: HiSax: debugging flags card 1 set to 4 Jun 29 11:27:12 firecn isdnlog: isdnlog Version 4.69 starting Jun 29 11:27:12 firecn isdnlog: Error: could not load holidays from /usr/share/isdn/holiday-xx.dat: No such file or directory Jun 29 11:27:12 firecn isdnlog: Dest V1.01: File '/usr/share/isdn/dest.cdb' opened fine - Dest 1.0 int (+h) AT DE NL CH BE Jun 29 11:27:12 firecn isdnlog: Error: could not load rate database from /usr/share/isdn/rate-xx.dat: No such file or directory Jun 29 11:27:12 firecn isdnlog: (ISDN subsystem with ISDN_MAX_CHANNELS > 16 detected, ioctl(IIOCNETGPN) is available) Jun 29 11:27:12 firecn isdnlog: isdn.conf:2 active channels, 0 MSN/SI entries Jun 29 11:27:12 firecn isdnlog: (Data versions: iprofd=0x06 net_cfg=0x06 /dev/isdninfo=0x01) Jun 29 11:27:12 firecn isdnlog: Everything is fine, isdnlog-4.69 is running in full featured mode. Jun 29 11:27:12 firecn kernel: isdn: Verbose-Level is 2 Jun 29 11:27:12 firecn ipppd[13969]: ipppd i2.2.12 (isdn4linux version of pppd by MH) started Jun 29 11:27:12 firecn isdnlog: (HiSax driver detected)