Dec 31, 2009

What Is a Port Number?

In computer networking, a port number is part of the addressing information used to identify the senders and receivers of messages. Port numbers are most commonly used with TCP/IP connections. Home network routers and computer software work with ports and sometimes allow you to configure port number settings. These port numbers allow different applications on the same computer to share network resources simultaneously.
Port numbers are associated with network addresses. For example, in TCP/IP networking, both TCP and UDP utilize their own set of ports that work together with IP addresses.
Port numbers work like telephone extensions. Just as a business telephone switchboard can use a main phone number and assign each employee an extension number (like x100, x101, etc.), so a computer has a main address and a set of port numbers to handle incoming and outgoing connections.
In both TCP and UDP, port numbers start at 0 and go up to 65535. Numbers in the lower ranges are dedicated to common Internet protocols (like 21 for FTP, 80 for HTTP, etc.).

When You May Need to Take Action with Port Numbers

Port numbers are typically processed by network hardware and software automatically. Normally you will not see them while casually using a network nor need to take any action involving them. However, in these special cases you can work with network port numbers:
  • network administrators may need to set up port forwarding to allow the port numbers of specific applications to pass through a firewall. On home networks, broadband routerssupport port forwarding on their configuration screens.

  • network programmers sometimes need to specify port numbers in their code, such as insocket programming.

  • sometimes, a Web site URL will require a specific TCP port number be included. For example, http://localhost:8080/ uses TCP port 8080. Again, this is more usually seen in software development environments than on the Internet.

No comments:

Post a Comment