Koozali.org: home of the SME Server

mxstream connection lost

Rob Delissen

mxstream connection lost
« on: October 21, 2001, 03:59:59 PM »
I'm using SME5, and added adsl4linux to connect to the internet with mxstream. I used the howto written by rogier at www.e-smith.nl. Workt fine, mut once a week the connection drops, and i have to restart the server to connect again. I also used freesco, with a redial-script. That box keeps the connection up. Can anyone help me finding a similar solution for the SME-server. (I dont heve the knowledge myself. Yet.)

Timothee

Re: mxstream connection lost
« Reply #1 on: October 21, 2001, 06:04:04 PM »
What provider do you use with adsl?
Did you also look at www.minddigger.com or forum.minddigger.com ??

guestFF

Re: mxstream connection lost
« Reply #2 on: October 21, 2001, 06:40:51 PM »
Hi, Take a look at how to invoke your ISP connection. You have to add is at rcd.7 level, for SMEv5 'resets' its connection one a week. At this point you will lose ISP connection. Try to look for 'automatic startup' or similar on both adsl4linux & e-smith.

Good luck.

HFW

Rob Delissen

Re: mxstream connection lost
« Reply #3 on: October 22, 2001, 01:40:26 AM »
Providors are both HCC-Net and XS4ALL.
The connection is initiated with a ASDL Start command, at startup. For Freesco someone wrote three scripts: one to check whether te connection is still up, one to initiate stop if it is not, and a third to redial.
The problem is I don't know how to make it work with e-smith: I know a lot of people in Holland struggle with this.
These are the scripts:
xs-check:
#!/bin/sh
clear > /dev/tty6
echo "ADSL log started $(date)." > /dev/tty6
#
while :; do
   sleep 150
   ping_result=no_result_yet
   ping_nr=5
   attempt=0
   ping_ok="1 packets transmitted, 1 packets received, 0% packet loss"
#
   while [ "$ping_result" != "$ping_ok" ] && [ "$ping_nr" -ne 0 ]; do
      ping_result=$(ping -c 1 194.109.6.11 | grep packets)
      ping_nr=$(expr $ping_nr - 1)
      sleep 30
   done
#
   if [ "$ping_nr" -eq 0 ]; then
      echo "$(date) Connection down......Restarting ADSL." > /dev/tty6
      until [ "$(ping -c 1 194.109.6.11 | grep packets)" = "$ping_ok" ]; do
         attempt=$(expr $attempt + 1)
         /mnt/router/etc/xs-down
         sleep 5
         /mnt/router/etc/xs-up
         sleep 1
      done
      echo "$(date) Connection re-established after $attempt attempt(s)." > /dev/tty6
   fi
done

xs-down:
#!/bin/sh
# Stop internet connection

echo
echo -n "Logout ISP...         "

echo
echo "stop pppd............."
killall pppd
echo "stop pptp............."
killall pptp
echo "remove pptp dir.."
rm -rf /var/run/pptp
echo "remove pp* file..."
rm /var/run/ppp*
echo "remove default route....."
route del default
echo "remove last route....."
# remove gateway: check route -n
route del YOUR.GATEWAY.IP.HERE
ifconfig ppp0 down

and at last:
xs-up:
#!/bin/sh
# Initiate internet connection

echo
echo -n "Login ISP...         "

pptp 10.0.0.138 file /etc/ppp/options.adsl &

sleep 10

Timothee

Re: mxstream connection lost
« Reply #4 on: October 22, 2001, 02:51:56 AM »
I know somewhone who has e-smith (both 4.1.x and sme 5) and also adsl with xs4all and he only needed to mod his modem and nothing to e-smith and it works good!
I don't know how to do this by myself because I have @home cable internet, but if you ask this question on forum.minddigger.com (which is my site :)) you'll get an answer I think.

guestFF

Re: mxstream connection lost
« Reply #5 on: October 22, 2001, 02:54:01 AM »
Hi Rob,

I installes both 4.1.2 & 5.0 with MXstream ADSL in NL. Both with adsl4linux.
I experianced no problems as long as I can ping the ADSL modem.

As fa as I can see from your log files you are not using adsl4linux, but special scripts.

