0% found this document useful (0 votes)
73 views

Computer Network

The document discusses a computer network assignment involving questions about TCP and UDP headers. The key points are: - TCP headers contain additional fields like sequence numbers, acknowledgement numbers, and windows that UDP headers do not have because TCP is connection-oriented while UDP is simpler and connectionless. - If a TCP segment's destination IP address or port is corrupted, the receiving TCP will calculate the checksum and drop the segment. - UDP is preferred over TCP for message-oriented applications that need to protect message boundaries, as each UDP datagram can represent a chunk of data while TCP encodes message length in a header field.

Uploaded by

Shi a
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views

Computer Network

The document discusses a computer network assignment involving questions about TCP and UDP headers. The key points are: - TCP headers contain additional fields like sequence numbers, acknowledgement numbers, and windows that UDP headers do not have because TCP is connection-oriented while UDP is simpler and connectionless. - If a TCP segment's destination IP address or port is corrupted, the receiving TCP will calculate the checksum and drop the segment. - UDP is preferred over TCP for message-oriented applications that need to protect message boundaries, as each UDP datagram can represent a chunk of data while TCP encodes message length in a header field.

Uploaded by

Shi a
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

COMPUTER NETWORK

ASSIGNMENT

Shiv Shankar pal (17mcmc32)


1. Compare the TCP header and the UDP header. List the fields in the TCP header
that are not part of the UDP header. Give the reason for each missing field.

Ans. Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) are the
two standard transport layers used with internet protocol (IP).
TCP will be connection-oriented – after an interconnection is made, data is usually
mailed bidirectional.
UDP is often a simpler, connectionless Web protocol. Multiple communications
usually are sent as packages throughout pieces exploitation UDP.
The field that are missing in the UDP header but present in the TCP header are - The
sequence number, acknowledge number, and Window fields.
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.

2. An IP datagram is carrying a TCP segment destined for address 130.14.16.17. The


destination port address is corrupted and it arrives at destination 130.14.16.19.
How does the receiving TCP react to this error?
Ans. It looks as if both the destination IP address and the destination port number
are corrupted. TCP calculates the checksum and drops the segment.

3.One ICMP message, discussed in Chapter 9, reports a destination port unreachable


error. How can TCP detect the error in the destination port?
Ans.

4.UDP is a message-oriented protocol. TCP is a byte-oriented protocol. If an appli-


cation needs to protect the boundaries of its message, which protocol should be
used, UDP or TCP?

Ans. For TCP, you encode your message length in a field at the start.
UDP is preferred because each user datagram can be used for each chunk of data.

5.What is the maximum size of the TCP header? What is the minimum size of the
TCP header?
Ans. "The maximum size of the TCP header is 60 bytes. The minimum size of the TCP
header is 20 bytes.

6. If the value of HLEN is 0111, how many bytes of option are included in the
segment?
Ans.

7.Show the entries for the header of a TCP segment that carries a message from an
FTP client to an FTP server. Fill the checksum field with 0s. Choose an appropriate
ephemeral port number and the correct well-known port number. The length of
data is 40 bytes.

You might also like