What is a Protocol?
Protocols enable predictable communication define how data should be structured and interpreted and allow systems with different hardware or software to communicate
They make network communication possible. Without them, devices couldn’t agree on how to transmit or verify data. Information could be lost, disordered, or completely misunderstood. Protocols ensure reliable delivery at scale across systems vendors and environments.
Characteristics
Syntax - Structure and formatting of the data
Semantics - Meaning behind the data
Timing - When and how data should be XM/RX
What a Protocol Looks Like
Protocols define message structures headers and sequences of operations that devices must follow to communicate. A protocol may describe how a message is initiated what fields must appear in a header what values are valid and how the receiver should respond
HTTP Request Example
| Line |
Meaning |
|
| GET /index.html HTTP/1.1 |
Request method path and HTTP version |
|
| Host example.com |
Target domain for the request |
|
| User-Agent Mozilla/5.0 |
Client identifier |
|
| Accept text/html |
Expected response type |
|
TCP Segment Structure Simplified
| Field |
Purpose |
|
| Source Port |
Identifies the sending application |
|
| Destination Port |
Identifies the receiving application |
|
| Sequence Number |
Orders data correctly |
|
| ACK Flag |
Acknowledges received segments |
|
| Payload |
Actual data being transmitted |
|
IP Packet Structure Simplified
| Field |
Purpose |
|
| Version |
IP version for example 4 or 6 |
|
| Header Length |
Length of the IP header |
|
| Source IP |
Originating address |
|
| Destination IP |
Target address |
|
| TTL |
Time to live value for expiration |
|
| Payload |
Data carried by the packet |
|
OSI Layer Examples
| OSI Layer |
Protocols |
|
| Layer 1 Physical |
Ethernet signaling |
|
| Layer 2 Data Link |
MAC ARP PPP |
|
| Layer 3 Network |
IP ICMP |
|
| Layer 4 Transport |
TCP UDP |
|
| Layers 5–7 Session–Application |
HTTP FTP DNS SSH |
|
The Internet Protocol (IP)
- IP operates at Layer 3 (Network) and provides logical addressing and routing between different networks
- Primary purpose is to move packets from source to destination across multiple networks (internetworking)
- Connectionless protocol - no session establishment required, each packet treated independently
- Best effort delivery - no guaranteed delivery, reliability handled by upper layers (TCP)
IPv4 vs IPv6 Comparison
| Feature |
IPv4 |
IPv6 |
| Address Length |
32 bits (4 octets) |
128 bits (8 hextets) |
| Address Format |
Dotted decimal (192.168.1.1) |
Hexadecimal (2001:db8::1) |
| Header Size |
20-60 bytes (variable) |
40 bytes (fixed) |
| Address Space |
~4.3 billion addresses |
340 undecillion addresses |
| Fragmentation |
Router and host |
Host only |
| Checksum |
Header checksum included |
No header checksum |
- Version - Identifies IP version (4 or 6)
- Time to Live (TTL) - Prevents infinite loops, decremented at each hop (0-255)
- Protocol - Identifies next layer protocol (TCP=6, UDP=17, ICMP=1)
- Source/Destination IP - Logical addresses for routing decisions
- Fragmentation fields - Allow large packets to be split across network segments with different MTUs
IP Addressing Fundamentals
- Hierarchical addressing enables efficient routing through network/host portions
- Subnet mask determines network vs host bits (example: /24 = 255.255.255.0)
- Private address ranges (RFC 1918): 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16
- APIPA (Automatic Private IP Addressing): 169.254.0.0/16 when DHCP fails
Vocabulary
- MTU (Maximum Transmission Unit) - Largest packet size a network segment can carry
- Fragmentation - Process of breaking large packets into smaller pieces
- TTL (Time to Live) - Hop count limit preventing routing loops
- DSCP (Differentiated Services Code Point) - QoS marking field for traffic prioritization
Routing Process
- Router examines destination IP address in each packet
- Compares against routing table using longest prefix match rule
- Forwards packet out appropriate interface toward destination network
- Decrements TTL and recalculates header checksum (IPv4 only)
Routing Table Components
| Component |
Purpose |
Example |
| Network Address |
Destination network |
192.168.10.0/24 |
| Next Hop |
Router to forward packet to |
10.1.1.2 |
| Outgoing Interface |
Local interface to use |
GigabitEthernet0/1 |
| Administrative Distance |
Route trustworthiness |
Static=1, OSPF=110 |
| Metric |
Path cost for route selection |
Hop count, bandwidth |
Notes
- Fragmentation Avoidance: Modern networks prefer Path MTU Discovery over fragmentation for performance
- TTL Best Practice: Default TTL values help identify OS types (Windows=128, Linux=64)
- Subnetting Strategy: Use VLSM (Variable Length Subnet Masking) to optimize address allocation
- IPv6 Transition: Dual-stack, tunneling, and translation methods enable IPv4 to IPv6 migration
- ICMP Dependency: IP relies on ICMP for error reporting (destination unreachable, time exceeded)
- Broadcast Limitation: IPv4 broadcasts don’t cross routers by default (use DHCP relay for exceptions)