Regional Internet Registries (RIRs) are organizations responsible for the allocation and registration of Internet number resources (IP addresses, AS numbers) within specific geographic regions. There are five RIRs:
- ARIN - American Registry for Internet Numbers (North America)
- RIPE NCC - Réseaux IP Européens (Europe, Middle East, Central Asia)
- APNIC - Asia-Pacific Network Information Centre (Asia-Pacific)
- LACNIC - Latin America and Caribbean Network Information Centre
- AFRINIC - African Network Information Centre (Africa)
They ensure fair distribution of IP resources and maintain the global Internet registry system.
IP address allocation follows a hierarchical structure:
- IANA - Internet Assigned Numbers Authority (top level)
- RIRs - Receive large blocks from IANA
- ISPs/LIRs - Local Internet Registries get smaller blocks
- End Users - Receive individual addresses or small subnets
This ensures efficient management and prevents address conflicts globally.
IPv4 exhaustion status varies by RIR:
- ARIN - Exhausted (2015), transfers only
- RIPE NCC - Exhausted (2019), limited allocations
- APNIC - Exhausted (2011), strict policies
- LACNIC - Exhausted (2014), very limited allocations
- AFRINIC - Near exhaustion, conservation policies
This drives IPv6 adoption and IPv4 address transfer markets.
IPv4 uses 32-bit addresses (4 octets) in dotted decimal notation:
Original Classes (now obsolete):
- Class A: 1.0.0.0 to 126.255.255.255 (/8 networks)
- Class B: 128.0.0.0 to 191.255.255.255 (/16 networks)
- Class C: 192.0.0.0 to 223.255.255.255 (/24 networks)
- Class D: 224.0.0.0 to 239.255.255.255 (Multicast)
- Class E: 240.0.0.0 to 255.255.255.255 (Reserved)
Modern networks use CIDR (Classless Inter-Domain Routing) instead.
CIDR (Classless Inter-Domain Routing) allows flexible subnet mask lengths, written as prefix/length:
10.0.0.0/8 = 16,777,216 addresses
172.16.0.0/12 = 1,048,576 addresses
Benefits over classful addressing:
- Eliminates address space waste
- Allows variable-length subnet masking (VLSM)
- Enables route aggregation (supernetting)
- More efficient routing table entries
Subnetting divides a network into smaller sub-networks:
Subnet 1: 192.168.1.0/26 (64 addresses: .0-.63)
Subnet 2: 192.168.1.64/26 (64 addresses: .64-.127)
Subnet 3: 192.168.1.128/26 (64 addresses: .128-.191)
Subnet 4: 192.168.1.192/26 (64 addresses: .192-.255)
Calculation steps:
- Determine required subnets and hosts per subnet
- Calculate bits needed: 2^n ≥ requirement
- Adjust subnet mask accordingly
- Calculate network, broadcast, and host ranges
Private IP ranges (RFC 1918) for internal networks:
Class B: 172.16.0.0/12 (172.16.0.0 - 172.31.255.255)
Class C: 192.168.0.0/16 (192.168.0.0 - 192.168.255.255)
Uses:
- Internal company networks
- Home networks
- NAT (Network Address Translation) scenarios
- Conserve public IP addresses
Additional private ranges:
- 169.254.0.0/16 - Link-local (APIPA)
- 127.0.0.0/8 - Loopback
IPv4 limitations that IPv6 addresses:
- Address exhaustion: 4.3 billion vs 340 undecillion addresses
- NAT complexity: End-to-end connectivity without NAT
- Configuration overhead: Autoconfiguration capabilities
- Security: IPSec built-in (optional in IPv4)
- QoS: Better traffic flow labeling
- Mobility: Native support for mobile devices
IPv6 provides a long-term solution for Internet growth.
IPv6 uses 128-bit addresses in hexadecimal notation:
Address types:
- Unicast: One-to-one communication
- Multicast: One-to-many (starts with FF00::/8)
- Anycast: One-to-nearest (uses unicast format)
Unicast subtypes:
- Global: 2000::/3 (public Internet)
- Link-local: FE80::/10 (local segment)
- Unique Local: FC00::/7 (private networks)
- Loopback: ::1
IPv6 allows compression to shorten addresses:
Compressed: 2001:db8::1
Rules:
1. Leading zeros in each group can be omitted
2. Consecutive groups of zeros can be replaced with "::"
3. "::" can only be used once per address
Examples:
→ 2001:db8:0:42:0:8a2e:370:7334
→ 2001:db8::42:0:8a2e:370:7334
Methods to enable IPv4/IPv6 coexistence:
- Dual Stack: Run both IPv4 and IPv6 simultaneously
- Tunneling: Encapsulate IPv6 in IPv4 (6to4, Teredo)
- Translation: Convert between protocols (NAT64/DNS64)
Common tunnel types:
Teredo: 2001::/32 prefix
6rd: Provider-based tunneling
ISATAP: Intra-site automatic tunneling
The OSI model defines network communication layers:
- Physical (L1): Cables, hubs, repeaters, electrical signals
- Data Link (L2): Ethernet, switches, MAC addresses, frames
- Network (L3): IP, routers, logical addressing, packets
- Transport (L4): TCP/UDP, end-to-end communication, segments
- Session (L5): NetBIOS, RPC, session management
- Presentation (L6): SSL/TLS, encryption, data formatting
- Application (L7): HTTP, FTP, SMTP, user interfaces
Memory aid: "Please Do Not Throw Sausage Pizza Away"
TCP/IP is a 4-layer practical implementation:
----------------- ----------------
Application → Application
Presentation → (Combined)
Session → (Combined)
Transport → Transport
Network → Internet
Data Link → Network Access
Physical → (Combined)
Key differences:
- OSI: Theoretical model, 7 layers
- TCP/IP: Practical implementation, 4 layers
- TCP/IP predates OSI model
- Industry uses TCP/IP for implementation
Encapsulation (sending):
- Application: Create application data
- Transport: Add TCP/UDP header → Segment
- Network: Add IP header → Packet
- Data Link: Add Ethernet header/trailer → Frame
- Physical: Convert to electrical signals → Bits
Decapsulation (receiving): Reverse process, each layer strips its header and passes data up.
Connection: Connection-oriented Connectionless
Reliability: Reliable Best effort
Ordering: Ordered delivery No ordering
Flow Control: Yes No
Error Checking: Yes Basic checksum
Overhead: High Low
Speed: Slower Faster
TCP Use cases: Web browsing, email, file transfer
UDP Use cases: Video streaming, DNS, gaming, VoIP
TCP connection establishment process:
Server → Client: SYN-ACK (seq=y, ack=x+1)
Client → Server: ACK (seq=x+1, ack=y+1)
[Connection established]
Purpose:
- Synchronize sequence numbers
- Exchange initial parameters
- Confirm both sides can send/receive
- Establish reliable communication
Flow Control (TCP Window):
- Receiver advertises available buffer space
- Sender limits data to window size
- Prevents receiver buffer overflow
Congestion Control:
- Slow Start: Exponential window growth
- Congestion Avoidance: Linear growth after threshold
- Fast Retransmit: Immediate retransmission on duplicate ACKs
- Fast Recovery: Reduce window size on congestion
Layer: Network (L3) Data Link (L2)
Addresses: IP addresses MAC addresses
Scope: Between networks Within network
Broadcast: Stops broadcasts Forwards broadcasts
Intelligence: Routing tables MAC address table
Router functions: Route selection, NAT, DHCP, firewall
Switch functions: Frame forwarding, VLAN support, STP
Interior Gateway Protocols (IGP):
- Distance Vector: RIP, EIGRP
- Link State: OSPF, IS-IS
Exterior Gateway Protocols (EGP):
- Path Vector: BGP (Border Gateway Protocol)
OSPF: Shortest path first, link state database
EIGRP: Advanced distance vector, Cisco proprietary
BGP: Internet routing, AS path attribute
ARP resolves IP addresses to MAC addresses:
2. Checks ARP cache for MAC address
3. If not found, broadcasts ARP request:
"Who has 192.168.1.1? Tell 192.168.1.100"
4. Target responds with ARP reply:
"192.168.1.1 is at AA:BB:CC:DD:EE:FF"
5. Sender caches the mapping and sends data
ARP types: ARP request (broadcast), ARP reply (unicast)
Network Address Translation (NAT) maps private IPs to public IPs:
Public IP: 203.0.113.1
Outbound translation:
192.168.1.100:3000 → 203.0.113.1:50000
192.168.1.101:3000 → 203.0.113.1:50001
NAT types:
- Static NAT: One-to-one mapping
- Dynamic NAT: Pool of public IPs
- PAT (Port Address Translation): Many-to-one with ports
Firewall types by technology:
- Packet Filter: L3/L4 headers only
- Stateful: Connection state tracking
- Application Layer: Deep packet inspection
- Next-Gen: IPS, application awareness, user identity
Deployment types:
- Network-based: Dedicated appliance
- Host-based: Software on individual systems
- Cloud-based: Firewall as a Service (FWaaS)
DNS resolves domain names to IP addresses:
2. Check local cache
3. Query recursive resolver
4. Query root nameserver (.) → returns .com nameserver
5. Query .com nameserver → returns example.com nameserver
6. Query example.com nameserver → returns A record
7. Return IP address to client
DNS record types: A, AAAA, CNAME, MX, NS, PTR, TXT
DHCP (Dynamic Host Configuration Protocol) automates IP configuration:
1. Discover: Client broadcasts DHCP discover
2. Offer: Server offers IP address and configuration
3. Request: Client requests offered configuration
4. Acknowledge: Server confirms assignment
DHCP provides:
- IP address and subnet mask
- Default gateway
- DNS servers
- Lease duration
- Other options (NTP, domain name)
Essential tools:
traceroute: Trace packet path and identify bottlenecks
nslookup: Query DNS records
netstat: Show network connections and statistics
wireshark: Packet capture and analysis
iperf: Network bandwidth testing
tcpdump: Command-line packet capture
Example commands:
traceroute google.com
nslookup example.com
netstat -an | grep :80
Systematic troubleshooting approach:
- Physical layer: Check cables, links, interfaces
- Data link: Verify switch connectivity, VLANs
- Network layer: Check IP configuration, routing
- Transport layer: Verify port accessibility
- Application layer: Test application-specific issues
1. ping localhost (127.0.0.1)
2. ping default gateway
3. ping external IP (8.8.8.8)
4. ping external hostname (google.com)
5. Test specific services (telnet host port)
VLAN (Virtual LAN) logically segments networks:
VLAN 10: Finance department
VLAN 20: IT department
VLAN 30: Guest network
802.1Q tagging adds 4-byte header:
[Ethernet][VLAN Tag][IP][Data]
Benefits:
- Improved security (broadcast domain separation)
- Better performance (reduced collision domains)
- Flexible network design
- Easier management
VPN types:
- Site-to-Site: Connects entire networks
- Remote Access: Individual user connections
- Client-to-Site: User to corporate network
VPN protocols:
L2TP: Layer 2 tunneling, often with IPSec
PPTP: Point-to-Point, legacy protocol
OpenVPN: SSL/TLS-based, open source
WireGuard: Modern, lightweight protocol
QoS manages network traffic to guarantee performance:
QoS mechanisms:
- Classification: Identify traffic types
- Marking: Tag packets with priority (DSCP)
- Queuing: Buffer management strategies
- Shaping: Control transmission rate
- Policing: Enforce traffic contracts
Voice: Highest priority, low latency
Video: High priority, moderate latency
Data: Best effort
Backup: Lowest priority
BGP (Border Gateway Protocol) routes traffic between autonomous systems:
under single administrative control
BGP session types:
eBGP: Between different ASes
iBGP: Within same AS
BGP attributes:
- AS_PATH: Sequence of ASes
- NEXT_HOP: Next router address
- LOCAL_PREF: Local preference value
- ORIGIN: How route was originated
SDN separates control plane from data plane:
[Control + Data] → [Controller] (Control plane)
Switch ↓
[OpenFlow Switch] (Data plane)
SDN benefits:
- Centralized network control
- Programmable network behavior
- Dynamic network configuration
- Easier network automation
Key protocols: OpenFlow, NETCONF, OVSDB
Network virtualization creates logical networks over physical infrastructure:
Technologies:
- VXLAN: Layer 2 over Layer 3 tunneling
- GRE: Generic Routing Encapsulation
- NVGRE: Network Virtualization using GRE
- Overlay networks: Virtual topology over underlay
[Outer IP][UDP][VXLAN][Inner Ethernet][IP][Data]
Key performance indicators:
- Bandwidth utilization: Percentage of link capacity used
- Latency: Round-trip time (RTT)
- Packet loss: Percentage of lost packets
- Jitter: Variation in latency
- Throughput: Actual data transfer rate
Voice: <150ms latency, <1% loss, <30ms jitter
Video: <400ms latency, <1% loss, <50ms jitter
Data: Variable based on application
Common attacks:
- DDoS: Distributed Denial of Service
- Man-in-the-Middle: Intercepting communications
- ARP Spoofing: Fake ARP responses
- DNS Poisoning: Corrupt DNS responses
- Port Scanning: Reconnaissance activity
Mitigation strategies:
MITM: Encryption (TLS), certificate validation
ARP Spoof: Static ARP entries, ARP inspection
DNS Poison: DNSSEC, secure DNS servers
Design considerations:
- Hierarchical design: Core, distribution, access layers
- Redundancy: Multiple uplinks, spanning tree
- VLANs: Segment departments/functions
- IP addressing: Hierarchical subnetting scheme
- Wireless: Coverage planning, controller-based
Floor 2: 192.168.2.0/24 (Sales, Marketing)
Floor 3: 192.168.3.0/24 (Engineering)
Servers: 192.168.100.0/24
DMZ: 192.168.200.0/24
MPLS (Multiprotocol Label Switching) uses labels for forwarding:
MPLS: Look up label in forwarding table
Label operations:
PUSH: Add label (ingress)
SWAP: Change label (transit)
POP: Remove label (egress)
Benefits: Traffic engineering, QoS, VPNs, fast forwarding
STP prevents loops in switched networks:
2. Calculate shortest path to root
3. Block redundant paths
4. Maintain loop-free topology
Port states: Blocking → Listening → Learning → Forwarding
STP variants: 802.1D (original), RSTP (802.1w), MSTP (802.1s)
Convergence is when all routers agree on network topology:
Factors affecting convergence:
- Routing protocol type
- Network size and complexity
- Timer values
- Link failure detection speed
- BFD (Bidirectional Forwarding Detection)
- Fast hello timers
- Prefix independent convergence
- Loop-free alternates
Load balancing methods:
- Round robin: Distribute requests sequentially
- Weighted: Based on server capacity
- Least connections: Route to least busy server
- Hash-based: Consistent distribution
Layer 7 (Application): Based on content/URLs
Example algorithms:
Source IP hash: Ensures session persistence
Health checks: Monitor server availability
Network segmentation: Divide network into smaller subnets
Microsegmentation: Granular security at application level
VLAN 10: Finance (subnet-level)
VLAN 20: HR (subnet-level)
Microsegmentation:
Finance DB ←→ Finance App only
HR App ←→ AD Server only
Block all other lateral movement
Implementation: Zero trust, application-aware firewalls, SDN
CDN distributes content closer to users:
CDN components:
Origin server: Primary content source
Edge servers: Distributed cache points
PoPs: Points of Presence worldwide
Load balancers: Distribute traffic
Benefits: Reduced latency, improved availability, DDoS protection
DWDM (Dense Wavelength Division Multiplexing) uses multiple light wavelengths:
λ1 (1550.12 nm): 10 Gbps
λ2 (1550.92 nm): 10 Gbps
λ3 (1551.72 nm): 10 Gbps
...
Total: 80+ channels = 800+ Gbps
Components: Optical multiplexer, amplifiers, demultiplexer
Multicast enables one-to-many communication:
IPv4: 224.0.0.0/4 (Class D)
IPv6: FF00::/8
Protocols:
IGMP: Internet Group Management Protocol
PIM: Protocol Independent Multicast
MSDP: Multicast Source Discovery Protocol
Modes: Dense mode (flood and prune), Sparse mode (explicit join)
IBN translates business intent into network configuration:
IBN: "Finance department should not access HR systems"
→ Automatically configure ACLs, VLANs, etc.
IBN components:
- Translation engine
- Automated configuration
- Continuous monitoring
- Closed-loop assurance
Network automation: Automated device configuration and management
Ansible: Agentless automation
Puppet: Configuration management
NETCONF: Network configuration protocol
RESTCONF: RESTful network configuration
Python: Scripting and API integration
Benefits: Reduced errors, faster deployment, consistency
Telemetry provides real-time network insights:
Modern: Streaming telemetry (push model)
Protocols:
gNMI: gRPC Network Management Interface
NETCONF: Configuration and state data
Kafka: Message streaming platform
Observability pillars: Metrics, logs, traces
5G introduces new networking paradigms:
Network slicing: Virtual networks per use case
Edge computing: Ultra-low latency processing
Massive MIMO: Multiple antenna arrays
Beamforming: Directional signal transmission
SDN/NFV: Software-defined infrastructure
Use cases: IoT, autonomous vehicles, industrial automation
Zero trust assumes no implicit trust in network location:
Zero Trust: "Never trust, always verify"
Principles:
1. Verify explicitly
2. Use least privilege access
3. Assume breach mentality
Implementation: Identity verification, encryption everywhere, microsegmentation
Capacity planning ensures network can handle growth:
Peak utilization: 60% of 1 Gbps = 600 Mbps
Growth rate: 20% annually
Planning horizon: 3 years
Calculation:
Year 3: 600 Mbps × 1.20³ = 1.04 Gbps
Recommended: 1.04 Gbps ÷ 0.80 = 1.3 Gbps
Upgrade to: 10 Gbps link
Factors: Growth trends, application requirements, redundancy
Current trends:
- AI/ML in networking: Predictive analytics, anomaly detection
- Quantum networking: Quantum key distribution, post-quantum crypto
- Programmable data planes: P4 language, custom forwarding
- Cloud-native networking: Service mesh, Kubernetes networking
- Edge computing: Distributed processing, edge-to-cloud
P4: Programming Protocol-independent Packet Processors
gRPC: High-performance RPC framework
eBPF: Extended Berkeley Packet Filter
Istio: Service mesh for microservices