The Seven-Layer OSI Model, Explained

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

← 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 →

Earn 3 college credits for Introduction to Operating SystemsRecommended for credit by NCCRS · Computer Science 354 · self-paced · one payment, lifetime access

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.

Compare: Linux vs Operating Systems

Why take it here

Why students take Introduction to Operating Systems with UPI Study

What happens under every app you runIntroduction to Operating Systems explains the software that runs a computer: processes and scheduling, threads and synchronization, deadlock, memory and paging, devices and storage, file systems, networking, security and virtualization. It suits computer science and information technology degrees.
Credit at a fraction of the priceThe same 3 credits can cost $750 or more at a US college. Here it is one payment, self-paced, with lifetime access.
Finish your degree soonerTransfer credits reduce the courses you still owe, so you can graduate earlier or lighten a heavy semester.
Strengthen an applicationA completed college-level course on an official transcript shows admissions and scholarship committees you can do the work.
Study on your own scheduleNo start dates, no deadlines. Watch the lessons, practice, and take the final when you are ready.
130,000+students helped with college creditsACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

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.

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?
From bottom to top, the seven OSI layers are physical, data link, network, transport, session, presentation and application. Physical sends bits as signals, data link crosses one link with hardware addresses, network addresses and routes, and transport delivers to the right program using ports. Session manages the conversation, presentation formats, compresses or encrypts data, and application provides network services to programs.
What is an easy way to remember the OSI layers?
A popular mnemonic from top to bottom is All People Seem To Need Data Processing, for application, presentation, session, transport, network, data link and physical. Going from bottom to top, many students use Please Do Not Throw Sausage Pizza Away. Either way, the first letter of each word matches the first letter of a layer, in order.
What is encapsulation in networking?
Encapsulation is the process of each layer adding its own header to the data on the way down the stack. The transport layer adds a header with ports, making a segment. The network layer adds an IP header, making a packet. The data link layer adds a header and a check-value trailer, making a frame. The receiver removes these wrappers in reverse order.
How is the TCP/IP model different from the OSI model?
The TCP/IP model uses four layers, application, transport, internet and link, while the OSI model uses seven. TCP/IP folds the application, presentation and session layers into one application layer, and folds data link and physical into one link layer. OSI remains the common reference map, which is why people still say layer 3 or layer 4, while Internet software follows TCP/IP.

About the Introduction to Operating Systems course

How many college credits is Introduction to Operating Systems?
Introduction to Operating Systems (Computer Science 354) carries a NCCRS credit recommendation for 3 semester credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
How much does Introduction to Operating Systems cost and what is included?
$250, paid once, with lifetime access: all 83 video lessons, a practice quiz after each, the graded work and final exam, and an official transcript when you finish. Students who want several courses choose UPI Study PRO instead.
Which universities accept UPI Study credits?
UPI Study has signed partner agreements with universities such as Thomas Edison State University, University of the People and Charter Oak State College, and works with universities such as Penn State, SNHU and SUNY. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities. Use "Find my college" on this page to check yours.
How long does Introduction to Operating Systems take?
It is self-paced with no deadlines. The 83 lessons total about 10 hours of video; most students add reading and practice time and finish in a few weeks to a few months, on their own schedule.
How are the exams done?
Quizzes and assignments are online in the course. The final exam is taken online with proctoring; a person on the UPI Study team checks assignments, usually within two days.
How do my credits reach my college?
When the course shows 100% complete, request the official transcript from your dashboard. It is sent to the college you name, and you can send it to more than one. Check your college first with "Find my college" on this page, or ask Athena.

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

Introduction to Operating Systems
3 credits · NCCRS
Enroll →