Re: PPPD and demand dialing

From: Moe Trin (ibuprofin_at_painkiller.example.tld)
Date: 03/30/05

  • Next message: Buck Rogers: "Re: ATT global"
    Date: Tue, 29 Mar 2005 17:36:46 -0600
    
    

    In article <slrnd4hqs6.1ks.jdege@jdege.visi.com>, Jeffrey C. Dege wrote:

    >I need PPPD to work in demand-dial mode.
    >
    >I tried to add the options using the GUI network configuration tool,
    >but I couldn't get it to work, and I couldn't figure out why.

    Without the logs or other details, I doubt anyone else can tell - we
    can't see what's happening on your system. Damn security problem, I
    guess. ;-)

    >So I tracked down the file that the tool was creating, ifcfg-ppp0,
    >and went in and edited it directly.
    >
    >My question is why, since pppd has supported demand dialing for years
    >now, and since the sysconfig networking system has explicit options
    >for configuring demand dialing, why have these options never been made
    >configurable from the GUI?

    I gave up on those scripts. They are written by an expert script writer,
    who delights in showing how complex he can make things. "One script that
    can be used for everything" - yeah, right.

    [compton ~]$ cat /usr/local/bin/dialin
    #!/bin/bash
    exec /usr/sbin/pppd connect "/usr/sbin/chat -f /etc/ppp/dialscript" \
    defaultroute lock noipdefault modem /dev/modem 115200 crtscts \
    user ibuprofin nodetach
    [compton ~]$

    There must not be anything after the \ in those two lines.

    [compton ~]$ cat /etc/ppp/dialscript
    ABORT BUSY ABORT 'NO CARRIER' "" AT&F1 OK ATDT2662902 CONNECT \d\c
    [compton ~]$

    Modify those two scripts as needed so that root can run them from the
    command line. That probably means username, modem init string, phone
    number and maybe device name. This also requires /etc/ppp/*secrets,
    and /etc/resolv.conf to be configured, but I assume you know that. When
    the scripts work for you, remove the 'nodetach' option, and add 'demand
    idle 300 holdoff 15'. Then edit one of the boot scripts - I suggest using
    /etc/rc.d/rc.local - and add the following:

       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.

    >And as an aside, where should I go for advice on configuring the rest of
    >this beast? I have a couple more steps to get done before I close down
    >my old system - getting email and usenet working, installing xringd, etc.

    I dunno - what's wrong with the regular comp.os.linux.* newsgroups?

    >Where should I go to ask questions?

    No put-down intended - ALWAYS hit http://groups.google.com first. In
    most cases, your question has been answered several to many times before.

            Old guy


  • Next message: Buck Rogers: "Re: ATT global"

    Relevant Pages

    • Re: Items missing from the handbook and/or FAQs.
      ... > configuration is handled through ifconfig would have saved me some time. ... > would also have saved me reading through the rc scripts. ... > During setup you can create filesystems other than FreeBSD, ... > their own gdm startup scripts doesn't make much sense. ...
      (freebsd-questions)
    • Re: Dracut -- Cross distribution initramfs infrastructure
      ... when the initrd is running. ... Detect the configuration of the rootfs and create the ... Configure the rootfs on boot. ... The setup scripts have these tasks: ...
      (Linux-Kernel)
    • Re: sun calendar & dsee6 on CentOS machine-- need to return to preinstall configuration
      ... previous configuration attempts made by the scripts on my ... that I can remove the previous installation attempts from this machine ... I'm pretty sure that won't even work anyway as the scripts surely ... eventually broke the rpm database on my target machine. ...
      (comp.sys.sun.apps)
    • Re: perl cgi problem
      ... > I'm sorr for such a long code. ... You're using Matt Wright's scripts, ... Partitioning a problem is where you figure out if the ... or the script's configuration. ...
      (comp.lang.perl.misc)
    • RE: cpufreqd: ondemand
      ... >is full speed if the system is idle. ... >Why does the same cpufreqd configuration behave differently on ... >Debian than on Mandriva? ... ># need big power ...
      (Debian-User)