Blog/Computer Networks Interview Questions for Freshers: 25 With Answers

Computer Networks Interview Questions for Freshers: 25 With Answers

25 fresher-level computer networks interview questions with complete answers tied to the RFCs, a topic-weighting table and a 7-day plan.

Last updated: 13 October 2026 · By the Asuraa Team

Quick answer: The computer networks interview questions freshers face most cover the OSI and TCP/IP models, TCP vs UDP, the three-way handshake, IPv4 vs IPv6, subnetting, DNS, HTTP methods and status codes, and HTTPS with TLS. Quote current standards: RFC 9293 (August 2022) is the current TCP specification, replacing RFC 793. Answer with a definition, the reason it matters and a concrete example.

Key takeaways

  • Fresher networking interviews concentrate on the OSI and TCP/IP models, TCP vs UDP, IP addressing and subnetting, DNS, HTTP and HTTPS.
  • RFC 9293, published in August 2022, is the current TCP specification and obsoletes the original RFC 793.
  • RFC 768 defines UDP with an 8-byte header and states that delivery and duplicate protection are not guaranteed.
  • RFC 1035 specifies DNS over both UDP and TCP on port 53, with TCP required for zone transfers.
  • RFC 8446 defines TLS 1.3 with a one-round-trip full handshake and removes static RSA key exchange, so all public-key exchanges provide forward secrecy.

Computer networks interviews for freshers cover five areas: network models (OSI and TCP/IP), the transport layer (TCP and UDP), IP addressing and devices, application protocols (DNS, HTTP, HTTPS), and basic troubleshooting. The 25 questions below follow that order, each with a complete answer. Protocol facts are tied to the IETF RFCs that define them, so you can quote them with confidence.

Which networking topics carry the most weight in fresher interviews?

TCP vs UDP, the OSI model and "what happens when you type a URL" carry the most weight, because they let the interviewer probe several layers in one question.

AreaTypical questionsWhat interviewers check
ModelsOSI layers, TCP/IP model, URL-to-page flowBig-picture understanding
TransportTCP vs UDP, handshake, flow vs congestion controlReliability trade-offs
Addressing and devicesIPv4 vs IPv6, subnetting, NAT, ARP, DHCP, router vs switchPractical networking basics
ApplicationDNS, HTTP methods, status codes, HTTPS and TLSWeb fundamentals every developer needs
Troubleshootingping, traceroute, firewalls, latencyAbility to debug a real connection

For other core subjects asked in the same round, see the interview questions by subject guide and operating system interview questions for freshers.

What questions are asked on network models?

1. What are the seven layers of the OSI model?

