IP Ports

Tuesday, October 5, 2010

Ports were developed so that computers could accept data from multiple sources over the same IP address. Think if it like this; Your TV service is the Internet, and the ports are you channels. You have many forms of entertainment, news, and information available through many different channels. Think about this, lets say that MTV is channel 35 on your TV. The same is true for web servers that run on port 80. Every port has a special purpose just as each channel serves a different television program. While you only have 1 cable TV subscription, you can still receive multiple channels.

Two main types of ports: TCP and UDP. TCP stands for Transmission Control Protocol. UDP stands for User Data Protocol. Some programs on your computer will use TCP ports to communication and other may use UDP. It is important to know the difference between how the two operation. See TCP vs. UDP for an explanation with pictures!

There are 65,535 TCP and UDP ports available to transmit data with. Ports 0-1023 are reserved for common use. These ports are assigned by the IANA (Internet Assigned Numbering Authority). This means, that every port from 0-1023 will be the same on every system. For example, let's say a server in New York is using port 80, and so is a server Texas. Because port 80 falls in the range of reserved ports, we know both servers are using port 80 for HTTP connections. Viewing a list of known ports can help you determine which type of connections are present on your machine. To see a list of commonly used port numbers and descriptions click here. For more information see the netstat article. You can view the RFC on ports (RFC 1700) here.

Servers, or any machine for that matter "listen" on certain ports. For example, a server running web, FTP, and Telnet services will listen on a port for each. The act of listening simply means the machine is waiting for another device to connect to it. See the illustration below:





You can see how the server is listening for 3 ports over a single IP address (192.168.0.15). You should also know that it is possible for multiple devices to connect to a single port. Meaning, a telnet server may accept over 100 simultaneous connections to port 23.

0 Comments: