Networking Fundamentals: CIDR, Routing vs Switching, TCP vs UDP, Wi-Fi to Internet
Company: Millennium
Role: Machine Learning Engineer
Category: Software Engineering Fundamentals
Difficulty: medium
Interview Round: Technical Screen
The interview also covered networking fundamentals. Answer each question clearly enough for an interviewer to follow, explaining the mechanics behind each term rather than only naming it.
### Clarifying Questions
- Should addressing be explained for IPv4 only, or for IPv6 as well?
- For the Wi-Fi walk-through, is a home network assumed (one router doing DHCP and NAT), or an enterprise network with separate authentication and addressing servers?
- For troubleshooting, is a particular symptom in mind, such as no connectivity at all, slow pages, or a single site failing?
### Part 1: IP addressing, routing and switching
Explain IP addresses, subnets and CIDR notation; how a router forwards a packet; how a switch forwards a frame; and how the two differ.
```hint Follow one packet
Trace a packet from a laptop to a server on another network, and note at each device which header fields it reads and which it rewrites.
```
#### What This Part Should Cover
- Subnet and CIDR arithmetic with a worked example
- Routers forwarding at layer 3 by routing-table lookup with longest-prefix match
- Switches forwarding at layer 2 from a learned MAC address table, and what happens to unknown destinations
- How ARP connects the two layers, and which addresses change at each hop
### Part 2: TCP versus UDP
Compare TCP and UDP and say which applications suit each.
```hint The price of each guarantee
List what TCP guarantees, then ask what each guarantee costs an application that would rather lose a late packet than wait for it.
```
#### What This Part Should Cover
- TCP's connection setup, reliable ordered delivery, flow control and congestion control
- UDP's connectionless, low-overhead delivery without guarantees
- Why real-time audio/video and DNS use UDP, and what the application must then handle itself
### Part 3: From joining Wi-Fi to reaching the internet
Walk through what happens from the moment a laptop connects to a Wi-Fi network until it can load a website.
```hint What the laptop does not know yet
List every piece of information the laptop lacks when it first connects, and which protocol supplies each one.
```
#### What This Part Should Cover
- Association, and authentication, with the access point
- DHCP supplying the address, subnet mask, gateway and DNS servers
- DNS resolution, then the connection to the web server
- NAT translating the private address to a public one and back
### Part 4: Troubleshooting tools
Which tools would you use to troubleshoot a network problem, and what does each one tell you?
```hint Work up the layers
Picture a failure at each layer, from no address to a broken web server, and pick the tool that would expose it.
```
#### What This Part Should Cover
- ping, traceroute, dig/nslookup, ip/ifconfig, netstat/ss, tcpdump/Wireshark and curl, and what each reveals
- An order for using them, layer by layer
- The limits of each tool, such as blocked ICMP or cached DNS answers
### What a Strong Answer Covers
- Correct mechanics in every part, not only definitions
- Each concept placed at the layer where it operates
- One coherent story from Wi-Fi association to the first HTTP response
- Practical troubleshooting judgment about which tool to reach for first
### Follow-up Questions
- After joining Wi-Fi, a laptop shows an address starting with 169.254. What failed, and what do you check?
- ping to a server works, but curl to its website hangs. How do you narrow it down?
- Why can traceroute show asterisks for a hop even though the destination is reachable?
- How can a server behind NAT accept incoming connections?
Overview: Networking fundamentals from an AI engineering internship screen: IP addressing, subnets and CIDR, how routers and switches forward traffic, and TCP versus UDP. It also asks what happens from joining Wi-Fi to reaching a website, and which tools to use when troubleshooting a network problem.
Read the full Millennium Machine Learning Engineer interview experience this question came from