ISDN+Linux probleem

Pagina: 1
Acties:
  • 100 views sinds 30-01-2008
  • Reageer

  • budi
  • Registratie: Januari 2000
  • Laatst online: 14-08 18:33
Hoi ik heb een probleem met een combinatie van RedHat 6.1 en ISDN. Op zich werkt het allemaal prima met de onderstaande scriptjes, maar ik heb het probleem dat ik vrijwel altijd 2x isdn-up moet runnen voordat ik verbinding krijg. Zou iemand die hier verstand van heeft de volgende scriptjes door willen lezen om te kijken of er iets verkeerd staat? Alvast bedankt.
Oh ja, ik bel in via Superweb maar daar ligt het niet aan, omdat ik er ook last van had toen ik nog via Freesurf inbelde. Bovendien heb ik het nummer gebeld met mijn gewone telefoon en ik hoor gewoon een computer aan de andere kant van de lijn.

isdn-init
---------

#!/bin/sh
#
# isdn-init Initialize isdn parameters and start the ipppd daemon.
# Note that the idle timeout is set below to 10 minutes.
#

#
# Enter local and remote number here. Local number
# can be practically everything if you wish.
#
LOCAL_NUMBER="0356913533"

#REMOTE_NUMBER="0334645505"
REMOTE_NUMBER="16110107501915"
#REMOTE_NUMBER="8805490"


#
# Put your username here. The same username needs to
# be in /etc/ppp/pap-secrets.
#
USER=bjonkhart
#USER=bjonkhart@freeler.nl
#USER=budij@hetnet.nl
#USER=jonkhart
#
# Set idle timeout here. The ISDN PPP daemon hangs up after this
# many seconds of idle time (default == 600 secs == 10 mins).
#
IDLE=300




##############################################################

DEVICE="ippp0"

#
# Forcibly kill all existing stuff!
#
killall -9 ipppd
ifconfig $DEVICE down

#
# Set up device.
#
isdnctrl delif $SDEVICE 2>/dev/null
isdnctrl delif $DEVICE 2>/dev/null
sleep 2
isdnctrl addif $DEVICE # Create new interface 'DEVICE'
isdnctrl addphone $DEVICE in $REMOTE_NUMBER # Set incoming phone-number
isdnctrl addphone $DEVICE out $REMOTE_NUMBER # Set outgoung phone-number
isdnctrl eaz $DEVICE $LOCAL_NUMBER # Set local EAZ ..
isdnctrl l2_prot $DEVICE hdlc # for sync PPP: set Level 2 to HDLC
isdnctrl l3_prot $DEVICE trans # not really necessary, 'trans' is default
isdnctrl dialmode $DEVICE manual # set the dial mode
isdnctrl encap $DEVICE syncppp # encap the IP Pakets in PPP frames
isdnctrl huptimeout $DEVICE $IDLE # Hangup-Timeout is $IDLE sec.
isdnctrl chargehup $DEVICE off # Hangup before next Charge-Info
isdnctrl secure $DEVICE on # Accept only configured phone-number
#isdnctrl dialmax $DEVICE 5 # get/set number of dial-atempts for interface


# start the (new) deamon:
# -----------------------
# 'user myusername' : set username to get the right password from the
# pap-secrets file(s)
# ipcp-accept-local ipcp-accept-remote : accept every IP address
# -vjccomp -ac -pc : _my_ remote side doesn't support this, so disable it
# -vj: disable VJ Compression .. reported to be more stable
# -bsdcomp : i4l-syncPPP driver doesn't support bsd-compression
# debug : enable debugging, WARNING: ipppd will also log your password
# useifip : get IP address information form the network interface
# /dev/ippp0 /dev/ippp1 /dev/ippp2 : connect to 3 devices for max.
# three connections at the same time

ipppd user $USER \
ipcp-accept-local ipcp-accept-remote \
-detach \
mru 1524 \
-bsdcomp \
-vj \
/dev/ippp0 &

ifconfig $DEVICE down


------EOF------------------------------------------------

ISDN-UP
-------

#! /bin/sh
#
# isdn-up Force a dialout.
#

DEVICE=ippp0

isdnctrl dial $DEVICE


------EOF------------------------------------------------

ISDN-DOWN
---------

