Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between a port number and a protocol number? [closed]

What is the difference between a port number and a protocol number?

like image 975
nana adu-twum Avatar asked Feb 25 '09 17:02

nana adu-twum


People also ask

Is port number a protocol?

A port is identified for each transport protocol and address combination by a 16-bit unsigned number, known as the port number. The most common transport protocols that use port numbers are the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP).

What is a port and what is a protocol?

A port in networking is a software-defined number associated to a network protocol that receives or transmits communication for a specific service. A port in computer hardware is a jack or socket that peripheral hardware plugs into.

What is the difference between port number and port address?

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.


2 Answers

You can think of a port as a phone extension, with the computer's IP address being like its phone number. You can call the number (IP address) to talk to the computer, then dial the extension (port) to talk to a specific application. An application needs to be listening on a port in order to communicate.

A protocol is just the language that the two applications on either end of a conversation agree to speak in. If your application is sending streams of bytes to my application, my application needs to know how to interpret those bytes.

like image 54
Bill the Lizard Avatar answered Oct 23 '22 12:10

Bill the Lizard


Protocol = how to communicate, Port = where to communicate

like image 27
Kent Boogaart Avatar answered Oct 23 '22 12:10

Kent Boogaart