1
00:00:00,060 --> 00:00:06,750
The Transmission Control Protocol TCP provides a communication service at an intermediate level between

2
00:00:06,750 --> 00:00:13,770
an application program and the Internet protocol, it provides host a host connectivity at the transport

3
00:00:13,770 --> 00:00:15,060
layer of the Internet model.

4
00:00:16,250 --> 00:00:23,290
DCP works with the Internet Protocol IP, which defines how computers send packets of data to each other

5
00:00:24,140 --> 00:00:29,470
together, TCP and IP are basic rules defining the Internet.

6
00:00:30,840 --> 00:00:38,010
TCP is a connection oriented protocol, which means a connection is establish and maintain until the

7
00:00:38,010 --> 00:00:41,700
application programs at each end have finished exchanging messages.

8
00:00:43,280 --> 00:00:49,910
It determines how to fragment application data into packets that networks can deliver, sends packets

9
00:00:49,910 --> 00:00:58,040
to and accepts packets from the network layer manages flow control and because it is meant to provide

10
00:00:58,040 --> 00:01:04,850
error free data transmission handles retransmission of dropped or garbled packets, as well as acknowledgement

11
00:01:04,850 --> 00:01:06,470
of all packets that arrive.

12
00:01:07,620 --> 00:01:12,960
Let's see the connection oriented error-free communication of TCP and an example, when a Web server

13
00:01:12,960 --> 00:01:18,570
sends an HTML file to a client, it uses the HTTP protocol to do so.

14
00:01:19,410 --> 00:01:25,290
The program layer asks the TCP layer to set up the connection and send the file.

15
00:01:26,100 --> 00:01:33,000
The TCP stack divides the file into packets, numbers them and then forwards them individually to the

16
00:01:33,000 --> 00:01:34,290
IP layer for delivery.

17
00:01:34,440 --> 00:01:39,960
Although each packet in the transmission will have the same source and destination IP addresses, packets

18
00:01:39,960 --> 00:01:42,120
may be sent along multiple routes.

19
00:01:43,280 --> 00:01:49,820
The TCP program layer in the client computer waits until all of the packets have arrived, then acknowledges

20
00:01:49,820 --> 00:01:56,720
those it receives and asks for the retransmission on any it does not based on missing packet numbers,

21
00:01:57,560 --> 00:02:02,540
then assembled them into a file and delivers the file to the receiving application.

22
00:02:03,520 --> 00:02:10,780
The DCP three way handshake is a method used by TCP to set up a connection, PCP's threeway handshaking

23
00:02:10,780 --> 00:02:14,950
technique is often referred to as Sin Sinak Act.

24
00:02:15,790 --> 00:02:22,300
Because there are three messages transmitted by TCP to negotiate and started TCP session between two

25
00:02:22,300 --> 00:02:22,930
computers.

26
00:02:24,050 --> 00:02:30,680
This three way handshake process is also designed so the both ends can initiate and negotiate separate

27
00:02:30,680 --> 00:02:33,270
TCP socket connections at the same time.

28
00:02:34,100 --> 00:02:37,400
That means the connection is full duplex.

29
00:02:37,970 --> 00:02:38,480
You know what?

30
00:02:38,480 --> 00:02:42,260
We have to take a break at this point and talk about TCP Flagg's.

31
00:02:43,740 --> 00:02:51,240
There are one bit flags in TCP headers, which are called TCP flags, TCP flags are used within TCP

32
00:02:51,240 --> 00:02:57,200
packet transfers to indicate a particular connection state or provide additional information.

33
00:02:58,300 --> 00:03:06,190
Ignoring EKI, CWA and NSA flags, for now, there are basically six TCP flags.

34
00:03:07,670 --> 00:03:14,240
The sin or synchronization flag is used as a first step in establishing a three way handshake between

35
00:03:14,240 --> 00:03:20,120
two hosts, only the first packet from both the sender and the receiver should have this flag said.

36
00:03:21,780 --> 00:03:27,570
The ACT flag, which stands for acknowledgement, is used to acknowledge the successful receipt of a

37
00:03:27,570 --> 00:03:27,990
packet.

