Previous Page | Next Page

  1. Introduction
  2. Network Topology
  3. Hardware Connections
  4. TCP/IP Ports and Addresses
  5. Network Protocol Levels
  6. Data Link Layer and IEEE
  7. Network Protocol Categories
  8. Repeaters, Bridges, Routers
  9. ARP and RARP Address Translation
  10. Basic Addressing
  11. IP (Network)
  12. TCP (Transport)
  13. UDP (Transport)
  14. ICMP
  15. Hardware Cabling
  16. Wireless media
  17. Outside Connections
  18. Ethernet
  19. Token Ring
  20. ARCnet
  21. AppleTalk
  22. FDDI
  23. IPX/SPX
  24. NetBEUI
  25. AppleTalk
  26. SNA
  27. Others
  28. Simple Routing
  29. More Complex Routing
  30. IP Masquerading
  31. Firewalls
  32. Domain Name Service (DNS)
  33. Virtual Private Networking
  34. DHCP
  35. BOOTP
  36. RPC and NFS
  37. Broadcasting and Multicasting
  38. IGMP
  39. Dynamic Routing Protocols
  40. Simple Mail Transfer Protocol (SMTP)
  41. Simple Network Management Protocol
  42. Network Services
  43. Installing Drivers
  44. Network Operating Systems
  45. Applications
  46. Wide Area Networks
  47. Backing up the network
  48. Fault Tolerance
  49. Troubleshooting
  50. Commonly used Network Ports
  51. Networking Terms and Definitions
  52. Networking RFCs and Protocols
  53. Further Reading
  54. Credits

Transmission Control Protocol

Transmission Control Protocol (TCP) supports the network at the transport layer. Transmission Control Protocol (TCP) provides a reliable connection oriented service. Connection oriented means both the client and server must open the connection before data is sent. TCP is defined by RFC 793 and 1122. TCP provides:

  • End to end reliability.
  • Data packet re sequencing.
  • Flow control.

TCP relies on the IP service at the network layer to deliver data to the host. Since IP is not reliable with regard to message quality or delivery, TCP must make provisions to be sure messages are delivered on time and correctly (Federal Express?).

TCP Message Format

The format of the TCP header is as follows:

  1. Source port number (16 bits)
  2. Destination port number (16 bits)
  3. Sequence number (32 bits) - The byte in the data stream that the first byte of this packet represents.
  4. Acknowledgement number (32 bits) - Contains the next sequence number that the sender of the acknowledgement expects to receive which is the sequence number plus 1 (plus the number of bytes received in the last message?). This number is used only if the ACK flag is on.
  5. Header length (4 bits) - The length of the header in 32 bit words, required since the options field is variable in length.
  6. Reserved (6 bits)
  7. URG (1 bit) - The urgent pointer is valid.
  8. ACK (1 bit) - Makes the acknowledgement number valid.
  9. PSH (1 bit) - High priority data for the application.
  10. RST (1 bit) - Reset the connection.
  11. SYN (1 bit) - Turned on when a connection is being established and the sequence number field will contain the initial sequence number chosen by this host for this connection.
  12. FIN (1 bit) - The sender is done sending data.
  13. Window size (16 bits) - The maximum number of bytes that the receiver will to accept.
  14. TCP checksum (16 bits) - Calculated over the TCP header, data, and TCP pseudo header.
  15. Urgent pointer (16 bits) - It is only valid if the URG bit is set. The urgent mode is a way to transmit emergency data to the other side of the connection. It must be added to the sequence number field of the segment to generate the sequence number of the last byte of urgent data.
  16. Options (variable length)

The header is followed by data. TCP data is full duplex.