Loading W Code...
Internet Protocol Suite - 4 Layer Practical Architecture
TCP/IP Protocol Suite: The practical, open-standard architecture powering the global Internet today, developed by DARPA.
Application + Presentation + Session (Layers 7, 6, 5)
Protocols
HTTP/1.1, HTTP/2, HTTP/3, HTTPS, SSH, DNS, DHCP, FTP, SMTP, WebSockets
In the TCP/IP architectural suite, the Application Layer collapses the top three layers of the OSI model into a single pragmatically streamlined layer. It handles everything from user-facing application protocols to data serialization and session persistence.
443, SSH Daemon on Port 22).// DNS Lookup & Socket Connection Workflow in C
#include <netdb.h>
#include <stdio.h>
struct addrinfo hints = { .ai_family = AF_INET, .ai_socktype = SOCK_STREAM };
struct addrinfo *res;
// Resolves hostname "api.wcode.edu" to IP address
if (getaddrinfo("api.wcode.edu", "443", &hints, &res) == 0) {
int sockfd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
connect(sockfd, res->ai_addr, res->ai_addrlen);
freeaddrinfo(res);
}Transport Layer (Layer 4)
Protocols
TCP (Transmission Control Protocol), UDP (User Datagram Protocol), QUIC
The Transport Layer delivers data between specific processes running on hosts across the network. It uses two fundamental transport paradigms:
// Linux Kernel C TCP Header Structure (netinet/tcp.h)
struct tcphdr {
uint16_t source; // Source Port Number
uint16_t dest; // Destination Port Number
uint32_t seq; // Sequence Number
uint32_t ack_seq; // Acknowledgment Number
uint16_t res1:4, doff:4, fin:1, syn:1, rst:1, psh:1, ack:1, urg:1;
uint16_t window; // Flow Control Receive Window Size
uint16_t check; // TCP Checksum
uint16_t urg_ptr; // Urgent Pointer
};Network Layer (Layer 3)
Protocols
IPv4, IPv6, ICMP, ARP, IGMP, BGP, OSPF
The Internet Layer is the core engine of the global Internet. It accepts transport segments, wraps them into IP Packets, and routes them across heterogeneous networks to their final logical destination.
| Class | First Octet Range | Default Subnet Mask | Primary Assignment | Max Usable Hosts |
|---|---|---|---|---|
| Class A | 1 – 126 | 255.0.0.0 (/8) | Enterprise Backbones | 16,777,214 |
| Class B | 128 – 191 | 255.255.0.0 (/16) | Mid-sized Organizations | 65,534 |
| Class C | 192 – 223 | 255.255.255.0 (/24) | Local LANs / Home Wi-Fi | 254 |
| Class D | 224 – 239 | N/A | Multicast Video / Routing | Reserved |
# ARP Request Query & Packet Capture (tcpdump)
$ sudo arp-scan --interface=eth0 192.168.1.0/24
Interface: eth0, datalink type: EN10MB (Ethernet)
192.168.1.1 00:1a:2b:3c:4d:5e Router Gateway
192.168.1.105 aa:bb:cc:11:22:33 WorkstationData Link + Physical (Layers 2, 1)
Protocols
Ethernet (802.3), Wi-Fi (802.11), PPP, MAC, DSL
The Network Access Layer (or Link Layer) encompasses both the physical media drivers and local framing logic required to move data over physical network hardware.
| Generation / Standard | Frequency Band | Maximum Physical Data Rate | Max Range |
|---|---|---|---|
| Wi-Fi 4 (802.11n) | 2.4 / 5.0 GHz | 600 Mbps | ~70 Meters |
| Wi-Fi 5 (802.11ac) | 5.0 GHz | 3.5 Gbps | ~35 Meters |
| Wi-Fi 6E (802.11ax) | 2.4 / 5.0 / 6.0 GHz | 9.6 Gbps | ~25 Meters |
# Inspecting Physical Network Card State via Linux ip CLI
$ ip link show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP
link/ether aa:bb:cc:11:22:33 brd ff:ff:ff:ff:ff:ff