Computer Networks
Computer networks connect hosts so that they can exchange data. Exams ask the OSI and TCP/IP layers, which device works at which layer, IPv4 addressing and subnetting, well-known ports and protocols, topologies, Ethernet access and transmission time.
What should you know about Computer Networks?
- MAC addresses: A switch learns which MAC address is on which port and sends each frame only there, unlike a hub that repeats to all ports.
- allow or block traffic between networks according to rules: Packet filters check addresses and ports; stateful firewalls also track connections.
- 80: IANA: HTTP 80, HTTPS 443, FTP 21 (control), SSH 22, Telnet 23, SMTP 25, DNS 53.
- TCP: TCP sets up a connection (three-way handshake), numbers and acknowledges segments; UDP is connectionless and faster.
Which formulas and rules are used in Computer Networks?
hosts = 2^(32 − p) − 2
e.g. usable hosts in a /p subnet
network = IP AND mask; broadcast = network with host bits all 1
e.g. subnet addresses
links = n (n − 1) ÷ 2
e.g. full mesh
t = size (bits) ÷ bandwidth (bit/s)
e.g. transmission time
What are the shortcuts for Computer Networks questions?
- OSI bottom to top: Please Do Not Throw Sausage Pizza Away (Physical, Data link, Network, Transport, Session, Presentation, Application).
- Hub L1, switch L2 (MAC), router L3 (IP).
- Ports: 20/21 FTP, 22 SSH, 23 Telnet, 25 SMTP, 53 DNS, 80 HTTP, 110 POP3, 143 IMAP, 443 HTTPS.
- The three wrong options are always of the same kind as the answer (four Articles, four years, four names). Recall one firm fact about each option and strike out the ones you are sure of.
How do you solve Computer Networks questions? Worked examples
Example 1
Which cable is least affected by electromagnetic interference?
Options: coaxial cable; flat ribbon cable; optical fibre; unshielded twisted pair
Solution
Fibre carries light, so electrical noise cannot couple into it; it also gives the highest bandwidth and distance.
Answer: optical fibre
Example 2
Classic Ethernet (IEEE 802.3) uses which access method?
Options: CSMA/CA; CSMA/CD; polling; token passing
Solution
CSMA/CD: listen, transmit, and back off on a collision. Wi-Fi (802.11) uses CSMA/CA because radios cannot detect collisions while sending.
Answer: CSMA/CD
Example 3
How many usable host addresses does a /26 subnet have?
Solution
- Host bits = 32 − 26 = 6; 2⁶ = 64 addresses.
- 64 − 2 = 62 usable hosts.
Answer: 62
What mistakes should you avoid in Computer Networks?
- Subtract 2 for usable hosts (network and broadcast addresses) but not when counting subnets.
- 1 byte = 8 bits: a 10 MB file over 10 Mbps takes 8 s, not 1 s.
- Read the question word carefully: NOT, FIRST, LAST, "correct" and "incorrect" turn the answer around.
Sources: NIELIT O-Level syllabus (networks, C programming, DBMS) and standard computer science textbook - textbook fact · IANA Service Name and Transport Protocol Port Number Registry
Computer Networks question book: practice each sub-topic
- Computer Networks
Question book · 1 chapters
Computer Networks
How many usable host addresses does an IPv4 /22 subnet have?
Solution
- Host bits = 32 − 22 = 10
- Hosts = 2^10 − 2 = 1,022 (network and broadcast addresses excluded)
Answer: 1,022
Open the book to turn the pages: every question with its answer and full solution.
Ready? Take a mock: fresh questions every time, each with a step-by-step solution.