permaculture playing cards*
The moose likes Security and the fly likes IP Conflicts due to use of router Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "IP Conflicts due to use of router" Watch "IP Conflicts due to use of router" New topic
Author

IP Conflicts due to use of router

sashwat kumar padhy
Greenhorn

Joined: Jun 12, 2013
Posts: 20

When i connect to the internet using my router, the ipv4 address is x.y.z.a,where as,when i use sites like whatismyip to verify my ip,they show a different ip!..I know there must be some configuration issues with the router settings,But if i make somehow the ip address Static(which i see from those sites),Could it be possible to accomplish connections with other computers using that ip? What's the benifit of using static ip?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41592
    
  55
What you're seeing is most likely the difference between the internal address assigned by the router, and the external address assigned by your ISP. An internal address should be a private address like 192.168.x.y or 10.x.y.z.

The benefit of a static address (which would be assigned by your ISP) is that the external address would always be the same. Currently you're likely to get a different external IP address every time you connect. The benefit would be that your computer is always reachable under the same address (provided that all firewalls and routers in between let the traffic pass through).

I don't understand what the "conflict" is that you mention, though.


Ping & DNS - my free Android networking tools app
sashwat kumar padhy
Greenhorn

Joined: Jun 12, 2013
Posts: 20

Ulf Dittmer wrote:

I don't understand what the "conflict" is that you mention, though.


I have developed a java program which has a server and a client program. The client program is needed to be run by my friend who is is a different city where as i would run the server program. This program works as long as i put the ip information as the internal ip address,in the client program.(inside the home network only) What i want is to have a single IP which can be used by the client program,anywhere over internet to run the client program.Without using servers isn't it possible? If no,then does free server providers like www.serversfree.com allow these facilities?
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18754
    
  40

sashwat kumar padhy wrote:
I have developed a java program which has a server and a client program. The client program is needed to be run by my friend who is is a different city where as i would run the server program. This program works as long as i put the ip information as the internal ip address,in the client program.(inside the home network only) What i want is to have a single IP which can be used by the client program,anywhere over internet to run the client program.Without using servers isn't it possible? If no,then does free server providers like www.serversfree.com allow these facilities?


First of all, what is the IP address of your machine??? Does start with 192.168.*.* ?? Does it start with 10.*.*.* ?? If you are, then your machine is not directly on the internet. It is on a private network (an intranet) and it uses a default gateway, which may also use a default gateway, until it gets to the machine or router that is on the internet.

In other words, when you go to one of those "what is my IP" sites, it is reporting the IP address of the machine on the internet -- which if you are on a private network, isn't the same as your machine.


Hosting services places their machines on the internet. Or forward the ports to the machines in the intranet.... if you are in a private network, and you want it accessible from the internet, then you too, will need to forward the port from the router to your machine.

Henry

Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18754
    
  40

Hmmm.... it looks like I already explained this in your other topic.

http://www.coderanch.com/t/613674/java/java/Client-Server-Java-app


Ohh, and BTW, when I asked what is your IP address, I don't mean your router's address -- I mean what is the IP address of you machine. This can be gotten via ipconfig or ifconfig, depending on the OS.

Henry
sashwat kumar padhy
Greenhorn

Joined: Jun 12, 2013
Posts: 20

Henry Wong wrote:Hmmm.... it looks like I already explained this in your other topic.

http://www.coderanch.com/t/613674/java/java/Client-Server-Java-app



Henry you're a gem! Thanks man. I didn't know about the port forwarding concept. So was having issues there,with those ports. Now solved. I also learnt many new stuffs.."" Thanks again..""
 
 
subject: IP Conflicts due to use of router