Re: Moving interfaces
- From: ibuprofin@xxxxxxxxxxxxxxxxxxxxxx (Moe Trin)
- Date: Thu, 04 Dec 2008 21:23:19 -0600
On Thu, 04 Dec 2008, in the Usenet newsgroup alt.os.linux, in article
<GYWdnTWqy--IiKXUnZ2dnUVZ_h-dnZ2d@xxxxxxxxxxxxxxx>, sk8r-365 wrote:
Moe Trin made a definite or systematic statement of:
Is it that cold up in snow country? I suppose it could be, as I'm
seeing a ton of license plates from several provinces and states along
the Canadian border.
About 10+ F. this late morning.
And people wonder why I don't miss winter snows.
OK - let's do some isolation. First, you know I'm command line, so<snip>
find one of those, and let's begin:
Excellent troubleshooting information! Kept it for future use.
Setting up networking can seem very complicated, but it's really a
series of _relatively_ simple steps. The key is understanding that,
and then looking at break points to see "did it make it this far?".
Seems nothing was wrong on this end of things. Wasn't Linux at fault.
Have to prove this yet, but it *appears* my new dialup ISP had some
routing problems. Could login but not route. Thinking this because
yesterday I tried things again - with no eth0 setup - and BOOM!, I'm
gettting email, using the Web and snooping USENET. This is day two of
using dialup.
Well, that's the way it should work. Without knowing anything about
about the ISP (I can see the connection is being provided by Level3,
but they're a Point-of-Presence provider), it's kind of hard to see
why the connection wouldn't work once you passed the PAP or CHAP
authentication stage.
Configuration files are the same, but now there are namesever
entries in /etc/networks and /etc/ppp/resolv.conf (mirror of
/etc/resolv.conf).
/etc/ppp/resolv.conf would be the source if you are using the
'usepeerdns' option - that file is created when the link comes up.
Set up users in groups 'dialout' and 'dip'; wrote into their .bashrc
pon and poff into .bash_logout (we don't use a login manager). So, now
when we login there is a connection when X loads and it hangs up the
connection when logging out.
OK - if that's the way you want to use it. Before I got broadband
here, I was using ppp in 'demand' mode. You create a script named
/usr/local/bin/dialin that is able to bring up the connection when
run by root - an EXAMPLE might look like:
#!/bin/bash
exec /usr/sbin/pppd connect "/usr/sbin/chat -f /etc/ppp/dialscript" lock \
defaultroute noipdefault /dev/modem 115200 crtscts user ibuprofin \
nodetach
There must not be anything after the \ in those two lines. The file
/etc/ppp/dialscript has what's needed to kick the phone into operation:
ABORT BUSY ABORT 'NO CARRIER' "" AT&F1 OK ATDT2662902 CONNECT \d\c
Running that from a command line as root worked (note that most of the
options in the script would work equally well in /etc/ppp/options or
similar). Once you reached that "it works" stage, replace the
'nodetach' option, with 'demand idle 300 holdoff 15' and add two lines
to the system boot script (I used rc.local, which is the last boot
script run):
echo -n 1 > /proc/sys/net/ipv4/ip_dynaddr
/usr/local/bin/dialin
The first line is used to tell a 2.2.x or later kernel that the system
will have dynamic IP addresses, while the second line runs the dialin
script. As this file (rc.local) is run by root, the daemon will be
running as root. Now, pppd will start, but stay in the background and
respond to requests for IP services after that. The idle 300 will cause
the system to disconnect when the ppp link has been idle for 5 minutes
(300 seconds). The holdoff 15 means the system will not try to redial
for 15 seconds after an idle timeout, to allow everything to recover.
Depending on the ISP, you might need to use the 'active-filter' option
to block port-scanners from keeping the link up (resetting the idle
timer), but that's a bit more ISP specific.
Your time and information is appreciated.
Glad to be able to help!
Old guy
.
- References:
- Re: Moving interfaces
- From: Moe Trin
- Re: Moving interfaces
- From: Moe Trin
- Re: Moving interfaces
- Prev by Date: Re: Moving interfaces
- Next by Date: Re: Shaken, not stirred (Mini-rant)
- Previous by thread: Re: Moving interfaces
- Next by thread: my machine is very slow
- Index(es):
Relevant Pages
|