Course contentsShow
← Security
Lesson 374 of 3,0529. Network Security - Traffic AnalysisFree lesson

Understanding Network Packets and Protocol Layers

Learn packet structure, OSI/TCP-IP models, headers, and how data flows through protocol layers during capture.

Understanding Network Packets and Protocol Layers

You'll learn: How data travels through networks as packets, structured in distinct protocol layers that each add their own headers and instructions.

What Is a Network Packet?

When you send data across a network, it doesn't travel as one big chunk. Instead, it's broken into small pieces called packets. Think of mailing a thick book by tearing out pages and sending each in its own envelope—each packet is one envelope containing a portion of your data plus addressing information.

Protocol Layers: The Envelopes Within Envelopes

Networks use layered models to organize communication. The two main models are:

  • OSI Model (7 layers): Physical, Data Link, Network, Transport, Session, Presentation, Application
  • TCP/IP Model (4 layers): Network Access, Internet, Transport, Application

Each layer adds its own header—metadata that tells the next device how to handle the packet. It's like nested envelopes: the innermost contains your actual message, then each outer layer adds routing information, error-checking codes, or delivery instructions.

How Data Flows During Capture

When you perform traffic analysis (like during reconnaissance), you capture packets as they move through the network. At each layer:

  1. Application layer: Your data (e.g., HTTP request)
  2. Transport layer: TCP/UDP header added (port numbers, sequence numbers)
  3. Network layer: IP header added (source/destination IP addresses)
  4. Data Link layer: Ethernet header added (MAC addresses)

Reading a captured packet means peeling back these layers in reverse—examining headers to understand who sent what, to where, and how.

Key Takeaway: Network packets are layered data units where each protocol layer wraps the data with its own header, creating a structured format that enables traffic analysis by revealing communication patterns, endpoints, and protocols in use.