ppp / internet address question

Adrian Hall adrian at ahall.tiac.net
Sun Dec 17 17:06:36 EST 1995


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)



More information about the Discuss mailing list