Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 May 1999 09:31:08 +1000
From:      Jim Mock <jim@blues.ghis.net>
To:        "Michael G." <mikegoe@ibm.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Dynamic IP address
Message-ID:  <19990513093108.E57394@blues.ghis.net>
In-Reply-To: <99051219000900.00342@Nikki.ibm.net>
References:  <99051219000900.00342@Nikki.ibm.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 12 May 1999 at 18:58:00 -0400, Michael G. wrote:
> I checked the archives ..but couldn't find this answer...
> 
> How can I check what my current IP address when I log into my
> ISP...as it is dynamically allocated at connection?   arp didn't
> seem to get me anywhere because I don't know what my machine is
> called???...from the outside...

Try 'netstat -rn'.  It'll give you something like this..

[jim@blues:~]$ netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use     Netif
Expire
default            203.37.7.2         UGSc       11        0     tun0
127.0.0.1          127.0.0.1          UH          0    41002      lo0
203.37.7.2         203.37.48.130      UH         12        0     tun0
                   ^^^^^^^^^^^^^ that should be your ip

Also, 'ifconfig tun0' will provide it as well..

[jim@blues:~]$ ifconfig tun0
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
        inet 203.37.48.130 --> 203.37.7.2 netmask 0xffffff00 
        ^^^^^^^^^^^^^^^^^^ that's your ip

Hope this helps,

-- 
- Jim Mock - jim@blues.ghis.net - systems administrator - ghis.NET -
- work: http://www.ghis.net/ - personal: http://www.ghis.net/~jim/ -
- FreeBSD 'zine: http://www.freebsdzine.org/ - jim@freebsdzine.org -
- FreeBSD: http://advocacy.freebsd.org/ - jim@advocacy.FreeBSD.org -


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990513093108.E57394>