UPI Study › Courses › Introduction to Operating Systems › Free lessons › Lesson 7.2 Free with a free account
The Seven-Layer OSI Model
Introduction to Operating Systems · Chapter 7: Computer Networks: Architecture, Layers, and ProtocolsSection 7.2 · lesson 57 of 838 min · free with a free account
Free preview
Create a free account to keep watching
It takes a minute and costs nothing. Your free account unlocks all of Chapter 1 and 3 more lessons of Introduction to Operating Systems.
Lesson complete
Earn the 3 college credits for Introduction to Operating Systems
Enrolling adds a quiz after each lesson, the graded work and the official transcript. Recommended for credit by NCCRS.
Next lesson: The Data Link Layer →← How Computer Networks WorkNext lesson: The Data Link Layer →
A free account plays all of Chapter 1 and 3 more lessons of Introduction to Operating Systems. Create a free account →
In this lesson
How seven layers split networking and wrap data in headers.
- Name the seven OSI layers in order and state each layer's job
- Explain encapsulation and name the segment, packet and frame units
- Use the layers to locate where a network problem lives
- Compare the seven-layer OSI model with the four-layer TCP/IP model
Free study notes
Get this lesson's notes by email
The key points and 4 practice questions with answers, in your inbox. One email, free.
One email. Unsubscribe in one click.
Transcript
Everything said in the video, section by section (1,114 words). Read along, or search it.
Opening Scene
Boxes Inside Boxes
Sam, who runs a small online bakery, is shipping a cake mold to a customer. It goes into tissue, then a small box, then a shipping box with an address label. The courier puts that box in a crate on a truck. At the other end, someone opens the crate, then the shipping box, then the small box, then the tissue. Computers send data in exactly this way. So on a computer, who does the wrapping, and how many boxes are there?
Why Layers
One Specialist per Job
Sending data across the world is a huge job. So engineers cut it into pieces, and gave each piece to one specialist: a layer. A layer does exactly one kind of work. It offers its result to the layer above, and uses the layer below without caring how that one works. It's the same idea you met inside an operating system, in lesson 1.4. Layers help in three ways. First, each one is simpler to design, and to fix. Second, one layer can be replaced without touching the others. New Wi-Fi hardware doesn't need a new web browser. Third, machines from different makers can still talk, because each layer follows an agreed rulebook, called a protocol.
The Seven Layers
From Application Down to Physical
The agreed map of these layers is the OSI model, short for Open Systems Interconnection. It's a reference model from the standards body ISO. It has seven layers, numbered from the bottom. Let's walk down from the top, where Sam's browser lives. Layer 7, application, isn't the browser itself. It's the network services the browser uses, like the rules for fetching a web page, or sending email. Layer 6, presentation, makes sure both sides read the data the same way. It can also compress it, or encrypt it. Layer 5, session, opens, keeps, and closes the conversation. Layer 4, transport, carries data between the right programs on the two machines, using numbers called ports. It can also make delivery reliable. Layer 3, network, gives every machine an address, and chooses routes across many networks. Layer 2, data link, moves data across one single link, using hardware addresses. And layer 1, physical, turns bits into real signals: on a cable, in light, or on a radio wave.
Memory Aid
Two Rhymes for the Layer Order
To remember them, use a rhyme. Top to bottom: All People Seem To Need Data Processing. Bottom to top: Please Do Not Throw Sausage Pizza Away. Either way, the first letters spell the layers.
Troubleshooting
Asking Which Layer Broke
The layers also give support people a map. When something breaks, ask: at which layer? A loose cable is layer 1. A laptop on Wi-Fi with no address is a layer 3 problem. A page whose accents come out as odd symbols is layer 6. Ivy, who looks after the computers at a school, once got a call from Sam: the shop page wouldn't load. She didn't open the browser. She asked: is the cable in? It wasn't. The dog had pulled it out. Layer 1, she said, and pushed it back in. Most problems live down at the bottom.
Quick Check
The Highest Layer a Router Needs
Quick check. Ivy's school has a router. For every packet that arrives, it reads the destination IP address and picks the way forward. What's the highest layer that router needs: layer 2, data link; layer 3, network; or layer 4, transport? Pause, and decide. Layer 3, network. Reading IP addresses and choosing routes is exactly that layer's job, so a router works in layers 1 to 3. That's why people say a layer 3 router. Layer 4 is tempting, but ports pick programs on the two end machines, and a plain router doesn't need them.
Encapsulation
Headers Added on the Way Down
Now the wrapping. Sam's laptop sends an order to the shop server: 2 cakes, pickup at 5. On the way down, each layer adds a header: extra information at the front, which the same layer on the other side will read. The transport layer adds its header, with the ports. Now the unit is called a segment. The network layer adds the IP header, with the addresses. Now it's a packet. The data link layer adds a frame header, and also a trailer at the end: a check value. Now it's a frame. Finally, the physical layer sends it all as bits. This wrapping is called encapsulation.
Unwrapping
Peeling Wrappers in Reverse
At the other end, the receiver peels the wrappers off in the opposite order. Each layer reads the header its partner wrote, until only the order is left. So the layer on one computer talks, in a sense, to the same layer on the other computer, through everything underneath.
Quick Check
Which Header Comes Off First
Quick check. The order from Sam's laptop arrives, fully wrapped, at the shop server. Which wrapper does the server read and remove first: the frame header, the IP header, or the TCP header? Pause, and decide. The frame header. It went on last, so it comes off first. Data climbs the receiver's layers from the bottom, and layer 2 is the first to read. The TCP header is tempting, because it went on first. That's exactly why it comes off last, just before the server reads: 2 cakes, pickup at 5.
Common Mistake
Layers Are Jobs, Not Programs
One mix-up to avoid: each layer is a job, not a separate program or a separate box. In a laptop, layers 7 to 5 usually live in the app, or in OS libraries. Layers 4 and 3 live in the OS kernel. Layers 2 and 1 are the driver and the network card. Switches and routers use only the bottom layers. That's why you won't find a web browser inside a router.
TCP/IP Model
Seven Layers Folded Into Four
The OSI model is a very good map. But the Internet was built around a smaller one: the TCP/IP model, named after its two best-known protocols. It has four layers: application, transport, internet, and link. OSI's top three fold into one application layer, because real programs often format the data and run the conversation in the same code. And OSI's bottom two fold into one link layer: Ethernet, Wi-Fi, and the signals. So learn OSI's names, because people say layer 3 and layer 4 every day. And know TCP/IP, because that's what the software really does.
Wrap-Up
Wrapped Down, Unwrapped Up
Back to Sam's cake mold. Tissue, small box, shipping box, crate: each wrapper had its own job, and was opened by its partner at the other end. An order on the network travels the same way: wrapped by the layers on the way down, and unwrapped, in reverse, on the way up.
Key Takeaways
Layers, Encapsulation and TCP/IP
To recap. The OSI model splits networking into seven layers, each with one job. From the bottom: physical, data link, network, transport, session, presentation, application. On the way down, each layer wraps the data in its own header: segment, packet, frame, then bits. And the Internet's own TCP/IP model folds those seven into four.
About Introduction to Operating Systems at UPI Study
Introduction to Operating Systems (Computer Science 354) is a self-paced online course of 83 video lessons in 10 chapters, from what an operating system does and process scheduling to concurrency, memory, devices, file systems, networks, the internet, security and virtual machines. It carries a NCCRS credit recommendation for 3 semester credits.
Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Enroll now → Course details Download the syllabus All Computer Science courses Every course with PRO →
Compare: Linux vs Operating Systems
Why take it here
Why students take Introduction to Operating Systems with UPI Study
Where the credit goes
Universities that work with NCCRS
Introduction to Operating Systems carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Thomas Edison State UniversitySigned partner
University of the PeopleSigned partner
Charter Oak State CollegeSigned partner
Strayer UniversitySigned partner
Columbia Southern UniversitySigned partner
Indiana TechSigned partner
Penn StateWorks with NCCRS
Southern New Hampshire UniversityWorks with NCCRS
SUNYWorks with NCCRS
+many more cooperating universitiesFind my college →Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.
FAQ
Questions students ask us
About The Seven-Layer OSI Model
What are the 7 layers of the OSI model?
What is an easy way to remember the OSI layers?
What is encapsulation in networking?
How is the TCP/IP model different from the OSI model?
About the Introduction to Operating Systems course
How many college credits is Introduction to Operating Systems?
How much does Introduction to Operating Systems cost and what is included?
Which universities accept UPI Study credits?
How long does Introduction to Operating Systems take?
How are the exams done?
How do my credits reach my college?
Ready for the full course? Earn 3 credits in Introduction to Operating Systems.
83 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.
Updated
3 credits · NCCRSEnroll →