[COLUG] Cingular aircard operation problem
William Yang
wyang at gcfn.net
Thu Apr 26 13:57:18 EDT 2007
Jim wrote:
> charles morrison wrote:
>
> < ... the aircards seem to disconnect during a session.
>
> < My son has found that if he drops to a command prompt and issues a
> < continuous ping (under Windows), the connection is maintained and he
> < gets very good speed. This indicates to us that the Cingular network
> < disconnects us in a very short period of inactivity. We would both like
> < some ideas on how to maintain the Cingular connection, he, using windows
> < and I, using Kubuntu, which will not keep the network busy with pings,
> < but keep the connection alive so the card is usable.
>
> If you are trying to maintain _TCP_ connections under Linux,
> like an ssh connection of long duration, but with
> idleness, that you don't want broken,
> a solution could be something like:
>
> echo 30 >/proc/sys/net/ipv4/tcp_keepalive_time
>
> Explore the other /proc/sys/net/ipv4/tcp_keepalive_* pseudofiles.
>
> If there isn't a TCP connection to maintain,
> maybe ping is the way to go.
>
> It'd be good to learn the screen command also.
Pondering the ping solution, I think the trick might be to identify how
long the timeout really is, and then set the 'ping' delay to be
something "adequately shorter". Probably the best destination to ping
would be the upstream default gateway (ie: shoot for a target with at
little delay as possible) with a timing that's as infrequent as
reasonably possible so as to maintain the performance desired.
The thinking I have is as follows:
1) Set a reasonably long interval.
2) Always try a fixed number of times then recheck to see if the
situation on the network has changed (DHCP reassignment, for
example... or IF up.
3) Count * interval should come out to be some reasonable time window
(I like the "5 minute" model).
4) Read the man page for 'ping' to make the transmissions smaller (and
thus less likely to congest your bandwidth) or play with other
settings to tune this to your current situation.
5) NO WARRANTY OR GUARANTEE. NO REPRESENTATION THAT THIS SOLUTION IS
FIT FOR MERCHANTABILITY OR ANY PARTICULAR PURPOSE. Use this
suggestion at your own risk. It's not my fault and not my problem
if something bad happens as a result, such as (for instance)
Cingular billing you ungodly amounts of money for abusing their
network and then cancelling your service at an inopportune time.
#! /bin/sh
exit 0 # CODE DISABLKED BY DEFAULT
INTERVAL=10 # 10 seconds until I lose performance...
COUNT=30 # 30 * 10 seconds = 5 minutes; how often I loop
GO=0 # used exclusively for flow control purposes
while [ $GO = 0 ] ; do
GW=192.168.1.1 # or `netstat -rnA inet | grep | sed | awk`
# other logic may go here.
ping -q -c $COUNT -i $INTERVAL $GW
GO=$?
done
--
William Yang
wyang at gcfn.net
More information about the colug432
mailing list