Introduction to TCP/IP Protocols and Network Services
Chapter 6 — Introduction to TCP/IP Protocols and Network Services
Modern networks rely on the TCP/IP protocol suite to define how data is prepared, addressed, transmitted, routed, and received. The chapter begins by mapping the TCP/IP suite to the OSI model, then introduces common application protocols, port numbers, and secure protocol alternatives used for web access, file transfer, email, and remote administration.
The chapter also examines essential network services. DHCP and APIPA provide host configuration, while SNMP, Syslog, and NTP support network monitoring, event logging, and time synchronization. At the transport layer, TCP and UDP are compared, followed by a closer look at TCP connections, headers, flags, and the three-way handshake.
Finally, the chapter explains IP operation, including TTL, MTU, fragmentation, and protocol numbers, together with the supporting roles of ICMP and ARP. It also introduces GRE and IPsec, data encapsulation and decapsulation, and basic PowerShell commands used to inspect configurations, test connectivity, and troubleshoot TCP/IP communication.
TCP/IP and OSI Mapping
TCP/IP is the open protocol suite used by the Internet and most private networks. Its four layers combine the seven OSI layers into a practical implementation model.
| TCP/IP layer | OSI equivalent | Primary responsibility |
|---|---|---|
| Process/Application | 7, 6, 5 | Application services, representation, and sessions |
| Host-to-Host | 4 Transport | End-to-end delivery, reliability, and ports |
| Internet | 3 Network | Logical addressing, routing, and packets |
| Network Access | 2 and 1 | Frames, MAC addresses, media, and signals |
Protocol & Port Explorer
Select a protocol to connect its port, transport, purpose, and security clue.
Secure Replacement Flip Cards
Flip each older service to reveal the secure exam choice.
Secure terminal?
SSH · TCP 22. Encrypts authentication and terminal traffic.
Secure file transfer?
SFTP · TCP 22. Transfers files through SSH; it is not FTP with TLS.
Secure web?
HTTPS · TCP 443. Protects browser-server traffic with TLS.
Secure directory?
LDAPS · TCP 636. Encrypts directory queries and credentials.
Secure submission?
Submission · TCP 587. TLS protects submitted email in transit.
DHCP DORA & APIPA
DHCP uses UDP 67 on the server and UDP 68 on the client to deliver addressing, gateway, DNS, and domain information.
Monitoring, Logging & Time
| Syslog level | Severity | Meaning |
|---|---|---|
| 0 | Emergency | System unusable |
| 1–3 | Alert–Error | Immediate or serious condition |
| 4–5 | Warning–Notice | Potential problem or notable event |
| 6–7 | Information–Debug | Normal detail or diagnostics |
TCP and UDP Transport Protocols
Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) are transport-layer protocols that carry data between applications on network devices. Both protocols use port numbers to identify the sending and receiving applications, but they have different objectives and communication methods.
Transmission Control Protocol (TCP)
TCP establishes a logical connection before transmitting data. It uses sequencing, acknowledgments, error checking, flow control, and retransmission to ensure that data arrives completely and in the correct order.
Objective: To provide reliable, ordered, and error-checked delivery between applications.
User Datagram Protocol (UDP)
UDP sends datagrams without first establishing a connection. It does not provide acknowledgments, sequencing, flow control, or retransmission, resulting in lower overhead and faster delivery.
Objective: To provide fast and efficient delivery for applications that can tolerate some data loss or handle reliability themselves.
Reliability versus speed
TCP is suitable for web browsing, email, file transfer, and remote administration, where complete delivery is important. UDP is suitable for DNS, DHCP, voice, video streaming, online gaming, monitoring, and broadcast traffic, where low delay is preferred.
TCP Session Animator
A TCP connection starts by synchronizing sequence numbers. Step through SYN, SYN/ACK, and ACK.
TCP Header and Control Flags
A TCP header contains the information needed to establish a connection, arrange segments in the correct order, acknowledge received data, control transmission, and detect errors. A standard TCP header is at least 20 bytes long and may be larger when optional fields are used.
Principal TCP Control Flags
| Flag | Meaning | Exam clue |
|---|---|---|
| SYN | Synchronizes sequence numbers between devices. | Starts a TCP connection. |
| ACK | Indicates that the acknowledgment field is valid. | Confirms received data. |
| FIN | Indicates that the sender has finished transmitting. | Gracefully closes a connection. |
| RST | Immediately resets an existing or attempted connection. | Aborts or rejects a connection. |
| PSH | Requests immediate delivery to the receiving application. | Process the data promptly. |
| URG | Indicates that the urgent pointer field is valid. | Marks urgent data. |
Internet Protocol, TTL & MTU
IP provides logical addressing and routing on a best-effort basis. It does not guarantee delivery, order, or recovery.
TTL
Each router decrements Time to Live. A packet is discarded when TTL reaches zero.
MTU
Largest Layer 3 packet a link carries without fragmentation. Path-MTU problems may break large transfers while small packets work.
Protocol field
Identifies ICMP 1, TCP 6, UDP 17, GRE 47, or another protocol carried inside IPv4.
IP Protocol Number Explorer
ICMP & ARP
ICMP
Ping uses Echo Request/Reply. Tracert uses TTL expiry and Time Exceeded. A blocked ping alone does not prove a host is down.
ARP
Checks cache, broadcasts a request on the local link, and learns the owner’s MAC address.
ARP decision lab
A client at 192.168.10.25/24 sends data to 198.51.100.20. Whose MAC address must it resolve?
GRE & IPSec
GRE
Carries multiple Layer 3 protocols and multicast, but provides no encryption, authentication, or confidentiality.
AH
Provides origin authentication and integrity, but no encryption; address changes such as NAT are problematic.
ESP
Provides confidentiality plus optional integrity, authentication, and anti-replay protection.
IKE
Negotiates peers, security associations, algorithms, parameters, and keys.
Encapsulation Builder
Build the sending sequence from application data to physical bits.
PowerShell 7 Practice
Get-NetTCPConnectionTCP listeners and connectionsGet-NetUDPEndpointLocal UDP endpointsTest-NetConnection example.com -Port 443DNS and TCP port testGet-NetNeighborARP / neighbor cacheGet-NetRouteLocal routing tableping example.comICMP Echo testtracert example.comTTL-based routed pathipconfig /allDHCP, DNS, and addressingExam Check
Fifteen questions drawn directly from the Chapter 6 manual.