1 00:00:00,120 --> 00:00:01,740 In this lesson, we're going to discuss 2 00:00:01,740 --> 00:00:04,019 the transmission control protocol. 3 00:00:04,019 --> 00:00:06,870 Now, the transmission control protocol or TCP, 4 00:00:06,870 --> 00:00:09,870 is a fundamental protocol within the internet protocol suite 5 00:00:09,870 --> 00:00:11,160 that consists of a set of rules 6 00:00:11,160 --> 00:00:13,710 that govern the exchange of data over the internet. 7 00:00:13,710 --> 00:00:16,170 The transmission control protocol is widely used 8 00:00:16,170 --> 00:00:18,720 due to its reliability in delivering packets of data 9 00:00:18,720 --> 00:00:20,700 across the network because it can ensure 10 00:00:20,700 --> 00:00:23,550 that all the data packets reach their intended destination, 11 00:00:23,550 --> 00:00:26,250 in the correct order and without corruption. 12 00:00:26,250 --> 00:00:28,650 Now, this is achieved through a process of error checking, 13 00:00:28,650 --> 00:00:31,170 data sequencing, and acknowledgement. 14 00:00:31,170 --> 00:00:34,710 TCP operates it through the transport layer of the OSI model 15 00:00:34,710 --> 00:00:37,260 which conceptualizes and standardizes the functions 16 00:00:37,260 --> 00:00:39,450 of a telecommunication or computing system 17 00:00:39,450 --> 00:00:41,730 into seven abstraction layers. 18 00:00:41,730 --> 00:00:43,800 At its core, TCP is responsible 19 00:00:43,800 --> 00:00:45,720 for ensuring the reliable transmission of data 20 00:00:45,720 --> 00:00:47,310 between a client and a server, 21 00:00:47,310 --> 00:00:50,310 by breaking down larger messages into smaller packets, 22 00:00:50,310 --> 00:00:51,690 setting them over the network, 23 00:00:51,690 --> 00:00:54,210 and reassembling them at the destination. 24 00:00:54,210 --> 00:00:56,370 This packetization makes the data transfer 25 00:00:56,370 --> 00:00:58,650 more efficient and more manageable. 26 00:00:58,650 --> 00:01:00,390 Now, when you think of TCP, 27 00:01:00,390 --> 00:01:02,700 you should immediately think of the three-way handshake 28 00:01:02,700 --> 00:01:04,410 that's going to be used to establish a connection 29 00:01:04,410 --> 00:01:06,390 between two different systems. 30 00:01:06,390 --> 00:01:09,300 This handshaking process will involve three steps, 31 00:01:09,300 --> 00:01:11,220 the SYN, or synchronize step, 32 00:01:11,220 --> 00:01:13,920 the SYN-ACK, or synchronize-acknowledge step, 33 00:01:13,920 --> 00:01:16,170 and the ACK or acknowledge step. 34 00:01:16,170 --> 00:01:18,510 Initially, the client is going to send a SYN packet 35 00:01:18,510 --> 00:01:21,120 to the server to initiate a communication session. 36 00:01:21,120 --> 00:01:24,330 Then, the server will respond back with a SYN-ACK packet 37 00:01:24,330 --> 00:01:26,520 to acknowledge receipt of the SYN packet, 38 00:01:26,520 --> 00:01:28,470 and to inform the client that the server is willing 39 00:01:28,470 --> 00:01:30,570 and able to establish a session. 40 00:01:30,570 --> 00:01:32,730 Finally, the client will send an ACK packet 41 00:01:32,730 --> 00:01:34,170 back to the server to confirm 42 00:01:34,170 --> 00:01:36,270 the establishment of that connection. 43 00:01:36,270 --> 00:01:38,160 This three-way handshaking process 44 00:01:38,160 --> 00:01:40,260 will ensure that both the sender and the receiver 45 00:01:40,260 --> 00:01:41,910 are ready for data transmission, 46 00:01:41,910 --> 00:01:45,330 and that the communication channel is reliable and secure. 47 00:01:45,330 --> 00:01:47,100 Another important feature of TCP, 48 00:01:47,100 --> 00:01:49,680 is its error checking and flow control mechanisms, 49 00:01:49,680 --> 00:01:51,600 that ensure the reliable deliverability 50 00:01:51,600 --> 00:01:53,010 of the data being transmitted, 51 00:01:53,010 --> 00:01:55,530 using the transmission control protocol. 52 00:01:55,530 --> 00:01:58,650 TCP will use a sequence number and acknowledgement messages 53 00:01:58,650 --> 00:02:00,600 to ensure the data is being received correctly 54 00:02:00,600 --> 00:02:02,250 and in the proper order. 55 00:02:02,250 --> 00:02:03,990 If a packet is lost or corrupted, 56 00:02:03,990 --> 00:02:05,460 the protocol will notice that, 57 00:02:05,460 --> 00:02:07,200 and it will require for it to be retransmitted 58 00:02:07,200 --> 00:02:08,639 by the sender. 59 00:02:08,639 --> 00:02:11,490 TCP also employs flow control to prevent the center 60 00:02:11,490 --> 00:02:14,610 from overwhelming the receiver with too much data at once. 61 00:02:14,610 --> 00:02:16,170 This flow control is achieved 62 00:02:16,170 --> 00:02:18,240 through a mechanism called, windowing. 63 00:02:18,240 --> 00:02:19,950 Windowing occurs by allowing the receiver 64 00:02:19,950 --> 00:02:22,680 to specify the amount of data it can handle at one time. 65 00:02:22,680 --> 00:02:24,450 And during the communication session, 66 00:02:24,450 --> 00:02:27,390 this window can continually be widened or narrowed, 67 00:02:27,390 --> 00:02:29,160 to allow more or less data to be sent 68 00:02:29,160 --> 00:02:30,540 during each transmission, 69 00:02:30,540 --> 00:02:31,950 based on the current network conditions 70 00:02:31,950 --> 00:02:34,320 being experienced by that client. 71 00:02:34,320 --> 00:02:35,970 When sending data over the network, 72 00:02:35,970 --> 00:02:37,980 the transmission control protocol will use ports 73 00:02:37,980 --> 00:02:40,140 as part of its communication process. 74 00:02:40,140 --> 00:02:41,940 Now, a port is a numerical identifier 75 00:02:41,940 --> 00:02:44,010 inside of the TCP/IP suite, 76 00:02:44,010 --> 00:02:45,600 and other networking protocols 77 00:02:45,600 --> 00:02:47,400 that helps distinguish between different services 78 00:02:47,400 --> 00:02:50,640 or applications running on the same physical computer. 79 00:02:50,640 --> 00:02:53,070 Each TCP connection is going to be identified 80 00:02:53,070 --> 00:02:54,780 by a pair of endpoint addresses, 81 00:02:54,780 --> 00:02:57,840 each consisting of an IP address and a port number. 82 00:02:57,840 --> 00:03:00,390 We call these, the source and destination IPs, 83 00:03:00,390 --> 00:03:02,490 and the source and destination ports. 84 00:03:02,490 --> 00:03:05,220 For example, when you access a secure website, 85 00:03:05,220 --> 00:03:07,500 your web browser will establish a TCP connection 86 00:03:07,500 --> 00:03:10,320 with the server over Port 443, 87 00:03:10,320 --> 00:03:12,840 which is a standard port for HTTPS, 88 00:03:12,840 --> 00:03:15,690 known as the Hyper Text Transfer Protocol Secure, 89 00:03:15,690 --> 00:03:18,480 and this traffic will then use SSL or TLS 90 00:03:18,480 --> 00:03:21,870 to encrypt any data being sent over this particular port. 91 00:03:21,870 --> 00:03:24,390 Now, ports are important in the communication process, 92 00:03:24,390 --> 00:03:27,060 because these ports allow for multiple network applications 93 00:03:27,060 --> 00:03:29,250 to coexist on the same physical server, 94 00:03:29,250 --> 00:03:30,930 while each application or service 95 00:03:30,930 --> 00:03:34,260 gets aside a unique port number to identify its function. 96 00:03:34,260 --> 00:03:36,510 So remember, the transmission control protocol 97 00:03:36,510 --> 00:03:38,490 is at the heart of internet communication 98 00:03:38,490 --> 00:03:40,740 by ensuring the reliability and order delivery 99 00:03:40,740 --> 00:03:43,080 of data between a client and a server. 100 00:03:43,080 --> 00:03:44,370 It's really important that you remember 101 00:03:44,370 --> 00:03:47,730 that TCP operates at the transport layer of the OSI model, 102 00:03:47,730 --> 00:03:49,980 and it uses a process of packetization, 103 00:03:49,980 --> 00:03:51,630 acknowledgement, and error checking, 104 00:03:51,630 --> 00:03:53,400 to ensure data integrity. 105 00:03:53,400 --> 00:03:54,600 The three-way handshake here 106 00:03:54,600 --> 00:03:56,790 is going to be crucial for establishing the connection, 107 00:03:56,790 --> 00:03:58,680 and TCP will use ports to allow 108 00:03:58,680 --> 00:04:00,870 for the logical differentiation of services 109 00:04:00,870 --> 00:04:02,553 on a single physical machine.