TCP Protocol

TCP stands for “Transmission Control Protocol”, it is a fundamental protocol within the TCP/IP protocol suite — a collection of standards that allow systems to communicate over the Internet.  TCP is a  reliable and connection oriented protocol. It also includes error checking, which ensures each packet is delivered as requested. It defines how to establish and maintain a network conversation through which application programs can exchange data.
Watch the Video lectures on TCP (click the following links)
You are invited to raise queries by writing your question in the the box given below

Published by Expert_Talk

I like sharing article and discussion on emerging technologies. Love to share my knowledge on various latest trends and technologies.

29 thoughts on “TCP Protocol

  1. How does the ultimate destination obtain the contents of the pseudo-header in UDP and TCP?

    1. At the destination, the transport layer request IP addresses from the IP layer to compute the checksum.

      At the sender side, in order to create this pseudo-header for checksum calculation purposes, the missing parts of the IP Header are provided by the IP layer. TCP first requests the missing IP header info (source IP) from the IP layer. Kindly note, generally Destination IP Address is already known to the transport layer. Once the IP Address from the IP layer is received it can complete the checksum calculation and pass the segment (TCP/UDP) (without the IP pseudo-header) to the IP layer.

  2. I guess there is a typo in the CN_Assignment_5 in question 6

    Choose an appropriate ephemeral port number and the correct well-known port number

    Well-known port numbers are 0 to 1023;
    Ephemeral port numbers are > 1024

    In the task we need to choose one port number for source, so I suppose that there should be OR instead of AND

    Or I miss something?

    1. Question is correct.
      It is given that connection is establishd b/w TFTP client and server. Server runs on well defined port number. here you need to suggest the port number for client and server both.
      Read the question again and i hope you will understand it clearly.

  3. Dear Professor,

    Can you, please explain the difference between connection and session?

    For example, when configuring a VNC, you have three options:
    1. Allow Remote Management with Session Management (multiple concurrent sessions)
    2. Allow Remote Management without Session Management (one concurrent session only)
    3. Do not allow Remote Administration

    And then you have VNC viewers (vnc1 to vnc3).

    For example, if I choose the first option (with Session Management), it means that I can connect to remote server via port 5901 (vnc1) with multiple users, right?
    But what if I choose the second option (without Session Management) and enable both vnc1 and vnc2, does this mean I can connect to remote server via 5901 (1 user = 1 session?) and 5902 (1 user)?

    Thank you.

    1. Connection is a like a physical channel between the two communicating entities, whereas Session refers to the actual data exchange done between the two connected entities. Session also correlates the happenings over several individual connections.

      Regarding VNC configuration
      Option 1 provides the controlling of multiple sessions whereas the option 2 only manages single session at a time. With vnc1 and vnc2 you will configure the numbers of viewers where one will be set as ‘primary’ or controller and other will be configured as ‘secondary’.

    1. Initially when TCP segment format was proposed, it has kept 6 bits as Reserved bits with an intention to provide space to give more meaning to TCP in future.

      Most of the initial format proposed for many protocol reserves some space(bits) as an scope to add more meaning to it. This generally is done whenver the research agencies suggest some developments expected in technology in near future, this provides a flexibiltity to cope with the developments in technology.

      Out of these 6 reserved bits, 3 bits are still not defined but other 3 bits have beed used in various experiments for handling Congetion Control.

  4. Hi Professor!I have a question
    Is UDP better than TCP?In what cases using UDP and TCP is usefull?

    1. It depends on a situation. For example, if an application needs to protect the boundaries of its message UDP is preferred because each user datagram can be used for each chunk of data

    2. TCP, unlike UDP, is a stream-oriented protocol. In UDP, a process sends message with predefined boundaries to UDP for delivery. UDP adds its own header to each of these messages and delvers it to IP for transmission. Neither IP nor UDP recognizes any relationship between the datagrams.
      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 process seem to be connected by an imaginary “tube” that carries their bytes across the Internet.

  5. In my opinion, TCP is better as TCP is slower however, it guarantees delivery of data to the destination router and it has extensive error checking mechanisms. UDP is faster but it can not guarantee for delivery of data to the destination and it has only main error checking mechanism TCP is for applications where reliability is more important, such as file transfer web browsing, emails, and file transfer. TCP is useful where error correction facilities. UDP is largely used by time sensitive applications. UDP is useful for Domain Name System, Voice over IP, Trivial File online games and Transfer Protocol.

  6. In silly window syndrome, you have mentioned three approaches. Can Nagle’s algorthim and Delayed Acknowledgement be used together? I think in this case both sender and receiver will not wait too much time

    1. For silly window syndrome, various solution has been proposed both for sender and reciever to minimize or avoid this syndrome. TCP has taken all the proposal and defines an Acknowledgement Policy which is the modified form of combination of all the proposal.
      TCP Acknowledgement Policy defines 6 rules of transmission.

    1. The acknowledgement field in a segment defines the sequence number of the byte which is to be received next i.e. sequence number of byte that the sender should transmit next.

      U1710154

      1. The value of acknowledgement field in a segment is the number of the next byte a party is expecting to receive.The acknowledgement number is cumulative

    2. Acknowledgement field which is in a segment identifies number of next bytes to receive.

    3. The value of the acknowledgement field in a segment defines the number of the next byte a party expects to receive. The acknowledgement number is cumulative. It means if party uses 6534 as an acknowledgement number, it has received all bytes from the beginning up to 6533.

  7. If NOP can be used more than once in No-operation option.What is max number using NOP in No-operation option?

    1. NOP option is a 1 byte option and is used as a filler. In general, bits in a packet aligns in a multiple of word size slot for various filelds. So if any field doen not have suffiecient bits to represent, then NOP will be used as padding the space. NOP can be used any number of times in a 40 bytes option part of header.

  8. If options MSS and SACK are used, Windows XP will usually place two nop’s between them, as was indicated in the first picture on this page.Nop option occupies 1 byte. If options longer than one byte are used, NOP options should be used at the beginning of the UDP options area to achieve alignment as would be more efficient for active Nop options.

  9. The heart of the error control mechanism is the retransmission of segments. What does it mean “retransmission of semgments” ?

    1. I think in whole we are discussing segment retransmission behavior.
      Segment retransmissions are an essential tool in assuring reliable end-to-end communication in the Internet (https://arxiv.org/ftp/arxiv/papers/1112/1112.2292.pdf)
      Retransmissions are a sure sign that the self-healing powers of the TCP protocol are working — they are the symptom of a problem, not a problem in themselves.

  10. Hello professor. Why headers of TCP protocol are differ in some sources? In your slides and khanacademy.com indicates that there are 6 flags: URG, ACK, PSH, RST, SYN, FIN. But in Wikipedia there are 8 flags: CWR, ECE, URG, ACK, PSH, RST, SYN, FIN. Also David Bombal who teaches computer network and helps to pass CCNA certificate indicates that there are 7 flags: CWR, ECE, URG, ACK, RST, SYN, FIN.

    1. Early versions of TCP used 6 flags, and those have been extended to 8 flags in later versions, The RFC that defines the flags for TCP packets is RFC 9293, It is an updated version of RFC 793.
      (RFC stands for Request For Comments, it refers to a document that outlines specifications, best practices, and recommendations for Internet protocols and standards)

      The two new TCP flags, ECE and CWR (known as ECN-Echo and Congestion Window Reduced) were added to support Explicit Congestion Notification (ECN), extending the number of TCP flags from 6 to 8. The ECE and CWR flags work together to inform senders when congestion is detected. When a sender receives a TCP segment with the ECE flag set, it knows the receiver is using ECN and can adjust its congestion control accordingly.

Leave a reply to Stitsyuk U1710267 Cancel reply