Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.Hawaii.Edu!news.uoregon.edu!newsfeed.internetmci.com!in3.uu.net!nntp.inet.fi!news.csc.fi!news.ifmo.ru!usenet From: "Peter Zhigulin" <zpit@samara.net> Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: pppd ip-up and ip-down problem Date: 1 Nov 1996 01:45:50 GMT Organization: Samara State University Lines: 86 Message-ID: <01bbc796$5fbfae80$1841d1c3@icent> References: <327540CA.3640@soncom.com> NNTP-Posting-Host: icent.ssu.samara.ru Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Newsreader: Microsoft Internet News 4.70.1155 Pat Sonnek <psonnek@soncom.com> wrote in article <327540CA.3640@soncom.com>... > I'm having a problem with pppd. /etc/ip-up appears to have been > executed, but the routing commands never take effect. If I mannually > key > in the ip-up command (as root) > (/etc/ppp/ip-up ppp1 cuaa1 57600 206.9.159.17 206.9.159.18) Then the > routing takes effect. I've included everything I can think of to help > someone diagnose my problem. I now the ip-up and ip-down are getting > executed by pppd, from the logger command in each script. Hi! May be I'm wrong, but I've wrote only 3 files in /etc/ppp: options options.ttyd0 options.ttyd1 options tells pppd all about device and options.ttyd* - about wich IP numbers to be used Looks like that: [zpit]info:/etc/ppp> {6}ls -l total 16 -rw-rw-r-- 1 root wheel 56 Oct 31 10:07 options -rw-rw-r-- 1 root wheel 54 Oct 29 13:54 options.ttyd0 -rw-rw-r-- 1 root wheel 54 Oct 29 13:55 options.ttyd1 [zpit]info:/etc/ppp> {10}cat options -detach dns1 195.209.65.1 dns2 195.209.64.1 modem 38400 [zpit]info:/etc/ppp> {8}cat options.ttyd0 195.209.65.241:195.209.65.242 netmask 255.255.255.252 [zpit]info:/etc/ppp> {9}cat options.ttyd1 195.209.65.245:195.209.65.246 netmask 255.255.255.252 [zpit]info:/etc/ppp> {10} Thats all, dial-up users has /usr/sbin/pppd as shell. And I've never used ip-up/down - all routes changes made automaticaly In your case, you need to check if the user come from ttyd[1,2], becouse they are dialing in, not you dialing out (cuaa* used in this case) > #!/bin/sh > dport=`tty | awk -F / '{print $3}'` > if [ "$dport" = "cuaa1" ] ^^^^^ <-ttyd1 > then > /usr/sbin/pppd passive 206.9.159.17:206.9.159.18 57600 > fi > if [ "$dport" = "cuaa2" ] ^^^^^ <-ttyd2 > then > /usr/sbin/pppd passive 206.9.159.17:206.9.159.19 57600 > fi > > logger Disconnected As I know (may be from handbook), ip-up is executed when icmp packets can walk trough ppplink and ip-down - when they (icmp packets) can't do this So you do not have to change/delete any routes. Hope, it's usefull for you Peter [skiped] > -- > Patrick Sonnek - SysAdmin Sonnek Communications > http://www.soncom.com -- Regards ! Thanks for Your time ... ********************************************************* ** The Pit, NSA ** SNC ** ** e-mail: zpit@samara.net ** e-mail: wheel@samara.net ** *********************************************************