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.
SDN 101: An Introduction to Software Defined Networking
Discover the advantages of SDN.
SDN has quickly become one of the hottest trends in IT. But not all SDN solutions offer real software-defined functionality. As more enterprises consider SDN, they want to know, “What is SDN? And what are the real benefits?” If you're ready to explore the advantages of SDN, and want to know how it should be implemented within your enterprise, start by reading our introductory white paper.
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" != "220.127.116.11" ] ; 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 18.104.22.168) 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 :-)