Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ppp / internet address question



On most Unix systems, ifconfig gives you it, for example

$ ifconfig ppp0
ppp0: flags=51<UP,POINTOPOINT,RUNNING>
	inet 206.119.12.117 --> 199.0.65.20 netmask ffffff00 

This gives both ends.  This was done on a Sparc, but should work for
other systems

Adrian

> 
> Hi,
> 
> How can I query the kernel (or pppd) for my own internet address number 
> when I am dialed in to a provider that assigns from a group of numbers?
> I call MASSinternet and receive a local IP address from their pool, which 
> shows up in my system log.  I need to get the actual hostname in order to
> establish certain connections like Hyper-G servers.
> 
> I am trying to automate the proceedure that involves tailing the log file 
> to get my local IP address, using nslookup on the address to get the dns 
> name of the ppp connection, setting my hostname to that particular name, 
> and connecting to a Hyper-G server.
> 
> I thought I could use netstat -nr to get the number, but that didn't 
> work: it just gives me the destination address.  I would vastly prefer to 
> not have to tail my system log to get this info.  It is certain that 
> some running process has the data.  I just don't know how to get it out.
> 
> Thanks in advance,
> 
> --Tom
> 
> -- 
> Tom Cavin
> tec at usa1.com
> 
> 
> 


-- 
---------------------------------------------------------------------------
Adrian Hall					adrian at ahall.tiac.net
Systems & Networking Engineer			ahall at xionics.com
(at home)




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org