OSI & TCP/IP models

Computer Networks ยท 8 interview questions

The OSI model splits networking into seven layers โ€” physical, data link, network, transport, session, presentation and application. It's a teaching model: it predates the protocols that won, and no widely used stack implements it directly.

The TCP/IP model is what actually runs, with four layers: link, internet, transport and application. OSI's session and presentation responsibilities are simply handled inside applications and libraries.

Layering matters because it defines who owns which problem. IP handles addressing and routing between networks and promises nothing about delivery; TCP adds reliability on top; the application worries about meaning. Every question about where a feature belongs is answered by that separation.

OSI & TCP/IP models interview questions

Name the seven OSI layers in order.
Physical, data link, network, transport, session, presentation, application โ€” layer 1 to layer 7.
How does the TCP/IP model differ from OSI?
TCP/IP has four layers โ€” link, internet, transport, application โ€” and collapses OSI's session, presentation and application into one. OSI is a reference model; TCP/IP is what's actually deployed.
Which devices operate at which layer?
Hubs and repeaters at the physical layer, switches and bridges at the data link layer, routers at the network layer. Load balancers and firewalls can operate at transport or application layer depending on type.
What is the data unit called at each layer?
Segment at the transport layer (TCP) or datagram (UDP), packet at the network layer, frame at the data link layer, and bits at the physical layer.
What is encapsulation in networking?
Each layer wraps the layer above's data in its own header as it descends the stack, and strips it on the way back up. Your HTTP request gains a TCP header, then an IP header, then an Ethernet frame header.
Why do we need both MAC and IP addresses?
MAC addresses are flat and permanent, identifying an interface on a local link. IP addresses are hierarchical and location-dependent, which is what makes routing between networks scalable. Flat addressing can't scale globally; hierarchical addressing can't survive being burned into hardware.
Why they ask: A strong 'do you understand why layering exists' question.
What does ARP do?
Resolves an IP address to a MAC address on the local network, so a frame can be addressed. The sender broadcasts a request and the owner replies; results are cached briefly.
What problem does each of the four TCP/IP layers own?
Link: getting a frame across one physical hop. Internet: addressing and routing between networks, best-effort. Transport: end-to-end delivery, reliability and multiplexing by port. Application: what the bytes mean.

You'll forget most of this by next week

That's not a discipline problem, it's how memory works. In the app these come back on an expanding schedule โ€” right before you'd lose them.

Start free for 7 days