My PC has ethernet card installed and assigned an IP address by myself. It
also has dial up networking to Earthlink configured as Service assigns IP
address.
Now, I have a Java pgm to retrieve the local host IP address by using
"System.out.println(InetAddress.getLocalHost().getHostAddress());", which
displays the one I assigned to NIC even I dial up to Earthlink.
My question is how can I check out the IP address assigned by Earthlink?
Outside Java and Inside Java.
thks,
wayne
09-21-2000, 06:14 AM
Ghozt
Re: InetAddress question
Don't know how to do determine the IP address assigned by Earthlink from within
Java
but to determine the IP Address assigned by Earthlink outside java is easy
I assume you are running on a windows box?
execute the following command:
tracert ibm.com
this will display the servers that your machine goes through to
access the ibm server.
the first ip address will either be your nic or the one
assigned by earthlink. If it is the ip of your nic then the second
ip address is the one assigned by earthlink
Hope this helps
Cheers Ghozt
"Wayne Liu" <liuwayne@earthlink.net> wrote:
>
>Hello,
>
>My PC has ethernet card installed and assigned an IP address by myself.
It
>also has dial up networking to Earthlink configured as Service assigns IP
>address.
>
>Now, I have a Java pgm to retrieve the local host IP address by using
>"System.out.println(InetAddress.getLocalHost().getHostAddress());", which
>displays the one I assigned to NIC even I dial up to Earthlink.
>
>My question is how can I check out the IP address assigned by Earthlink?
>Outside Java and Inside Java.
>
>thks,
>wayne
>
>
>
09-21-2000, 10:32 AM
Wayne Liu
Re: InetAddress question
Thks, I haven't tried at home. But I have tried in the office. The first ip
address shown is the default gateway address, not my pc address.
"Ghozt" <ghozt@mailexcite.com> wrote:
>
>Don't know how to do determine the IP address assigned by Earthlink from
within
>Java
>but to determine the IP Address assigned by Earthlink outside java is easy
>
>I assume you are running on a windows box?
>
>execute the following command:
>
>tracert ibm.com
>
>this will display the servers that your machine goes through to
>access the ibm server.
>
>the first ip address will either be your nic or the one
>assigned by earthlink. If it is the ip of your nic then the second
>ip address is the one assigned by earthlink
>
>Hope this helps
>
>Cheers Ghozt
>
>
>
>
>"Wayne Liu" <liuwayne@earthlink.net> wrote:
>>
>>Hello,
>>
>>My PC has ethernet card installed and assigned an IP address by myself.
>It
>>also has dial up networking to Earthlink configured as Service assigns
IP
>>address.
>>
>>Now, I have a Java pgm to retrieve the local host IP address by using
>>"System.out.println(InetAddress.getLocalHost().getHostAddress());", which
>>displays the one I assigned to NIC even I dial up to Earthlink.
>>
>>My question is how can I check out the IP address assigned by Earthlink?
>>Outside Java and Inside Java.
>>
>>thks,
>>wayne
>>
>>
>>
>