Skip to Main Content Skip to Search
Accelerating the pace of engineering and science

Technical Solutions

How do I change my TCP port number and how do I know which ports I can use?


Date Last Modified: Friday, June 26, 2009
Solution ID:   1-17RQV
Product:   MATLAB
Reported in Release:   R11
Platform:   All Platforms
Operating System:   All OS
 

Subject:

How do I change my TCP port number and how do I know which ports I can use?

Problem Description:

I would like to change my TCP port number, so I would like to know which ports I can use.

Solution:

We strongly recommend that you contact your system administrator for assistance on changing your TCP port number.

Often the best thing to do is just to try the next number. The best numbers to try for MATLAB 5.3 (R11) are 1705 to 1711, and for MATLAB 6.x (R12.x) and higher are 27000 to 27010.

Use the NETSTAT command to find out which ports you can use. On UNIX, type the following command at your UNIX prompt:


netstat -P tcp

On Windows NT and 2000, type the following command in a DOS prompt at your C:\WINNT\system32 directory:


netstat -p tcp

Look at the Foreign or Remote Address column. This column will list the machine names or IP addresses followed by a period and then the port number. If the local machine is on this list, then the port number listed is being used.

Please provide feedback to help us improve this Solution
Contact support