Please refer to the adsl4linux homepage for detailed instructions. I will try to find some other links I used...

Hope it helps.

HFW

guestFF

Re: mxstream connection lost
« Reply #6 on: October 22, 2001, 02:56:46 AM »
Timothee is right, no modifications to e-smith, just install adsl4linux. Here's a tip, star out with a clean e-smith with no 'special' scripts.....


HFW

Rob Delissen

Re: mxstream connection lost
« Reply #7 on: October 22, 2001, 09:01:43 PM »
I have started out with a fresh install. No special scripts. And i have installed adsl4linux on this installation, as howtood by Rogier on
http://www.e-smith.nl/sections.php?op=viewarticle&artid=1

And it works allright. Exept once every few days the connection drops, and SME doesnt reconnect again.

The script I posted were not logfiles from the server. Sorry for the misunderstanding. The scripts are from another router installation (freesco), and ment to redial on connection-loss. And they work. On Freesco. I hoped there would be a similar solution for the SME. But I don't know how...

guestFF

Re: mxstream connection lost
« Reply #8 on: October 23, 2001, 03:12:39 AM »
Once again,

E-smith (SMEV5) 'resets' itself once in a 'while' . Make sure that adsl4linux 'knows'  about htis. Check your '/var/log/messages'  to see when, why and how this is happening...

regards,

HFW

guestFF

Re: mxstream connection lost
« Reply #9 on: October 23, 2001, 03:16:52 AM »
Freesco isn't e-smith. Stick to one subject at a time. Don't mix freesco issues with e-smit issues. One step at a time will help you.

HFW

Bart

Re: mxstream connection lost
« Reply #10 on: October 23, 2001, 07:00:56 PM »
IMHO, ADSL4Linux is a dreadful solution when using essg.

I use a combination of :

- an entry in /etc/inittab that respawns pptp when starting (or killed)
- entry "persist" in /etc/ppp/options

I also send a mail from /etc/ppp/ip-up.local to the administrator (me :) ) when a connection is established. (and from /etc/ppp/ip-down.local when the mxstream/adsl-connection breaks)
All in all it has been proven to be a very solid solution for autoreconnecting the essg to internet .

It requires however a solid understanding of how mxstream, pptp, pppd and the firewall interact on the essg/linux box.

- Bart

Johan Wijngaard

Re: mxstream connection lost
« Reply #11 on: October 23, 2001, 10:38:00 PM »
Hello,

For get the adsl4linux settings and tweak you alcatel mxstream modem tot the pro router.

then the router makes the connections and keep it up.

Then configure E-smith with normal settings to the second ethernet port of you box with the richt gateway information.

Its running always and fast

A discrition of the tweak of you modem/router is on the follow link


http://hacks.sateh.com/alcatel.php

succes

Johan

Rob Delissen

Re: mxstream connection lost
« Reply #12 on: October 23, 2001, 10:40:30 PM »
Thank you Bart. Glad you give me some prospective. Though I think you overestimate my Linux-knowledge. Could you transfornm your advise into a little howto. Or send me the config files, so I can work it out myself.

Johan Wijngaard

Re: mxstream connection lost
« Reply #13 on: October 23, 2001, 10:42:58 PM »
Special for Rob,

In dutch is a site that have publish the tweak of your mxstram modem on a very good manner.

got to:

http://www.bruring.com/adsl/

Then config your second ethernet port to

Tot a ip adress in the 10.0.0.x (not 1,138,are 255)
 with a mask as 255.255.255.0
with the gate way to 10.0.0.138

On my place its works very good (ISP is XS4ALL

Second time  goodluck

Johan

Timothee

Re: mxstream connection lost
« Reply #14 on: October 23, 2001, 10:45:09 PM »
This is exactly what I meant! You don't need to tweak anything to your e-smith box.

guestFF

Re: mxstream connection lost
« Reply #15 on: October 24, 2001, 12:11:47 AM »
Very good Johan.

Ronald

Re: mxstream connection lost
« Reply #16 on: October 26, 2001, 11:37:22 PM »
Rob,

Tweak your modem and it will be always on!
http://www.bruring.com/adsl/

Ronald