 Hello and welcome to the session on TCP services in the TCP IP protocol suite. Here are the learning outcomes. At the end of this session, students will be able to identify the services offered by TCP. TCP IP protocol suite. Here the figure shows the relationship of TCP to the other protocols in the TCP IP protocol suite. Here you can see in this figure where the TCP stands in between the application layer and the network layer. There are different layers like physical layers, data link layers, which will be covered under underlining LAN or WAN technology. Network layer, the IGMP, ICMP, IP protocol is there, ARP protocol is there, RARP protocol is there. At transport layer, there are three protocols, the UDP, TCP and HTTP. Previously, there are two protocols only on transport layer, UDP and TCP. Now it is newly added, the stream control transport layer protocol. At application layer, there are different protocols like simple mail transport protocol, file transport protocol, trivial file transport protocol, domain name servers, simple network management protocol or the boost trap protocol. So you can see here the TCP working as an imaginary between the application layer and the network layer. TCP services, here we are going to learn the services offered by TCP to the processes at the application layer. The number of services provided by TCP are process to process communication, stream delivery service, full duplex communication, connection oriented service and reliable service. First process to process communication. TCP provides process to process communication using port numbers. Here you can see in the table the list well known port numbers provided by TCP. Like the port number 7, the protocol used is ECO and which will be ECOs the received datagram back to the sender. Like 13 port number day time, which returns the date and time. Like port number 25, which is SMTP protocol, simple mail transfer protocol. Stream delivery. TCP is a stream oriented protocol. In UDP, a process sends a message with predefined boundaries to UDP for delivery. UDP adds its own header to each of these messages and delivers it to IP for transmission. Each message from the process is called a user datagram and which will be becomes one IP datagram. Neither IP nor UDP recognizes any relationship between the datagrams. But the TCP on the other hand allows the sending process to deliver data as a stream of bytes and allows the receiving process to obtain data as a stream of bytes. TCP creates an environment in which the two processes look like to be connected by an imaginary tube that carries their bytes across the internet. This imaginary environment is shown in this particular figure. The sending process produces the stream of bytes and the receiving process consumes. Since the sending process becomes writing to and the receiving process are reading from the tube. Sending and receiving buffers. Here the figure shows the moment of data in one direction. At the sender, the buffer has three types of chambers. The white section contains empty chambers that can be filled by the sending process that is producer. The colored area holds bytes that have been sent but not yet acknowledged. The TCP sender keeps these bytes in the buffer until it receives an acknowledgement. The shaded area contains types of to be sent by this sending TCP. TCP may be able to send only part of this shaded section. This could be due to the slowness of the receiving processes or congestion in the network. Also, after the bytes in the colored chambers are acknowledged, the chambers are recycled and available for use by the sending process. The TCP segments. Even though buffering handles the inconsistency between the speed of producing and consuming processes, we need one more phase before we can send data. The IP layer as a service provider for TCP needs to send data in packets, not as a stream of bytes. At the transport layer, TCP groups a number of bytes together in a packet called segment. TCP adds a header to each segment. The segments are attached for the use of control purpose and delivers the segment to the IP layer for transmission. The segments are encapsulated in an IP datagram and transmitted. This entire operation is transferred to the receiving process. All of these are handled by TCP sender with the receiving application process unaware of TCP activities. FIGUR shows the how segments are created from the bytes in the buffers. However, segments are not necessarily all the time same size. In the figure, for simplicity, it is shown that the segment carrying three bytes and the other carrying five bytes. But in reality, segments carry hundreds of thousands of bytes. Now the other services offered by TCP, the full duplex communication. The TCP offers full duplex service where data can flow in both directions at the same time. Each TCP endpoint then has its own sending and receiving buffers. And segments move in both directions. Multiplexing and demultiplexing. Like UDP, TCP performs multiplexing at the sender and demultiplexing at the receiver. However, since TCP is a connection-oriented protocol, a connection needs to be established for each pair of processes. Connection-oriented service. TCP is a connection-oriented protocol. When a process at site A wants to send to and receive data from another process at site B, there are three phases occur. Like first phase, the two pieces establish a virtual connection between them. The second phase, data are exchanged in both directions. And the last phase is the connection is terminated. Here a virtual connection is established, not a physical connection. The TCP segment is encapsulated in an IP datagram and can be sent out of order or lost or corrupted and then resent. Each may be routed over the different path to reach the destination. There is no physical connection. TCP creates a stream-oriented environment in which it accepts the responsibility of delivering the bytes in order to the other site. Next service is reliable service. The TCP is a reliable transport protocol. It uses an acknowledgement mechanism to check the safe and sound arrival of data. We'll discuss this feature in the section of TCP error control. Now pause the video. Here is the attempt the MCQ. In TCP sending and receiving data is done as either stream of bytes, sequence of characters, lines of data or packets. Give the answer. Here the answer is A. Likewise attempt the second MCQ. The answer is A. True or false. The services offered by TCP to the processes at the application layer. Stream delivery service, full-duplex communication, connection-oriented service. Pause the video and give the answer. The answer is true. These are my references. Thank you.