Menu

Earn Premium with Referrals

Invite your friends and earn Premium rewards through our referral program.

See how it works and start inviting friends.

OSI & TCP/IP Reference Models
CN

OSI & TCP/IP Reference Models

The fundamental rules of the road: Master the 7 layers of OSI and the 4 layers of TCP/IP.

Networking models provide a layered framework so that products from different vendors can interoperate. Each layer provides services to the layer above and consumes services from the layer below.

The OSI Model (7 Layers)

LayerNameData unitFunctionExample
7ApplicationDataUser interface, application servicesHTTP, SMTP, DNS
6PresentationDataEncoding, encryption, compressionSSL/TLS, JPEG
5SessionDataSession management, checkpointsNetBIOS, RPC
4TransportSegmentEnd-to-end reliability, flow controlTCP, UDP
3NetworkPacketLogical addressing, routingIP, ICMP, OSPF
2Data LinkFramePhysical addressing (MAC), error detectionEthernet, WiFi
1PhysicalBitsRaw bit transmission, electrical signalsCables, radio

Mnemonic: Please Do Not Throw Sausage Pizza Away

The TCP/IP Model (4 Layers)

TCP/IP is the practical model used by the internet:

LayerEquivalent OSI layersProtocols
Application5-7 (Session, Presentation, Application)HTTP, DNS, SMTP, FTP
Transport4 (Transport)TCP, UDP
Internet3 (Network)IP, ICMP, ARP
Network Access1-2 (Physical, Data Link)Ethernet, WiFi, PPP

OSI vs TCP/IP

AspectOSITCP/IP
DevelopedBefore protocolsAlongside protocols
Layers74
UseTeaching/ReferenceReal-world internet
FlexibilityRigidPragmatic
ProtocolsGeneric termsNamed protocols

Q: List the 7 OSI layers from bottom to top.

A: Physical, Data Link, Network, Transport, Session, Presentation, Application. Mnemonic: Please Do Not Throw Sausage Pizza Away.

Q: What is the difference between OSI and TCP/IP?

A: OSI is a theoretical reference model (7 layers) developed before protocols existed — it teaches concepts. TCP/IP is the practical model (4 layers) that emerged from real protocol development — it powers the internet.

Q: Which OSI layer handles encryption?

A: The Presentation Layer (Layer 6). It handles data formatting, encryption (SSL/TLS), and compression. In TCP/IP, these functions are absorbed into the Application Layer.

Q: What happens at each layer during a web request?

A: Application creates HTTP data. Transport splits into TCP segments. Network adds IP headers (source/dest IP). Data Link adds MAC addresses. Physical sends the bits. The reverse happens at the receiver.

My Private Notes

Notes are auto-saved locally to this device.