Sorry, but your question is really unclear. An IP address is unique within private network, so what are you asking about ?
posted 3 months ago
Thank you Claude for your reply. Allow me to clarify; if I run ipconfig in every computer in a network I will get a different IP address for each one (perhaps I am wrong and I get the network IP address); I have been searching the Internet for "Network IP address" and some code that some people think works to get it (some use java.net.InetAddress). I am creating a Java desktop application and I want to make sure it only woks in the network where it has been installed.
Your help will be greatly appreciated,
You could do something like this to find all the ip addresses associated with the platform:
Be aware that the platform may have multiple network interfaces, and each network interface may have more than one IP address. Also, as Tim commented, they will often be internal/private addresses, not public Internet addresses.
Alejandro Barrero wrote:I am creating a Java desktop application and I want to make sure it only woks in the network where it has been installed.
If you want to find the public IP address that the platform would use when accessing the Internet, there are a number of open network APIs which you could use. Here's an example using ipify:
The IP address may not necessarily be the same ever time you check. If the connection to the Internet is using DHCP, or if there are multiple connections to the Internet (for load balancing, failover, etc.).
Everybody! Do the Funky Monkey! Like this tiny ad!
global solutions you can do in your home or backyard