954,323 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

server / client questions

Say I have a server, and multiple clients. Each client (same or different LAN) opens a program which connects to the server. I'm not sure how to ask my question, so I'll just write what I'm trying to do:

(theoretical example)

Server constantly listens for connection on port 2000.
Server's public IP is 111.111.1.111
Server's LAN IP is 1.1.1.5


Would the following be a correct flow? (Please correct, I have little to no understanding of this part)

3 clients, under the same public ip 123.123.123.123
whose LAN ip's are:
192.168.1.10
192.168.1.11
192.168.1.12

So the first question arises: does each of these clients need to use a different port?

Let's say they each open a different port
192.168.1.10:101
192.168.1.11:102
192.168.1.12:103

The data then goes to their router. Would the data going out look like this?
123.123.123.123:101
123.123.123.123:102
123.123.123.123:103

If so, when it reaches the server, is the following correct?
Data is received on the server's router's ports 101, 102, 103
The router then forwards ALL THREE ports to the server's LAN ip, port 2000 (1.1.1.5:2000)

The server now has a valid connection?

kchyn
Newbie Poster
19 posts since Sep 2010
Reputation Points: 10
Solved Threads: 0
 

I don't know that you should need to open any ports.
Is there a reason you aren't using private IP addresses in the LAN?
You'll have to search for the exact ranges but they're around:
10.0.0.1-10.255.0.0
172.0..0 whatever something
192.168.0.0-192.168.255.255,learn subnetting if you need to

skilly
Posting Whiz in Training
256 posts since Mar 2010
Reputation Points: 33
Solved Threads: 21
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: