Escolar Documentos
Profissional Documentos
Cultura Documentos
Application
Application
Transport
Internet
Transport
Network
Data Link
Physical
Link
IPG
Preamble
Standard
12 Bytes
8 Bytes
Layer 1
Start of Frame
Delimiter
1 Byte
Layer2
Layer2 Frame Size with
802.1 Q
64 - 1522 Bytes
Layer4
Layer4 TCP Segment
Size
Variable
Layer4 OverHead
Layer4 TCP OverHead
TCP Header
20 - 60 Bytes
Layer4 Payload
Payload
Variable
What is TCP?
Transport Control Protocol (TCP) is a Transport Layer Connection Oriented Protocol that is used for services that require ordered data transfer and data segmentation, error recovery, f
How does TCP work?
TCP encapsulates the Layer5 PDU, adding a Layer4 UDP header to it, thus, turning it into a Layer4 PDU, called segment. The Multiplexing over ports feature, offers the posibilities to
The Multiplexing over ports feature, offers the posibilities to provide multiple services to run over different ports at the same time with a port number ranging between 0 and 65535. O
1024 to 49151 are register available ports (ports that become assigned to an application once a requirement is made to IANA), 49152 to 65535 are dynamic or private ports that cannot
Ordered data transfer and data segmentation feature, permits continous streaming of bytes from an upper-layer process that is "segmented" for transmission and delivered to upper-laye
Error recovery feature, offers numberig and acknowledging of data with sequence and acknowledgement header fields.
Flow control feature, offers the use of window sizes to protect buffer space and routing devices from being overloaded with traffic.
Connection management feature, offers connection establishment and termination capacity through the use of port initialization, sequencing and acknowledgement fields.
Layer4 TCP Header Structure?
0
15
16
Source Port
Window Size
23
24
31
32
39
Layer4 OverHead
Layer4 TCP Header
Destination Port
Acknowledgement Number
Checksum
40
47
Sequence Number
TCP Flags
Options and Padding (0 to 4
EndPoint2
|---------------------------------------->
<----------------------------------------|
Ack=1, Seq=1
Connection Maintenance
|---------------------------------------->
EndPoint1
Seq=1, Ack
Syn=0, Ack=1
Seq=461, Ack=1449
* He confirms receiving 1448 Bytes.
* The connection is estabished with a certain window size. If the transmission is consistent and no unreceived bits have been resent, then the original window transmission s
What is the TCP Sliding Window?
TCP communication uses windowing, meaning that one or more segments are sent at one time, and a receiver can acknowledge the receipt of all the segments in a window with a sing
In some cases, TCP uses a sliding window, where the window size begins with one segment. If there is a successful acknowledgment of that one segment (that is, the receiver sends an
the window size doubles to two segments. Upon successful receipt of those two segments, the next window contains four segments.
This exponential increase in window size continues until the receiver does not acknowledge successful receipt of all segments within a certain time period (known as the round - trip ti
What is the TCP Maximum Segment Size?
The TCP Maximum Segment Size (MSS) is the amount of data that can be contained in a single TCP segment. The value is dependent on the current TCP window size. MSS only refe
If a single TCP flow drops a packet, that flow might experience TCP slow start , meaning that the window size is reduced to one segment.
The window size then grows exponentially until it reaches one-half of its congestion window size (that is, the window size when congestion was previously experienced). At that point
If a router interfaces output queue fills to capacity, all TCP flows can simultaneously start to drop packets, causing all TCP flows to experience slow start.
This condition, called global synchronization or TCP synchronization , results in a very inefficient use of bandwidth, because of all TCP flows having reduced window sizes and theref
What is Out-of-Order Delivery?
In many routed environments, a router has more than one egress interface that can reach a destination IP address.
If load balancing is enabled in such a scenario, some packets in a traffic flow might go out one interface, while other packets go out of another interface.
With traffic flowing out of multiple interfaces, there is a chance that the packets will arrive out of order. Fortunately, TCP can help prevent out-of-order packets by either sequencing th
Well-Known TCP Ports?
Application Type
Telnet
SMTP
DNS
HTTP
POP3
SSL
1024+
23
25
53
80
110
443
1024+
1024+
Layer2
Layer2 MAC OverHead
Frame Header
14 bytes / 18 Bytes
Layer2 Payload
Payload
42/46 - 1500 Bytes
Layer4 Payload
Payload
Variable
er and data segmentation, error recovery, flow control, connection management and port multiplexing. TCP header size is of 20-60 Bytes.
Layer3
Layer3 IPv6 Packet
Size
0 - 1500 Bytes
over ports feature, offers the posibilities to provide multiple services to run over different ports at the same time with a port number ranging between 0 and 65535.
t number ranging between 0 and 65535. Out of those 65536 usable ports 0 to 1023 are known as well defined, reserved communication ports,
35 are dynamic or private ports that cannot be registered with IANA, they are used for private, or customized services or temporary purposes.
r transmission and delivered to upper-layer processes at the receiving device, with the bytes in the same order.
48
55
Sequence Number
TCP Flags
Options and Padding (0 to 40)
56
63
Window Size
Sequence No.: a 32-bit field indicting the amount of data sent during a TCP session. The sending party can be assured that the receiving party really received the data,
because the receiving party uses the sequence number as the basis for the acknowledgment number in the next segment it sends back to the sender;
Acknowledgment No: used by the recipient of a segment to request the next segment in the TCP session. The value of this field is calculated by adding 1 to the previously received sequence number
Offset field: The Offset field is a 4-bit leftmost field that specifies the offset between the data in a TCP segment and the start of the segment, in units of 4-byte words;
Reserved field: The 3-bit Reserved field is not used, and each of the 3 bits are set to a value of 0;
TCP Flags field: The TCP Flags field is comprised of 9 flag bits (also known as control bits ), which indicate a variety of segment parameters;
Window field: The 16-bit Window field specifies the number of bytes a sender is willing to transmit before receiving an acknowledgment from the receiver;
Checksum field: The Checksum field is a 16-bit field that performs error checking for a segment;
Urgent Pointer field: The 16-bit Urgent Pointer field indicates that last byte of a segments data that was considered urgent.
The field specifies the number of bytes between the current sequence number and that urgent data byte;
TCP Options field: The optional TCP Options field can range in size from 0 to 320 bits (as long as the number of bits is evenly divisible by 32), and the field can contain a variety of TCP segment pa
y with Ack/Fin.
Connection Maintenance
|----------------------------------->
<----------------------------------|
EndPoint1
Ack, Fin
Seq=1,Ack=461
|----------------------------------->
|-------------------------------------------------------->
<--------------------------------------------------------|
Ack
|--------------------------------------------------------->
n time period (known as the round - trip time [RTT] , which is sometimes called real transfer time ), or until a configured maximum window size is reached.
current TCP window size. MSS only refers to the amount of data in a segment.
was previously experienced). At that point, the window size begins to grow linearly instead of exponentially.
ce slow start.
s having reduced window sizes and therefore spending more time waiting for acknowledgments.
ut-of-order packets by either sequencing them in the correct order or by requesting the retransmission of out-of-order packets.
er3
Layer3 IPv6 OverHead
IPv6 Header
40 Bytes
Layer3 Payload
Payload
Variable
Procedure
EndPoint2
Ack, Fin