mpd und isdn-Einwahlverbindung

XPectIT

the just
Ich stehe mal wieder vor einem Problem.

Nachdem pf nat Probleme mit dem FreeBSD ppp zu haben scheint (es wird die Adresse des Interfaces nicht automatisch in den nat-Regeln angepasst), bin ich auf der Suche nach Alternativen. asg brachte mich auf den Gedanken den mpd anzuschauen.

Jetzt habe ich im Netz gelesen, howtos gewälzt und mit den config-Dateien herumgespielt, komme allerdings zu keinem brauchbaren Ergebnis.

Ich finde Beschreibungen wie ich mit xDSL oder Modems und mpd verfahren muss, aber zum Thema ISDN Einwahl lief mir noch nichts über den Weg.

i4bing ist im Kernel enthalten, netgraph ebenfalls. Aber ich habe keinen Anhaltspunkt wie die mpd.conf und die mpd.links aussehen sollte.

Ich bin für jeden Hinweis dankbar.

Edit: Hier findet sich ein Hinweis, das der Kaeptn das wohl schonmal erfolgreich angewandt hat. http://www.bsdforen.de/showpost.php?p=16185&postcount=3
 
Da kann ich Dir sicherlich weiterhelfen.

http://ezine.daemonnews.org/200406/mpd.html

Da gibt es ein ganzes Tutorial. Klappt auch alles wunderbar.
Bei mir habe ich auch deutlich kuerzere Pings gemessen.
2ms Unterschied zu ppp und NAT.
Mein Problem ist allerdings, dass der pf nicht alles zu übersetzen scheint.
www.real.com kann ich nicht aufrufen beispiel weise.
PF ist ganz offen und hat keine weiteren Regeln definiert.

HTH

CAT
 
ISDN Howto

Hi,

ich habe mir mal diese HOWTO aus dem Netz heruntergeladen und als Text abgespeichert. Ich schicke es hier mit...leider habe ich den Link nicht mehr, kann also den ehrenwerten Autor nicht nennen.

Vielleicht hilfts dir ja..

Gruß

-Marcus


Konfiguration des ISDN Kernels Links zum Thema
Diese Beispielkonfiguration soll eine ISDN-PPP Call By Call Verbindung zum Internet ermöglichen. Der erste Schritt, um diese Verbindung herzustellen, ist die Konfiguration des KERNELS und somit die korrekte Installation der ISDN Karte in das FreeBSD System.

1. In das Verzeichnis /usr/src/sys/i386/conf wechseln
2. cp GENERIC KERNISDN
3. Editieren Sie die Datei KERNISDN und fügen Sie folgende Zeilen hinzu:
# ISDN Section I4B
options AVM_A1
device ifpi
pseudo-device "i4bq921"
pseudo-device "i4bq931"
pseudo-device "i4b"
pseudo-device "i4btrc" 4
pseudo-device "i4bctl"
pseudo-device "i4brbch" 4
pseudo-device "i4btel" 4
pseudo-device "i4bipr" 4
pseudo-device "i4bisppp" 4
pseudo-device sppp4
options IPR_VJ
3a. Editieren Sie die Datei KERNISDN und ändern folgende Werte
# Pseudo devices - the number indicates how many units to allocated.
pseudo-device loop
pseudo-device bpf 4
pseudo-device ether 1
pseudo-device ppp 2
pseudo-device tun 2
4. config -r KERNISDN
5. In das Verzeichnis /usr/src/sys/compile/KERNISDN wechseln
6. make depend
7. make
8. make install
9. reboot

Danach sollten im dmesg folgende Zeilen enthalten sein:
ifpi0: <AVM Fritz!Card PCI> port 0xde00-0xde1f mem 0xefffffe0-0xefffffff irq 10 at device 12.0 on pci0
ifpi0: ISAC 2085 Version A1/A2 or 2086/2186 Version 1.1 (IOM-2)
ifpi0: passive stack unit 0
i4bisppp: 4 ISDN SyncPPP device(s) attached (VJ header compression)
i4b: ISDN call control device attached
i4btel: 4 ISDN telephony interface device(s) attached
i4brbch: 4 raw B channel access device(s) attached
i4bipr: 4 IP over raw HDLC ISDN device(s) attached (VJ header compression)
i4bctl: ISDN system control port attached
i4btrc: 4 ISDN trace device(s) attached



