<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.45">
<TITLE>RE: looking up ip global IP address from inside LAN</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>&gt; From: Justin Holzer [<A HREF="mailto:justin@ptctraining.com">mailto:justin@ptctraining.com</A>]</FONT>
</P>

<P><FONT SIZE=2>&gt; Say for example, I have cable modem service, and have several machines</FONT>
<BR><FONT SIZE=2>&gt; sharing this connection via a store-bought broadband router. </FONT>
<BR><FONT SIZE=2>&gt; Now say I'm running squeak on one of the networked machines, ie. 192.168.1.1.</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; Is it possible for me to get the global IP address of my </FONT>
<BR><FONT SIZE=2>&gt; cable modem, ie 216.109.125.71, without having to send a </FONT>
<BR><FONT SIZE=2>&gt; packet outside of my local network?</FONT>
</P>

<P><FONT SIZE=2>Hmmm... it should be possible, if we assume the meaning of local</FONT>
<BR><FONT SIZE=2>is physical. Not sure if you can do this in Squeak though...</FONT>
</P>

<P><FONT SIZE=2>Since each network interface has its' own IP address, devices on your</FONT>
<BR><FONT SIZE=2>&nbsp;'local' network (LAN) will each have an address (hopefully in the</FONT>
<BR><FONT SIZE=2>same subnet :-)). A router on your LAN will have a local IP</FONT>
<BR><FONT SIZE=2>address and the other side of it (often called the WAN interface)</FONT>
<BR><FONT SIZE=2>attached to your cable modem will have a different IP address </FONT>
<BR><FONT SIZE=2>that it gets from your ISP.</FONT>
</P>

<P><FONT SIZE=2>What you want is most likely the WAN address from your router.</FONT>
<BR><FONT SIZE=2>Several other methods have been mentioned so here's a third</FONT>
<BR><FONT SIZE=2>possibility:</FONT>
</P>

<P><FONT SIZE=2>OSProcess + traceroute (or tracert in Windows) (Unless someone has </FONT>
<BR><FONT SIZE=2>written a traceroute utility you can use within Squeak ?)</FONT>
</P>

<P><FONT SIZE=2>In theory you should be able to get the address from traceroute</FONT>
<BR><FONT SIZE=2>because it SHOULD be the next address following your router's LAN </FONT>
<BR><FONT SIZE=2>address when you use traceroute... [I'm at work so I can't try/verify </FONT>
<BR><FONT SIZE=2>it myself right now...] (And assuming your router isn't blocking ICMP</FONT>
<BR><FONT SIZE=2>(the protocol used by traceroute))</FONT>
</P>

<P><FONT SIZE=2>The real &quot;trick&quot; is going to be keeping packets within your</FONT>
<BR><FONT SIZE=2>network... with traceroute you have to be &quot;aiming&quot; at something</FONT>
<BR><FONT SIZE=2>to get it to work. If you can control &quot;hops&quot; in whatever traceroute</FONT>
<BR><FONT SIZE=2>utility you are using it might be possible. I don't recall how</FONT>
<BR><FONT SIZE=2>'hop counts' are measured - between routers or between network </FONT>
<BR><FONT SIZE=2>interfaces...</FONT>
</P>

<P><FONT SIZE=2>HTH</FONT>
</P>

<P><FONT SIZE=2>-Andy-&nbsp;&nbsp; </FONT>
</P>

</BODY>
</HTML>