From bottom to top: Physical (bits over cables or radio), Data Link (frames and MAC addresses, switches), Network (IP addressing and routing, routers), Transport (end-to-end delivery with TCP or UDP and ports), Session (managing conversations), Presentation (encoding, compression, encryption formats) and Application (protocols users' programs speak, such as HTTP and DNS). A common memory aid is "Please Do Not Throw Sausage Pizza Away".

2. How is the TCP/IP model different from the OSI model?

The TCP/IP model has four layers: Link (network access), Internet, Transport and Application. It merges OSI's Session, Presentation and Application layers into one Application layer and OSI's Physical and Data Link layers into one Link layer. OSI is a teaching reference; TCP/IP describes how the internet actually works.

3. What happens when you type a URL into the browser and press Enter?

The browser parses the URL and checks its caches, then resolves the domain to an IP address through DNS. It opens a TCP connection to the server (port 443 for HTTPS) and performs a TLS handshake to set up encryption. It sends an HTTP request, the server returns a response with a status code and HTML, and the browser parses the HTML, fetches CSS, JavaScript and images, and renders the page. Interviewers often stop you at one step and ask for detail, so know each one.

What TCP and UDP questions should freshers prepare?

4. What is the difference between TCP and UDP?

TCP is connection-oriented and gives applications a reliable, in-order byte stream; RFC 9293, the current TCP specification published in August 2022, describes how it uses sequence numbers, acknowledgements, retransmission and mandatory checksums. UDP, defined in RFC 768, is connectionless with an 8-byte header, and the RFC states that delivery and duplicate protection are not guaranteed. TCP suits web pages, email and file transfer; UDP suits DNS lookups, video calls, live streaming and games, where speed matters more than retransmitting late packets.

FeatureTCPUDP
ConnectionHandshake before dataNone
ReliabilityRetransmits lost data, in orderNo delivery guarantee
Header size20 bytes minimum8 bytes
Typical usesHTTP, SMTP, SSHDNS queries, VoIP, gaming

5. Explain the TCP three-way handshake.

The client sends a SYN carrying its initial sequence number; the server replies with a SYN-ACK that acknowledges the client's number and carries its own; the client sends an ACK for the server's number, and data can flow. RFC 9293 explains the handshake exists because sequence numbers are not tied to a global clock, so each side must confirm the other's starting number. It also prevents old duplicate connection requests from being accepted.

6. How is a TCP connection closed?

Each direction closes separately. One side sends FIN, the other acknowledges it, then the other side sends its own FIN and receives an ACK, which is often called a four-way termination. The side that closes first waits in the TIME-WAIT state for a while to make sure late packets do not confuse a new connection on the same ports.

7. What is the difference between flow control and congestion control?

Flow control protects the receiver: TCP's receive window tells the sender how much data the receiver can buffer, so a fast sender does not overwhelm a slow receiver. Congestion control protects the network: the sender limits its rate with a congestion window that grows when acknowledgements arrive and shrinks when packet loss suggests congestion. One is about the endpoint, the other about the path in between.

8. What are ports, and which well-known ports should you know?

A port number identifies which application on a host should receive the data, so one IP address can run many services. Commonly asked well-known ports are 80 (HTTP), 443 (HTTPS), 53 (DNS), 22 (SSH), 25 (SMTP) and 21 (FTP control). An IP address plus a port is a socket endpoint.

What IP addressing and device questions come up?

9. What is the difference between IPv4 and IPv6?

IPv4 uses 32-bit addresses, written as four decimal numbers like 192.168.1.10, giving about 4.3 billion addresses, which have effectively run out. IPv6 uses 128-bit addresses written in hexadecimal groups, like 2001:db8::1, giving a vast address space. IPv6 also simplifies the header and removes the need for NAT in most cases.

10. What is subnetting? Solve a /24 example.

Subnetting splits a network into smaller networks using a subnet mask, written in CIDR notation as the number of network bits. 192.168.1.0/24 has 24 network bits and 8 host bits, so 256 addresses, of which 254 are usable hosts after excluding the network address (.0) and broadcast address (.255). Splitting it into /26 gives four subnets of 64 addresses each, with 62 usable hosts per subnet.

11. What are private IP addresses and NAT?

Private ranges (10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16) are used inside homes and offices and are not routed on the public internet. NAT (Network Address Translation) on a router rewrites private source addresses to the router's public address and tracks connections so replies reach the right device. That is how every device on your home Wi-Fi shares one public IP.

12. What is the difference between a hub, a switch and a router?

A hub repeats incoming signals to every port, so all devices share bandwidth and see all traffic. A switch works at the data link layer and forwards frames only to the port of the destination MAC address. A router works at the network layer and forwards packets between different networks using IP addresses and routing tables, such as between your home network and your ISP.

13. What is the difference between a MAC address and an IP address, and what does ARP do?

A MAC address is a 48-bit hardware address burned into a network interface and used for delivery within a local network. An IP address is a logical address used to route packets across networks and can change when you move. ARP (Address Resolution Protocol) finds the MAC address for a given IP address on the local network by broadcasting a request and caching the reply.

14. How does DHCP work?

DHCP automatically gives a device an IP address, subnet mask, default gateway and DNS server when it joins a network. The exchange is often remembered as DORA: the client broadcasts Discover, the server sends an Offer, the client sends a Request and the server confirms with an Acknowledge. Addresses are leased for a period and renewed.

What application-layer questions are asked?

15. How does DNS resolution work?

DNS translates a domain name like asuraa.in into an IP address. Your device asks a recursive resolver, which, if the answer is not cached, queries a root server, then the top-level domain server for .in, then the domain's authoritative name server, and caches the result for its TTL. RFC 1035 specifies DNS over both UDP and TCP on port 53, with UDP used for standard queries, a 512-byte limit on classic UDP messages, and TCP required for zone transfers.

16. What are the common DNS record types?

An A record maps a name to an IPv4 address and AAAA maps it to an IPv6 address. CNAME makes one name an alias of another, MX lists mail servers with a preference value (lower is preferred), NS names the authoritative name servers, and TXT holds text used for things like domain verification. RFC 1035 defines A, NS, CNAME and MX.

17. What is the difference between HTTP and HTTPS?

HTTP sends requests and responses in plain text, usually on port 80, so anyone on the path can read or modify them. HTTPS is HTTP inside a TLS-encrypted connection, usually on port 443, which provides confidentiality, integrity and server authentication through certificates. Browsers mark plain HTTP sites as not secure, and login or payment pages must use HTTPS.

18. What happens in a TLS handshake?

The client sends a hello with supported versions, cipher suites and key-share data; the server replies with its choice, its key share and its certificate; both sides derive the same session keys and confirm with Finished messages. RFC 8446, which defines TLS 1.3 (August 2018), describes a full handshake in one round trip and removes static RSA key exchange, so all public-key exchanges provide forward secrecy. It also allows optional 0-RTT early data, with weaker replay protection.

19. What are the HTTP methods, and which are idempotent?

GET retrieves a resource, POST submits data and usually creates something, PUT replaces a resource, PATCH partially updates it, and DELETE removes it. MDN's HTTP methods reference lists GET, HEAD, OPTIONS, PUT and DELETE as idempotent (repeating the request has the same effect as sending it once), while POST and PATCH are not. GET and HEAD are also safe, meaning they should not change server state.

20. What do HTTP status code classes mean?

RFC 9110, the HTTP semantics standard published in June 2022, groups status codes into five classes: 1xx informational, 2xx successful (200 OK, 201 Created), 3xx redirection (301 Moved Permanently, 304 Not Modified), 4xx client error (400 Bad Request, 401 Unauthorized, 404 Not Found) and 5xx server error (500 Internal Server Error, 503 Service Unavailable). A 4xx means the request needs fixing; a 5xx means the server failed.

21. Why is HTTP called stateless, and how do websites remember users?

HTTP is stateless because each request is independent; the server does not automatically remember previous requests. Websites add state with cookies, which the browser sends with each request, often carrying a session ID that maps to data stored on the server, or with tokens such as JWTs sent in headers. This is how you stay logged in across pages.

What troubleshooting and general questions come up?

22. What do ping and traceroute do?

ping sends ICMP echo requests to a host and reports whether replies arrive and how long they take, testing reachability and latency. traceroute (tracert on Windows) shows each router hop on the path to the destination by sending packets with increasing TTL values. Together they help locate where a connection fails or slows down.

23. What is a firewall?

A firewall filters network traffic according to rules, such as allowing inbound port 443 but blocking everything else. It can run on a network device or on a host, and stateful firewalls track connections so replies to allowed outbound traffic are let back in. Firewalls are a first line of defence, not a complete security solution.

24. What are LAN, MAN and WAN, and what are network topologies?

A LAN covers a small area like an office or campus, a MAN covers a city, and a WAN spans large distances, the internet being the largest example. Topologies describe how devices connect: bus, star, ring, mesh and hybrid. Most modern LANs use a star topology around switches because one cable failure affects only one device.

25. What is the difference between bandwidth, latency and throughput?

Bandwidth is the maximum data rate a link can carry, such as 100 Mbps. Latency is the time a packet takes to travel from source to destination, measured in milliseconds. Throughput is the actual data rate achieved, which is usually below bandwidth because of latency, congestion, packet loss and protocol overhead.

How should you revise computer networks in 7 days before the interview?

Revise one layer per day and use real tools (ping, nslookup, traceroute and your browser's network tab) so every concept has something you have seen. The technical interview preparation guide explains how to walk an interviewer through a multi-step answer.

  1. Day 1: Models. OSI and TCP/IP layers with one protocol and one device per layer.
  2. Day 2: Transport. TCP vs UDP, handshake, termination, flow vs congestion control. Draw the handshake.
  3. Day 3: Addressing. IPv4 vs IPv6, private ranges, NAT, and five subnetting problems by hand.
  4. Day 4: Devices and LAN protocols. Hub vs switch vs router, MAC vs IP, ARP, DHCP.
  5. Day 5: DNS and HTTP. Run nslookup on three domains, inspect request methods and status codes in the browser's network tab.
  6. Day 6: HTTPS and troubleshooting. TLS handshake, certificates, ping, traceroute, firewalls.
  7. Day 7: Mock round. Explain "what happens when you type a URL" end to end in five minutes, then answer all 25 questions aloud.

If networking is your target career rather than one interview subject, read the network engineer and CCNA career guide and the overview of network engineer jobs for freshers.

What do most guides on computer networks interview questions get wrong?

Most guides still cite RFC 793 for TCP, but RFC 9293 replaced it in August 2022; quoting the current standard is a small signal that you read primary sources. Guides also describe UDP as "unreliable and therefore worse", when the real point is that UDP leaves reliability to the application, which is why latency-sensitive services choose it. Finally, many say DNS "uses UDP only". RFC 1035 specifies both UDP and TCP on port 53, with TCP required for zone transfers and used when responses are too large for a UDP message.

Related guides

FAQ

What are the most important computer networks topics for a fresher interview?

Focus on the OSI and TCP/IP models, TCP vs UDP, the three-way handshake, IPv4 vs IPv6, subnetting, NAT, MAC vs IP with ARP, DHCP, DNS resolution, HTTP methods and status codes, and HTTPS with TLS. Be ready to explain what happens when you type a URL, which connects almost all of these in one answer.

What is the difference between TCP and UDP in one line?

TCP is connection-oriented and gives a reliable, ordered byte stream with acknowledgements and retransmission, while UDP is connectionless with an 8-byte header and no delivery guarantee. Use TCP when every byte must arrive, such as web pages and file transfers, and UDP when low latency matters more, such as DNS queries and video calls.

Does DNS use TCP or UDP?

Both. RFC 1035 specifies DNS on port 53 over UDP and TCP. Standard queries normally use UDP because it is fast, while zone transfers must use TCP, and TCP is also used when a response is too large for a UDP message. Saying DNS uses only UDP is a common interview mistake.

How many usable hosts are there in a /24 network?

A /24 network has 8 host bits, which gives 256 addresses. Two are reserved, the network address and the broadcast address, so 254 are usable for hosts. In general, a subnet with n host bits has 2 to the power n minus 2 usable host addresses, which is the formula interviewers expect you to apply quickly.

Is computer networks asked in interviews for software developer roles?

Yes. Networking is a core computer science subject in many technical rounds, and developers need it to understand APIs, latency and security. Software roles focus on TCP vs UDP, DNS, HTTP, HTTPS and status codes, while network engineer roles go deeper into subnetting, routing and switching.

Final thoughts

Networking rounds reward freshers who can trace one request through every layer and explain each step plainly. Use ping, nslookup and your browser's network tab while revising so each protocol is something you have seen, not just read about. When you are ready, look for software, support and network roles on Asuraa jobs.

Related articles

Share this article

Continue Reading

Data Science Career Paths

Explore different career trajectories in data science and find your perfect fit.

Read article →

Building Your DS Portfolio

Learn how to create projects that impress hiring managers and showcase your skills.

Read article →

Salary Negotiation Guide

Get the compensation you deserve with our proven negotiation strategies.

Review Your Resume →