#! /bin/sh
#
# isdn-down Hang up and make sure the lines _stays_ hung up.
#

DEVICE=ippp0

isdnctrl hangup $DEVICE
ifconfig $DEVICE down

------EOF------------------------------------------------

PAP-SECRETS
-----------

# # Added by linuxconf
bjonkhart * XXXXXX

------EOF------------------------------------------------

IP-UP
-----

#!/bin/bash

# This file should not be modified -- make local changes to
# /etc/ppp/ip-up.local instead

LOGDEVICE=$6
REALDEVICE=$1

export PATH=/sbin:/usr/sbin:/bin:/usr/bin

[ -x /etc/ppp/ip-up.local ] && /etc/ppp/ip-up.local $*

# Used for clustering heartbeat monitoring stuff.
[ -x /etc/ppp/ip-up.heart ] && /etc/ppp/ip-up.heart $*

/etc/sysconfig/network-scripts/ifup-post ifcfg-${LOGDEVICE}

exit 0

IP-UP.LOCAL
-----------

#!/bin/sh

PATH=/bin:/sbin:/usr/bin:/usr/sbin

#INTERFACE=`echo $1 | sed 's/[0-9]$//'`
#if [ "$INTERFACE" = "ippp" ]; then
# cp -f /etc/resolv.conf /etc/resolv.conf_isdnbak >& /dev/null
#fi

case "$1" in
ippp0)
route add default gw $5
;;
esac

------EOF------------------------------------------------


Stukje logfile
--------------

Nov 6 21:58:08 server ipppd[16929]: Local number: 0356913533, Remote number: 16110107501915, Type: outgoing
Nov 6 21:58:08 server ipppd[16929]: PHASE_WAIT -> PHASE_ESTABLISHED, ifunit: 0, linkunit: 0, fd: 7
<hier blijft hij de hele tijd op hangen... daarna hang ik op en probeer ik het opnieuw en dan doet hij het wel>
Nov 6 22:00:04 server ipppd[16929]: Modem hangup
Nov 6 22:00:04 server ipppd[16929]: Connection terminated.
Nov 6 22:00:04 server ipppd[16929]: taking down PHASE_DEAD link 0, linkunit: 0
Nov 6 22:00:04 server ipppd[16929]: closing fd 7 from unit 0
Nov 6 22:00:04 server ipppd[16929]: link 0 closed , linkunit: 0
Nov 6 22:00:04 server ipppd[16929]: reinit_unit: 0
Nov 6 22:00:04 server ipppd[16929]: Connect[0]: /dev/ippp0, fd: 7
Nov 6 22:00:15 server ipppd[16929]: Local number: 0356913533, Remote number: 16110107501915, Type: outgoing
Nov 6 22:00:15 server ipppd[16929]: PHASE_WAIT -> PHASE_ESTABLISHED, ifunit: 0, linkunit: 0, fd: 7
Nov 6 22:00:15 server ipppd[16929]: Remote message:
Nov 6 22:00:15 server ipppd[16929]: MPPP negotiation, He: No We: No
Nov 6 22:00:15 server ipppd[16929]: CCP enabled! Trying CCP.
Nov 6 22:00:15 server ipppd[16929]: CCP: got ccp-unit 0 for link 0 (protocol: 0x80fd)
Nov 6 22:00:15 server ipppd[16929]: ccp_resetci!
Nov 6 22:00:15 server ipppd[16929]: local IP address 213.171.138.8
Nov 6 22:00:15 server ipppd[16929]: remote IP address 213.35.248.146

MY Systemconfiguration: 10fingers@5chars/s; 2legs@5km/h; 1mouth@14k4; 2ears@18Khz; 2eyes@-6&-7


  • xychix
  • Registratie: September 2000
  • Laatst online: 03-12-2025

xychix

FreeBSD Rules !

zou je niet de telefoon nummers uit dit script halen ?

nu snap ik dat je vol vertrouwen bent maar ik gooide dit niet zomaar allemaal online :o

[OOOOPPPPSSS]
Het is nog vroeg en ik heb in de search aan het lezen Bijlkbaar sliep ik nog !
En kickte ik dit superoude topic volledig onnodig !
Excuse moi!
[/OOOOPPPPSSS]

Every failure offers you a new opportunity! | Lokatie database|GoT - Notepad