Download the BYJU'S Exam Prep App for free GATE/ESE preparation videos & tests - Download the BYJU'S Exam Prep App for free GATE/ESE preparation videos & tests -

Difference Between IP address and Port Number

Both of these are types of addressing information used in computer networking, but there is a fundamental difference between IP address and port number. In this article, we will look into the same. But let us first look into their individual functionalities.

What is an IP Address?

The term IP is an acronym for Internet Protocol. An IP address refers to the logical address of any network hardware through which any device in the vicinity identifies its network. The IP address is basically a numerical representation (unique number) used for identifying a specific interface on any given network. Every device that connects to the internet has its own IP address assigned for its unique identification. The IP addresses in IPv6 are 128 bits, while the IP addresses in IPv4 are 32 bits.

What is a Port Number?

A port number refers to the type of addressing information that identifies the receiver as well as the sender of a message in computer networking. The primary use of different port numbers is to identify the protocol at which a network must direct the incoming traffic. In other words, the port numbers determine the specific processes to which a network must forward the internet or any specific message (once it arrives at the intended server). There are ports for every protocol and these act as endpoints of communications.

A port gets represented by various 16-bit numbers. Here, the numbers from 0 to 1023 are restricted, and only well-known protocol services use them. The port numbers from 1024 to 49151 are the registered ones. It means that you can register these numbers to any particular protocol using the software corporations. At last, the numbers from 49152 to 65536 act as private ports. Anybody can use these.

Difference Between IP address and Port Number

Here is a list of the differences between IP Address and Port Number.

Parameters IP Address Port Number
Meaning and Purpose The IP address refers to the Internet Protocol Address. These basically identify a host present in a network. We use Port numbers for identifying any process/ service present on your system.
Bits Used The size of IPv4 is 4 bytes (32 bits), and that of IPv6 is 16 bytes (128 bits). A typical port number is 16 bits in size.
Layer of Protocol This address refers to that of the IP protocol of Layer-3. This address refers to that of the protocol of Layer-4.
Address Provider A network administrator or system admin provides a user with their IP address. The kernel of the OS (operating system) provides an application with its port number.
Command Used One can use the ipconfig command for finding an IP address. One can use the netstat command for finding the available TCP ports along with the network statistics.
Uses This type of address identifies a computer/ host device on the computer network. These numbers act as the logical interfaces utilized by the communication protocols.
Examples A few examples of IP addresses are 172.16.0.2, 192.168.0.2, etc. A few examples of port numbers are 67 and 68 for DHCP traffic, 80 for HTTP, 22 for SSH, 123 for NTP, etc.

Keep learning and stay tuned to get the latest updates on GATE Exam along with GATE Eligibility Criteria, GATE 2023, GATE Admit Card, GATE Application Form, GATE Syllabus, GATE Cut off, GATE Previous Year Question Paper, and more.

Comments

Leave a Comment

Your Mobile number and Email id will not be published.

*

*