C
chrisrocker90
Hi,
I'm having a terrifically difficult time getting the hostname of my
computer to resolve to the correct, external IP address (as opposed to
127.0.0.1). I think it's a Win2K problem, but I'm not sure. I'm
posting here in case someone knows about it, and in case I'm mistaken
and it is just a java problem.
Here's the issue: I'm using java to display the network interfaces and
their names on two identical (more or less) Win2K systems. The
(undesired) result I'm getting on one Win2K system is as follow:
Interface: MS TCP Loopback Interface
Canonical Name: Chris <---- computer name
hostAddress: 127.0.0.1
Interface Broadcomm NeXtrem Gigabit Ehternet Driver
Canonical Name: 192.168.12.20
hostAddress: 192.168.12.20
On another system called "Rock", I get the desired result, with the
exact same code:
Interface: MS TCP Loopback Interface
Canonical Name: 127.0.0.1
hostAddress: 127.0.0.1
Interface Broadcomm NeXtrem Gigabit Ehternet Driver
Canonical Name: ROCK <---- computer name
hostAddress: 192.168.12.20
The apis I'm using are:
NetworkInterface.getNetworkInterfaces
NetworkInterface.getInetAddresses
InetAddresses.getCanonical name.
Anyone know what could cause this behavior? I've tried just about
everything. I think I'm going to have recode around this nasty bug.
That means I'll have to modify some complicated, inherited spaghetti
code, instead of a hoped for tweak.
Any help would be vastly appreciated!
Chris
I'm having a terrifically difficult time getting the hostname of my
computer to resolve to the correct, external IP address (as opposed to
127.0.0.1). I think it's a Win2K problem, but I'm not sure. I'm
posting here in case someone knows about it, and in case I'm mistaken
and it is just a java problem.
Here's the issue: I'm using java to display the network interfaces and
their names on two identical (more or less) Win2K systems. The
(undesired) result I'm getting on one Win2K system is as follow:
Interface: MS TCP Loopback Interface
Canonical Name: Chris <---- computer name
hostAddress: 127.0.0.1
Interface Broadcomm NeXtrem Gigabit Ehternet Driver
Canonical Name: 192.168.12.20
hostAddress: 192.168.12.20
On another system called "Rock", I get the desired result, with the
exact same code:
Interface: MS TCP Loopback Interface
Canonical Name: 127.0.0.1
hostAddress: 127.0.0.1
Interface Broadcomm NeXtrem Gigabit Ehternet Driver
Canonical Name: ROCK <---- computer name
hostAddress: 192.168.12.20
The apis I'm using are:
NetworkInterface.getNetworkInterfaces
NetworkInterface.getInetAddresses
InetAddresses.getCanonical name.
Anyone know what could cause this behavior? I've tried just about
everything. I think I'm going to have recode around this nasty bug.
That means I'll have to modify some complicated, inherited spaghetti
code, instead of a hoped for tweak.
Any help would be vastly appreciated!
Chris