Difference between IP Address and Port Number

Rashmi Bhardwaj | Blog,BUZZ,Protocol,Routing & Switching
Advertisements

IP ADDRESS AND PORT NUMBER

What is an IP Address?

An IP address is the address of the layer-3 IP protocolIP address is a logical 32-bit address which is used to determine the destination of a data packet (datagram). The IP address identifies the source and destination networks which allow the datagram to flow accordingly in the specified route

Version 4 of the Internet Protocol i.e. IPv4 defines an IP address as a 32-bit number. However, because of the growth of the Internet and the depletion of available IPv4 addresses, a new version of IP (IPv6), using 128 bits for the IP address, was developed in 1995 and standardised as RFC 2460 in 1998.

Related- Public vs Private IP Address

Advertisements

What is PORT Number –

Ports are represented by 16-bit numbers. Hence ports range from 0-65,525. The port numbers from 0 -1023 are restricted because they are reserved for the use of well-known protocol services such as HTTP and FTP. In a network, the endpoint, which two hosts communicate with each other are identified as ports.

Related – Ports vs Socket

Related- Well Known Port Numbers

IP Address vs Port Number –

Both IP address and Port number have an essential role to play in Networking and Application domain. The differences between IP address and Port number have been enlisted in below table –

IP ADDRESS
PORT NUMBER
Used to identify a host
Used to identify an application/services on your system
An IP address is the address of the layer-3 IP protocol.
A port number is a layer-4 address used by some layer-4 protocols e.g. TCP and UDP
The IP address for IPv4 is of 32 bits (4 bytes) size and for IPv6 is 128 bits (16 bytes)
The Port number is 16 bits and assigned by the Network operating system when the application process creates the sockets.
IP address is provided by network administrator or admin user of system.
Port number for application is decided by the Kernel of the OS. This port no. is called port address.
To find IP address, issue the command “ipconfig” under CLI and press “Enter.” Your IP address should be listed under “Ethernet adapter/LAN”
To find port number used for application, Type “netstat -a” and press “Enter.” A list of all your active TCP/IP connections will populate showing port number used by source and destination hosts.
IP address works to send datagram traffic across network from source machine to destination machine
After IP delivers the packet to destination , with the help of the port numbers OS directs the data to the correct application
E.g. – 192.168.0.1, 172.16.0.1 are some of IP address examples.
E.g. – Port number 80 for http traffic , 67 and 68 for DHCP traffic etc.

Download the difference table here.

difference-between-ip-address-and-port-number

 

 

 

 

Related- Networking Scenario Based Interview Questions

To know more about IP address and Port number and their difference watch this video –

ABOUT THE AUTHOR

Advertisements

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart
Select your currency
INR Indian rupee
Scroll to Top