Can multiple TCP Servers run with same IP Address on a host?

(Last Updated On: July 29, 2016)

Answer:

Yes, we can create multiple TCP/IP servers using the same IP address on a machine. Actually, a tcp socket server is identified by unique combination of an IP address and a Port number. And, we can have many combinations of an IP address and Port numbers.

 

NOTES: 

It is important to note that maximum limit of port number is 65535 and many of the ports are reserved and many are well known ports e.g. port number 80, TCP for http app, 21 for FTP and 22 for SFTP, SCP etc.

If we have more than one network adapters on a machine we can get more IP addresses, hence more unique combination of IP address and port.

For example, on a machine you can have Ethernet and Wi-Fi adapters both, so you should have 2 IP addresses. If you are connected to Wi-Fi and Ethernet both, fire “ipconfig” command on command line interface on windows machine, you will see 2 IP addresses.