Computer Networks Cheatsheet – OSI Model, Protocols, Commands
Introduction
Computer Networks is one of the most important subjects for engineering students, especially for B.Tech, IT, and Computer Science students. Whether it’s preparing for semester exams, interviews, or competitive placements, networking concepts like the OSI model, TCP/IP protocols, and basic commands are frequently tested.
This cheatsheet is designed to be your quick revision guide — simple, structured, and exam-focused. We’ll break down the OSI model layers, explain the most important protocols, list frequently used networking commands, and summarize concepts in a way that helps you revise faster and score better.

Why Study Computer Networks?
Before jumping into the technical details, here’s why networking is essential:
- Almost all communication between computers, servers, and devices happens over networks.
- Concepts like IP addressing, routing, and switching form the foundation of internet technology.
- Networking is a core subject for IT jobs and placements (e.g., system admin, network engineer, cybersecurity analyst).
- Exam questions often come from OSI model explanations, command outputs, and protocol differences.
OSI Model – The 7 Layers Explained
The OSI (Open Systems Interconnection) model is a conceptual framework used to understand how data flows across networks. It has 7 layers, each with specific roles.

1. Physical Layer (Layer 1)
- Deals with transmission of raw bits over a physical medium.
- Concerned with cables, signals, voltages, hubs.
- Example devices: Hubs, repeaters.
2. Data Link Layer (Layer 2)
- Responsible for error detection, framing, and MAC addressing.
- Example devices: Switches, bridges.
- Protocols: Ethernet, PPP.
3. Network Layer (Layer 3)
- Handles logical addressing (IP), routing, and forwarding.
- Example devices: Routers.
- Protocols: IPv4, IPv6, ICMP.
4. Transport Layer (Layer 4)
- Ensures end-to-end communication, reliability, error recovery.
- Protocols: TCP (reliable), UDP (faster, connectionless).
5. Session Layer (Layer 5)
- Manages sessions between applications.
- Example: Session establishment in video conferencing.
6. Presentation Layer (Layer 6)
- Responsible for data translation, encryption, compression.
- Example: SSL, JPEG, ASCII.
7. Application Layer (Layer 7)
- Closest to the user, provides network services to applications.
- Examples: HTTP, FTP, SMTP, DNS.
TCP/IP Model vs OSI Model
The TCP/IP model is a simplified version of the OSI model and is widely used in real-world networking.
OSI Model (7 Layers) | TCP/IP Model (4 Layers) |
---|---|
Application, Presentation, Session | Application |
Transport | Transport |
Network | Internet |
Data Link + Physical | Network Access |

Important Networking Protocols
1. HTTP & HTTPS
- HTTP: Hypertext Transfer Protocol – used for web communication.
- HTTPS: Secure version with SSL/TLS encryption.
2. FTP (File Transfer Protocol)
- Used to transfer files between client and server.
3. SMTP (Simple Mail Transfer Protocol)
- Used for sending emails.
4. DNS (Domain Name System)
- Converts domain names into IP addresses.
5. DHCP (Dynamic Host Configuration Protocol)
- Automatically assigns IP addresses to devices in a network.
6. ARP (Address Resolution Protocol)
- Resolves IP address to MAC address.
7. ICMP (Internet Control Message Protocol)
- Used for diagnostic tools like
ping
.

Common Networking Devices
- Router – Connects multiple networks and routes data.
- Switch – Connects devices within the same network using MAC addresses.
- Hub – Broadcasts data to all devices in a network.
- Firewall – Provides security by filtering traffic.

Important Networking Commands (Cheatsheet)
Here are some must-know commands for labs, viva, and exams:
Windows Commands
ipconfig
→ Displays IP configuration.ping <ip/domain>
→ Tests connectivity.tracert <domain>
→ Shows route packets take.netstat
→ Displays active connections.
Linux Commands
ifconfig
orip addr
→ Show network interfaces.ping
→ Test connectivity.traceroute
→ Show route to destination.netstat -tulnp
→ Display active sockets.nslookup <domain>
→ Get DNS info.
Key Networking Exam Notes
- TCP vs UDP: TCP is reliable but slower, UDP is faster but less reliable.
- IPv4 vs IPv6: IPv4 is 32-bit, IPv6 is 128-bit with larger address space.
- Switch vs Hub: Switch is more efficient as it sends data only to the intended device.
- Subnetting: Dividing an IP network into smaller subnetworks for efficiency.
- Port Numbers:
- HTTP: 80
- HTTPS: 443
- FTP: 21
- SMTP: 25
- DNS: 53

FAQs on Computer Networks
Q1. What is the difference between TCP and UDP?
TCP provides reliable, connection-oriented communication, while UDP is faster but connectionless and unreliable.
Q2. Why is the OSI model important?
It standardizes communication between different systems and helps understand how networking works at each layer.
Q3. What is the difference between IPv4 and IPv6?
IPv4 uses 32-bit addressing (4.3 billion addresses), while IPv6 uses 128-bit addressing (virtually unlimited addresses).
Q4. Which commands are most important for viva and exams?ipconfig
, ping
, tracert
, netstat
(Windows) and ifconfig
, ping
, traceroute
(Linux).
Q5. What is the real-world use of DNS?
DNS resolves human-friendly domain names (like google.com) into machine-friendly IP addresses.
Conclusion
This Computer Networks Cheatsheet covered the OSI model, TCP/IP comparison, important networking protocols, devices, and essential commands. If you’re preparing for B.Tech exams, interviews, or placements, this guide is your quick revision tool.
Remember, while this cheatsheet simplifies concepts, it’s always useful to practice commands hands-on and solve past exam questions for better retention.
[CTA BUTTON: Download PDF Version of This Cheatsheet — Link: https://btechcheatsheets.com/download/computer-networks-cheatsheet]