We have three types of communication in networking that are; host to host, node to node and process to process communication. For all these three types of communication, there is a specific address or id like there is IP address for host to host communication but with in a system each process or each application has its own unique identification number that is used to have a direct communication of a specific application of one system with the same application in other system. Like in Internet if we are chatting and as well as listening to online songs, now both the applications will have their own packets that will be transferred to our system but both of them will contain the identification number of their designated application. This id is known as port number. Remember not each and every application that is running in a system will have a port number but only those will have it which communicates through an Internet.
So port number and IP addresses are like the end points of a communication that is bidirectional. Every application communicating with the Internet will have a unique port number and they are assigned through specific algorithms. These numbers are dynamic and they are not permanent. Like the same application may be assigned with a port number when it wants to communicate but as soon as it disconnects it link, the port number is destroyed and the next time may it get some new port number that would be different from its previous number so it varies.
Internet ports constitute a mechanism for delivering incoming data packets to the appropriate application process and thread due to the numbers assigned to them. The Internet ports and IP addresses together make socket address which is used for process to process delivery of packets.
Ports support connections in the form of both virtual circuits (TCP streams) and datagrams (UDP packets).
© Daxii.com