Question

In: Computer Science

Research on TCP, UDP, and IP. And Define TCP, UDP, and IP Compare the header of...

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?

Solutions

Expert Solution

***************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

  1. VERSION: Version of the IP protocol (4 bits), which is 4 for IPv4

  2. 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.

  3. Type of service: Low Delay, High Throughput, Reliability (8 bits)

  4. Total Length: Length of header + Data (16 bits), which has a minimum value 20 bytes and the maximum is 65,535 bytes.

  5. Identification: Unique Packet Id for identifying the group of fragments of a single IP datagram (16 bits)

  6. Flags: 3 flags of 1 bit each : reserved bit (must be zero), do not fragment flag, more fragments flag

  7. 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.

  8. 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.

  9. Protocol: Name of the protocol to which the data is to be passed (8 bits)

  10. Header Checksum: 16 bits header checksum for checking errors in the datagram header

  11. Source IP address: 32 bits IP address of the sender

  12. Destination IP address: 32 bits IP address of the receiver

  13. 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:

  • Source Port Address –
    16 bit field that holds the port address of the application that is sending the data segment.
  • Destination Port Address –
    16 bit field that holds the port address of the application in the host that is receiving the data segment.
  • Sequence Number –
    32 bit field that holds the sequence number, i.e, the byte number of the first byte that is sent in that particular segment. It is used to reassemble the message at the receiving end if the segments are received out of order.
  • Acknowledgement Number –
    32 bit field that holds the acknowledgement number, i.e, the byte number that the receiver expects to receive next. It is an acknowledgment for the previous bytes being received successfully.
  • Header Length (HLEN) –
    This is a 4 bit field that indicates the length of the TCP header by number of 4-byte words in the header, i.e, if the header is of 20 bytes(min length of TCP header), then this field will hold 5 (because 5 x 4 = 20) and the maximum length: 60 bytes, then it’ll hold the value 15(because 15 x 4 = 60). Hence, the value of this field is always between 5 and 15.
  • Control flags –
    These are 6 1-bit control bits that control connection establishment, connection termination, connection abortion, flow control, mode of transfer etc. Their function is:
    • URG: Urgent pointer is valid
    • ACK: Acknowledgement number is valid( used in case of cumulative acknowledgement)
    • PSH: Request for push
    • RST: Reset the connection
    • SYN: Synchronize sequence numbers
    • FIN: Terminate the connection
  • Window size –
    This field tells the window size of the sending TCP in bytes.
  • Checksum –
    This field holds the checksum for error control. It is mandatory in TCP as opposed to UDP.
  • Urgent pointer –
    This field (valid only if the URG control flag is set) is used to point to data that is urgently required that needs to reach the receiving process at the earliest. The value of this field is added to the sequence number to get the byte number of the last urgent byte.

UDP Header :

  1. Source Port : Source Port is 2 Byte long field used to identify port number of source.
  2. Destination Port : It is 2 Byte long field, used to identify the port of destined packet.
  3. Length : Length is the length of UDP including header and the data. It is 16-bits field.
  4. Checksum : Checksum is 2 Bytes long field. It is the 16-bit one’s complement of the one’s complement sum of the UDP header, pseudo header of information from the IP header and the data, padded with zero octets at the end (if necessary) to make a multiple of two octets.

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***********************


Related Solutions

Q10. Compare the header of TCP, UDP, and IP packets and explain why are there more...
Q10. Compare the header of TCP, UDP, and IP packets and explain why are there more fields in TCP header than UDP and IP? (10 points)
Compare and contrast TCP and UDP.
Compare and contrast TCP and UDP.
WHAT ARE THE DIFFERENCES BETWEEN TCP/IP AND UDP IN TERMS OF OSI LAYERS AND DEFINITION ITSELF?...
WHAT ARE THE DIFFERENCES BETWEEN TCP/IP AND UDP IN TERMS OF OSI LAYERS AND DEFINITION ITSELF? PLEASE GIVE BREIFE EXPLANATIONS WITH PICTURES AND EXAMPLES WITH EASY ENOUGH TO MEMORIZE AND UNDERSTAND
1-What are the types of computer networks? 2-Define TCP/IP
1-What are the types of computer networks? 2-Define TCP/IP
why the OSI model is important? and compare between TCP/IP and OSI model?
why the OSI model is important? and compare between TCP/IP and OSI model?
The OSI and the TCP/IP reference models are defined in seven and four layers, respectively. Research...
The OSI and the TCP/IP reference models are defined in seven and four layers, respectively. Research and discuss why this approach to a network model works better than a single layer model and provide a brief discussion on the benefits of the multi-layer approach. In what other everyday activities could layered approaches also be applied to explain its steps or activities?
What are the services provided by TCP?  What services are provided by UDP?
What are the services provided by TCP?  What services are provided by UDP?
What are the differences between TCP and UDP? What are transport protocols?
What are the differences between TCP and UDP? What are transport protocols?
Why is UDP/IP used to transmit and receive packetized voice signals over and IP network and...
Why is UDP/IP used to transmit and receive packetized voice signals over and IP network and not TCP/IP used in VoIP?
Define the following terms related to the Internet: TCP/IP, RFC, the World Wide Web, Internet Governance,...
Define the following terms related to the Internet: TCP/IP, RFC, the World Wide Web, Internet Governance, ISOC, W3C, IT‐ISAC, Internet and WWW Technology.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT