EE 281 Lecture Notes - Lecture 4: Maximum Segment Size, Explicit Congestion Notification, Transmission Control Protocol

46 views2 pages
23 Feb 2017
School
Course
Professor
Identifies the port number of the receiver’s socket.
Checksum
Like UDP, this is a 16-bit 1s complement sum of the TCP header, application data, and IP pseudo header. The IP pseudo header
is a subset of the fields in the IP header: source address, destination address, protocol ID, and the length of the TCP header and
data. All the data is added in 16-bit chunks. Any overflow carries result in a 1 added to the result. The final result is
complemented (bits inverted). When the receiver performs the same operation and includes the checksum field, the result for an
uncorrupted packet is all 1s (0xffff).
Sequence number
Every byte that is transmitted is counted starting from some initial sequence number. The 32-bit sequence number of the TCP
segment is the number of the first byte in the data. The sequence number is an essential part of TCP’s reliable data transfer
service.
Acknowledgement (ACK) number
A receiver sends back a 32-bit acknowledgement number that is the sequence number of the next byte that it expects to receive.
This too is an essential part of TCP’s reliable data transfer service.
Receive window
The receiver tells the sender the maximum number of bytes that it is capable of receiving. This 16-bit value takes priority over
the MSS (maximum segment size).
Header length
The header length indicates the number of 32-bit words in the TCP header. Note that the IP header contains the total datagram
length, which can be used to determine how much data is in the message. The basic TCP header is 20 bytes and the minimum
value of the header length is hence 5 (20 bytes = 5 32-bit words). TCP supports optional data in its header and this may make the
header larger.
TCP Options
If the header length is greater than 5, that means there are more than 20 bytes in the header and TCP options are present. TCP
options are located at the end of the normal 20-byte header. While approximately 32 different options are defined, some are
obsolete and many are never used. The most commonly used options include:
Maximum Segment Size: defines the maximum segment size that will be used during a connection between two hosts.
Window Scaling: extends the number of bits for the receive window to allow the TCP window size to be specified as a 30-bit
number instead of a 16-bit number.
Selective Acknowledgements: allow the receiver to inform the sender if it received any out-of-order segments.
Timestamps: an extension to allow more accurate mechanism to measure segment delivery time, including retransmissions.
Flags
A number of 1-bit flags are present in the header. These are:
ACK: informs the recipient of the segment that the acknowledgement field contains a valid sequence number.
RST, SYN, FIN: These are used to set up and tear down the TCP connection. The SYN (“Synchronize”) flag is used in the
handshake used to set up a connection. The FIN (“Finish”) flag is used to close a connection. The RST (“Reset”) flag indicates
that a segment was received for a closed or nonexistent socket.
PSH (“Push”): Tells the receiver to pass the received data to the application layer immediately. This flag is not used in practice.
URG (“Urgent”): Tells the receiver that the application data contains a region of “urgent” data, possibly along with “non-
urgent” data. The 16-bit urgent data pointer is an index to the last byte of this data. As with PSH, the concept of urgent data is not
used.
NS (“Nonce Sum”), CWR (“Congestion Window Reduced”), and ECE (“Explicit Congestion Expected”) are all part of an
Explicit Congestion Notification protocol, which is an extension to IP. Not all routers support this and we will not cover this
extension.
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in

Document Summary

Identifies the port number of the receiver"s socket. Like udp, this is a 16-bit 1s complement sum of the tcp header, application data, and ip pseudo header. The ip pseudo header is a subset of the fields in the ip header: source address, destination address, protocol id, and the length of the tcp header and data. All the data is added in 16-bit chunks. Any overflow carries result in a 1 added to the result. When the receiver performs the same operation and includes the checksum field, the result for an uncorrupted packet is all 1s (0xffff). Every byte that is transmitted is counted starting from some initial sequence number. The 32-bit sequence number of the tcp segment is the number of the first byte in the data. The sequence number is an essential part of tcp"s reliable data transfer service.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents