Computer Networks questions and answers
OSI/TCP-IP, protocols, addressing and ports. Practise computer networks questions from the technical & programming section of placement tests, with a worked explanation after every answer. Practice is free and needs no sign-up.
Sample computer networks questions with worked answers
Question 1
Which layer of the OSI model is responsible for logical addressing and routing packets between networks?
- Data link layer
- Transport layer
- Network layer
- Session layer
Answer: C. Network layer
Explanation: The network layer (layer 3) handles logical (IP) addressing and routing. The data link layer handles frames and MAC addresses, and the transport layer provides end-to-end delivery.
Question 2
How many usable host addresses are available in a single subnet with the mask /26?
- 64
- 62
- 30
- 126
Answer: B. 62
Explanation: A /26 leaves 32 - 26 = 6 host bits, which gives 2^6 = 64 addresses. Removing the network and broadcast addresses leaves 62 usable hosts.
Question 3
In a stop-and-wait protocol, transmitting one frame takes 1 ms and the one-way propagation delay is 2 ms. Ignoring ACK transmission and processing time, what is the link utilisation (efficiency)?
- 33%
- 25%
- 20%
- 50%
Answer: C. 20%
Explanation: Efficiency = Tt / (Tt + 2 × Tp) = 1 / (1 + 4) = 0.2, or 20%. The sender is busy for 1 ms out of every 5 ms cycle.
All 30 computer networks questions with answers
- Which layer of the OSI model is responsible for logical addressing and routing…
- What is the default port number for HTTPS?
- Which protocol finds the MAC address that belongs to a known IPv4 address on a…
- Which device works at the data link layer and forwards frames based on…
- Which transport-layer protocol is connectionless and does not guarantee…
- How many usable host addresses are available in a single subnet with the mask…
- What is the broadcast address of the subnet containing the host…
- What is the correct order of segments in TCP's three-way handshake for opening…
- Which of the following is a private IPv4 address (RFC 1918)?
- A Go-Back-N ARQ protocol uses 3-bit sequence numbers. What is the maximum…
- CSMA/CD (Carrier Sense Multiple Access with Collision Detection) is the…
- In a stop-and-wait protocol, transmitting one frame takes 1 ms and the one-way…
- How many usable host addresses does the network 10.0.0.0/21 provide?
- How many redundant (parity) bits does a Hamming code need to correct…
- A TCP sender has a congestion window of 16 MSS, with the whole window in…
- What is the main job of DNS (Domain Name System)?
- What is the default port number of SMTP, the protocol used to send email…
- Which OSI layer is responsible for data representation tasks such as…
- Which protocol automatically assigns an IP address, subnet mask and default…
- How many bits long is an IPv6 address?
- What is the subnet mask, in dotted-decimal form, for a /28 prefix?
- What is the network address of the host 172.16.45.200/20?
- A Selective Repeat ARQ protocol uses 4-bit sequence numbers. What is the…
- How long does it take to transmit (put on the wire) a 1,500-byte packet on a…
- What is the maximum throughput (channel efficiency) of slotted ALOHA?
- The network 192.168.5.0/24 must be divided into equal-sized subnets, each with…
- Using CRC with the generator polynomial x^3 + x + 1 (bits 1011), what…
- On a link, transmitting one frame takes 1 ms and the one-way propagation delay…
- A TCP connection starts with cwnd = 1 MSS and ssthresh = 16 MSS. Assume no…
- An IPv4 datagram of 4,000 bytes (20-byte header + 3,980 bytes of data) must…
Computer Networks: common questions
What are computer networks questions?
OSI/TCP-IP, protocols, addressing and ports. They appear in the technical & programming section of many placement tests.
Where can I practise computer networks questions with answers for free?
Right here on LogicWiz Exams. Every computer networks question has a worked explanation after you answer. Practice is free and needs no sign-up.
How should I practise computer networks?
Start with easy questions, then move to medium and hard. Read the explanation after each answer, and come back to the ones you missed.
Start practising
On this page you can start a fresh set of computer networks questions, choose easy, medium or hard, and time yourself if you want to. Or practise the whole subject: Technical & Programming practice.
More technical & programming topics
- Pseudo-code: Trace loops, recursion and bitwise logic.
- C Programming: Output prediction, pointers and operators.
- Java: OOP, strings, collections and exceptions.
- Python: Data types, comprehensions and mutability.
- Data Structures: Arrays, stacks, queues, trees, graphs and hashing.
- Algorithms: Complexity, sorting, searching, recursion and DP.
- Object-Oriented Programming: Encapsulation, inheritance, polymorphism, abstraction.
- DBMS: Keys, normalisation, transactions and indexing.
- SQL: Joins, grouping, subqueries and query output.
- Operating Systems: Processes, scheduling, memory and deadlocks.
- Software Engineering: SDLC, testing, agile and version control.
- Cloud & DevOps: Service models, containers, CI/CD and Linux.
- GenAI Basics: LLMs, tokens, prompting, embeddings and RAG.
Other subjects
- Quantitative Aptitude: Arithmetic, percentages, time and work, speed, probability and data interpretation: the numerical section of every fresher test.
- Logical Reasoning: Series, coding-decoding, arrangements, syllogisms and puzzles: the section that separates prepared candidates from the rest.
- Verbal Ability: Vocabulary, grammar, reading comprehension and sentence order: tested in nearly every IT services hiring exam.
- Python: Python quizzes by topic, from types and strings to classes and generators: output prediction and interview concepts.
- SQL: SQL quizzes by topic, from SELECT and joins to window functions: query output and concepts for analyst and developer roles.
LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge · Test from a job description · LogicWiz Open: free team quiz · Free interview prep