38
00:03:29,120 --> 00:03:35,360
The risk flag, which stands for Reset, get sent from receiver to the sender when a packet is sent

39
00:03:35,360 --> 00:03:37,960
to a particular host that was not expecting it.

40
00:03:39,140 --> 00:03:45,320
The Finn flag, which stands for finished, means there is no more data from the sender, therefore

41
00:03:45,320 --> 00:03:48,110
it is used in the last packet sent from the sender.

42
00:03:49,770 --> 00:03:57,240
The flag, which stands for Bush is somewhat similar to the flag and tells a receiver to process these

43
00:03:57,240 --> 00:04:00,390
packets as they are received instead of buffering them.

44
00:04:01,810 --> 00:04:08,890
The U.S. flag is used to notify the receiver to process the urgent packets before processing all other

45
00:04:08,890 --> 00:04:09,460
packets.

46
00:04:10,610 --> 00:04:17,240
So every legitimate TCP connection begins with a DCP three way handshake, which is used to exchange

47
00:04:17,240 --> 00:04:23,150
sequence numbers so that lost packets can be retransmitted and packets can be placed in the proper order.

48
00:04:24,620 --> 00:04:32,000
If Machine wants to initiate a connection to Machine B, it will start by sending a DCP packet with

49
00:04:32,090 --> 00:04:33,530
sin control bit set.

50
00:04:35,100 --> 00:04:42,930
This packet will include an initial sequence number, which I'll call here is an A because it comes

51
00:04:42,930 --> 00:04:44,100
from machinery.

52
00:04:45,090 --> 00:04:52,170
Which is 32 bits long and typically generated in a pseudo random fashion by the DCPI software on the

53
00:04:52,170 --> 00:04:52,610
shiny.

54
00:04:53,470 --> 00:05:01,720
The act number, another 32 bits in the TCP header is typically set to zero because it is ignored in

55
00:05:01,720 --> 00:05:02,680
this initial spin.

56
00:05:03,250 --> 00:05:09,340
Some operating system variance may make this act number non-zero, but either way, it's ignored by

57
00:05:09,340 --> 00:05:10,360
the destination machine.

58
00:05:11,870 --> 00:05:18,890
So if the destination port is open, that is, there is something listening on that port, it must respond

59
00:05:18,890 --> 00:05:26,930
with a Sinak packet back a packet that has both the Sin and Act control bit set at the same time.

60
00:05:28,850 --> 00:05:36,050
This packet will have a sequence number of ES and be a pseudo random number assigned by Machine B for

61
00:05:36,050 --> 00:05:36,830
this connection.

62
00:05:39,070 --> 00:05:46,780
The Sinak packet will have an acknowledgement number of is an A plus one indicating that Machine B has

63
00:05:46,780 --> 00:05:49,030
acknowledged this in packet from Machine A.

64
00:05:50,260 --> 00:05:56,080
To complete the three way handshake machine responds with an Act packett, which has a sequence number

65
00:05:56,080 --> 00:06:00,510
of is an A plus one, it's the next packet.

66
00:06:00,510 --> 00:06:05,050
So the sequence number has to change from the value in the original sin packet.

67
00:06:06,530 --> 00:06:13,550
Acknowledgement no field is set to Essene B plus one, thereby acknowledging this inact packet, right?

68
00:06:15,340 --> 00:06:22,240
So we have now exchange sequence numbers, all packets going from A to B. We'll have increasing sequence

69
00:06:22,240 --> 00:06:29,740
numbers starting at Issei plus one going up by value of one for each byte of data transmitted in the

70
00:06:29,740 --> 00:06:31,540
payloads of a to be packets.

71
00:06:32,920 --> 00:06:40,090
Likewise, all responses back from B. We'll have sequence numbers start again is B plus one and going

72
00:06:40,090 --> 00:06:42,040
up for each byte of data from Betawi.

73
00:06:42,760 --> 00:06:46,720
In essence, we have two streams of sequence numbers in this series.

74
00:06:46,720 --> 00:06:55,570
Packet's one from A to B, originally based on Iceni and the other from Betawi, originally based on

75
00:06:55,720 --> 00:06:56,970
ice and B.
