๐ COMPUTER NETWORKS โ DETAILED NOTES
๐ง 1. Introduction to Computer Networks
๐น Definition
A computer network is a collection of interconnected computers that share resources and data using communication channels.
๐น Goals of Networking
- Resource sharingย (hardware/software)
- Communicationย (email, chat)
- Data sharing
- Backup and reliability
- Scalability
โ๏ธ 2. Types of Computer Networks
| Type | Coverage Area | Example |
|---|
| PAN (Personal Area Network) | Within a few meters | Bluetooth, Hotspot |
| LAN (Local Area Network) | Within a building/campus | Office network |
| MAN (Metropolitan Area Network) | Within a city | Cable TV network |
| WAN (Wide Area Network) | Across countries | Internet |
| WLAN (Wireless LAN) | Wireless version of LAN | Wi-Fi |
| SAN (Storage Area Network) | High-speed data storage | Data centers |
๐ 3. Network Topologies
๐น Definition
Network topology defines the physical or logical arrangement of devices in a network.
| Type | Description | Advantages | Disadvantages |
|---|
| Bus | Single backbone cable | Easy to install | Difficult fault detection |
| Star | Central hub connects all nodes | Easy to manage | Hub failure breaks network |
| Ring | Each node connects to next forming a circle | Predictable data flow | One node failure affects all |
| Mesh | Every node connects to every other | Reliable, fault-tolerant | Expensive |
| Tree | Hierarchical structure | Easy to expand | Root failure affects all |
| Hybrid | Mix of topologies | Flexible | Complex |
๐งฎ 4. Network Devices
| Device | Function |
|---|
| Hub | Broadcasts data to all devices (Layer 1). |
| Switch | Forwards data to specific device (Layer 2). |
| Router | Connects different networks (Layer 3). |
| Bridge | Connects two LAN segments. |
| Gateway | Converts data between protocols (Layer 7). |
| Modem | Converts digital โ analog signals. |
| Repeater | Regenerates weak signals. |
| Access Point | Enables wireless connectivity. |
| Firewall | Monitors & filters traffic for security. |
๐งฉ 5. Network Models
๐น A. OSI Model (Open Systems Interconnection)
Developed by ISO โ defines 7 layers of network communication.
| Layer No. | Name | Function | Devices/Protocols |
|---|
| 7 | Application | Network services to user | HTTP, FTP, SMTP |
| 6 | Presentation | Data translation, encryption | SSL, JPEG, ASCII |
| 5 | Session | Manage sessions between devices | NetBIOS, RPC |
| 4 | Transport | Reliable data delivery | TCP, UDP |
| 3 | Network | Logical addressing & routing | IP, ICMP, Router |
| 2 | Data Link | Error detection, framing | Switch, Ethernet, PPP |
| 1 | Physical | Transmission of bits | Cables, Hubs |
๐น Mnemonic:
๐ All People Seem To Need Data Processing
๐น B. TCP/IP Model
| Layer | Description | Example Protocols |
|---|
| Application | User interaction | HTTP, FTP, DNS |
| Transport | End-to-end connection | TCP, UDP |
| Internet | Logical addressing & routing | IP, ICMP |
| Network Access | Physical transmission | Ethernet, Wi-Fi |
๐น Comparison (OSI vs TCP/IP)
| OSI | TCP/IP |
|---|
| 7 layers | 4 layers |
| Theoretical model | Practical model |
| Strictly defined | Flexible |
| Developed by ISO | Developed by DoD (U.S.) |
๐ง 6. Transmission Media
๐น A. Guided Media (Wired)
| Type | Description | Bandwidth | Example |
|---|
| Twisted Pair Cable | Two wires twisted to reduce interference | Low | Telephone, LAN |
| Coaxial Cable | Central copper core with insulation | Medium | Cable TV |
| Optical Fiber | Uses light signals | Very High | Backbone networks |
๐น B. Unguided Media (Wireless)
| Type | Example | Range |
|---|
| Radio Waves | Wi-Fi, Bluetooth | Short to medium |
| Microwaves | Cellular networks | Long |
| Infrared | Remote controls | Short |
| Satellite Communication | GPS, TV broadcasting | Global |
๐ก 7. Network Protocols
| Protocol | Purpose | Layer |
|---|
| HTTP/HTTPS | Web access | Application |
| FTP/SFTP | File transfer | Application |
| SMTP/POP3/IMAP | Email | Application |
| DNS | Domain name resolution | Application |
| DHCP | Dynamic IP allocation | Application |
| ARP | Maps IP to MAC | Data Link |
| ICMP | Error reporting (ping) | Network |
| IP (IPv4/IPv6) | Logical addressing | Network |
| TCP | Reliable, connection-oriented | Transport |
| UDP | Fast, connectionless | Transport |
๐งฎ 8. Switching Techniques
| Type | Description | Example |
|---|
| Circuit Switching | Dedicated path for entire session | Telephone |
| Packet Switching | Data divided into packets | Internet |
| Message Switching | Entire message stored then forwarded | Telegraph |
๐ง 9. Transmission Modes
| Mode | Description | Example |
|---|
| Simplex | One-way communication | Monitor |
| Half Duplex | Both ways, one at a time | Walkie-talkie |
| Full Duplex | Both directions simultaneously | Telephone |
๐ถ 10. IP Addressing
๐น IPv4
- 32-bit address (e.g., 192.168.1.1)
- Represented inย dotted decimalย format
- Classes:
| Class | Range | Default Mask | Use |
|---|
| A | 0โ127 | 255.0.0.0 | Large networks |
| B | 128โ191 | 255.255.0.0 | Medium networks |
| C | 192โ223 | 255.255.255.0 | Small networks |
| D | 224โ239 | Multicasting | |
| E | 240โ255 | Experimental | |
๐น IPv6
- 128-bit address (e.g., 2001:0db8::1)
- Supports huge address space
- Includes built-in security & QoS
๐งฉ 11. Routing
๐น Definition
Routing is the process of selecting best path for data transmission in a network.
๐น Types of Routing
| Type | Description |
|---|
| Static Routing | Fixed manually by admin |
| Dynamic Routing | Routers update routes automatically |
| Default Routing | All unknown packets go to default router |
๐น Routing Algorithms
| Algorithm | Type | Example |
|---|
| Distance Vector | Based on distance (hop count) | RIP |
| Link State | Uses complete network topology | OSPF |
| Hybrid | Combines both | EIGRP |
๐งฎ 12. Error Detection and Correction
| Method | Description |
|---|
| Parity Bit | Adds extra bit to detect errors |
| Checksum | Summation of data blocks |
| CRC (Cyclic Redundancy Check) | Polynomial-based error detection |
| Hamming Code | Detects & corrects single-bit errors |
๐ 13. Network Security
๐น Security Goals
- Confidentialityย โ Prevent unauthorized access
- Integrityย โ Data not altered
- Availabilityย โ Services always available
๐น Common Attacks
| Attack | Description |
|---|
| Phishing | Fraudulent emails/websites |
| DoS / DDoS | Overloading systems to crash |
| Spoofing | Faking IP or identity |
| Sniffing | Intercepting data packets |
| Malware / Trojan / Worms | Malicious software |
๐น Security Mechanisms
- Encryption (AES, RSA)
- Authentication (Username/Password, OTP)
- Firewalls & Intrusion Detection Systems (IDS)
- VPN (Virtual Private Network)
๐งฉ 14. Cryptography Basics
| Term | Meaning |
|---|
| Plaintext | Original message |
| Ciphertext | Encrypted message |
| Encryption | Converting plaintext โ ciphertext |
| Decryption | Ciphertext โ plaintext |
| Key | Secret used in encryption/decryption |
๐น Types
| Type | Description | Example |
|---|
| Symmetric | Same key used for both | AES, DES |
| Asymmetric | Public & private keys | RSA |
| Hashing | One-way encryption | SHA, MD5 |
๐ 15. Network Layers in TCP/IP Stack
| Layer | Protocol | Role |
|---|
| Application | HTTP, DNS, FTP | User interaction |
| Transport | TCP, UDP | Data delivery |
| Internet | IP, ICMP | Routing |
| Network Access | Ethernet, Wi-Fi | Data transmission |
๐งฎ 16. Network Address Translation (NAT)
๐น Definition
Technique used to map private IPs to public IPs for internet access.
๐น Types
| Type | Description |
|---|
| Static NAT | One-to-one mapping |
| Dynamic NAT | Many-to-many mapping |
| PAT (Port Address Translation) | Many-to-one mapping (home routers) |
๐งฑ 17. Domain Name System (DNS)
๐น Purpose
Converts domain names to IP addresses.
e.g., www.google.com โ 142.250.196.36
๐น Hierarchy
Root โ TLD (.com, .org) โ Domain โ Subdomain
๐ก 18. Network Performance Metrics
| Metric | Meaning |
|---|
| Bandwidth | Data rate (bits/sec) |
| Latency | Delay in transmission |
| Throughput | Actual data transmitted/sec |
| Jitter | Variation in delay |
| Packet Loss | Lost packets during transmission |
๐งญ 19. Wireless Networking
| Technology | Description |
|---|
| Wi-Fi (IEEE 802.11) | Wireless LAN |
| Bluetooth (IEEE 802.15) | Short-range PAN |
| WiMAX (IEEE 802.16) | Long-range wireless broadband |
| 4G/5G | Mobile communication |
| NFC | Contactless payment tech |
๐ 20. Emerging Networking Technologies
- IoT (Internet of Things)ย โ Connecting smart devices
- SDN (Software-Defined Networking)ย โ Centralized network control
- Cloud Networkingย โ Virtualized networks in cloud
- Edge Computingย โ Data processing near source
- 6G Networks (Future)ย โ High-speed, AI-driven communication
โ
21. Summary Table
| Concept | Key Point |
|---|
| Network | Interconnected devices |
| Topology | Physical arrangement |
| Protocol | Communication rules |
| OSI Model | 7 layers |
| TCP/IP | 4 layers |
| IP Address | Logical identifier |
| Switching | Path selection |
| Routing | Finding best route |
| Error Control | CRC, Hamming |
| Security | Encryption, Firewall |
| Wireless |