In: Computer Science
Research on TCP, UDP, and IP. And Define TCP, UDP, and IP
Compare the header of TCP, UDP, and IP packets.
Why are there more fields in PCP header than UDP and IP?
***************PLEASE UPVOTE***********************
TCP : TCP (Transmission Control Protocol) is a connection-oriented communications protocol that facilitates the exchange of messages between computing devices in a network. It is a standard that defines how to establish and maintain a network conversation through which application programs can exchange data. TCP works with the Internet Protocol (IP), which defines how computers send packets of data to each other. Together, TCP and IP are the basic rules defining the Internet
UDP : UDP (User Datagram Protocol) is a communication protocol used across the Internet for especially time-sensitive transmissions such as video playback or DNS lookups. It speeds up communications by not formally establishing a connection before data is transferred. This allows data to be transferred very quickly. UDP is basically a communications protocol that is primarily used for establishing low-latency and loss-tolerating connections between applications on the internet. UDP is an alternative to Transmission Control Protocol (TCP). Both UDP and TCP run on top of IP and are sometimes referred to as UDP/IP or TCP/IP.
IP : IP (Internet Protocol) is a protocol, or set of rules, for routing and addressing packets of data so that they can travel across networks and arrive at the correct destination.This protocol, like many others such as HTTP, TCP, UDP, etc., is responsible for establishing communications in most of our networks.
IP information is attached to each packet, and this information helps routers to send packets to the right place. Every device or domain that connects to the Internet is assigned an IP address, and as packets are directed to the IP address attached to them, data arrives where it is needed.
IP Header
VERSION: Version of the IP protocol (4 bits), which is 4 for IPv4
HLEN: IP header length (4 bits), which is the number of 32 bit words in the header. The minimum value for this field is 5 and the maximum is 15.
Type of service: Low Delay, High Throughput, Reliability (8 bits)
Total Length: Length of header + Data (16 bits), which has a minimum value 20 bytes and the maximum is 65,535 bytes.
Identification: Unique Packet Id for identifying the group of fragments of a single IP datagram (16 bits)
Flags: 3 flags of 1 bit each : reserved bit (must be zero), do not fragment flag, more fragments flag
Fragment Offset: Represents the number of Data Bytes ahead of the particular fragment in the particular Datagram. Specified in terms of number of 8 bytes, which has the maximum value of 65,528 bytes.
Time to live: Datagram’s lifetime (8 bits), It prevents the datagram to loop through the network by restricting the number of Hops taken by a Packet before delivering to the Destination.
Protocol: Name of the protocol to which the data is to be passed (8 bits)
Header Checksum: 16 bits header checksum for checking errors in the datagram header
Source IP address: 32 bits IP address of the sender
Destination IP address: 32 bits IP address of the receiver
Option: Optional information such as source route, record route. Used by the Network administrator to check whether a path is working or not.
TCP Header:
UDP Header :
MAIN DIFFERENCE
1. UDP header is 8-bytes fixed and simple header, while for TCP it may vary from 20 bytes to 60 bytes.
2. Unlike TCP, Checksum calculation is not mandatory in UDP. No Error control or flow control is provided by UDP. Hence UDP depends on IP and ICMP for error reporting.While in TCP, TCP provides extensive error checking mechanisms. It is because it provides flow control and acknowledgment of data.
3. Sequencing of data is a feature of Transmission Control Protocol (TCP). this means that packets arrive in-order at the receiver.Whereas there is no sequence in UDP.
Why are there more fields in PCP header than UDP and IP?
This is because UDP is significantly more limited in capability than TCP, its headers are much smaller. A UDP header contains 8 bytes, whereas each TCP header has ten required fields totalling up to 20 bytes (160 bits) in size. They can also optionally include an additional data section up to 40 bytes in size.
The field that are missing in the UDP header but present in the TCP header are - The sequence number, acknowledge number, and Window fields.
***************PLEASE UPVOTE***********************