Configurazione di una connessione ISDN: Difference between revisions
mNo edit summary |
|||
| (25 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
==Registrazione Account Tiscali== | |||
Registrare un account Tiscali (che offre il multilinka 128K) | |||
* http://abbonati.tiscali.it/internet/ | |||
Il numero da chiamare è '''7023456789''' | |||
Il login deve essere inserito come '''username@tiscali.it''' | |||
==Registrazione Account Libero== | |||
* http://registrazione.libero.it/ | |||
== Configurazione del modulo della scheda ISDN == | == Configurazione del modulo della scheda ISDN == | ||
=== Eicon Diva 2.01 PCI === | |||
Impostare i parametri per il caricamento del driver, in base al modello della scheda (Vedi /usr/share/doc/isdnutils-base/README.HiSax.gz): | |||
options hisax type=11 protocol=2 | |||
<pre>echo "options hisax type=11 protocol=2" | sudo tee modprobe.d/hisax.conf > /dev/null | |||
</pre> | </pre> | ||
| Line 13: | Line 23: | ||
sudo rmmod hisax | sudo rmmod hisax | ||
sudo modprobe hisax | sudo modprobe hisax | ||
Se non riesce a caricarlo e dà errori tipo: | |||
FATAL: Error inserting hisax (/lib/modules/2.6.32-5-686/kernel/drivers/isdn/hisax/hisax.ko): No such device | |||
ed in /var/log/syslog: | |||
<pre> | |||
Sep 6 12:33:21 firepub kernel: [ 97.834743] HiSax: LinkLayer Revision 2.59.2.4 | |||
Sep 6 12:33:21 firepub kernel: [ 97.834766] HiSax: Total 1 card defined | |||
Sep 6 12:33:21 firepub kernel: [ 97.834780] HiSax: Card 1 Protocol EDSS1 Id=HiSax (0) | |||
Sep 6 12:33:21 firepub kernel: [ 97.834786] HiSax: Eicon.Diehl Diva driver Rev. 1.33.2.6 | |||
Sep 6 12:33:21 firepub kernel: [ 97.834913] Diva: IPAC PCI card configured at 0xd11ec000 IRQ 16 | |||
Sep 6 12:33:21 firepub kernel: [ 97.834918] Diva: IPAC PCI space at 0xd11e8000 | |||
Sep 6 12:33:21 firepub kernel: [ 97.834923] Diva: IPAC version 2 | |||
Sep 6 12:33:21 firepub kernel: [ 97.834929] Eicon.Diehl Diva: IRQ 16 count 0 | |||
Sep 6 12:33:21 firepub kernel: [ 97.868033] Eicon.Diehl Diva: IRQ 16 count 0 | |||
Sep 6 12:33:21 firepub kernel: [ 97.868040] Eicon.Diehl Diva: IRQ(16) getting no interrupts during init 1 | |||
Sep 6 12:33:21 firepub kernel: [ 97.920024] Eicon.Diehl Diva: IRQ 16 count 0 | |||
Sep 6 12:33:21 firepub kernel: [ 97.920030] Eicon.Diehl Diva: IRQ(16) getting no interrupts during init 2 | |||
Sep 6 12:33:21 firepub kernel: [ 97.972030] Eicon.Diehl Diva: IRQ 16 count 0 | |||
Sep 6 12:33:21 firepub kernel: [ 97.972037] Eicon.Diehl Diva: IRQ(16) getting no interrupts during init 3 | |||
Sep 6 12:33:21 firepub kernel: [ 97.972086] HiSax: Card Eicon.Diehl Diva not installed ! | |||
</pre> | |||
Occorre rimuovere i drivers mISDN: | |||
sudo rmmod isdn slhc mISDNinfineon mISDNipac mISDN_core | |||
Ricaricare hisax | |||
sudo modprobe hisax | |||
=== AVM Fritz! PCI === | |||
Il modulo che viene caricato automaticamente è | |||
hisax_fcpcipnp | |||
| Line 46: | Line 91: | ||
sudo apt-get install isdnutils | sudo apt-get install isdnutils | ||
Accettare i default, ed inserire i parametri relativi alla propria linea ed alla connsessione internet da configurare. | Accettare i default, ed inserire i parametri relativi alla propria linea ed alla connsessione internet da configurare. | ||
<pre> | |||
? Does firmware need to be loaded? ? | |||
? ? | |||
? none ? | |||
</pre> | |||
<pre> | |||
? What is your ISP's telephone number? ? | |||
? ? | |||
? 7023456789__ ? | |||
</pre> | |||
<pre> | |||
? What is your local MSN? ? | |||
? ? | |||
? 0________________________________________________________________________ ? | |||
? ? | |||
</pre> | |||
<pre> | |||
? What is the user name for logging into your ISP? ? | |||
? ? | |||
?username@tiscali.it ? | |||
</pre> | |||
<pre> | |||
? What country is this system in? ? | |||
? ? | |||
? other ? | |||
</pre> | |||
<pre> | |||
? Enter the ISO two-letter code for your country ? | |||
? ? | |||
? IT__ ? | |||
</pre> | |||
<pre> | |||
? What is your local areacode, if applicable? ? | |||
? ? | |||
? 0377________________________________________ ? | |||
</pre> | |||
Modificare il file per i parametri di dialing: | Modificare il file per i parametri di dialing: | ||
| Line 63: | Line 154: | ||
</pre> | </pre> | ||
== Modifica gestione default route == | |||
'''TODO: SE SI USA IPPP2 NON VIENE IMPOSTATA LA DEFAULT ROUTE. CAMBIARE ippp0 in ippp2''' | |||
cd /etc/isdn | |||
sudo mv ipppd.ippp0 ipppd.ippp2 | |||
sudo mv device.ippp0 device.ippp2 | |||
Nel caso non siano stati creati questi files, rilanciare la configurazione: | |||
sudo dpkg-reconfigure ipppd | |||
* Riscrivere gli script up/down. | |||
Script up: | |||
<pre> | <pre> | ||
cd /etc/ppp/ip-up.d | |||
sudo cp 00-ipppd 00-ipppd.ori | |||
cat | sudo tee /etc/ppp/ip-up.d/00-ipppd > /dev/null <<'EOFile' | |||
#!/bin/sh | |||
# example /etc/ppp/ip-up.d script for use with ipppd and dynamic IP numbers. | |||
# Edit / add to the entries to suit the requirements of the interface. | |||
# Use the network to enable the IP dynamic hack to reset old connections | |||
# (otherwise the RST-provoking packet can't get out). | |||
# For a smaller set of dynamic numbers: | |||
# PPP_NET=`echo $PPP_LOCAL | sed 's,\.[0-9]*$,.0/24,'` | |||
# in case your ISP has a large pool of dynamic numbers (should be OK): | |||
PPP_NET=`echo $PPP_LOCAL | sed 's,\.[0-9]*\.[0-9]*$,.0.0/16,'` | |||
case "$PPP_IFACE" in | |||
ippp0) route del default | |||
- | # route add default netmask 0 $PPP_IFACE # usually necessary | ||
route add default netmask 0 gw $PPP_REMOTE # usually necessary | |||
# The next lines are for simple firewalling. | |||
# See comments in /etc/isdn/device.* about firewalling! | |||
#ipchains -D input -j DENY -i $PPP_IFACE 2>/dev/null | |||
#ipchains -A input -j ACCEPT -i $PPP_IFACE -p TCP -d $PPP_NET 1 | |||
#ipchains -A input -j ACCEPT -i $PPP_IFACE -p TCP -d $PPP_NET s | |||
#ipchains -A input -j ACCEPT -i $PPP_IFACE -p TCP -d $PPP_NET s | |||
#ipchains -A input -j ACCEPT -i $PPP_IFACE -p TCP -d $PPP_NET i | |||
;; | |||
ippp2) route add default dev $PPP_IFACE # usually necessary | |||
;; | |||
# add more ipppX cases if you need them... | |||
esac | |||
EOFile | |||
</pre> | </pre> | ||
Script down: | |||
<pre> | <pre> | ||
cd /etc/ppp/ip-down.d | |||
sudo cp 99-ipppd 99-ipppd.ori | |||
cat | sudo tee /etc/ppp/ip-down.d/99-ipppd > /dev/null <<'EOFile' | |||
#!/bin/sh | |||
# example /etc/ppp/ip-down.d script for use with ipppd and dynamic IP numbers. | |||
# Edit / add to the entries to suit the requirements of the interface. | |||
# Use the network to enable the IP dynamic hack to reset old connections. | |||
# For a smaller set of dynamic numbers: | |||
# PPP_NET=`echo $PPP_LOCAL | sed 's,\.[0-9]*$,.0/24,'` | |||
# in case your ISP has a large pool of dynamic numbers (should be OK): | |||
PPP_NET=`echo $PPP_LOCAL | sed 's,\.[0-9]*\.[0-9]*$,.0.0/16,'` | |||
ippp0: | case "$PPP_IFACE" in | ||
ippp0) 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 | |||
# route add default netmask 0 $PPP_IFACE # usually necessary | |||
route add default netmask 0 gw $PPP_REMOTE # usually necessary | |||
fi | |||
# The next lines are for simple firewalling. | |||
# See comments in /etc/isdn/device.* about firewalling! | |||
#ipchains -D input -j ACCEPT -i $PPP_IFACE -p TCP -d $PPP_NET 1000: | |||
#ipchains -D input -j ACCEPT -i $PPP_IFACE -p TCP -d $PPP_NET ssh | |||
#ipchains -D input -j ACCEPT -i $PPP_IFACE -p TCP -d $PPP_NET smtp | |||
#ipchains -D input -j ACCEPT -i $PPP_IFACE -p TCP -d $PPP_NET ident | |||
#ipchains -D input -j ACCEPT -i $PPP_IFACE -p UDP -d $PPP_NET 1024: | |||
#ipchains -D input -j ACCEPT -i $PPP_IFACE -p ICMP -d $PPP_NET | |||
#ipchains -D input -j DENY -i $PPP_IFACE | |||
;; | |||
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 | |||
EOFile | |||
</pre> | </pre> | ||
| Line 145: | Line 255: | ||
<pre> | <pre> | ||
sudoedit /etc/isdn/device. | sudoedit /etc/isdn/device.ippp2 | ||
... | ... | ||
DIALMODE=manual # XXX_ other values can be 'on' and 'off' | DIALMODE=manual # XXX_ other values can be 'on' and 'off' | ||
... | ... | ||
</pre> | </pre> | ||
Riavviare i servizi isdn: | Riavviare i servizi isdn: | ||
sudo | sudo invoke-rc.d isdnutils restart | ||
* Starting ISDN services... | * Starting ISDN services... | ||
interfaces ipppd isdnlog ...done. | interfaces ipppd isdnlog ...done. | ||
| Line 199: | Line 298: | ||
</pre> | </pre> | ||
== | == 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 associato ad una numerazione a ricerca automatica.''' | |||
Se così fosse, quando si fa un dialing, si ottiene l'errore: | |||
<pre> | <pre> | ||
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 | |||
</pre> | </pre> | ||
''''L'errore E001B (man isdncause E001B) indica che ci sono problemi di linea. AD ESEMPIO SE IL CAVO COLLEGATO NON È GIUSTO SI OTTIENE QUESTO ERRORE, OPPURE SE NON C'È LA LINEA SI OTTIENE QUESTO ERRORE''' | |||
'''CON LA CONFIGURAZIONE PTP 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''' | |||
===Scheda ISDN AVM Fritz PCI === | |||
* Rilevare il driverId: | |||
sudo cat /var/log/syslog | grep -i hisax | grep Id= | |||
Jun 8 15:12:59 firecn kernel: [ 9.780756] HiSax: Card 1 Protocol EDSS1 Id=fcpcipnp0 (0) | |||
In questo caso il driverId è | |||
fcpcipnp0 | |||
===Scheda ISDN Eicon Diva PCI === | |||
* In questo caso il driverId dovrebbe rimanere | |||
HiSax | |||
== | ===Attivazione PtP=== | ||
Per mettere la scheda in modalità point-to-point è sufficiente lanciare il comando: | |||
sudo hisaxctrl driverId 7 1 | |||
sostituendo a | |||
driverId | |||
il valore precedentemente rilevato in base alla scheda in uso. | |||
Si leggerà in syslog: | Si leggerà in syslog: | ||
| Line 290: | Line 345: | ||
(naturalmente "sudo hisaxctrl HiSax 7 0" mette in point-multipoint....) | (naturalmente "sudo hisaxctrl HiSax 7 0" mette in point-multipoint....) | ||
====Attivazione PtP per Debian Etch==== | |||
Per mantenere questa modifica al reboot, inserire questa riga in /etc/modutils/actions: | Per mantenere questa modifica al reboot, inserire questa riga in /etc/modutils/actions: | ||
| Line 305: | Line 361: | ||
post-install hisax hisaxctrl HiSax 7 1 | post-install hisax hisaxctrl HiSax 7 1 | ||
Oppure inserire in /etc/isdn/device. | ====Attivazione PtP per Debian Lenny==== | ||
Oppure inserire in /etc/isdn/device.ippp2 (riga 99) '''SOSTITUENDO IL CORRETTO DRIVERID''': | |||
sudoedit /etc/isdn/device.ippp2 | |||
<pre> | <pre> | ||
| Line 312: | Line 372: | ||
start) | start) | ||
# Set point-to-point mode | # Set point-to-point mode | ||
hisaxctrl | hisaxctrl fcpcipnp0 7 1 | ||
# XXX_ | # XXX_ | ||
... | ... | ||
| Line 320: | Line 380: | ||
== Configurazione del numero da chiamare == | == Configurazione del numero da chiamare == | ||
Mettere il numero della propria linea SENZA PREFISSO in /etc/isdn/device. | Mettere il numero della propria linea SENZA PREFISSO in /etc/isdn/device.ippp2 | ||
sudoedit /etc/isdn/device.ippp2 | |||
LOCALMSN='26113644' # XXX_ | LOCALMSN='26113644' # XXX_ | ||
| Line 326: | Line 388: | ||
LOCALMSN='0' # XXX_ | LOCALMSN='0' # XXX_ | ||
sudoedit /etc/isdn/device. | Mettere il numero in /etc/isdn/device.ippp2 | ||
sudoedit /etc/isdn/device.ippp2 | |||
... | ... | ||
REMOTEMSN='7023456789' | REMOTEMSN='7023456789' | ||
Configurare i dati per l'autenticazione | Configurare i dati per l'autenticazione | ||
Modificare in /etc/isdn/ipppd. | Modificare in /etc/isdn/ipppd.ippp2 : | ||
sudoedit /etc/isdn/ipppd. | sudoedit /etc/isdn/ipppd.ippp2 | ||
... | ... | ||
name | name username@tiscali.it # set local name for auth XXX_ | ||
noauth | noauth | ||
defaultroute | |||
#ms-get-dns | |||
Inserire le password in /etc/ppp/pap-secrets : | Inserire le password in /etc/ppp/pap-secrets : | ||
sudoedit /etc/ppp/pap-secrets | sudoedit /etc/ppp/pap-secrets | ||
... | ... | ||
" | "username\@tiscali.it" "*" "lapassword" | ||
Inserire le password in /etc/ppp/chap-secrets: | Inserire le password in /etc/ppp/chap-secrets: | ||
sudoedit /etc/ppp/chap-secrets | sudoedit /etc/ppp/chap-secrets | ||
... | ... | ||
" | "username\@tiscali.it" "*" "lapassword" | ||
Riavviare i servizi | Riavviare i servizi | ||
sudo invoke-rc.d isdnutils stop ; sudo invoke-rc.d isdnutils start | |||
sudo | |||
== Collegamento == | == Collegamento == | ||
''''ATTENZIONE''': se dovessero esserci degli errori, e si rendesse necessario cambiare i files di configurazione, qualsiasi essi siano, è NECESSARIO riavviare isdnutils: | ''''ATTENZIONE''': se dovessero esserci degli errori, e si rendesse necessario cambiare i files di configurazione, qualsiasi essi siano, è NECESSARIO riavviare isdnutils: | ||
/etc/init.d/isndutils restart | |||
sudo /etc/init.d/isndutils restart | |||
Collegarsi: | Collegarsi: | ||
sudo isdnctrl dial | sudo isdnctrl dial ippp2 | ||
Si avrà: | Si avrà: | ||
| Line 386: | Line 447: | ||
Jul 7 19:38:56 ergo ipppd[5904]: remote IP address 151.6.139.50 | Jul 7 19:38:56 ergo ipppd[5904]: remote IP address 151.6.139.50 | ||
</pre> | </pre> | ||
'''SE SI OTTIENE INVECE L'ERRORE E001B, ALLORA LA LINEA È MANCANTE O IL CAVO NON È CORRETTO. USARE UN CAVO DI RETE CON TUTTE LE COPPIE COLLEGATE''' | |||
Scollegarsi: | Scollegarsi: | ||
sudo isdnctrl hangup | sudo isdnctrl hangup ippp2 | ||
Si avrà: | Si avrà: | ||
| Line 414: | Line 477: | ||
sudo /etc/init.d/isdnutils stop | sudo /etc/init.d/isdnutils stop | ||
Per non far partire il support isdn al boot | Per non far partire il support isdn al boot deselzeiona isdnutils: | ||
sudo update-rc.d -f isdnutils remove | |||
== Debug della scheda == | == Debug della scheda == | ||
Latest revision as of 10:47, 6 September 2011
Registrazione Account Tiscali
Registrare un account Tiscali (che offre il multilinka 128K)
Il numero da chiamare è 7023456789
Il login deve essere inserito come username@tiscali.it
Registrazione Account Libero
Configurazione del modulo della scheda ISDN
Eicon Diva 2.01 PCI
Impostare i parametri per il caricamento del driver, in base al modello della scheda (Vedi /usr/share/doc/isdnutils-base/README.HiSax.gz):
echo "options hisax type=11 protocol=2" | sudo tee modprobe.d/hisax.conf > /dev/null
Ricaricare il modulo hisax:
sudo rmmod hisax sudo modprobe hisax
Se non riesce a caricarlo e dà errori tipo:
FATAL: Error inserting hisax (/lib/modules/2.6.32-5-686/kernel/drivers/isdn/hisax/hisax.ko): No such device
ed in /var/log/syslog:
Sep 6 12:33:21 firepub kernel: [ 97.834743] HiSax: LinkLayer Revision 2.59.2.4 Sep 6 12:33:21 firepub kernel: [ 97.834766] HiSax: Total 1 card defined Sep 6 12:33:21 firepub kernel: [ 97.834780] HiSax: Card 1 Protocol EDSS1 Id=HiSax (0) Sep 6 12:33:21 firepub kernel: [ 97.834786] HiSax: Eicon.Diehl Diva driver Rev. 1.33.2.6 Sep 6 12:33:21 firepub kernel: [ 97.834913] Diva: IPAC PCI card configured at 0xd11ec000 IRQ 16 Sep 6 12:33:21 firepub kernel: [ 97.834918] Diva: IPAC PCI space at 0xd11e8000 Sep 6 12:33:21 firepub kernel: [ 97.834923] Diva: IPAC version 2 Sep 6 12:33:21 firepub kernel: [ 97.834929] Eicon.Diehl Diva: IRQ 16 count 0 Sep 6 12:33:21 firepub kernel: [ 97.868033] Eicon.Diehl Diva: IRQ 16 count 0 Sep 6 12:33:21 firepub kernel: [ 97.868040] Eicon.Diehl Diva: IRQ(16) getting no interrupts during init 1 Sep 6 12:33:21 firepub kernel: [ 97.920024] Eicon.Diehl Diva: IRQ 16 count 0 Sep 6 12:33:21 firepub kernel: [ 97.920030] Eicon.Diehl Diva: IRQ(16) getting no interrupts during init 2 Sep 6 12:33:21 firepub kernel: [ 97.972030] Eicon.Diehl Diva: IRQ 16 count 0 Sep 6 12:33:21 firepub kernel: [ 97.972037] Eicon.Diehl Diva: IRQ(16) getting no interrupts during init 3 Sep 6 12:33:21 firepub kernel: [ 97.972086] HiSax: Card Eicon.Diehl Diva not installed !
Occorre rimuovere i drivers mISDN:
sudo rmmod isdn slhc mISDNinfineon mISDNipac mISDN_core
Ricaricare hisax
sudo modprobe hisax
AVM Fritz! PCI
Il modulo che viene caricato automaticamente è
hisax_fcpcipnp
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? ? ? ? ?username@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
cd /etc/isdn sudo mv ipppd.ippp0 ipppd.ippp2 sudo mv device.ippp0 device.ippp2
Nel caso non siano stati creati questi files, rilanciare la configurazione:
sudo dpkg-reconfigure ipppd
- Riscrivere gli script up/down.
Script up:
cd /etc/ppp/ip-up.d
sudo cp 00-ipppd 00-ipppd.ori
cat | sudo tee /etc/ppp/ip-up.d/00-ipppd > /dev/null <<'EOFile'
#!/bin/sh
# example /etc/ppp/ip-up.d script for use with ipppd and dynamic IP numbers.
# Edit / add to the entries to suit the requirements of the interface.
# Use the network to enable the IP dynamic hack to reset old connections
# (otherwise the RST-provoking packet can't get out).
# For a smaller set of dynamic numbers:
# PPP_NET=`echo $PPP_LOCAL | sed 's,\.[0-9]*$,.0/24,'`
# in case your ISP has a large pool of dynamic numbers (should be OK):
PPP_NET=`echo $PPP_LOCAL | sed 's,\.[0-9]*\.[0-9]*$,.0.0/16,'`
case "$PPP_IFACE" in
ippp0) route del default
# route add default netmask 0 $PPP_IFACE # usually necessary
route add default netmask 0 gw $PPP_REMOTE # usually necessary
# The next lines are for simple firewalling.
# See comments in /etc/isdn/device.* about firewalling!
#ipchains -D input -j DENY -i $PPP_IFACE 2>/dev/null
#ipchains -A input -j ACCEPT -i $PPP_IFACE -p TCP -d $PPP_NET 1
#ipchains -A input -j ACCEPT -i $PPP_IFACE -p TCP -d $PPP_NET s
#ipchains -A input -j ACCEPT -i $PPP_IFACE -p TCP -d $PPP_NET s
#ipchains -A input -j ACCEPT -i $PPP_IFACE -p TCP -d $PPP_NET i
;;
ippp2) route add default dev $PPP_IFACE # usually necessary
;;
# add more ipppX cases if you need them...
esac
EOFile
Script down:
cd /etc/ppp/ip-down.d
sudo cp 99-ipppd 99-ipppd.ori
cat | sudo tee /etc/ppp/ip-down.d/99-ipppd > /dev/null <<'EOFile'
#!/bin/sh
# example /etc/ppp/ip-down.d script for use with ipppd and dynamic IP numbers.
# Edit / add to the entries to suit the requirements of the interface.
# Use the network to enable the IP dynamic hack to reset old connections.
# For a smaller set of dynamic numbers:
# PPP_NET=`echo $PPP_LOCAL | sed 's,\.[0-9]*$,.0/24,'`
# in case your ISP has a large pool of dynamic numbers (should be OK):
PPP_NET=`echo $PPP_LOCAL | sed 's,\.[0-9]*\.[0-9]*$,.0.0/16,'`
case "$PPP_IFACE" in
ippp0) 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
# route add default netmask 0 $PPP_IFACE # usually necessary
route add default netmask 0 gw $PPP_REMOTE # usually necessary
fi
# The next lines are for simple firewalling.
# See comments in /etc/isdn/device.* about firewalling!
#ipchains -D input -j ACCEPT -i $PPP_IFACE -p TCP -d $PPP_NET 1000:
#ipchains -D input -j ACCEPT -i $PPP_IFACE -p TCP -d $PPP_NET ssh
#ipchains -D input -j ACCEPT -i $PPP_IFACE -p TCP -d $PPP_NET smtp
#ipchains -D input -j ACCEPT -i $PPP_IFACE -p TCP -d $PPP_NET ident
#ipchains -D input -j ACCEPT -i $PPP_IFACE -p UDP -d $PPP_NET 1024:
#ipchains -D input -j ACCEPT -i $PPP_IFACE -p ICMP -d $PPP_NET
#ipchains -D input -j DENY -i $PPP_IFACE
;;
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
EOFile
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 invoke-rc.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 associato 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 che ci sono problemi di linea. AD ESEMPIO SE IL CAVO COLLEGATO NON È GIUSTO SI OTTIENE QUESTO ERRORE, OPPURE SE NON C'È LA LINEA SI OTTIENE QUESTO ERRORE
CON LA CONFIGURAZIONE PTP 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
Scheda ISDN AVM Fritz PCI
- Rilevare il driverId:
sudo cat /var/log/syslog | grep -i hisax | grep Id=
Jun 8 15:12:59 firecn kernel: [ 9.780756] HiSax: Card 1 Protocol EDSS1 Id=fcpcipnp0 (0)
In questo caso il driverId è
fcpcipnp0
Scheda ISDN Eicon Diva PCI
- In questo caso il driverId dovrebbe rimanere
HiSax
Attivazione PtP
Per mettere la scheda in modalità point-to-point è sufficiente lanciare il comando:
sudo hisaxctrl driverId 7 1
sostituendo a
driverId
il valore precedentemente rilevato in base alla scheda in uso.
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....)
Attivazione PtP per Debian Etch
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
Attivazione PtP per Debian Lenny
Oppure inserire in /etc/isdn/device.ippp2 (riga 99) SOSTITUENDO IL CORRETTO DRIVERID:
sudoedit /etc/isdn/device.ippp2
....
case "$dowhat" in
start)
# Set point-to-point mode
hisaxctrl fcpcipnp0 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.ippp2
sudoedit /etc/isdn/device.ippp2 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 username@tiscali.it # set local name for auth XXX_ noauth defaultroute #ms-get-dns
Inserire le password in /etc/ppp/pap-secrets :
sudoedit /etc/ppp/pap-secrets ... "username\@tiscali.it" "*" "lapassword"
Inserire le password in /etc/ppp/chap-secrets:
sudoedit /etc/ppp/chap-secrets ... "username\@tiscali.it" "*" "lapassword"
Riavviare i servizi
sudo invoke-rc.d isdnutils stop ; sudo invoke-rc.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
SE SI OTTIENE INVECE L'ERRORE E001B, ALLORA LA LINEA È MANCANTE O IL CAVO NON È CORRETTO. USARE UN CAVO DI RETE CON TUTTE LE COPPIE COLLEGATE
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 deselzeiona isdnutils:
sudo update-rc.d -f isdnutils remove
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)