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:09,510 ‫an application program and the internet protocol. 3 00:00:10,320 --> 00:00:15,030 ‫It provides host to host connectivity at the transport layer of the internet model. 4 00:00:16,220 --> 00:00:23,270 ‫DCP works with the Internet Protocol IP, which defines how computers send packets of data to each other. 5 00:00:24,110 --> 00:00:29,480 ‫Together, TCP and IP are basic rules defining the internet. 6 00:00:30,840 --> 00:00:37,980 ‫TCP is a connection oriented protocol, which means a connection is establish and maintain until the 7 00:00:37,980 --> 00:00:41,670 ‫application programs at each end have finished exchanging messages. 8 00:00:43,310 --> 00:00:49,880 ‫It determines how to fragment application data into packets that networks can deliver, sends packets 9 00:00:49,880 --> 00:00:52,910 ‫to and accepts packets from the network layer. 10 00:00:53,820 --> 00:01:01,560 ‫Manages flow control, and because it is meant to provide error free data transmission, handles retransmission 11 00:01:01,560 --> 00:01:06,420 ‫of dropped or garbled packets, as well as acknowledgement 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:15,420 ‫sends an HTML file to a client. 14 00:01:16,110 --> 00:01:18,570 ‫It uses the HTTP protocol to do so. 15 00:01:19,410 --> 00:01:25,260 ‫The CDP program layer asks the TCP layer to set up the connection and send the file. 16 00:01:26,100 --> 00:01:32,970 ‫The TCP stack divides the file into packets, numbers them and then forwards them individually to the 17 00:01:32,970 --> 00:01:34,320 ‫IP layer for delivery. 18 00:01:34,440 --> 00:01:39,960 ‫Although each packet in the transmission will have the same source and destination IP addresses, packets 19 00:01:39,960 --> 00:01:42,090 ‫may be sent along multiple routes. 20 00:01:43,310 --> 00:01:49,820 ‫The TCP program layer in the client computer waits until all of the packets have arrived, then acknowledges 21 00:01:49,820 --> 00:01:56,690 ‫those it receives and asks for the retransmission on any it does not based on missing packet numbers, 22 00:01:57,560 --> 00:02:02,510 ‫then assembled him into a file and delivers the file to the receiving application. 23 00:02:03,520 --> 00:02:08,170 ‫The TCP Three-Way handshake is a method used by TCP to set up a connection. 24 00:02:08,950 --> 00:02:14,950 ‫He three three-way handshaking technique is often referred to as Sin Sinek Ach. 25 00:02:15,820 --> 00:02:22,270 ‫Because there are three messages transmitted by TCP to negotiate and started TCP session between two 26 00:02:22,270 --> 00:02:22,900 ‫computers. 27 00:02:24,050 --> 00:02:30,650 ‫This three way handshake process is also designed so that both ends can initiate and negotiate separate 28 00:02:30,650 --> 00:02:33,260 ‫TCP socket connections at the same time. 29 00:02:34,130 --> 00:02:37,370 ‫That means the connection is full duplex. 30 00:02:37,950 --> 00:02:38,440 ‫You know what? 31 00:02:38,450 --> 00:02:42,230 ‫We have to take a break at this point and talk about TCP flags. 32 00:02:43,770 --> 00:02:51,210 ‫There are one bit flags in TCP headers, which are called TCP flags, TCP flags are used within TCP 33 00:02:51,210 --> 00:02:57,180 ‫packet transfers to indicate a particular connection state or provide additional information. 34 00:02:58,330 --> 00:03:06,160 ‫Ignoring easy CW, R and an s flags for now, they're basically Six TCP flags. 35 00:03:07,670 --> 00:03:14,240 ‫The in or synchronization flag is used as a first step in establishing a three way handshake between 36 00:03:14,240 --> 00:03:14,960 ‫two hosts. 37 00:03:15,410 --> 00:03:20,120 ‫Only the first packet from both the sender and the receiver should have this flag set. 38 00:03:21,780 --> 00:03:27,540 ‫The act flag, which stands for acknowledgement, is used to acknowledge the successful receipt of a 39 00:03:27,540 --> 00:03:27,960 ‫packet. 40 00:03:29,150 --> 00:03:35,330 ‫The rest flag, which stands for Reset, get sent from receiver to the sender when a packet is sent 41 00:03:35,330 --> 00:03:36,630 ‫to a particular host. 42 00:03:36,650 --> 00:03:37,940 ‫That was not expecting it. 43 00:03:39,140 --> 00:03:44,600 ‫The Finn flag, which stands for finished means there is no more data from the sender. 44 00:03:44,630 --> 00:03:48,110 ‫Therefore, it is used in the last packet sent from the sender. 45 00:03:49,740 --> 00:03:56,460 ‫The peace flag, which stands for Bush, is somewhat similar to the U.S. flag and tells a receiver to 46 00:03:56,460 --> 00:04:00,350 ‫process these packets as they are received instead of buffering them. 47 00:04:01,840 --> 00:04:08,890 ‫The ARE flag is used to notify the receiver to process the urgent packets before processing all other 48 00:04:08,890 --> 00:04:09,430 ‫packets. 49 00:04:10,440 --> 00:04:14,820 ‫OK, now we can continue to talk about TCP is three way handshake. 50 00:04:17,020 --> 00:04:17,710 ‫Step one. 51 00:04:18,410 --> 00:04:21,880 ‫Computer sends a send data packet to Computer B. 52 00:04:22,930 --> 00:04:27,880 ‫Send data back, it means the data packet where the sin flag of the TCP header is set. 53 00:04:29,630 --> 00:04:32,150 ‫Well, what does setting the scene flag mean? 54 00:04:32,510 --> 00:04:34,790 ‫That means making the send bit one. 55 00:04:35,980 --> 00:04:40,590 ‫The objective of this package is to ask if computer be is open for new connections. 56 00:04:41,730 --> 00:04:46,470 ‫Computer B must have opened ports that can accept and initiate new connections. 57 00:04:47,960 --> 00:04:55,070 ‫Step two, when Computer B receives a signed packet from Computer A, it responds and returns a confirmation 58 00:04:55,070 --> 00:04:55,460 ‫receipt. 59 00:04:56,060 --> 00:04:57,260 ‫The snack packet. 60 00:04:58,610 --> 00:05:04,730 ‫As you understand, since backpack, it means the packet in which the sin and AG flags are set. 61 00:05:06,370 --> 00:05:07,120 ‫Step three. 62 00:05:07,570 --> 00:05:12,310 ‫Computer receives the Sinek from Computer B and responds with an act packet. 63 00:05:13,560 --> 00:05:18,720 ‫At this point, both computers have received an acknowledgement of the connection with these, a full 64 00:05:18,720 --> 00:05:20,880 ‫duplex communication is established. 65 00:05:21,950 --> 00:05:29,390 ‫UDP is another protocol of transport layer layer four used primarily for establishing low latency and 66 00:05:29,390 --> 00:05:32,780 ‫loss tolerating connections between applications on the internet. 67 00:05:33,110 --> 00:05:39,380 ‫TCP has emerged as a dominant protocol used for the bulk of internet connectivity owing to its services 68 00:05:39,380 --> 00:05:46,610 ‫for breaking large data sets into individual packet, checking for and resetting lost packets and reassembling 69 00:05:46,610 --> 00:05:48,710 ‫packets into the correct sequence. 70 00:05:49,400 --> 00:05:56,120 ‫But these additional services come at a cost in terms of additional data overhead and delays called 71 00:05:56,120 --> 00:05:56,840 ‫latency. 72 00:05:57,990 --> 00:06:05,790 ‫In contrast, UDP just sends the packets, which means that it has a much lower bandwidth overhead and 73 00:06:05,790 --> 00:06:06,420 ‫latency. 74 00:06:07,140 --> 00:06:12,450 ‫But packets can be lost or received out of order as a result, owing to the different paths individual 75 00:06:12,450 --> 00:06:15,060 ‫packets traverse between center and receiver. 76 00:06:15,510 --> 00:06:22,140 ‫So UDP uses a simple connection less communication model with a minimum of protocol mechanism. 77 00:06:23,200 --> 00:06:30,100 ‫It has no handshaking dialogues and thus exposes the user's program to any unreliability of the underlying 78 00:06:30,100 --> 00:06:30,670 ‫network. 79 00:06:31,480 --> 00:06:35,620 ‫There is no guarantee of delivery ordering or duplicate protection. 80 00:06:36,040 --> 00:06:43,240 ‫UDP is suitable for purposes where error checking and correction are either not necessary or are performed 81 00:06:43,420 --> 00:06:44,710 ‫in the application. 82 00:06:46,370 --> 00:06:53,360 ‫UDP is an ideal protocol for network applications in which perceived latency is critical, such as gaming, 83 00:06:53,540 --> 00:06:59,660 ‫voice and video communications, which can suffer some data loss without adversely affecting perceived 84 00:06:59,660 --> 00:07:00,260 ‫quality. 85 00:07:01,010 --> 00:07:07,790 ‫In addition, since its transaction oriented suitable for simple query response protocols such as the 86 00:07:08,030 --> 00:07:11,300 ‫domain name system or the network time protocol.