DSA Tracker

DSA Tracker

Computer Networks interview practice

The 40 networking questions, ranked by how many of the surveyed prep sources list each one.

Computer Networks Interview Questions (All 40 Reference)

Printable cheat sheet →
#1 (cn-001)•easy•Asked in 19 surveyed sources

What is the OSI model, and what are its seven layers?

Interview one-liner: The OSI model is a seven-layer reference model that splits network communication into physical, data link, network, transport, session, presentation and application functions.

#2 (cn-002)•medium•Asked in 14 surveyed sources

What is DNS, and why is it organised as a hierarchy?

Interview one-liner: DNS is a distributed, hierarchical naming system that maps domain names such as example.com to IP addresses.

#3 (cn-003)•easy•Asked in 14 surveyed sources

What is the TCP/IP model, and how many layers does it have?

Interview one-liner: The TCP/IP model is the practical internet reference model, usually taught as four layers: network access, internet, transport and application.

#4 (cn-004)•medium•Asked in 13 surveyed sources

Differentiate between TCP and UDP.

Interview one-liner: TCP provides reliable, ordered, connection-oriented delivery, while UDP sends independent datagrams with no delivery guarantee but less overhead.

#5 (cn-005)•easy•Asked in 12 surveyed sources

On a LAN, which device forwards a unicast frame only to the port where its destination MAC address is attached?

Interview one-liner: A switch learns the MAC address behind each port and forwards a known unicast frame only out of the port that leads to its destination.

#6 (cn-006)•easy•Asked in 12 surveyed sources

Which type of network connects hosts within a geographically limited area such as a single office building under one administrative domain?

Interview one-liner: A LAN connects hosts within a single building or office suite, while MANs span cities and WANs connect wider regions.

#7 (cn-007)•easy•Asked in 12 surveyed sources

How many bits long is a standard IEEE 802 (Ethernet or Wi-Fi) MAC address?

Interview one-liner: A standard IEEE 802 MAC address is 48 bits long, identifying a network interface on one link.

#8 (cn-008)•medium•Asked in 11 surveyed sources

Explain the TCP three-way handshake and why TCP uses three messages instead of two.

Interview one-liner: The TCP three-way handshake is SYN, SYN-ACK, ACK, and it sets up sequence numbers on both sides before any data flows.

#9 (cn-009)•easy•Asked in 11 surveyed sources

What is a network topology? Explain its types.

Interview one-liner: Network topology is the arrangement of nodes and links, such as bus, star, ring, mesh or tree, and it shapes cost, fault tolerance and performance.

#10 (cn-010)•medium•Asked in 11 surveyed sources

The IPv4 address 192.168.1.10 falls in which classful range?

Interview one-liner: The first octet decides the classful range, and 192 in the first octet means class C.

#11 (cn-011)•medium•Asked in 10 surveyed sources

A subnet uses mask 255.255.255.0, written /24. How many usable host addresses does it have?

Interview one-liner: A /24 subnet has 256 addresses, of which 254 are usable by hosts after the network and broadcast addresses are excluded.

#12 (cn-012)•medium•Asked in 10 surveyed sources

What is the use of a router, and how is it different from a gateway?

Interview one-liner: A router forwards IP packets between networks, while a gateway is the broader term for any node that joins networks or protocols.

#13 (cn-013)•medium•Asked in 10 surveyed sources

What is a firewall?

Interview one-liner: A firewall is a filter between networks that allows or drops traffic by matching rules on addresses, ports and protocols.

#14 (cn-014)•medium•Asked in 9 surveyed sources

A home router rewrites the private source address of outgoing packets to its single public address and uses port numbers to track each connection. Which technique is this?

Interview one-liner: NAT rewrites private source addresses to one public address, and port numbers let the router match each reply to the right host.

#15 (cn-015)•easy•Asked in 9 surveyed sources

In the DHCP DORA sequence, what is the first message a new host sends, and how is it addressed?

Interview one-liner: DORA is Discover, Offer, Request, Acknowledge, and a new host starts it with a broadcast Discover because it has no address yet.

#16 (cn-016)•easy•Asked in 9 surveyed sources

Which default TCP port does HTTPS use?

Interview one-liner: HTTPS uses TCP port 443 by default, while plain HTTP uses port 80.

#17 (cn-017)•medium•Asked in 8 surveyed sources

What is a VPN, and what are its main types?

Interview one-liner: A VPN builds an encrypted tunnel over an untrusted network so remote users or sites can reach a private network as if locally connected.

#18 (cn-018)•medium•Asked in 8 surveyed sources

Which IEEE standard defines the 4-byte tag that carries a VLAN ID inside an Ethernet frame?

Interview one-liner: IEEE 802.1Q defines the four-byte VLAN tag that lets one trunk link carry frames from several VLANs.

#19 (cn-019)•medium•Asked in 8 surveyed sources

Which of these IPv4 addresses is a private address under RFC 1918?

Interview one-liner: The RFC 1918 private blocks are 10/8, 172.16/12 and 192.168/16, and routers on the public internet do not forward them.

#20 (cn-020)•hard•Asked in 7 surveyed sources

Explain what happens when you enter a URL in a browser.

