Qt Networking - TCP server ip address
-
Hi all,
I am trying to write a network game. I am a newbie in networking. I know only the basics of TCP and UDP.
To get started, I looked at the "forture server example":http://doc.qt.nokia.com/4.7-snapshot/network-fortuneserver.htmlI ran the example yesterday and got the ip address that looked something like 65.31.33.234 . I understand this is my public ip address. Everything looked fine until I ran it today. It now gives me my local ip address 192.168.2.4 . I wonder what changed between yesterday and today.
Why did I get the external ip address yesterday and a local ip address today?
I did not make any change in the code. Just to be sure, I rebuild the project again with code copied from the example.
I am totally baffled!I am running Ubuntu 11.10.
-
65.31.33.234 is a public routable IP address and is likely what your home network appears as when viewed from the Internet.
192.168.2.4 is a private non-routable IP address and part of a class C network. This is most likely your IP address on your internal network as assigned by your router's DHCP service.
Without more context it is impossible to say what has changed between.
-