IP Addressing, DNS & Protocols
Master IP addressing, DNS resolution, and key networking protocols like TCP/IP to understand how devices communicate on the internet.
IP Addressing
An IP (Internet Protocol) address is a unique numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication. IP addresses serve two main functions: host or network interface identification and location addressing.
IPv4 Characteristics
- 32-bit address space (4.3 billion addresses)
- Written in dotted-decimal notation (e.g., 192.168.1.1)
- Divided into network and host portions
- Five address classes (A, B, C, D, E)
- Special addresses (loopback, private, broadcast)
IPv4 Address Classes
- Class A: 1.0.0.0 to 126.255.255.255
- Class B: 128.0.0.0 to 191.255.255.255
- Class C: 192.0.0.0 to 223.255.255.255
- Class D: 224.0.0.0 to 239.255.255.255 (Multicast)
- Class E: 240.0.0.0 to 255.255.255.255 (Reserved)
IPv4 Address Converter
IPv6 Characteristics
- 128-bit address space (3.4×10³⁸ addresses)
- Written in hexadecimal notation (e.g., 2001:db8::1)
- Designed to solve IPv4 address exhaustion
- Simplified header format for efficient routing
- Built-in security and auto-configuration
IPv6 Address Types
- Unicast: One-to-one communication
- Multicast: One-to-many communication
- Anycast: One-to-nearest communication
- Link-local: Local network communication
- Unique local: Local network addressing
Subnetting Basics
- Divides a large network into smaller subnetworks
- Uses subnet masks to define network boundaries
- Reduces broadcast traffic and improves security
- Enables efficient IP address allocation
- Uses CIDR notation (e.g., 192.168.1.0/24)
Subnet Mask Examples
- /24 (255.255.255.0) - 256 addresses
- /25 (255.255.255.128) - 128 addresses
- /26 (255.255.255.192) - 64 addresses
- /27 (255.255.255.224) - 32 addresses
- /28 (255.255.255.240) - 16 addresses
DNS Resolution
The Domain Name System (DNS) is the hierarchical and decentralized naming system used to identify computers, services, and other resources reachable through the Internet or other Internet Protocol networks. It translates domain names to IP addresses, making it easier for humans to remember addresses.
DNS Resolution Process
- User enters domain name in browser
- Query sent to recursive resolver
- Resolver checks cache, then queries root servers
- Root servers direct to TLD servers
- TLD servers direct to authoritative servers
- Authoritative servers provide IP address
- Resolver returns IP address to user
DNS Record Types
- A: Maps domain to IPv4 address
- AAAA: Maps domain to IPv6 address
- CNAME: Canonical name (alias)
- MX: Mail exchange server
- NS: Name server for the domain
- TXT: Text records for various purposes
- SOA: Start of authority information
Networking Protocols
Networking protocols are sets of established rules that dictate how data is formatted, transmitted, and received between devices. They ensure that devices can communicate with each other regardless of their internal structure or design.
TCP (Transmission Control Protocol)
- Connection-oriented protocol
- Reliable, ordered data delivery
- Error checking and recovery
- Flow control and congestion control
- Three-way handshake for connections
- Used for web browsing, email, file transfer
IP (Internet Protocol)
- Connectionless protocol
- Responsible for addressing and routing
- Best-effort delivery (no guarantees)
- Fragmentation and reassembly of packets
- Works with TCP or UDP
- IPv4 and IPv6 versions
HTTP (Hypertext Transfer Protocol)
- Application layer protocol
- Foundation of data communication for the web
- Client-server model
- Stateless protocol
- Methods: GET, POST, PUT, DELETE, etc.
- Status codes: 200, 404, 500, etc.
HTTPS (HTTP Secure)
- HTTP over SSL/TLS encryption
- Secure communication over networks
- Authentication of website
- Encrypted data transfer
- Prevents eavesdropping and tampering
- Uses port 443 by default
| Protocol | Layer | Purpose | Example Use |
|---|---|---|---|
| UDP | Transport | Connectionless, low overhead | Video streaming, DNS |
| FTP | Application | File transfer | Uploading website files |
| SMTP | Application | Email transmission | Sending email |
| DHCP | Application | IP address assignment | Automatic network configuration |
| ICMP | Internet | Error reporting and diagnostics | Ping command |
Putting It All Together
IP addressing, DNS, and networking protocols work together to enable communication across the internet. When you type a website address into your browser, these technologies collaborate to deliver the requested content.