Konfiguration der /etc/isdn/isdnd.rc
Links zum Thema
Die Datei "/etc/isdn/isdnd.rc" ist die zentrale Konfigurationsdatei des ISDN Daemons. Eine Beispielkonfiguration könnte so aussehen (s.u.). In dieser Konfigurationsdatei sind die beiden devices rbch0 und rbch1 eingetragen, damit später auch eine Kanalbündelung über ISDN möglich ist.
#==============================================================================
# SYSTEM section: isdnd global configuration parameters
#==============================================================================
system
# accounting
# ----------
acctall = on # generate info for everything
acctfile = /var/log/isdnd.acct # name & location of accounting file
useacctfile = yes # generate accouting info to file
isdntime = on
monitor-allowed = no # global switch: monitor on/off
#==============================================================================
# User-ppp example
#==============================================================================
entry
name = I4BPPP
usrdevicename = rbch # erster ISDN-Kanal
usrdeviceunit = 0
isdncontroller = 0
isdnchannel = -1
local-phone-incoming = 1234567 # Durch richtige Telefonnummer ersetzen
remote-phone-incoming = *
local-phone-dialout = 1234567 # Durch richtige Telefonnummer ersetzen
remote-phone-dialout = 1234567 # ppp(8) will override this
remdial-handling = first
dialin-reaction = ignore
dialout-type = normal
b1protocol = hdlc
idletime-incoming = 240 # Should be larger than ppps timeout
idletime-outgoing = 30 # Should be larger than ppps timeout
ratetype = 0
unitlength = 90
unitlengthsrc = rate
dialretries = 3
dialrandincr = on
recoverytime = 25 # Should be smaller than ppps redial
usedown = off
downtries = 2
downtime = 30
entry
name = I4BPPP # zweiter ISDN-Kanal
usrdevicename = rbch
usrdeviceunit = 1
isdncontroller = 0
isdnchannel = -1
local-phone-incoming = 1234567 # Durch richtige Telefonnummer ersetzen
remote-phone-incoming = *
local-phone-dialout = 1234567 # Durch richtige Telefonnummer ersetzen
remote-phone-dialout = 1234567 # ppp(8) will override this
remdial-handling = first
dialin-reaction = accept
dialout-type = normal
b1protocol = hdlc
idletime-incoming = 240 # Should be larger than ppps timeout
idletime-outgoing = 30 # Should be larger than ppps timeout
ratetype = 0
unitlength = 90
unitlengthsrc = rate
dialretries = 3
dialrandincr = on
recoverytime = 25 # Should be smaller than ppps redial
usedown = off
downtries = 2
downtime = 30
# EOF #########################################################################

click here to dowload isdnd.rc
Konfiguration der /etc/ppp/ppp.conf Links zum Thema
Die Datei "/etc/ppp/ppp.conf" ist die zentrale Konfigurationsdatei des PPP Daemons. Diese Beispiel-konfiguration ermöglicht eine ppp-Verbindung zu einem Internetprovider. Wahlweise kann die Verbindung mit einem ISDN-Kanal (64kBit) oder mit zwei ISDN-Kanälen (128kBit) hergestellt werden.
#==============================================================================
# PPP: /etc/ppp/ppp.conf
#==============================================================================
default:
set cd 180
set device /dev/i4brbch0 /dev/i4brbch1 # Beide ISDN Kanaelen initialisieren
set dial
set hangup
set login
set proctitle ppp-isdn
set speed sync
nat enable yes
provider:
set phone "0123456789" # Nummer des Internetproviders
set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
add default HISADDR
enable dns
set authname BENUTZERNAME
set authkey BENUTZERPASSWORT
provider2:
set device /dev/i4brbch0 /dev/i4brbch1
set phone "0123456789" # Nummer des Internetproviders
set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
set mrru 1500
enable lqr
set reconnect 3 5
set redial 3 10
set lqrperiod 45
set speed sync
set bandwidth 65536
clone 1,2
link deflink rm
link * set mode auto
set autoload 0 0 1 # zweiten ISDN Kanal sofort laden
add default HISADDR
enable dns
set authname BENUTZERNAME
set authkey BENUTZERPASSWORT
# EOF #########################################################################
Konfiguration der /etc/rc.conf Links zum Thema
Damit beim Systemstart der ISDN und der PPP Daemon automatisch gestartet wird, muss die Datei "/etc/rc.conf" mit folgenden Einträgen erweitert werden.
Eintrag für den ISDN Daemon:

### ISDN interface options: ###
isdn_enable="YES" # Enable the ISDN subsystem (or NO)
isdn_fsdev="NO" # NO for daemon mode.
isdn_flags="-dn -d0x1f9" # Flags for isdnd
isdn_trace="NO" # Enable the ISDN trace subsystem
isdn_traceflags="-f /var/tmp/isdntrace0" # Flags for isdntrace

Eintrag für den PPP Daemon:

# User ppp configuration.
ppp_enable="YES" # Start user-ppp (or NO).
ppp_mode="auto" # Choice of "auto", "ddial", "direct" or "dedicated"
ppp_nat="YES" # Use PPP's internal network address translation or NO
ppp_profile="provider" # Which profile to use from /etc/ppp/ppp.conf.
ppp_user="root" # Which user to run ppp as

Hinweis zum PPP Eintrag:
Für den Fall, dass PPP nicht austomatisch beim Systemstart gestartet werden soll, besteht die Möglichkeit den PPP-Daemon von Hand zu starten.
Dazu verbindet man sich an der Konsole oder via Shell (ssh, telnet) zum FreeBSD Server und meldet sich als Benutzer root an.

1. Den Befehl ppp ausführen

root@www:~ # ppp
Working in interactive mode
Using interface: tun1
ppp ON www>dial provider # Profil "provider" (64kBit) starten

2. oder alternativ

root@www:~ # ppp
Working in interactive mode
Using interface: tun1
ppp ON www>dial provider2 # Profil "provider2" (128kBit) starten
 
Ich will die gegebenen Antworten ja nicht abwerten, aber so viel mit meiner eigentlichen Frage hat das nicht zu tun ;)

In Link1 von cat1510 sticht die Überschrift "DSL Router for FreeBSD with MPD and PF" hervor. Und marcus geht auf eine ISDN-Konfiguration mit ppp ein.

Mir ging es ursprünglich um eine ISDN-Konfiguration und Einwahl unter Verwendung von mpd. Allerdings hat sich mein Ursprungsproblem gelöst, und ich verwende nun weiterhin ppp und ISDN mit "pf-NAT".
Mit mpd und ISDN bin ich zwar keinen Schritt weiter, aber trotzdem danke für die Antworten.
 
Zurück
Oben