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

Re: How to determine local IP



On Mon, 21 Jun 1999, Ramesh Natarajan wrote:

> This message was sent from Geocrawler.com by "Ramesh Natarajan" <nram@rocketmail.com>
> 
> Hi, Once dialed in, how to determine the local (dynamically assigned)
> IP id? I know pppd invokes ip-up with the local IP. But outside that,
> is there a env variable, API or a file that holds returns this info?

I would use ip-up to write a file that contains the IP. However, I used to
use the following sometimes. I don't use ppp anymore, but this might
still work. awk can probably do it more elegantly...

/sbin/ifconfig | grep P-t-P | cut -d: -f2 | cut -d" " -f1

...RickM...


Reply to: