[next] [tail] [up]

Internetworking: The Transport Layer of TCP/IP

11.1 Transport Control Protocol (TCP)

 |-------------------------|------------------------|
 |      source port        |    destination port     |
 |---------16-bits-------------------16--bits---------|
 |                                                  |
 |                sequence  number                  |
 |---------------------32--bits----------------------|
 |                 acknowledgment                   |
 |                     32 -bits                      |
 |------|--------|-||-|-||-|------------------------|
 Hleeandgetrh Reserved UR ACPSRS SYFI|     Window   Size      |
 |4-bits---6-bits--G-KH-T-NN-|--------16--bits---------|
 |                         |                        |
 |     TCP  checksum       |    Urgent  pointer     |
 |---------16-bits------------------|16--bits---------|
~|                                 |                ~
~|        Options  (if any)        padding  (if needed~)
 |--------------------------------------------------|
~|                optional data area                ~
~|--------------------------------------------------~

Source/Destination Ports Port numbers are to be arranged by the communicating parties, however, some numbers are reserved for special applications.
protocol port assignment
echo 7
daytime 13
ftp 21
telnet 23
simple mail 25
time 37
whois 43
trivial ftp 69
finger 79
Sequence and Acknowledgment Numbers Byte-stream sequencing is assumed.
Window Size Tells the receiving TCP module the number of bytes that the sender is willing to accept.
Header Length In units of 4 bytes, for identifying the start of the data.
URG Notifies that the Urgent pointer field points to valid data. The TCP module must process urgent data before processing any other data.
ACK Tells that the Acknowledgment field holds valid data.
PSH Requests a push, that is, that the receiver immediately send the data to the destination application without waiting for its buffer to reach some threshold.
Telnet applications normally set this flag. By doing so, telnet forces TCP to immediately pass the user's keyboard inputs to the telnet server. This helps eliminate delays in echoing the received character back to the sender.
RST Asks the receiving TCP module to reset the TCP connection. A TCP will send a message with the RST flag when it detects a problem with the connection. Most applications simply terminate when they receive this flag.
SYN Asks to synchronize the sequence numbers
FIN Tells the receiving TCP module that the sender has finished sending data.
Urgent Pointer Points to last byte of urgent data in the TCP data area.
Options

[next] [front] [up]