CAPI und BRI
COMMON-ISDN-API (CAPI) ist ein Schnittstellen-Standard für Applikationsprogrammierung, der dafür verwendet wird, um ISDN-Komponenten an Basic Rate Interfaces (BRI) anzuschließen. Wenn sie dem Standard folgen, können Anwendungen einen definierten Mechanismus für die Kommunikation über ISDN-Leitungen verwenden, ohne sich an die Besonderheiten der Implementierungen der Hardware-Anbieter halten zu müssen. Die Hardware-Anbieter wiederum profitieren von einer Vielzahl von Anwendungen, die problemlos mit ihren Komponenten zusammenarbeiten. Anwendungen können z.B. Faxprogramme, Softwareanrufbeantworter oder Onlinebanking sein.
ISDN mit BRI konfigurieren
Am Router1 wird das bri Interface konfiguriert:
Router> ena Router# con ter Router(config)# hostname BRI1 BRI1(config)# interface bri0 BRI1(config-if)# ip address 42.34.10.1 255.255.255.0 BRI1(config-if)# no shut BRI1(config-if)# exit…und danach am Router 2:
Router> ena Router# con ter Router(config)# hostname BRI2 BRI2(config)# interface bri0 BRI2(config-if)# ip address 42.34.10.121 255.255.255.0 BRI2(config-if)# no shut BRI2(config-if)# exit
ISDN
Am Router2 (BRI2) wird der ISDN-Teil eingestellt. Eine SPID (Service Profile Identifier) ist eine Kennung die von einer Telefongesellschaft zu einem Terminal auf einem Integrated Services Digital Network B-Kanal zugewiesen wird. Die SPID ist eine numerische Zeichenfolge von 3 bis 20 Stellen.
BRI2(config)# isdn switch-type basic-ni BRI2(config)# interface bri0 BRI2(config-if)# isdn spid 1234Schauen wir nach was passiert ist:
BRI2(config-if)# show isdn status
zeigt:
Multible Frame established
Alles in Ordnung? Dann schauen wir uns den Status an
BRI2(config-if)# exit BRI2(config)# exit BRI2# show isdn status
Eine Wählverbindung erstellen
Der Dialer-String ist die vollständige Telefonnummer der Gegenstelle (nicht die eigene)
BRI2(config)# dialer-list 1 protocol ip permit BRI2(config)# interface bri0 BRI2(config-if)# dialer string 11223344 BRI2(config-if)# dialer group 1 BRI2(config-if)# exit
Jetzt muss nur noch der Router der Gegenstele konfiguriert werden. Hierbei ist zu beachten:
- die SPID muss gleich bleiben, sie wird vorgegeben.
- Die IP-Adresse muss aus dem gleichen Subnetz sein
- Der Dialer-String ist dei Telefonnummer der Gegenstelle, ist also zur Ersten verschieden
Beispiel 1
Konfiguration Router1 (linke Seite)
service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname <Links> ! enable secret <login Passwort> ! username <Telnet> password <login Passwort> ! ! ip subnet-zero ! isdn switch-type basic-net3 isdn leased-line BRI0 ! ! ! interface Ethernet0 ip address 10.2.2.1 255.255.255.0 no ip directed-broadcast no ip proxy-arp no shutdown ! interface BRI0 no ip address no ip directed-broadcast encapsulation ppp shutdown ! interface BRI0:1 ip address 192.168.1.2 255.255.255.0 no ip directed-broadcast encapsulation ppp no shutdown ! interface BRI0:2 no ip directed-broadcast no ip address shutdown ! no ip http server ip classless ip route 10.1.1.0 255.255.255.0 192.168.1.1 ! ! line con 0 transport input none stopbits 1 line vty 0 4 login local ! end
Konfiguration Router2 (rechte Seite)
service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname <Rechts> ! enable secret <login Passwort> ! username <Telnet> password <login Passwort> ! ! ip subnet-zero ! isdn switch-type basic-net3 isdn leased-line BRI0 ! ! ! interface Ethernet0 ip address 10.1.1.1 255.255.255.0 no ip proxy-arp no ip directed-broadcast no shutdown ! interface BRI0 no ip address no ip directed-broadcast encapsulation ppp shutdown ! interface BRI0:1 ip address 192.168.1.1 255.255.255.0 no ip directed-broadcast encapsulation ppp no shutdown ! interface BRI0:2 no ip address no ip directed-broadcast shutdown ! no ip http server ip classless ip route 10.2.2.0 255.255.255.0 192.168.1.2 ! ! line con 0 transport input none stopbits 1 line vty 0 4 login local ! ! end
Beispiel 2
Router1 (linke Seite
version 12.0 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname links ! enable secret <login Passwort> ! username <rechts> password <c.i.s.c.o.> ! ! ! ip subnet-zero ! isdn switch-type basic-net3 isdn voice-call-failure 0 cns event-service server no ip domain-lookup ! ! ! interface Ethernet0 ip address 10.1.1.1 255.255.255.0 no ip directed-broadcast no ip proxy-arp no shut ! interface BRI0 no ip address no ip directed-broadcast encapsulation ppp dialer pool-member 1 isdn switch-type basic-net3 isdn send-alerting ppp authentication chap callin no shutdown ! interface Dialer1 description Verbindung zu Router rechts ip address 192.168.2.1 255.255.255.0 no ip directed-broadcast no ip proxy-arp encapsulation ppp dialer remote-name rechts dialer pool 1 dialer string <Rufnummer Router rechts> dialer idle-timeout 120 either dialer load-threshold 100 either dialer-group 1 ppp authentication chap callin ppp multilink ! ! no ip http server ip classless ip route 10.2.2.0 255.255.255.0 Dialer1 ! access-list 102 deny udp any eq netbios-dgm any access-list 102 deny udp any eq netbios-ns any access-list 102 deny udp any eq netbios-ss any access-list 102 deny udp any range snmp snmptrap any access-list 102 deny udp any range bootps bootpc any access-list 102 deny tcp any eq 137 any access-list 102 deny tcp any eq 138 any access-list 102 deny tcp any eq 139 any access-list 102 permit ip any any dialer-list 1 protocol ip list 102 ! line con 0 transport input none stopbits 1 line vty 0 4 login local ! ! ! end
Router 2 (rechte Seite)
version 12.0 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname rechts ! enable secret <login Passwort> ! ! username <links> password <c.i.s.c.o.> ! ! ! ip subnet-zero ! isdn switch-type basic-net3 isdn voice-call-failure 0 no ip domain-lookup ! ! ! interface Ethernet0 ip address 10.2.2.1 255.255.255.0 no ip directed-broadcast no ip proxy-arp no shutdown ! interface BRI0 no ip address no shutdown no ip directed-broadcast encapsulation ppp dialer pool-member 1 isdn switch-type basic-net3 isdn send-alerting ppp authentication chap callin ! interface Dialer1 description Verbindung zu Router links ip address 192.168.2.2 255.255.255.0 no ip directed-broadcast no ip proxy-arp encapsulation ppp dialer remote-name links dialer pool 1 dialer idle-timeout 120 either dialer load-threshold 100 either dialer string <Rufnummer Router links> dialer-group 1 ppp authentication chap callin ppp multilink ! ! no ip http server ip classless ip route 10.1.1.0 255.255.255.0 Dialer1 ! ! access-list 102 deny udp any eq netbios-dgm any access-list 102 deny udp any eq netbios-ns any access-list 102 deny udp any eq netbios-ss any access-list 102 deny udp any range snmp snmptrap any access-list 102 deny udp any range bootps bootpc any access-list 102 deny tcp any eq 137 any access-list 102 deny tcp any eq 138 any access-list 102 deny tcp any eq 139 any access-list 102 permit ip any any dialer-list 1 protocol ip list 102 ! line con 0 transport input none stopbits 1 line vty 0 4 login local ! ! ! end
Beispiel 3
Router 1 (links)
service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname links ! enable secret <login Passwort> ! username <rechts> password <c.i.s.c.o.> username <mitte> password <c.i.s.c.o.> ! ! ! ip subnet-zero ! isdn switch-type basic-net3 isdn voice-call-failure 0 cns event-service server ! ! ! interface Ethernet0 ip address 10.1.1.1 255.255.255.0 no ip directed-broadcast no ip proxy-arp no shutdown ! interface BRI0 no ip address no ip directed-broadcast encapsulation ppp dialer pool-member 1 dialer pool-member 2 isdn switch-type basic-net3 isdn send-alerting ppp authentication chap callin no shutdown ! interface Dialer1 description Verbindung zu Router rechts ip address 192.168.2.1 255.255.255.0 no ip directed-broadcast no ip proxy-arp encapsulation ppp dialer remote-name rechts dialer pool 1 dialer idle-timeout 120 either dialer string <Rufnummer Router rechts> dialer-group 1 ppp authentication chap callin ! interface Dialer2 description Verbindung zu Router mitte ip address 192.168.1.1 255.255.255.0 no ip directed-broadcast no ip proxy-arp encapsulation ppp dialer remote-name mitte dialer pool 2 dialer idle-timeout 120 either dialer string <Rufnummer Router mitte> dialer-group 1 ppp authentication chap callin ! no ip http server ip classless ip route 10.2.2.0 255.255.255.0 Dialer2 ip route 10.3.3.0 255.255.255.0 Dialer1 ! access-list 102 deny udp any eq netbios-dgm any access-list 102 deny udp any eq netbios-ns any access-list 102 deny udp any eq netbios-ss any access-list 102 deny udp any range snmp snmptrap any access-list 102 deny udp any range bootps bootpc any access-list 102 deny tcp any eq 137 any access-list 102 deny tcp any eq 138 any access-list 102 deny tcp any eq 139 any access-list 102 permit ip any any dialer-list 1 protocol ip list 102 ! line con 0 transport input none stopbits 1 line vty 0 4 login local ! ! ! end
Router 2 (mitte)
service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname mitte ! enable secret <login Passwort> ! username <rechts> password <c.i.s.c.o.> username <links> password <c.i.s.c.o.> ip subnet-zero isdn switch-type basic-net3 ! ! ! interface Ethernet0/0 ip address 10.2.2.1 255.255.255.0 no ip directed-broadcast no ip proxy-arp no shutdown ! interface BRI0/0 no ip address no ip directed-broadcast encapsulation ppp dialer pool-member 1 dialer pool-member 2 isdn switch-type basic-net3 isdn send-alerting ppp authentication chap callin ! interface Ethernet0/1 no ip address no ip directed-broadcast no ip proxy-arp no shutdown ! interface Dialer1 description Verbindung zu Router rechts ip address 192.168.3.1 255.255.255.0 no ip directed-broadcast no ip proxy-arp encapsulation ppp dialer remote-name rechts dialer string <Rufnummer Router rechts> dialer pool 1 dialer idle-timeout 120 either dialer-group 1 ppp authentication chap callin ! interface Dialer2 description Verbindung zu Router links ip address 192.168.1.2 255.255.255.0 no ip directed-broadcast encapsulation ppp dialer remote-name links dialer string <Rufnummer Router links> dialer pool 2 dialer idle-timeout 120 either dialer-group 1 ppp authentication chap callin ! ip classless ip route 10.1.1.0 255.255.255.0 Dialer2 ip route 10.3.3.0 255.255.255.0 Dialer1 ! access-list 102 deny udp any eq netbios-dgm any access-list 102 deny udp any eq netbios-ns any access-list 102 deny udp any eq netbios-ss any access-list 102 deny udp any range snmp snmptrap any access-list 102 deny udp any range bootps bootpc any access-list 102 deny tcp any eq 137 any access-list 102 deny tcp any eq 138 any access-list 102 deny tcp any eq 139 any access-list 102 permit ip any any dialer-list 1 protocol ip list 102 ! line con 0 transport input none line aux 0 line vty 0 4 login local ! end
Router 3 (rechts)
service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname rechts ! enable secret <login Passwort> ! username <links> password <c.i.s.c.o.> username <mitte> password <c.i.s.c.o.> ! ! ! ip subnet-zero ! isdn switch-type basic-net3 isdn voice-call-failure 0 ! ! ! interface Ethernet0 ip address 10.3.3.1 255.255.255.0 no ip directed-broadcast no ip proxy-arp no shutdown ! interface BRI0 no ip address no shutdown no ip directed-broadcast encapsulation ppp dialer pool-member 1 dialer pool-member 2 isdn switch-type basic-net3 isdn send-alerting ppp authentication chap callin ! interface Dialer1 description Verbindung zu Router links ip address 192.168.2.2 255.255.255.0 no ip directed-broadcast no ip proxy-arp encapsulation ppp dialer remote-name links dialer pool 1 dialer string <Rufnummer Router links> dialer idle-timeout 120 either dialer-group 1 ppp authentication chap callin ! interface Dialer2 description Verbindung zu Router mitte ip address 192.168.3.2 255.255.255.0 no ip directed-broadcast no ip proxy-arp encapsulation ppp dialer remote-name mitte dialer pool 2 dialer string <Rufnummer Router mitte> dialer idle-timeout 120 either dialer-group 1 ppp authentication chap callin ! no ip http server ip classless ip route 10.1.1.0 255.255.255.0 Dialer1 ip route 10.2.2.0 255.255.255.0 Dialer2 ! access-list 102 deny udp any eq netbios-dgm any access-list 102 deny udp any eq netbios-ns any access-list 102 deny udp any eq netbios-ss any access-list 102 deny udp any range snmp snmptrap any access-list 102 deny udp any range bootps bootpc any access-list 102 deny tcp any eq 137 any access-list 102 deny tcp any eq 138 any access-list 102 deny tcp any eq 139 any access-list 102 permit ip any any dialer-list 1 protocol ip list 102 ! line con 0 transport input none stopbits 1 line vty 0 4 login local ! ! ! end