Windows TCP/IP Networking Documentation

Introduction to TCP/IP
TCP Fundamentals
UDP Fundamentals
Troubleshooting TCP/IP

Overview of TCP/IP

TCP/IP (Transmission Control Protocol/Internet Protocol) is the fundamental communication protocol suite used on the internet and in most local area networks. It's a layered architecture that governs how data is transmitted across networks.

TCP/IP Layers

The TCP/IP model is divided into four layers:

  1. Application Layer: Handles user-facing applications (e.g., HTTP, SMTP, FTP).
  2. Transport Layer: Provides reliable data delivery (TCP) or connectionless delivery (UDP).
  3. Network Layer: Handles IP addressing and routing.
  4. Link Layer: Handles physical transmission of data over the network medium.

IP Addressing

IP addresses are unique numerical identifiers assigned to devices on a network. There are two main versions:

TCP Connection Establishment

The TCP connection establishment process involves a three-way handshake:

  1. SYN: The client sends a SYN (synchronize) packet to the server.
  2. SYN-ACK: The server responds with a SYN-ACK (synchronize-acknowledge) packet.
  3. ACK: The client sends an ACK (acknowledge) packet to confirm the connection.
                    
                      // Client:
                      // 1. Send SYN packet
                      // 2. Receive SYN-ACK packet
                      // 3. Send ACK packet

                      // Server:
                      // 1. Receive SYN packet
                      // 2. Send SYN-ACK packet
                      // 3. Receive ACK packet
                    
            

Data Transmission

TCP data transmission is based on segments, which are divided into smaller units for efficient routing. Each segment includes a header with control information and data. The application layer data is appended to the segment. The sender utilizes sequence numbers to ensure reliable delivery and receiver’s acknowledgment is crucial for the flow.