1. Computer Networks & Classification
A Computer Network is an interconnection of two or more autonomous computing devices enabling resource sharing (hardware, files), communication, and central management.
| Type |
Coverage Span |
Speed / Latency |
Transmission Tech / Example |
| PAN (Personal Area Net) |
Up to ~10 meters |
High speed / Low latency |
Bluetooth (IEEE 802.15.1), Zigbee, Smartwatch sync |
| LAN (Local Area Net) |
Up to 1 km (Office/Home) |
Very High (up to 10Gbps) |
Ethernet (IEEE 802.3), Wi-Fi (IEEE 802.11) |
| CAN (Campus Area Net) |
1 km – 5 km |
High speed |
Interconnected LANs across a university/military campus |
| MAN (Metropolitan Net) |
5 km – 50 km (Citywide) |
Medium speed |
Coaxial Cable TV networks, Municipal Wi-Fi, ATM networks |
| WAN (Wide Area Net) |
Country / Worldwide |
Lower relative speed |
Fiber undersea cables, Satellites. The Internet is the largest WAN. |
2. Network Topologies in Depth
Topology refers to the structural layout—both physical cabling layout and logical data flow—of nodes in a network.
BUS TOPOLOGY STAR TOPOLOGY RING TOPOLOGY
[Node] [Node] [Node] [Node] [Node] ─── [Node]
│ │ │ │ │ │
───┴──────┴──────┴─── Backbone [HUB] ─── [Node] │ │
│ [Node] ─── [Node]
[Node]
- Bus Topology: Nodes connect to a single central coaxial cable (Backbone) terminated at both ends. Half-duplex. If the main cable snaps, the entire network crashes.
- Star Topology: Every node connects directly to a central Hub/Switch via point-to-point links. Most widely used topology today. If the central device fails, the whole network goes down.
- Ring Topology: Nodes linked sequentially in a circular loop. Uses token passing (Token Ring - IEEE 802.5) to eliminate data collisions.
- Mesh Topology: Every node connects to every other node (Full Mesh). Maximum reliability and redundancy.
- Total Physical Links required for n nodes = n(n - 1) / 2
- I/O Ports required per node = n - 1
- Tree Topology: Hierarchical combination of Star and Bus topologies, branching out from a root node.
3. Comprehensive Network Hardware & Devices
| Layer (OSI Model) |
Network Device |
Primary Function |
| Layer 1 (Physical) |
Repeater |
Amplifies and regenerates weak incoming signals over long distances. |
| Layer 1 (Physical) |
Hub |
Non-intelligent multiport device; broadcasts data to ALL connected ports. Shared collision domain. |
| Layer 1 (Physical) |
Modem |
Converts digital signals to analog (Modulation) & analog to digital (Demodulation). |
| Layer 2 (Data Link) |
Switch |
Intelligent multiport device; unicasts data using a MAC Table (CAM Table). Separate collision domains. |
| Layer 2 (Data Link) |
Bridge |
Divides large LANs into smaller segments based on MAC addresses. |
| Layer 3 (Network) |
Router |
Connects distinct networks (LAN to WAN/Internet); routes packets using IP Addresses. |
| Layers 4 – 7 |
Gateway |
Protocol converter connecting two incompatible networks with different protocols. |
| Layers 3 – 7 |
Firewall |
Hardware/software security system that filters traffic based on defined security rules. |
4. Transmission Media
- Twisted Pair Cable: Copper wires twisted to reduce electromagnetic crosstalk. Uses RJ-45 connectors (UTP / STP). Ethernet standard.
- Coaxial Cable: Central copper wire with braided shielding. Used for Cable TV and older bus networks (BNC connectors).
- Fiber Optic Cable: Transmits data as pulses of light using Total Internal Reflection. Immune to electromagnetic interference; ultra-high speed and bandwidth.
- Wireless Transmission: Radio waves (Omnidirectional, penetrates walls), Microwaves (Line-of-sight), Infrared (Short range, cannot pass walls).
5. OSI Reference Model vs TCP/IP Suite
Mnemonic for 7 OSI Layers (Bottom to Top):
Please Do Not Touch Semantic Pet Animals
(Physical → Data Link → Network → Transport → Session → Presentation → Application)
| Layer # |
OSI Layer Name |
Data Unit |
Core Function & Associated Protocols |
| 7 |
Application Layer |
Data |
User interface, web & email applications (HTTP, HTTPS, FTP, SMTP, DNS) |
| 6 |
Presentation Layer |
Data |
Encryption, Decryption, Data Compression, Syntax formatting (SSL, TLS, JPEG) |
| 5 |
Session Layer |
Data |
Establishes, maintains, and terminates session connections (NetBIOS, RPC) |
| 4 |
Transport Layer |
Segments / Datagrams |
End-to-end reliability, port addressing, flow control (TCP, UDP) |
| 3 |
Network Layer |
Packets |
Logical Routing across networks using IP addresses (IP, ICMP, ARP, Router) |
| 2 |
Data Link Layer |
Frames |
Physical MAC addressing, error detection, framing (Switch, Bridge, Ethernet) |
| 1 |
Physical Layer |
Bits |
Raw binary bit transmission over physical media (Hub, Repeater, Cables) |
6. Detailed IP Addressing & MAC Addressing
A. IPv4 vs IPv6 Comparison
| Feature |
IPv4 (IP Version 4) |
IPv6 (IP Version 6) |
| Address Size | 32 bits (4 Bytes) | 128 bits (16 Bytes) |
| Notation Format | 4 decimal numbers separated by dots (`192.168.1.1`) | 8 hex groups separated by colons (`2001:db8::1`) |
| Total Addresses | 232 ≈ 4.3 Billion | 2128 (Virtually unlimited) |
| Loopback Address | `127.0.0.1` | `::1` |
B. IPv4 Classes & Subnet Masks
| Class |
1st Octet Range |
Default Subnet Mask |
Network / Host Bits |
Primary Purpose |
| Class A | 1 – 126 | `255.0.0.0` | 8 Net / 24 Host | Very Large Organizations |
| Class B | 128 – 191 | `255.255.0.0` | 16 Net / 16 Host | Medium Networks & Universities |
| Class C | 192 – 223 | `255.255.255.0` | 24 Net / 8 Host | Small Local Networks (Home/Office) |
| Class D | 224 – 239 | Undefined | Multicasting | Reserved for Multicast Groups |
| Class E | 240 – 255 | Undefined | Experimental | Reserved for Research & R&D |
*Note: 127.X.X.X is strictly reserved for Loopback internal testing.
C. MAC Address
Hardware/Physical address permanently burned into the Network Card. 48 bits (6 Bytes) long written in Hexadecimal (e.g., `00-1A-2B-3C-4D-5E`). First 24 bits represent the manufacturer OUI.
7. Network Protocols & Port Numbers Cheat-Sheet
| Protocol |
Full Form |
Port # |
Key Function |
| FTP | File Transfer Protocol | 20 / 21 | Transferring files between client and server |
| SSH | Secure Shell | 22 | Encrypted secure remote terminal access |
| TELNET | Telecommunication Network | 23 | Unencrypted plaintext remote terminal access |
| SMTP | Simple Mail Transfer Protocol | 25 | Sending / Pushing outgoing email messages |
| DNS | Domain Name System | 53 | Translates Domain Names → IP Addresses ("Phonebook of Internet") |
| DHCP | Dynamic Host Config Protocol | 67 / 68 | Automatically assigns IP addresses to network devices |
| HTTP | Hypertext Transfer Protocol | 80 | Unencrypted web page transfer over WWW |
| POP3 | Post Office Protocol v3 | 110 | Downloading email from server to client (deletes on server) |
| IMAP | Internet Message Access Protocol | 143 | Synchronized email retrieval keeping copy on server |
| HTTPS | HTTP Secure | 443 | Encrypted web transmission via SSL/TLS |
8. World Wide Web & Web Browsers
- World Wide Web (WWW): Invented by Tim Berners-Lee in 1989 at CERN.
- First Web Browser: WorldWideWeb (1990) by Tim Berners-Lee. First graphical browser: Mosaic (1993) by Marc Andreessen.
- First Search Engine: Archie (1990) by Alan Emtage.
- Cookies: Small text files saved on a user's browser by websites to store session data, user preferences, and shopping carts.
9. Practice Questions (UPSSSC Pattern)
1. How many physical cable links are required to build a fully connected Full Mesh topology with 6 computer nodes?
A) 12 B) 15 [Formula: 6×5/2] C) 30 D) 36
2. Which IPv4 address octet range represents Class C networks?
A) 1 – 126 B) 128 – 191 C) 192 – 223 D) 224 – 239
3. Which OSI layer is responsible for data encryption, compression, and syntax formatting?
A) Application Layer B) Presentation Layer C) Session Layer D) Transport Layer
4. Which protocol is used specifically to send (push) outgoing emails from a client to a server?
A) POP3 B) IMAP C) SMTP D) SNMP