cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
42844
Views
90
Helpful
7
Replies

difference between port number and protocol number?

ANKURBHARTI
Level 1
Level 1

 

 

I am little confused on the concept of port number and protocol number. can someone define that...i know port number is given to protocols running above L4 and Protocol number is given to protocol running on network layer.... please correct if i am wrong...thanks in advance...

1 Accepted Solution

Accepted Solutions

AFROJ AHMAD
Cisco Employee
Cisco Employee

Hi ,


Port numbers are use by TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) while Protocol numbers are reserved number used to identify protocols

-----------------

Protocol number is the value contained in the “protocol” field of an IPv4 header. It is used to identify the protocol. This is an 8 bit filed. In IPv6 this field is called “Next header” field. Some of the protocol numbers of commonly used routing protocols are given below:
Protocol     Protocol Number
EIGRP     88
OSPF     89

In TCP/IP, a port is software based end point in an Operating system. Each port is assigned a number. It is called port number. A port number can be 0 to 65535. There are UDP and TCP port numbers in the same range.

 

===============

Common Protocol Numbers

  

Protocol Number

Internet Control Message Protocol (ICMP)
1

Transmission Control Protocol (TCP)
6

User Datagram Protocol (UDP)
 17

General Routing Encapsulation (PPTP data over GRE)
 47

 

===========

To send some data from one machine to an other running 2 applications on each machine. How do they send the data to each other? Well you would use a IP address  and how do i make sure my message gets to the correct application and not to the every single program on the machine. You use a socket.

A socket consists of a IP address( In the IP ADDRESS filed we have one of field for protocol number) and a Port number, so now if you listen to a particular port number you can get messages from remote machines

 

 

Hope it will help..

 

Thanks-

Afroz

***Ratings Encourages Contributors ****

 

Thanks- Afroz [Do rate the useful post] ****Ratings Encourages Contributors ****

View solution in original post

7 Replies 7

AFROJ AHMAD
Cisco Employee
Cisco Employee

Hi ,


Port numbers are use by TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) while Protocol numbers are reserved number used to identify protocols

-----------------

Protocol number is the value contained in the “protocol” field of an IPv4 header. It is used to identify the protocol. This is an 8 bit filed. In IPv6 this field is called “Next header” field. Some of the protocol numbers of commonly used routing protocols are given below:
Protocol     Protocol Number
EIGRP     88
OSPF     89

In TCP/IP, a port is software based end point in an Operating system. Each port is assigned a number. It is called port number. A port number can be 0 to 65535. There are UDP and TCP port numbers in the same range.

 

===============

Common Protocol Numbers

  

Protocol Number

Internet Control Message Protocol (ICMP)
1

Transmission Control Protocol (TCP)
6

User Datagram Protocol (UDP)
 17

General Routing Encapsulation (PPTP data over GRE)
 47

 

===========

To send some data from one machine to an other running 2 applications on each machine. How do they send the data to each other? Well you would use a IP address  and how do i make sure my message gets to the correct application and not to the every single program on the machine. You use a socket.

A socket consists of a IP address( In the IP ADDRESS filed we have one of field for protocol number) and a Port number, so now if you listen to a particular port number you can get messages from remote machines

 

 

Hope it will help..

 

Thanks-

Afroz

***Ratings Encourages Contributors ****

 

Thanks- Afroz [Do rate the useful post] ****Ratings Encourages Contributors ****

Thanks so much! This was an amazing explanation!

Can u plz explain whether the Ip address is of source or destination ?


@AFROJ AHMAD wrote:

Hi ,


Port numbers are use by TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) while Protocol numbers are reserved number used to identify protocols

-----------------

Protocol number is the value contained in the “protocol” field of an IPv4 header. It is used to identify the protocol. This is an 8 bit filed. In IPv6 this field is called “Next header” field. Some of the protocol numbers of commonly used routing protocols are given below:
Protocol     Protocol Number
EIGRP     88
OSPF     89

In TCP/IP, a port is software based end point in an Operating system. Each port is assigned a number. It is called port number. A port number can be 0 to 65535. There are UDP and TCP port numbers in the same range.

 

===============

Common Protocol Numbers

  

Protocol Number

Internet Control Message Protocol (ICMP)
1

Transmission Control Protocol (TCP)
6

User Datagram Protocol (UDP)
 17

General Routing Encapsulation (PPTP data over GRE)
 47

 

===========

To send some data from one machine to an other running 2 applications on each machine. How do they send the data to each other? Well you would use a IP address  and how do i make sure my message gets to the correct application and not to the every single program on the machine. You use a socket.

A socket consists of a IP address( In the IP ADDRESS filed we have one of field for protocol number) and a Port number, so now if you listen to a particular port number you can get messages from remote machines

 

 

Hope it will help..

 

Thanks-

Afroz

***Ratings Encourages Contributors ****

 


 

Thanks it is much clear now.

amirkh1566
Level 1
Level 1

Hi;

Protocol number define the field in IP header to which protocol must be delivered.

Port number define the number of protocol in an application layer.

Examples:

Protocol Number---> ip=0 / icmp=1 / tcp=6 / udp=17

Port Number:---> http=80 / https=443 / ftp=20,21 / telnet=23

Hello! amirkh1566, I'm not sure ip=0 what do you mean? can please make more clear? Thank

Regards,

Sopheak

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: