[S.u.S.E. Linux] Chat & pppd in 5.2
When I was using older versions of chat and pppd, I used the pppd option "nodetach" to keep pppd from becoming a background process, and the chat option "-vs" to direct all the output of chat to stderr. Then I could follow the progress of the dialup, and see when my dynamic IP address was assigned, confirming my connection. With pppd and chat in SuSE 5.2 I can't get this scheme to work. The new pppd option "-detach" seems equivalent to "nodetach," but neither -v nor -V forces chat to send output to stderr. Now I have to do an ifconfig to see my connection. How can I see chat play out on stderr? Howard Arons -- To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e
On Tue, 26 May 1998, Howard Arons wrote:
When I was using older versions of chat and pppd, I used the pppd option "nodetach" to keep pppd from becoming a background process, and the chat option "-vs" to direct all the output of chat to stderr. Then I could follow the progress of the dialup, and see when my dynamic IP address was assigned, confirming my connection.
With pppd and chat in SuSE 5.2 I can't get this scheme to work.
With '&' at the end of your 'pppd' call, it is detaching anyway. I have put at the end of my scripts: sleep 40 echo route -n 1>&2 A successful dial-up connection will then show up in your routing. You could also use 'ifconfig' instead of 'route' with the added bonus that it would tell you your dynamic IP assignment. I do that with other scripting, so for me that is unneccesary. I say I 'have' done this. But this is what I actually do: I have changed ISPs using different authentication protocols so often I have found it advisable to use the 'debug' option in 'pppd' and turn on debug logging in /etc/syslog.conf with: daemon.debug /etc/ppp/ppp_log Then I open the ppp_log with 'tail -f /etc/ppp/ppp_log in an xterm su'd to root. This way I see all the details of the login negotiation. As I have replaced SuSE-5.2 pppd with ppp-2.3.3 and use dial-on-demand to connect to the Internet, I find this a very reliable way of verifying that an Internet connection is actually established. 'ping' is also very useful for this. Note that when you change /etc/syslog.conf you have to restart 'syslogd' with: kill -HUP `cat /var/run/syslogd.pid` to get the changes to work. Dwight -- To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e
Hi! Trying to kill the keyboard, hlarons@ComCAT.COM produced:
chat to stderr. Then I could follow the progress of the dialup, and see when my dynamic IP address was assigned, confirming my connection. [...] How can I see chat play out on stderr?
I think you just want to know when the connection is up and running and which IP-address you have been assigned. There is an easier way --- and you can even automate it this way: man pppd: /etc/ppp/ip-up A program or script which is executed when the link is available for sending and receiving IP packets (that is, IPCP has come up). It is executed with the parameters interface-name tty-device speed local-IP-address remote-IP-address and with its standard input, output and error streams redirected to /dev/null. [...] i.e. if you just create that script it'll start just as the connection is up and running (and it get's the IP-number as well). But read the manpage, the script gets run as whatever pppd is run, i.e. possibly root! Or you could poll ifconfig (if you use 'ppp0'): while [ `ifconfig | egrep -A 2 "^ppp0"| grep "UP"| grep "RUNNING" \ | wc -l` -lt 1 ] do # We are not connected yet sleep 1 done MY_IP= fconfig | egrep -A 1 "^ppp0" | grep "inet addr:" \ | cut -f2 -d':' | cut -f1 -d' '` echo "Connected, with IP $MY_IP." Is that what you wanted? -Wolfgang PS: If you use suseppp, the path may be /etc/suseppp/scripts/ or something. I don't know ... I don't use it. -- PGP 2 welcome: Mail me, subject "send PGP-key". If you've nothing at all to hide, you must be boring. Unsolicited Bulk E-Mails: *You* pay for ads you never wanted. Is our economy _so_ weak we have to tolerate SPAMMERS? I guess not. -- To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e
On Thu, 28 May 1998, Wolfgang Weisselberg wrote:
/etc/ppp/ip-up [...] i.e. if you just create that script it'll start just as the connection is up and running (and it get's the IP-number as well).
Unfortunately, as of ppp-2.3.3, ip-up does not work work for the dial-on-demand case (option 'demand')--as ip-up only executes when pppd is first started. I see they are up to ppp-2.3.5 so they may have fixed it by now. Dwight -- To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e
participants (3)
-
dwj@aaronsrod.com
-
hlarons@ComCAT.COM
-
weissel@jupiter.ph-cip.uni-koeln.de