Computer Networks
Introduction
A computer network is a collection of computers and other devices connected together to share resources and communicate. Networks are essential for modern computing environments.
1. Network Architecture
OSI Model Layers:
- Physical Layer
- Data Link Layer
- Network Layer
- Transport Layer
- Session Layer
- Presentation Layer
- Application Layer
2. Network Protocols
- TCP/IP Protocol Suite
- HTTP/HTTPS
- FTP
- DNS
- SMTP
- POP3
3. Key Concepts
- IP Addressing and Subnetting
- Routing and Switching
- Network Devices (Router, Switch, Gateway)
- Wireless Networks
- Network Security
- VPN and Firewalls
Comprehensive Computer Networks Guide
1. OSI Model - Seven Layers
Layer 1: Physical Layer
- Physical transmission of raw bits
- Physical media: copper cables, fiber optics, wireless
- Hardware components: hubs, repeaters
- Signals: analog, digital, modulation techniques
- Examples: Ethernet cables, WiFi radio waves
Layer 2: Data Link Layer
- Frame-based communication
- MAC (Media Access Control) addressing
- Switches operate here
- Protocols: Ethernet, PPP, HDLC
- Error detection: CRC (Cyclic Redundancy Check)
- ARP (Address Resolution Protocol)
Layer 3: Network Layer
- Routing and logical addressing
- IP (Internet Protocol) operation
- Routers operate here
- IPv4 and IPv6
- ICMP (ping), IGMP (multicast)
- Routing protocols: OSPF, BGP, RIP
Layer 4: Transport Layer
- End-to-end communication
- TCP (Transmission Control Protocol): Reliable, connection-oriented
- UDP (User Datagram Protocol): Unreliable, connectionless
- Ports and sockets
- Flow control and congestion control
- Error checking
Layer 5: Session Layer
- Session establishment, maintenance, termination
- Dialog control
- Token management
- NetBIOS, SOCKS, NFS
- Session recovery
Layer 6: Presentation Layer
- Data translation and encryption
- Character set conversion
- Compression and decompression
- SSL/TLS for encryption
- Image formatting (JPEG, PNG)
- Audio/video codecs
Layer 7: Application Layer
- User applications and services
- HTTP, HTTPS, FTP, SMTP, POP3, DNS, Telnet
- User interfaces
- Email, web browsing, file transfer
- Protocols specific to applications
2. TCP/IP Protocol Suite
IP Protocol (Layer 3)
- IPv4: 32-bit addressing (4.2 billion addresses)
- IPv6: 128-bit addressing (340 undecillion addresses)
- Connectionless, unreliable delivery
- Routing to destination networks
- TTL (Time To Live) for loop prevention
TCP Protocol (Layer 4)
- Reliable, connection-oriented
- Three-way handshake (SYN, SYN-ACK, ACK)
- Flow control with sliding windows
- Congestion control
- Ordered delivery of segments
- Error checking and retransmission
UDP Protocol (Layer 4)
- Connectionless, unreliable
- Low overhead, fast
- Uses: DNS, DHCP, VoIP, video streaming
- No flow control or congestion control
ICMP (Internet Control Message Protocol)
- Error reporting
- Ping functionality (echo requests)
- Traceroute
- Router solicitation
IGMP (Internet Group Management Protocol)
- Multicast group management
- Used for video conferencing and streaming
3. IP Addressing and Subnetting
IPv4 Addressing
- Format: 4 octets (e.g., 192.168.1.1)
- Classes: A, B, C (and deprecated D, E)
- Public vs Private addresses
- Special addresses: Loopback (127.0.0.1), Broadcast
IPv6 Addressing
- 128-bit address (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334)
- Improved routing and multicasting
- Built-in security (IPSec)
- Better auto-configuration
Subnetting
- Dividing networks into smaller subnets
- Subnet mask: Identifies network and host portions
- CIDR notation (/24, /16, etc.)
- Calculating subnets: Address space, broadcasts, usable hosts
- Supernetting: Combining networks
DHCP (Dynamic Host Configuration Protocol)
- Automatic IP address assignment
- Lease-based allocation
- Reduces manual configuration
- Server, relay agent, client model
NAT (Network Address Translation)
- Translating private to public IP addresses
- Port mapping
- Security benefit: hides internal network
- Types: Static NAT, Dynamic NAT, PAT (Port Address Translation)
4. Routing and Switching
Routing Fundamentals
- Forwarding packets based on destination IP
- Routing table: Destination, gateway, metric, interface
- Longest prefix match algorithm
- Static vs Dynamic routing
Dynamic Routing Protocols
Distance-Vector (RIP, EIGRP):
- Routing decisions based on hop count
- Simpler but less efficient
- Slower convergence time
Link-State (OSPF, IS-IS):
- Complete network topology knowledge
- Dijkstra's algorithm
- Faster convergence
- Better for large networks
Path-Vector (BGP):
- Internet-scale routing
- AS-Path selection
- Scalable but complex
Switching Fundamentals
- Layer 2 forwarding using MAC addresses
- Learning MAC addresses: MAC table, aging
- VLAN (Virtual LAN): Logical network segmentation
- Spanning Tree Protocol (STP): Preventing loops
- Switch types: Unmanaged, managed, smart
VLAN
- Logical network segmentation
- Improved security and performance
- Trunk links between switches
- Inter-VLAN routing
5. Network Devices
Router
- Layer 3 device
- Connects different networks
- Makes routing decisions
- NAT and firewall capabilities
- Connects to ISP for Internet access
Switch
- Layer 2 device
- Connects devices on same network
- MAC learning and forwarding
- Full-duplex communication
- Port speed: Fast Ethernet (100 Mbps), Gigabit (1000 Mbps)
Gateway
- Network access point
- Protocol translation
- May operate at multiple layers
- Default gateway for network
Firewall
- Network security device
- Stateless vs Stateful filtering
- Rule-based access control
- Proxy firewall for deep inspection
- Next-generation firewalls (NGF)
Load Balancer
- Distributes traffic across servers
- Health checking
- Session persistence
- Improves reliability and performance
6. DNS (Domain Name System)
DNS Functionality
- Translates domain names to IP addresses
- Hierarchical system
- Root, TLD, authoritative servers
- Recursive and iterative queries
DNS Records
- A: IPv4 address mapping
- AAAA: IPv6 address mapping
- CNAME: Canonical name (alias)
- MX: Mail exchange servers
- TXT: Text records
- NS: Nameserver records
- SOA: Start of Authority
- PTR: Reverse DNS mapping
DNS Resolution Process
- Query goes to recursive resolver
- Resolver queries root nameserver
- Root responds with TLD nameserver
- TLD responds with authoritative server
- Authoritative server returns IP address
DNSSEC
- Cryptographic security
- Prevents DNS spoofing
- Digital signatures for records
7. Email Protocols
SMTP (Simple Mail Transfer Protocol)
- Sending emails from client to server
- Port 25, 465 (SSL), 587 (TLS)
- Commands: EHLO, MAIL, RCPT, DATA
- Authentication and encryption
POP3 (Post Office Protocol)
- Retrieving emails from server
- Typically downloads to client device
- Port 110, 995 (SSL)
- Stateless protocol
IMAP (Internet Message Access Protocol)
- More advanced email retrieval
- Keeps emails on server
- Folder management
- Synchronization across devices
- Port 143, 993 (SSL)
8. Wireless Networks
WiFi Standards
- 802.11a, 802.11b, 802.11g, 802.11n, 802.11ac, 802.11ax (WiFi 6)
- Frequency bands: 2.4 GHz, 5 GHz, 6 GHz
- Channels and interference
- Speed improvements: 54 Mbps → 11 Gbps (WiFi 6)
WiFi Security
- WEP: Deprecated, insecure
- WPA: TKIP encryption
- WPA2: AES encryption, currently standard
- WPA3: Latest, improved security features
- Pre-shared key (PSK) vs Enterprise authentication
Cellular Networks
- 3G, 4G LTE, 5G
- Mobile broadband
- Cell towers and handoff
- Frequency bands allocation
Bluetooth
- Short-range wireless
- Personal Area Network (PAN)
- Versions: Bluetooth Classic, Bluetooth Low Energy (BLE)
- Pairing and bonding
9. Network Security
Common Threats
- Eavesdropping: Intercepting communications
- Man-in-the-Middle (MITM): Intercepting and altering data
- DoS/DDoS: Overwhelming server with requests
- Malware: Viruses, worms, trojans
- Social engineering: Tricking users
Cryptography Basics
- Symmetric encryption: Same key for encrypt/decrypt
- Asymmetric encryption: Public/private key pair
- Hash functions: MD5, SHA-1, SHA-256
- Digital signatures: Authentication and integrity
SSL/TLS
- Secure communication over internet
- Handshake process: Authentication, key exchange
- Certificates: Issued by Certificate Authorities (CA)
- HTTPS: HTTP over TLS
- TLS 1.3: Latest version
Firewalls
- Packet filtering: Rule-based filtering
- Stateful inspection: Tracking connections
- Application-level gateways: Deep packet inspection
- Zone-based firewalls
VPN (Virtual Private Network)
- Encrypted tunnel over public network
- Remote access security
- Site-to-site connections
- Protocols: PPTP, L2TP, IPSec, SSL/TLS
- VPN types: Access VPN, Intranet VPN, Extranet VPN
Intrusion Detection/Prevention (IDS/IPS)
- Monitoring for malicious activity
- Signature-based detection
- Anomaly-based detection
- Network-based vs Host-based
10. Network Management
SNMP (Simple Network Management Protocol)
- Monitoring and managing network devices
- Agents send information to manager
- MIBs (Management Information Base)
- Traps for alerts
- Versions: SNMPv1 (insecure), SNMPv3 (secure)
Network Monitoring
- Traffic analysis
- Bandwidth monitoring
- Device health checks
- Performance metrics: Latency, packet loss, jitter
Syslog
- Centralized logging
- Message severity levels
- Remote log collection
- Security analysis
11. Quality of Service (QoS)
QoS Parameters
- Bandwidth: Data transfer rate
- Latency: Delay in transmission
- Jitter: Variation in delay
- Packet loss: Dropped packets
- Priority: Importance of data
QoS Mechanisms
- Traffic shaping: Controlling data rate
- Prioritization: Marking traffic priority
- Congestion management
- Link efficiency
12. Network Design
LAN (Local Area Network)
- Limited geographic area
- High speed (100 Mbps - 10 Gbps)
- Low latency
- Ethernet technology
WAN (Wide Area Network)
- Large geographic area
- Lower speed
- Higher latency
- Leased lines, MPLS, Frame Relay
MAN (Metropolitan Area Network)
- City-scale network
- Between LAN and WAN
- WiFi mesh networks
Network Topology
- Star: Central hub
- Bus: Shared medium
- Ring: Circular connections
- Mesh: Multiple connections
- Hybrid: Combinations
13. Troubleshooting Tools
Ping
- Tests reachability
- ICMP echo request/reply
- Measures round-trip time
- Command:
ping www.example.com
Traceroute/Tracert
- Shows path to destination
- Hop-by-hop analysis
- Identifies latency issues
- Command:
tracert www.example.com
Ipconfig/Ifconfig
- Shows IP configuration
- DNS servers, gateways
- MAC addresses
Netstat
- Network statistics
- Active connections
- Listening ports
- Protocol statistics
Nslookup/Dig
- DNS resolution testing
- Query DNS records
- Troubleshoot DNS issues
14. Learning Path for Computer Networks
- Understand OSI model layers
- Learn TCP/IP fundamentals
- Study IP addressing and subnetting
- Master routing concepts
- Explore switching and VLANs
- Learn DNS and email protocols
- Understand wireless technologies
- Study network security
- Learn management protocols (SNMP)
- Practice troubleshooting
15. Certifications
- CompTIA Network+
- Cisco CCNA (Certified Cisco Network Associate)
- CCNP (Cisco Certified Network Professional)
- Juniper JNCIA, JNCIS
16. Career Paths
Network Administrator
- Configure and manage networks
- User support
- Basic troubleshooting
Network Engineer
- Design and optimize networks
- Complex troubleshooting
- Project implementation
Network Architect
- Strategic network design
- Enterprise solutions
- Technology selection
For more information and detailed explanations on Computer Network concepts, refer to the study materials above.