Re: [Debian] Kanalbuendelung
On Sun, Sep 23, 2001 at 11:06:05PM +0200, Stephan Splitthoff wrote:
> installiert/konfiguriert ist, bin ich mir nicht sicher ob es evtl. an
> einer falschen (zu alten) Version von i4l oder ipppd liegt.
Nö, läuft hier schon seit längerem, ab slink oder vorher...
> Als Kernel laeuft auf dem Rechner 2.2.18, normale ISDN-Verbindungen
> klappen einwandfrei.
Multilink-PPP muß im Kernel eincompiliert sein.
> Zuerst hatte ich nur eine Verbindung (ippp0). Dann hab ich mir fuer einen
> anderen Provider ein zweites device ippp1 angelegt.
> Hierzu hab ich in /etc/isdn/ die Dateien device.ippp0 und ipppd.ippp0
> kopiert (in device.ippp1 und ipppd.ippp1).
Die zum Testen evtl. erstmal zur Seite schieben.
Ich poste mal meine modifizierte device.ippp0, in ipppd.ippp0 sollte
als erste Option stehen:
# STANDARD OPTIONS
/dev/ippp0 /dev/ippp1
Dann die Option +mp auskommentieren, das wars mit dieser Datei. Statt
ippp1 kann man natürlich auch eine andere Zahl benutzen, ich glaube,
das hatte ich so mal laufen.
Hier das device.ippp0 zum Vergleichen und Anpassen:
---------
#!/bin/sh
# REMOVE the next line once configuration is complete #########################
# echo "Warning! $0 (not) configured yet! Aborting..."; exit 1
# REMOVE the above line once configuration is complete ########################
# Instructions: read the comments for each command, and if necessary, edit
# the command (e.g. replace EAZ with your real EAZ or MSN).
# If the command is commented out, remove the leading '#' to enable it if
# the command is needed.
#
# After you have configured this file, remove the "Warning!" line above to
# enable this file.
# Get the device name
set -e ; device=`basename $0`; device=${device#*.}
# set some important values
# Use 10.0.0.1 for LOCALIP and 10.0.0.2 for REMOTEIP if you have
# dynamic IP addresses; with static address fill in the real values!
LOCALIP=10.0.0.1 # XXX_
REMOTEIP=10.0.0.2 # XXX_
# Phone numbers (without the leading zero)
LOCALMSN=123456 # XXX_
REMOTEMSN=5317411 # XXX_
# Uncomment this line below for multilink ppp.
# Make shure +mp is defined in /etc/isdn/ipppd.ipppX!
#
DEVICE1="ippp1" # Device used for multilink ppp
# Encapsulation (default is syncppp for ipppX devices, rawip for isdnX devices)
# Change the next four lines if you need some other value.
if expr ${device} : ippp > /dev/null
then ENCAP=syncppp
else ENCAP=rawip
fi
# DIALMODE:
# New with kernel 2.0.36 is the `dialmode' setting.
# dialmode=auto is compatible with the old behaviour (dial-on-demand enabled).
# Read the isdnctrl manpage for more info.
# Change the value below if you want a different setting when the interface is
# started.
DIALMODE=auto # XXX_
# Configuration (start)
case "$1" in
start)
# If running kernel 2.0.31 or higher, enable the IP dynamic hack
# (if needed). See linux/Documentation/ip_dynaddr.txt .
# You may also need to use the ip-up and ip-down scripts in
# /usr/doc/isdnutils/examples to get the routing correct. Those
# scripts should be put in /etc/ppp, but beware of overwriting any
# existing scripts belonging to the "ppp" package!
[ -f /proc/sys/net/ipv4/ip_dynaddr ] && echo 7 > /proc/sys/net/ipv4/ip_dynaddr
# First you need to create the interface
isdnctrl addif ${device}
# eaz name num
# Set the EAZ (German 1TR6 protocol) or MSN (Euro-ISDN E-DSS1) for
# interface "name" to "num". For an EAZ this is only one digit, for a
# MSN "num" is the whole MSN.
# In the Netherlands this includes the areacode, but not the leading 0.
# (other countries?)
isdnctrl eaz ${device} $LOCALMSN
# addphone name out num
# Set the phone number(s) of the remote site for the IP-interface
# "name". More than one number can be set by calling isdnctrl addphone
# repeatedly. If more than one number is set these will be tried one
# after another. When using an german SPV-type connection, with a
# ICN-card, the number has to be preceeded by a capital S.
# This is the "normal" number.
isdnctrl addphone ${device} out 0$REMOTEMSN
# addphone name in num
# Set the phone number(s) that the IP-interface "name" is supposed to
# accept for incoming calls. If no num ber is given incoming calls are
# disabled. More than one number can be set by calling isdnctrl addphone
# repeatedly. Also wildcards can be used (see below).
# In the Netherlands (and elsewhere?),
# this is with areacode but without leading 0
# isdnctrl addphone ${device} in $REMOTEMSN
# secure name on|off
# Turns on or off the security feature for interface "name". If set to
# on, incoming calls will only be accepted if the calling number has
# been added to the access list with isdnctrl addphone name in.
isdnctrl secure ${device} on
# huptimeout name seconds
# Set the hangup timeout for interface "name" to "seconds". If there
# is inactivity (i.e. no traffic on the interface) for the given time
# the driver automatically shuts down the connection.
# Default is 60 seconds
isdnctrl huptimeout ${device} 50
# dialmax name num
# Set the number of dial atempts for interface "name" to "num". If
# dialing, each phonenumber is tried this many times before giving up.
#isdnctrl dialmax ${device} NUM
# ihup name on|off
# Turn on or off the hangup timeout for incoming calls on interface name
#isdnctrl ihup ${device} on
# encap name encapname
# Set the encapsulation mode for interface "name". Possible modes for
# encapname are: rawip ip cisco_h ethernet syncppp uihdlc
# (most people use rawip, syncppp or cisco_h; syncppp is normal for
# ISP's, rawip is normal for semi-fixed linux-linux connections)
isdnctrl encap ${device} $ENCAP
# l2_prot name protocol
# Set the layer-2 protocol for interface "name". Possible values for
# "protocol" are x75i, x75ui, x75bui and hdlc
# (most people use hdlc)
isdnctrl l2_prot ${device} hdlc
# l3_prot name protocol
# Set the layer-3 protocol for interface "name". At the moment only
# trans is supported. If protocol is omitted the current setting is
# printed.
isdnctrl l3_prot ${device} trans
# verbose num
# Set verbosity level to <num>.
# (2 shows the first package of every connection, that is very useful.)
# WARNING: this is a global parameter, that affects all isdn devices!
isdnctrl verbose 3
# CHARGEHUP FUNCTION
# chargehup name on|off
# Turn on or off hangup before next charge info for interface name. This
# can only be used if the ISDN provider transmits charge info during and
# after the connection. If set to on, the driver will close the
# connection just before the next charge info will be received if the
# interface is inactive.
isdnctrl chargehup ${device} on
# chargeint name seconds
# When "seconds" are given, the charge interval for the given interface
# is set. This may be of use on ISDN lines with no chargeinfo or no
# online chargeinfo. The connection will only be closed 2 seconds before
# the end of the next charge interval and only, if huptime out seconds
# of inactivity have been reached. If ihup is on, also incomming
# connections are closed by this mechanism.
isdnctrl chargeint ${device} 60
# CALLBACK FUNCTION
# callback name off|in|out
# Selects callback mode for interface "name". If callback mode is in,
# then after getting an incoming call, a callback is triggered. If
# callback mode is out, then this system does the initial call, then
# waiting for callback of the remote machine.
#isdnctrl callback ${device} MODE
# cbdelay name seconds
# Set the callback delay for interface "name" to "seconds". If callback
# mode for this interface is in, dialing is delayed the given time. If
# the callback mode is out, after dialing out and waiting the given
# time, a hangup is issued to free the line for the incoming callback
# from the remote machine. This hangup-after-dial is disabled by setting
# cbdelay to 0.
#isdnctrl cbdelay ${device} SECONDS
# cbhup name on|off
# Turns on or off Hangup (Reject) for interface "name" before starting
# Callback.
#isdnctrl cbhup ${device} MODE
# OTHER OPTIONS
# There are other options not used by most people. You can insert these
# options here.
# See also : isdnctrl(8), isdnctrl help text
# MPPP Stuff
if [ $DEVICE1 ] ; then
isdnctrl addslave ${device} $DEVICE1 # Create new slave interface 'DEVICE1'
isdnctrl addphone $DEVICE1 out 0$REMOTEMSN # Set outgoung phone-number
isdnctrl eaz $DEVICE1 $LOCALMSN # Set local EAZ ..
isdnctrl l2_prot $DEVICE1 hdlc # for sync PPP: set Level 2 to HDLC
isdnctrl l3_prot $DEVICE1 trans # not really necessary, 'trans' is default
isdnctrl encap $DEVICE1 syncppp # encap the IP Pakets in PPP frames
isdnctrl huptimeout $DEVICE1 50 # Hangup-Timeout is 300 sec. -> 5 min
isdnctrl chargehup $DEVICE1 on # Hangup before next Charge-Info
isdnctrl chargeint $DEVICE1 60
isdnctrl secure $DEVICE1 on # Accept only configured phone-number
isdnctrl dialmode $DEVICE1 auto # Auto-Dial
fi
# pppbind is needed when using one ipppd per ippp interface
# (like Debian does)
if bindnum=`expr $device : 'ippp\(.\)'`
then
isdnctrl pppbind ${device} `expr "$device" : 'ippp\(.\)'`
fi
# NETWORK SETUP
# Network device setup as usual.
# See also : ifconfig(8) route(8) or any book about unix networking.
ifconfig ${device} up
ifconfig ${device} $LOCALIP pointopoint $REMOTEIP
# route add -host $REMOTEIP
# setting default route here is only useful if this is your only
# outside connection...
route add default ${device}
# firewall rules
# Note that the default rule should be to deny all incoming connections!
# That's done with the line below:
# ipfwadm -I -p deny
# After that you need to allow incoming connections on eth0 and lo:
# ipfwadm -I -a accept -W lo -S 127.0.0.0/8
# ipfwadm -I -a accept -W eth0 -S 192.168.0.0/16
# Of course, change 192.168.0.0 to fit your ethernet network number...
# The ipfwadm commands above should be done only once, e.g. in
# /etc/init.d/netbase in the function spoof_protect.
#
# The firewall rules below will only work here if using static IP
# addresses!!! For dynamic addresses the rules should be added in
# /etc/ppp/ip-up.d/isdnutils and deleted in /etc/ppp/ip-down.d/isdnutils
#
# Next two lines enable inbound packets to non-service ports
# except for smtp and ident (for mail and identification of
# connections, a Good Thing).
# ipfwadm -I -a accept -W ${device} -P tcp -D $LOCALIP smtp ident 1024:65535
# ipfwadm -I -a accept -W ${device} -P udp -D $LOCALIP 1024:65535
# ipfwadm -I -a accept -W ${device} -P icmp -D $LOCALIP
# masquerading rules, for transparently connecting local net to internet
# ETH_IP=`hostname -i | tr -d ' '`
# ipfwadm -F -a accept -m -P tcp -S $ETH_IP/24
# ipfwadm -F -a accept -m -P udp -S $ETH_IP/24
isdnctrl dialmode $device $DIALMODE || true
;;
# Delete the interface
stop)
isdnctrl dialmode $device off || true
# Commands to undo the network stuff
# Undo any ipfwadm commands done above! Change the -a to -d, put below.
route del $REMOTEIP 2> /dev/null || true
# only delete default route if set above!
route del default 2> /dev/null || true
ifconfig $device down 2> /dev/null || true
isdnctrl delif $device 2> /dev/null || true
;;
# the rest is generic, don't touch
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
exit 0
---------
--
Bye,
Dietmar
--
-----------------------------------------------------------
Um sich aus der Liste auszutragen schicken Sie bitte eine
E-Mail an debian-user-de-request@lehmanns.de die im Subject
"unsubscribe <deine_email_adresse>" enthaelt.
Bei Problemen bitte eine Mail an: Jan.Otto@Lehmanns.de
-----------------------------------------------------------
933 eingetragene Mitglieder in dieser Liste.
Reply to: