Think of your routine conversations. They usually follow a general pattern dictated by predefined rules. For example, most conversations start with greetings and end with goodbyes.
Formally, according to the Oxford Dictionary, a protocol is “a set of rules governing the exchange or transmission of data between devices.”
The Transmission Control Protocol (TCP) is one such protocol. It was created to allow end systems to communicate effectively. The distinguishing feature of TCP is that it ensures that data reaches the intended destination and is not corrupted along the way.
The User Datagram Protocol (UDP) is also one such key protocol. However, it does not ensure that data reaches the destination and that it remains incorrupt.
HyperText Transfer Protocol (HTTP) is a web protocol that defines the format of messages to be exchanged between web clients, e.g., web browsers and web servers and what action is to be taken in response to the message. The World Wide Web uses this as its underlying protocol.
Computers send messages to each other that are made up of ones and zeros (bits). However, instead of sending messages of possibly trillions of bits all in one go, they’re broken down into smaller units called packets to make transmission more manageable. These smaller sizes make transmission more manageable because most links are shared by a few end-systems. Sending smaller units in succession instead of one big file all in one go makes usage of the network fairer amongst end-systems.
Every device that is connected to the Internet has an address called an ‘IP Address’ which is much like a mailing address.
- IP addresses are 32 bit numbers (in IP version 4).
- The human readable way for looking at these numbers is the dotted decimal notation, whereby the number is considered one octet of bits (8 bits) at a time. Those octets are read out in decimals, then separated by dots.
- Hence, each number can be from 0 to 255For example, 1.2.3.4.
- Some IP addresses are reserved for specific functions.
Any host connected to the Internet could be running many network applications. In order to distinguish these applications, all bound to the same IP address, from one another, another form of addressing, known as port numbers, is used. Each endpoint in a communication session is identified with a unique IP address and port combination. This combination is also known as a socket. So in essence, ports help to address the packet to specific applications on hosts.
- IP addresses identify end systems but ports identify an application on the end system.
- Every application has a 16-bit port number. So the port number could range from 0 to 65535.
- The ports 0−1023 are reserved for specific applications and are called well-known ports.
- For instance, port 80 is reserved for HTTP traffic. The ports 1024−49152 are known as registered ports and they are used by specific, potentially proprietary, applications that are known but not system defined.