Top Ad unit 728 × 90

07: Transport layer - Port addressing part 5

In this lesson we shall be covering port addressing in view of the instrumental role it plays in software programs and services identification. Thanks to port numbers, each service or software program is distinguished from the other. A message addressed to a given destination might be lost even if it arrives at the right destination machine because of the fact that there are a plethora of services and software programs running on the same destination machine, and the source machine has to distinguish between them. Thus, assigning a port number to each single service and application is what makes it easier for the source machine to send its data segments along to the appropriate app or service. The following figure may demystify the whole idea.

The figure shows that PC1 is using an application, whose port number is 5668, but in order for this application to work  and communicate successfully with other applications on the receiver’s machine, it has to deal with three services (two protocols and a program) which are DNS that uses port number 53, FTP whose port is 21, and http which is assigned port number 80. If those services were not designated port numbers, how it would be possible for the sender to address each data segment to its proper destination protocol or program within the destination machine ? thus, data segment would stop at the transport layer and not making it to the intended application if no port number was assigned. We can say that port numbers play the role of ID number, without which no data would arrive at its right destined application.

Now you may be asking who has provided all those port numbers in a way that each protocol is assigned a port number. IANA (Internet Assigned Numbers Authority) is the organization that is responsible for port numbering. It is responsible not only for port numbers but also for ip addressing which we will cover later in the forthcoming lessons. So, IANA is an organization that accountable for assigning various addressing standards.

Port numbers are divided into three categories. The first one is ‘well-known ports’, the second is ‘registered ports’, and the last is ‘dynamic or private ports’. As for well-known ports, they are ranged from 0 to 1023 which are reserved for services and applications. They are commonly used for applications such as http (web server) pop3/smtp (email server) and telnet. Well-known ports are specified to protocols and application programs working on servers or destination machines only.
These are the famous port numbers of different protocols which must be committed to memory : FTP=20-21 / Telnet=23 / SMTP=25 / SSH=22 / http=80 / TFTP=69 / DNS=53 / POP2=109 / pop3=110 / SFTP=115 / SNMP=161 / HTTPS=443. These port numbers are fixed and unchangeable.

The second category is ‘registered ports’ ranged from 1024 to 49151. Unlike well-known ports, these port numbers are assigned to user processes or applications. They are opened at the source machine by applications as shown in the above figure. Moreover, Registered ports are usually assigned by application programmers, or maybe selected by a client as its source port.

Last but not least, the last type of port numbers is ‘dynamic or private ports’. It is in the range 49152 – 65535. This type sometimes is referred to as ephemeral ports. These ports are usually assigned dynamically to client applications when initiating a connection. Consider the following figure.
I think that the figure is self-explanatory. But no worries ! Everything is explained, just read. The above figure shows that the source computer (Src) has Mozilla firefox browser run which randomly opened 1028. Then, the user connects to Facebook through port 50000 in the src computer and 80 in the web server. Afterthat, the same user adds another tab on the same browser (Mozilla firefox) for the purpose of connecting to Yahoo, which dynamically opened port 50001. Lastly, the user adds another tab on the same brower with a view to connect to Google, which also dynamically opened port 50002. The first port opened in the source computer (1028) is considered to a registered port because it is ranged from 1024 to 49151. This port is opened automatically by an application, which is, in this case, Mozilla firefox. The ports 50000, 50001, 50002 are all dynamic or private ports because they are ranged from 49152 to 65535. They are opened when the user uses the same application to connect to multiple servers of the same service, which is, in this example, http protocol whose port is 80. 

To sum up, when a source machine initiates a connection, the application used for communication openes a certain port known as registered port, but when the source machine uses the same application to connect to multiple servers requesting the same service, then dynamic or private ports are used.
07: Transport layer - Port addressing part 5 Reviewed by BOUFTIRA on 11:14:00 AM Rating: 5

No comments:

All Rights Reserved by Computer Networks For All © 2015 - 2017

Contact Form


Email *

Message *

Powered by Blogger.