From owner-freebsd-questions Wed May 12 17:19: 8 1999 Delivered-To: freebsd-questions@freebsd.org Received: from smtp1.erols.com (smtp1.erols.com [207.172.3.234]) by hub.freebsd.org (Postfix) with ESMTP id DBA7A1510F for ; Wed, 12 May 1999 17:19:04 -0700 (PDT) (envelope-from alantrulock@erols.com) Received: from ALAN (207-172-52-122.s122.tnt1.brd.va.dialup.rcn.com [207.172.52.122]) by smtp1.erols.com (8.8.8/8.8.5) with SMTP id UAA25339; Wed, 12 May 1999 20:18:30 -0400 (EDT) From: alantrulock@erols.com (Alan Trulock) To: jim@blues.ghis.net Cc: "Michael G." , freebsd-questions@FreeBSD.ORG Subject: Re: Dynamic IP address Date: Thu, 13 May 1999 00:17:26 GMT Message-ID: <373b185a.71928112@smtp.erols.com> References: <99051219000900.00342@Nikki.ibm.net> <19990513093108.E57394@blues.ghis.net> In-Reply-To: <19990513093108.E57394@blues.ghis.net> X-Mailer: Forte Agent 1.5/32.452 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG How about echo `ifconfig tun0 | tail -1 | awk '{print $2}'` or write it to a file echo `ifconfig tun0 | tail -1 | awk '{print $2}'` > /etc/myip or do this and use it in a script setenv MYIP `ifconfig tun0 | tail -1 | awk '{print $2}'` --Alan On Thu, 13 May 1999 09:31:08 +1000, you wrote: >On Wed, 12 May 1999 at 18:58:00 -0400, Michael G. wrote: >> I checked the archives ..but couldn't find this answer... >>=20 >> 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=3D8051 mtu 1500 > inet 203.37.48.130 --> 203.37.7.2 netmask 0xffffff00=20 > ^^^^^^^^^^^^^^^^^^ that's your ip > >Hope this helps, To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message