Networking Basics: Understanding TCP/IP, DNS, and Network Protocols
Learn the fundamentals of computer networking including the OSI model, TCP/IP protocol suite, IP addressing, subnetting, DNS, and network security essentials.
Why Networking Fundamentals Matter
Every cyber attack travels over a network. Whether an attacker is exploiting a web application, intercepting wireless traffic, or launching a denial-of-service attack, they are manipulating network protocols. To defend against these attacks — or to conduct authorized penetration testing — you must understand how networks operate at a fundamental level.
The OSI Model
The Open Systems Interconnection (OSI) model is a conceptual framework that standardizes networking functions into seven layers. Each layer provides services to the layer above it and receives services from the layer below.
| Layer | Name | Function | Example Protocols |
|-------|------|----------|-----------------|
| 7 | Application | User-facing network services | HTTP, FTP, SMTP, DNS |
| 6 | Presentation | Data translation, encryption | SSL/TLS, JPEG, ASCII |
| 5 | Session | Session management | NetBIOS, RPC |
| 4 | Transport | End-to-end reliability | TCP, UDP |
| 3 | Network | Logical addressing, routing | IP, ICMP, ARP |
| 2 | Data Link | Framing, MAC addressing | Ethernet, Wi-Fi (802.11) |
| 1 | Physical | Raw bit transmission | Cables, radio signals |
While the TCP/IP model (four layers) is more practical, the OSI model remains invaluable for troubleshooting and understanding where different protocols operate.
The TCP/IP Protocol Suite
TCP/IP is the foundational protocol suite of the internet. It consists of four layers: Application, Transport, Internet, and Link.
TCP vs UDP
TCP (Transmission Control Protocol) is connection-oriented and guaranteed. It establishes a three-way handshake (SYN, SYN-ACK, ACK) before sending data, ensures ordered delivery, and retransmits lost packets. TCP is used where reliability matters: web browsing, email, file transfers.
UDP (User Datagram Protocol) is connectionless and best-effort. It sends datagrams without establishing a connection, with no guarantee of delivery or ordering. UDP is used where speed matters over reliability: streaming, VoIP, DNS queries, DHCP.
IP Addressing
Every device on a network needs a unique IP address. IPv4 addresses are 32-bit numbers typically written in dotted decimal notation (192.168.1.1). With address exhaustion, IPv6 (128-bit) is gradually being adopted.
Subnetting
Subnetting divides a network into smaller, manageable segments. A subnet mask defines which portion of the IP address represents the network and which represents the host.
For example, 192.168.1.0/24 means the first 24 bits are the network portion, leaving 8 bits for hosts (254 usable addresses). Understanding CIDR notation (/16, /24, /28) and subnet calculations is essential for network design and security zoning.
DNS Resolution Process
The Domain Name System translates human-readable domain names into machine-readable IP addresses.
DNS Record Types
| Record | Purpose |
|--------|---------|
| A | Maps a domain to an IPv4 address |
| AAAA | Maps a domain to an IPv6 address |
| CNAME | Canonical name alias |
| MX | Mail exchange server |
| TXT | Arbitrary text (often for verification) |
| NS | Nameserver for the domain |
| SOA | Start of authority — administrative information |
Network Security Fundamentals
Firewalls
Firewalls filter traffic based on rules. Packet-filtering firewalls inspect headers (source/destination IP, port, protocol). Stateful firewalls track connection states and allow return traffic automatically. Next-generation firewalls (NGFW) add application-layer inspection, intrusion prevention, and threat intelligence.
VPNs
Virtual Private Networks encrypt traffic between two endpoints, creating a secure tunnel over an untrusted network. Common protocols include WireGuard, OpenVPN, and IPsec. VPNs protect data in transit and provide remote access to internal networks.
Network Segmentation
Dividing a network into segments limits the blast radius of a breach. If an attacker compromises a workstation in a segmented network, they cannot easily reach the database server in a different segment. VLANs and firewalls enforce segmentation.
Practical Networking Tools
Every security professional should be proficient with these tools:
Understanding these networking fundamentals is the bedrock of cybersecurity. Every attack and defense operates within these protocols. Master the basics here, and advanced topics like penetration testing, traffic analysis, and network defense become far more approachable.