DSA Tracker

DSA Tracker

← Back to interactive practice

Print or save this cheat sheet to PDF for quick interview revision.

Computer Networks: Top 40 Fresher Interview Questions

Ranked by how many of the surveyed prep sources list each question. Curated for fast active recall.

Q1 • cn-001easy • 19 sources

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

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

Q2 • cn-002medium • 14 sources

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

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

Q3 • cn-003easy • 14 sources

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

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

Q4 • cn-004medium • 13 sources

Differentiate between TCP and UDP.

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

Q5 • cn-005easy • 12 sources

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

Answer: 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.

Q6 • cn-006easy • 12 sources

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

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

Q7 • cn-007easy • 12 sources

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

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

Q8 • cn-008medium • 11 sources

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

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

Q9 • cn-009easy • 11 sources

What is a network topology? Explain its types.

Answer: 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.

Q10 • cn-010medium • 11 sources

The IPv4 address 192.168.1.10 falls in which classful range?

Answer: The first octet decides the classful range, and 192 in the first octet means class C.

Q11 • cn-011medium • 10 sources

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

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

Q12 • cn-012medium • 10 sources

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

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

Q13 • cn-013medium • 10 sources

What is a firewall?

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

Q14 • cn-014medium • 9 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?

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

Q15 • cn-015easy • 9 sources

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

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

Q16 • cn-016easy • 9 sources

Which default TCP port does HTTPS use?

Answer: HTTPS uses TCP port 443 by default, while plain HTTP uses port 80.

Q17 • cn-017medium • 8 sources

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

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

Q18 • cn-018medium • 8 sources

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

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

Q19 • cn-019medium • 8 sources

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

Answer: 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.

Q20 • cn-020hard • 7 sources

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

Answer: 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.

Q21 • cn-021medium • 7 sources

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

Answer: 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.

Q22 • cn-022medium • 7 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?

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

Q23 • cn-023medium • 7 sources

What does ARP do on a local Ethernet LAN?

Answer: 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.

Q24 • cn-024easy • 7 sources

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

Answer: SMTP uses TCP port 25 by default for transferring mail between mail servers.

Q25 • cn-025easy • 7 sources

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

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

Q26 • cn-026medium • 7 sources

What are symmetric and asymmetric encryption?

Answer: 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.

Q27 • cn-027easy • 6 sources

What are nodes and links?

Answer: 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.

Q28 • cn-028hard • 6 sources

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

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

Q29 • cn-029medium • 6 sources

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

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

Q30 • cn-030easy • 6 sources

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

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

Q31 • cn-031medium • 6 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?

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

Q32 • cn-032easy • 6 sources

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

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

Q33 • cn-033easy • 6 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?

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

Q34 • cn-034medium • 6 sources

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

Answer: 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.

Q35 • cn-035medium • 5 sources

Which statement best separates flow control from congestion control?

Answer: 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.

Q36 • cn-036medium • 5 sources

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

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

Q37 • cn-037easy • 5 sources

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

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

Q38 • cn-038medium • 5 sources

How does traceroute discover the routers along a path?

Answer: 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.

Q39 • cn-039easy • 5 sources

What does a point-to-point link connect?

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

Q40 • cn-040easy • 5 sources

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

Answer: In client/server networking, the client starts each request and the server listens, responds and usually serves many clients.

DSA Tracker • https://dsatracker.tech/core-cs/cn