1
00:00:00,440 --> 00:00:05,990
A TCP segment consists of a segment header and a data section.

2
00:00:06,200 --> 00:00:12,500
The TCP header contains ten mandatory fields and an optional extension field.

3
00:00:13,210 --> 00:00:18,370
The optional field is the options field, which is the last field seen on the slide.

4
00:00:19,220 --> 00:00:23,330
The TCP header includes a source port and destination port.

5
00:00:23,360 --> 00:00:25,700
Each 16 bits in length.

6
00:00:26,580 --> 00:00:31,470
The source port is the port on the originating machine that emitted the packet.

7
00:00:32,570 --> 00:00:38,270
The destination port indicates the port on the target machine the packet should be delivered to.

8
00:00:39,500 --> 00:00:46,400
The sequence number and an acknowledgement number allows TCP to track a series of packets to make sure

9
00:00:46,400 --> 00:00:49,670
they arrive reliably and pretty much in order.

10
00:00:49,700 --> 00:00:51,530
No, absolutely in order.

11
00:00:52,210 --> 00:00:56,320
If a packet is lost, TCP will retransmit it.

12
00:00:56,680 --> 00:00:58,570
If packets arrive out of order.

13
00:00:58,600 --> 00:01:04,780
TCP will adjust them to make sure that they are delivered to the destination services in the proper

14
00:01:04,780 --> 00:01:05,349
order.

15
00:01:07,310 --> 00:01:13,310
Data offset specifies the size of the TCP header in 32 bit words.

16
00:01:14,350 --> 00:01:19,420
The minimum size header is five words and the maximum is 15 words.

17
00:01:20,310 --> 00:01:27,150
There is also TCP control bit space, also known as flags, which are incredibly important for tracking

18
00:01:27,150 --> 00:01:29,820
the state of a given TCP connection.

19
00:01:30,030 --> 00:01:33,360
As you know, we've talked about them a few minutes ago.

20
00:01:33,990 --> 00:01:38,760
Of course, if you didn't take a break, it was a few minutes ago, but whatever you do, just don't

21
00:01:38,760 --> 00:01:39,990
spill on the keyboard.

22
00:01:40,350 --> 00:01:46,410
Now, TCP senders use a number called window size, which is in bytes by default.

23
00:01:47,130 --> 00:01:52,890
To regulate how much data they send to a receiver before requiring an acknowledgement in return.

24
00:01:53,650 --> 00:02:00,280
So if the window size becomes too small, network data transfer will be unnecessarily slow.

25
00:02:00,310 --> 00:02:07,270
While if the window size becomes too large, the network link can become saturated or the receiver may

26
00:02:07,270 --> 00:02:12,760
not be able to process incoming data quickly enough, also resulting in slow performance.

27
00:02:14,410 --> 00:02:21,400
When doing algorithms built into the protocol, dynamically calculate size values and use this field

28
00:02:21,400 --> 00:02:25,990
of the TCP headers to coordinate changes between senders and receivers.

