Subnet Calculator
No calculation yet.
CIDR Planner
Worksheet Generator
IP Addressing Basics
IP (Internet Protocol) addresses are numerical labels assigned to devices connected to a network that uses the Internet Protocol for communication.
IPv4 vs IPv6
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address Size | 32 bits | 128 bits |
| Address Format | 192.168.1.1 | 2001:0db8:85a3::8a2e:0370:7334 |
| Available Addresses | ~4.3 billion | ~3.4×10³⁸ |
| Header Size | 20–60 bytes | 40 bytes fixed |
Network Components
Key Concepts
- Network Address: Identifies the network itself
- Broadcast Address: Sends to all hosts on network
- Subnet Mask: Distinguishes network and host portions
- Gateway: Exit point from the network
IP Address Classes
IPv4 addresses are divided into classes to accommodate networks of different sizes.
Class Characteristics
| Class | First Octet | Network Bits | Host Bits | Networks | Hosts/Net |
|---|---|---|---|---|---|
| A | 1–126 | 8 | 24 | 126 | 16,777,214 |
| B | 128–191 | 16 | 16 | 16,384 | 65,534 |
| C | 192–223 | 24 | 8 | 2,097,152 | 254 |
CIDR Notation
CIDR replaces classful network architecture with flexible prefix lengths, enabling efficient IP allocation and route aggregation.
CIDR vs Classful
Benefits
- Efficient Allocation: No wasted IP space
- Flexible Subnetting: Any prefix length
- Route Aggregation: Reduces routing table size
- Modern Standard: Used in all modern networks
Common CIDR Examples
| CIDR | Subnet Mask | Usable Hosts | Use Case |
|---|---|---|---|
| /24 | 255.255.255.0 | 254 | Small Business |
| /26 | 255.255.255.192 | 62 | Department |
| /30 | 255.255.255.252 | 2 | Point-to-Point |
Firewalls
Firewalls monitor and control network traffic based on predetermined security rules, forming the first line of defence.
Firewall Types
Deployment
Common Use Cases
- Enterprise Networks: Protect internal resources from external threats
- DMZ Setup: Isolate public-facing servers
- Remote Access: Secure VPN connections
- Compliance: Meet regulatory requirements (PCI-DSS, ISO 27001)
IDS & IPS
IDS and IPS monitor network traffic for suspicious activity and policy violations, providing active threat response capabilities.
IDS vs IPS Comparison
| Feature | IDS | IPS |
|---|---|---|
| Primary Function | Detection & Alerting | Detection & Prevention |
| Network Position | Out-of-band | In-line |
| Response | Passive | Active |
| Impact on Traffic | None | Can block/drop packets |
Deployment Architecture
Detection Methods
- Signature-based: Known attack patterns
- Anomaly-based: Behavioural analysis
- Policy-based: Rule violations
- Heuristic: Machine learning patterns
VPN Technology
VPNs create secure, encrypted connections over public networks, enabling remote access and site-to-site connectivity.
VPN Types
VPN Protocols
| Protocol | Security | Speed | Use Case |
|---|---|---|---|
| IPSec | High | Medium | Site-to-Site |
| OpenVPN | High | Medium | Remote Access |
| WireGuard | High | Fast | Modern deployments |
Routers
Routers forward data packets between networks by selecting the optimal path based on routing tables and protocols.
Router Functions
Routing Protocols
| Protocol | Type | Use Case | Examples |
|---|---|---|---|
| OSPF | Link-State | Enterprise Networks | Large organisations |
| BGP | Path Vector | Internet Routing | ISPs, Large networks |
| EIGRP | Hybrid | Cisco Networks | Cisco environments |
Network Switches
Switches connect devices within a LAN by using MAC address tables to forward frames only to the intended destination port.
Switch Types
Switch vs Hub vs Router
| Device | OSI Layer | Intelligence | Use Case |
|---|---|---|---|
| Hub | Layer 1 | None | Legacy networks |
| Switch | Layer 2 | MAC address based | Local network |
| Router | Layer 3 | IP address based | Between networks |
VLANs
VLANs allow administrators to logically segment a physical network into multiple broadcast domains without additional hardware.
VLAN Benefits
VLAN Types
| VLAN Type | Configuration | Use Case |
|---|---|---|
| Port-based | Static assignment | General purpose |
| MAC-based | Dynamic by MAC | Mobile devices |
| Protocol-based | By protocol type | Specialised networks |
Common VLAN Architecture
VLAN 10: Management — 192.168.10.0/24
VLAN 20: Staff — 192.168.20.0/24
VLAN 30: Guests — 192.168.30.0/24
VLAN 40: Servers — 192.168.40.0/24
Tutorial — IP Addressing & Subnetting
- Understand IP structure: network + host bits determined by mask/prefix.
- Convert dotted mask to prefix or vice versa if needed.
- Calculate network: IP & mask (bitwise AND).
- Calculate broadcast: network | wildcard (invert mask).
- First usable = network+1 (unless /31 or /32). Last usable = broadcast-1.
- For planning subnets, borrow bits from host portion: newPrefix = oldPrefix + bitsBorrowed.