Skip to content
Related Articles

Related Articles

Improve Article

Difference between IP address and Port Number

  • Difficulty Level : Easy
  • Last Updated : 13 Aug, 2020
Geek Week

1. IP address :
An Internet Protocol address (IP address) is the logical address of our network hardware by which other devices identify it in a network. IP address stands for Internet Protocol address which is an unique number or a numerical representation that uniquely identifies a specific interface on the network. Each device that is connected to internet an IP address is assigned to it for its unique identification.

Addresses in IPv4 are 32-bits long example, 

And Addresses in IPv6 are 128-bits example,


2. Port Number :
Port number is the part of the addressing information used to identify the senders and receivers of messages in computer networking. Different port numbers are used to determine what protocol incoming traffic should be directed to. Port number identifies a specific process to which an Internet or other network message is to be forwarded when it arrives at a server. Ports are identified for each protocol and It is considered as a communication endpoint.

Ports are represented by 16-bit numbers. 0 to 1023 are restricted port numbers are as they are used by well-known protocol services. 1024 to 49151 are registered port numbers means it can be registered to specific protocols by software corporations and in last 49152 to 65536 are used as private ports means they can be used by anybody.

Difference between IP address and Port Number :

Serial NoIP addressPort Number
01. Internet Protocol address (IP address) used to identify a host in network.Port number is used to identify an processes/services on your system
02. IPv4 is of 32 bits (4 bytes) size and for IPv6 is 128 bits (16 bytes).The Port number is 16 bits numbers.
03.IP address is the address of the layer-3 IP protocol.Port number is the address of the layer-4 protocols.
04.IP address is provided by admin of system or network administrator. Port number for application is provided by kernel of Operating System.
05.ipconfig command can be used to find IP address .netstat  command can be used to find Network Statistics Including Available TCP Ports.
06.IP address identify a host/computer on a computer network.Port numbers are logical interfaces used by communication protocols., are some of IP address examples.80 for HTTP, 123 for NTP, 67 and 68 for DHCP traffic, 22 for SSH etc.

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :