Koozali.org: home of the SME Server

Disconnect DSL after an idle time

Andreas Herrmann

Disconnect DSL after an idle time
« on: September 06, 2002, 05:15:20 AM »
My E-Smith is a dedicated Server and Gateway over PPPoE.
Can one disconnect the connection according to an idle time? The server should not be on-line the whole time.
How can I do this.
Can you help me?

Michael

Re: Disconnect DSL after an idle time
« Reply #1 on: September 08, 2002, 11:08:49 PM »
Hi Hermann,

try:

copy the file  30demand

from here /etc/e-smith/templates/etc/ppp/pppoe.conf/ to there /etc/e-smith/templates-custom/etc/ppp/pppoe.conf/

the comand could look like this:
cp /etc/e-smith/templates/etc/ppp/pppoe.conf/30demand /etc/e-smith/templates-custom/etc/ppp/pppoe.conf/


change the file  30demand
ORIGINAL
# Bring link up on demand?  Default is to leave link up all the time.
# If you want the link to come up on demand, set DEMAND to a number indicating
# the idle time after which the link is brought down.
DEMAND={ db_get_prop(\%conf, 'pppoe', 'DemandIdleTime'); }

NEW AFTER CHANGE
# Bring link up on demand?  Default is to leave link up all the time.
# If you want the link to come up on demand, set DEMAND to a number indicating
# the idle time after which the link is brought down.
# DEMAND={ db_get_prop(\%conf, 'pppoe', 'DemandIdleTime'); }
DEMAND = 120

I suspect (hope) that the demand time is in seconds

After that expand the just created custom template
/sbin/e-smith/expand-template /etc/ppp/pppoe.conf

Shutdown and restart to let the changes take effect.

Now the file /etc/ppp/pppoe.conf should be set correct

If you want to understand  what you just did, look here:
http://www.e-smith.org/custom/


Well, you probably could just change the variable "DemandIdleTime" with something like this:

/sbin/e-smith/config set DemandIdleTime 130
and set the changes with this
/sbin/e-smith/signal-event console-save

but it never worked for me. If anyone knows how to do this, I would appreacheate any help

Andreas Herrmann

Re: Disconnect DSL after an idle time
« Reply #2 on: September 09, 2002, 10:44:22 PM »
That´s the right way in would works.
But the SME Server tries to hold up the pppoe connection all the time. So the server goes offline and in the next seconds it is again online.
Does someboy now how to disable e-smith´s function to hold the line up?

Rich Lafferty

Re: Disconnect DSL after an idle time
« Reply #3 on: September 09, 2002, 10:50:35 PM »
In most areas of the world, DSL is sold as an "always-on" Internet connection,
so there's no demand-dialing feature in our PPPOE support. Diald is only
used for intermittent dialup connections (modem, ISDN).

Cheers,
--Rich

Andreas Herrmann

Re: Disconnect DSL after an idle time
« Reply #4 on: September 09, 2002, 10:55:25 PM »
Your rights. But if I want to use my DSL flat rate at two places it would be useful. With T-Online this is possible. You can make a second user. So I must pay for the flat rate only once.

Charlie Brady

Re: Disconnect DSL after an idle time
« Reply #5 on: September 10, 2002, 06:42:15 AM »
Michael wrote:

> Well, you probably could just change the variable
> "DemandIdleTime" with something like this:
>
> /sbin/e-smith/config set DemandIdleTime 130
> and set the changes with this
> /sbin/e-smith/signal-event console-save
>
> but it never worked for me. If anyone knows how to do this, I
> would appreacheate any help

/sbin/e-smith/db configuration setprop pppoe DemandIdleTime 130
/sbin/e-smith/signal-event post-upgrade
/sbin/e-smith/signal-event reboot

["signal-event post-upgrade" then "signal-event reboot" is the sledgehammer approach, it reconfigures everything and restarts everything, so is the most reliable reconfig sequence.]

Charlie

Michael

Re: Disconnect DSL after an idle time
« Reply #6 on: September 10, 2002, 03:22:39 PM »
Hi Charlie,

thanks for the information.

Does anyone know where to find more documentation on setting db values, besides  www.e-smith.org/custmize?

Michael

Ray

Re: Disconnect DSL after an idle time
« Reply #7 on: November 12, 2002, 12:09:56 AM »
Hi there.

Is the Idletime in seconds or minutes ?
Thx