1.4 Explain common networking ports, protocols, services, and traffic types
IP Protocol Types
📘CompTIA Network+ (N10-009)
Transmission Control Protocol (TCP)
TCP, or Transmission Control Protocol, is one of the main protocols used in computer networking. It works at the Transport Layer (Layer 4) of the OSI model, alongside UDP (User Datagram Protocol). TCP is essential for reliable communication between devices on a network.
1. Main Features of TCP
- Connection-Oriented Protocol
- TCP requires a connection to be established between two devices before data is sent.
- This is called a TCP handshake (more on that below).
- Think of it as a “safe pipeline” that ensures both sides are ready to communicate.
- Reliable Delivery
- TCP ensures all data packets are delivered in order and without loss.
- If a packet is lost, TCP will retransmit it.
- This is why TCP is preferred for applications where accuracy is critical, like:
- File transfers (FTP)
- Email (SMTP, IMAP, POP3)
- Web pages (HTTP/HTTPS)
- Data Segmentation
- TCP breaks large messages into smaller chunks called segments.
- Each segment has a sequence number to help reassemble them at the destination.
- Flow Control
- TCP ensures that the sender doesn’t overwhelm the receiver with too much data at once.
- This is done using a mechanism called windowing, where the receiver tells the sender how much data it can handle at a time.
- Error Detection
- Each TCP segment includes a checksum to detect errors in data.
- If an error is found, TCP requests retransmission.
2. TCP Three-Way Handshake
TCP uses a three-step process to establish a connection. This is essential for reliable communication:
- SYN (Synchronize)
- The client sends a SYN packet to the server to request a connection.
- SYN-ACK (Synchronize-Acknowledge)
- The server responds with SYN-ACK to acknowledge the request.
- ACK (Acknowledge)
- The client sends an ACK back to confirm the connection is established.
After this handshake, data can flow reliably in both directions.
3. TCP Ports
- TCP uses ports to identify specific applications or services on a device.
- Each port is associated with a number (0–65535), and some ports are well-known for certain services:
| Service | TCP Port |
|---|---|
| HTTP | 80 |
| HTTPS | 443 |
| FTP (Data) | 20 |
| FTP (Control) | 21 |
| SSH | 22 |
| Telnet | 23 |
| SMTP (Email) | 25 |
| POP3 (Email) | 110 |
| IMAP (Email) | 143 |
| MySQL Database | 3306 |
- These ports allow TCP to know which service should handle the incoming data.
4. TCP Segment Structure
Each TCP segment contains key information:
- Source Port – identifies the sending application.
- Destination Port – identifies the receiving application.
- Sequence Number – helps reassemble data in order.
- Acknowledgment Number – confirms receipt of data.
- Flags – control information (e.g., SYN, ACK, FIN for starting or ending a connection).
- Checksum – verifies integrity of the segment.
- Data – the actual payload being sent.
5. TCP vs UDP
| Feature | TCP | UDP |
|---|---|---|
| Connection | Yes (connection-oriented) | No (connectionless) |
| Reliability | Reliable (retransmits lost packets) | Unreliable (no retransmission) |
| Ordering | Guaranteed order | Not guaranteed |
| Overhead | Higher (more control info) | Lower (less control info) |
| Use Cases | Web pages, Email, File transfer | Streaming video, VoIP, Gaming |
Tip for exam: TCP is reliable and connection-oriented, while UDP is fast but unreliable.
6. Common TCP Uses in IT Environments
- Web Browsing – Browsers use HTTP/HTTPS (TCP ports 80/443) to reliably load web pages.
- Email – SMTP, POP3, and IMAP use TCP to ensure emails are delivered correctly.
- File Transfer – FTP uses TCP to guarantee file integrity during upload/download.
- Remote Management – SSH and Telnet use TCP for secure and reliable remote sessions.
- Databases – SQL databases like MySQL use TCP to ensure queries and responses are accurate.
7. Key Exam Points to Remember
- TCP is connection-oriented and ensures reliable delivery.
- TCP uses a three-way handshake (SYN → SYN-ACK → ACK).
- TCP segments include sequence numbers, acknowledgment numbers, flags, and checksums.
- TCP uses port numbers to direct traffic to the correct application/service.
- TCP provides flow control, error detection, and data ordering.
- TCP is commonly used for web browsing, email, file transfer, remote access, and databases.
Summary:
TCP is like a careful, reliable delivery system in networking. It ensures every piece of data gets to the right application, in the right order, without loss or corruption. Understanding TCP is essential for passing the Network+ exam, especially when comparing it with UDP, knowing the handshake, ports, and uses in IT.