Interview one-liner: Entering a URL involves a DNS lookup (with ARP for the gateway if needed), a TCP and TLS connection, an HTTP request and response, and then page rendering.

#21 (cn-021)•medium•Asked in 7 surveyed sources

Differentiate the OSI reference model from the TCP/IP reference model.

Interview one-liner: The OSI model is a seven-layer reference model, while TCP/IP is the layered model the internet actually runs, with four or five layers depending on the course.

#22 (cn-022)•medium•Asked in 7 surveyed sources

A packet's TTL field starts at 5 and each router along the path decrements it by one. What happens when the TTL reaches zero?

Interview one-liner: When TTL hits zero, the router drops the packet and returns an ICMP Time Exceeded message, which stops loops from circulating forever.

#23 (cn-023)•medium•Asked in 7 surveyed sources

What does ARP do on a local Ethernet LAN?

Interview one-liner: ARP maps an IP address to the MAC address of the host on the same LAN that owns it, using a broadcast request and a unicast reply.

#24 (cn-024)•easy•Asked in 7 surveyed sources

Which TCP port does SMTP use by default for server-to-server mail transfer?

Interview one-liner: SMTP uses TCP port 25 by default for transferring mail between mail servers.

#25 (cn-025)•easy•Asked in 7 surveyed sources

In anonymous FTP, what login name does a user typically supply?

Interview one-liner: Anonymous FTP lets a user log in with the username anonymous, usually with an email address as the password, and see only public files.

#26 (cn-026)•medium•Asked in 7 surveyed sources

What are symmetric and asymmetric encryption?

Interview one-liner: Symmetric encryption uses one shared secret key and is fast, while asymmetric encryption uses a public and private key pair and solves the key-sharing problem.

#27 (cn-027)•easy•Asked in 6 surveyed sources

What are nodes and links?

Interview one-liner: In a network, a node is any device that sends, receives or forwards data, and a link is the connection between two directly connected nodes.

#28 (cn-028)•hard•Asked in 6 surveyed sources

Which algorithm does OSPF run on its link-state database to compute shortest paths?

Interview one-liner: OSPF routers flood link state, then each runs Dijkstra's algorithm on the shared map to find shortest paths.

#29 (cn-029)•medium•Asked in 6 surveyed sources

What is a proxy server? Explain forward proxy versus reverse proxy.

Interview one-liner: A forward proxy acts for clients reaching outside servers, while a reverse proxy acts for servers, receiving client requests and forwarding them to backends.

#30 (cn-030)•easy•Asked in 6 surveyed sources

What is a protocol, and what are its main elements?

Interview one-liner: A network protocol is a set of agreed rules for exchanging messages, and its main elements are syntax, semantics and timing.

#31 (cn-031)•medium•Asked in 6 surveyed sources

A 1,000-bit packet is sent on a 1 Mbps link. What is its transmission delay, and how does it differ from propagation delay?

Interview one-liner: Transmission delay is packet length divided by link rate, while propagation delay is distance divided by signal speed in the medium.

#32 (cn-032)•easy•Asked in 6 surveyed sources

In TCP and UDP transport-layer multiplexing, which range of 16-bit port numbers is designated as the well-known ports?

Interview one-liner: Well-known ports are port numbers 0 to 1023, reserved by IANA for standard server services like HTTP (80) and HTTPS (443).

#33 (cn-033)•easy•Asked in 6 surveyed sources

A video stream sends one copy of each frame to a group of receivers that have joined a group address. Which type of transmission is this?

Interview one-liner: Multicast sends one copy to a group address, and only the hosts that joined that group receive it.

#34 (cn-034)•medium•Asked in 6 surveyed sources

What happens to a data packet as it moves through the OSI model?

Interview one-liner: As data moves down the stack, each layer wraps it in its own header, and the receiver removes those headers in reverse order on the way up.

#35 (cn-035)•medium•Asked in 5 surveyed sources

Which statement best separates flow control from congestion control?

Interview one-liner: Flow control matches a sender to one receiver's buffer, while congestion control matches the sender's rate to the load on the whole network.

#36 (cn-036)•medium•Asked in 5 surveyed sources

What is the maximum number of hops a RIP route can span before it is treated as unreachable?

Interview one-liner: RIP uses hop count as its only metric, so any route of 16 hops or more is treated as unreachable.

#37 (cn-037)•easy•Asked in 5 surveyed sources

Which protocol carries the destination unreachable and time exceeded messages that routers send back to a source?

Interview one-liner: ICMP is the network-layer protocol that carries error reports and diagnostic messages, including the echo messages ping uses.

#38 (cn-038)•medium•Asked in 5 surveyed sources

How does traceroute discover the routers along a path?

Interview one-liner: Traceroute sends probes with TTL 1, 2, 3 and so on, and each router that expires a probe reveals itself through an ICMP Time Exceeded reply.

#39 (cn-039)•easy•Asked in 5 surveyed sources

What does a point-to-point link connect?

Interview one-liner: A point-to-point link joins exactly two nodes, so no other node shares the medium.

#40 (cn-040)•easy•Asked in 5 surveyed sources

In a client/server network, which role starts the request and which role waits to answer?

Interview one-liner: In client/server networking, the client starts each request and the server listens, responds and usually serves many clients.

More interview rounds