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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Which default TCP port does HTTPS use?
Answer: HTTPS uses TCP port 443 by default, while plain HTTP uses port 80.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.