TCP Articulation Format
Written on 10:29 by Ahmet Emir
Since the high layers aloof accelerate a abstracts beck to the protocols in the Transport layers, I’ll demonstrate
how TCP segments a abstracts beck and prepares it for the Internet layer. When the
Internet band receives the abstracts stream, it routes the segments as packets through an internetwork.
The segments are handed to the accepting host’s Host-to-Host band protocol, which
rebuilds the abstracts beck to duke to the upper-layer applications or protocols.
Figure 2.3 shows the TCP articulation format. The amount shows the altered fields aural the
TCP header.
FIGURE 2 . 3 TCP articulation format
Bit 0 Bit 15
Source anchorage (16) Destination anchorage (16)
Window (16)
Urgent (16)
Reserved (6) Cipher $.25 (6)
Checksum (16)
Header
length (4)
Sequence cardinal (32)
Acknowledgment cardinal (32)
Options (0 or 32 if any)
Data (varies)
Bit 16 Bit 31
24 bytes
76 Chapter 2 Introduction to TCP/IP
The TCP attack is 20 bytes long, or up to 24 bytes with options. You charge to understand
what anniversary acreage in the TCP articulation is:
Source anchorage The anchorage cardinal of the appliance on the host sending the data. (Port numbers
will be explained a little after in this section.)
Destination anchorage The anchorage cardinal of the appliance requested on the destination host.
Sequence cardinal A cardinal acclimated by TCP that puts the abstracts aback in the actual adjustment or
retransmits missing or damaged data, a action alleged sequencing.
Acknowledgment cardinal The TCP octet that is accepted next.
Header breadth The cardinal of 32-bit words in the TCP header. This indicates area the data
begins. The TCP attack (even one including options) is an basic cardinal of 32 $.25 in length.
Reserved Always set to zero.
Code $.25 Control functions acclimated to set up and abolish a session.
Window The window admeasurement the sender is accommodating to accept, in octets.
Checksum The circadian back-up analysis (CRC), because TCP doesn’t assurance the lower layers
and checks everything. The CRC checks the attack and abstracts fields.
Urgent A accurate acreage alone if the Urgent arrow in the cipher $.25 is set. If so, this amount indicates
the account from the accepted arrangement number, in octets, area the aboriginal articulation of non-urgent
data begins.
Options May be 0 or a assorted of 32 bits, if any. What this agency is that no options have
to be present (option admeasurement of 0). However, if any options are acclimated that do not account the option
field to absolute a assorted of 32 bits, added of 0s charge be acclimated to accomplish abiding the abstracts begins on
a 32-bit boundary.
Data Handed bottomward to the TCP agreement at the Transport layer, which includes the upperlayer
headers.
Let’s booty a attending at a TCP articulation affected from a arrangement analyzer:
TCP - Transport Control Protocol
Source Port: 5973
Destination Port: 23
Sequence Number: 1456389907
Ack Number: 1242056456
Offset: 5
Reserved: 0000
Code: %011000
Ack is valid
Push Request
Window: 61320
Checksum: 0x61a6
TCP/IP and the DoD Model 77
Urgent Pointer: 0
No TCP Options
TCP Abstracts Area:
vL.5.+.5.+.5.+.5 76 4c 19 35 11 2b 19 35 11 2b 19 35 11
2b 19 35 +. 11 2b 19
Frame Analysis Sequence: 0x0d00000f
Did you apprehension that aggregate I talked about beforehand is in the segment? As you can see from
the cardinal of fields in the header, TCP creates a lot of overhead. Appliance developers may
opt for ability over believability to save overhead, so User Datagram Agreement was also
defined at the Transport band as an alternative.
