Securing Protocol Layers   «Prev  Next»

Lesson 2 TCP/IP and network security
ObjectiveNetwork security is affected at TCP/IP levels.

TCP/IP and Network Security

Objective: Understand how security is implemented—and attacked—across the TCP/IP layers, and how to choose controls that harden each layer.

The Internet’s original protocols prioritized interoperability and reliability over security. Today, attackers routinely probe the TCP/IP stack, abusing weak configurations and legacy services. Defenders must understand how packets are built and routed, where trust boundaries exist, and which controls reduce risk at each layer. Modern baselines favor TLS (successor to SSL), AES for confidentiality, and SHA-256+ for integrity, replacing legacy mechanisms such as DES.

The TCP/IP Stack at a Glance

Before diving into defenses, review the functional layers and their typical responsibilities. The first figure summarizes the four TCP/IP layers.

tcpipstack
Four layers of the TCP/IP Protocol: 1) Application Layer, 2) (TCP/UDP) Transport Layer, 3) (IP) Internet Layer, 4) (ARP) Network Layer
  1. Application Layer: In the application layer, a client-side application is used to initiate communication with other hosts.
  2. Transport layer (TCP/UDP): The transport layer uses two protocols, TCP and UDP, to control the flow of information between hosts. TCP is responsible for placing a message into datagrams, reassembling the datagrams upon arrival at their destination, and resending anything that gets lost.
  3. Internet layer (IP): The Internet protocol (IP) layer is used primarily for addressing hosts and routing, and does not provide any means for error correction or flow control.
  4. Network layer: Signals are transmitted across the network layer.

How Security Is Affected at Each TCP/IP Layer

Mapping to OSI for Conceptual Clarity

Although real networks speak TCP/IP, the OSI model remains a useful reference for teaching responsibilities and comparing controls. The second figure shows a conceptual correlation between OSI layers and TCP/IP.


Network Security and Firewalls
osi-model
OSI Model contains 7 layers : Protocols apply to layers 2,3,5, and 7.
Layer Classification Protocol
1 Physcial
2 Data Link (ARP) =Address Resolution Protocol
3 Network (IP) = Internet Protocol
4 Transport
5 Session (TCP)= Transfer Control Protocol
6 Presentation
7 Application (FTP) = File Transport Protocol

  1. Physcial = Layer 1
  2. (ARP) Data Link = Layer 2
  3. (IP) Network = Layer 3
  4. Transport = Layer 4
  5. (TCP) Session = Layer 5
  6. Presentation = Layer 6
  7. (FTP) Application = Layer 7

The TPC/IP Model contains 4 layers.
  1. (FTP) Application
  2. (TCP/UDP) Transport
  3. (IP, ICMP) Internet
  4. (ARP) Network Access

Designing Firewall Policies for TCP/IP

Effective firewalling starts with architecture, not rules:

Interoperability Notes

Applications choose TCP for reliability (ordering, retransmission) or UDP for low-latency datagrams. Both encapsulate into IP, which relies on ARP (on local segments) to resolve MAC addresses. Healthy interoperability requires consistent MTU settings, ECN awareness, and careful load-balancer/NAT behavior (session affinity where needed). Document these expectations so firewall rules, NAT, and observability remain aligned.

Quick Reference


Terminology

IP: Logical addressing and routing for hosts on an internetwork.

ICMP: Signaling at the IP layer (e.g., errors, diagnostics).

TCP/IP: The suite that encapsulates application data into packets routed across networks.

UDP: Connectionless transport used for latency-sensitive or broadcast/multicast scenarios.

OSI: A seven-layer conceptual model used to describe and reason about network communication.


SEMrush Software 2 SEMrush Banner 2