Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
sorry, made a mistake. you should be dialing if the line is down, right? so the script should be
getIP=`/sbin/ifconfig ppp0 | grep "inet addr" | cut -d ":" -f2 | cut -d " " -f1`
if [ "$getIP" != "18.104.22.168" ] ; then
even if you don't get an IP address, i.e., if the link is down, the value for getIP will be null -- or in other words, they will not match the IP designated by your ISP (replaced with 22.214.171.124) and will dial.
This script could prove very useful as I have a similar problem
Sorry to hijack the thread, but what if it's a dynamic ip address? Would it not then always try reconnecting until it matched the specified ip address? Would there be a way to get it to check whether ppp0 is present full stop?
if you are having dynamic IPs, then you don't need to set rules to check the IP, you simply check if you have ppp0 up or not (in fact, I should have thought about it when the thread first arose, but i was thinking eth0 . . . :-( )
what you do is,
getDev=`/sbin/ifconfig | grep ppp0`
if [ "$getDev" == "" ] ; then
thus, if there is a ppp0, then the getDev will yeild some result and no scritp will run, on the other hand, if there _is_ no ppp0, then the result will be null and the script will run -- despite any IP conditionaing :-)