WEBVTT

00:00:00.000 --> 00:00:03.680
Welcome back to CSE 316 — Data Communication and Networking.

00:00:03.730 --> 00:00:09.400
This is the detailed video version of Session 3, and the rest of the course depends on it.

00:00:09.450 --> 00:00:18.400
It is dense by design, and it is meant to be watched the way you would use a textbook chapter — in pieces, with the pause button, and again before an exam.

00:00:19.500 --> 00:00:25.420
There is a checkpoint at the end of each section so you can tell whether to go on or go back.

00:00:25.470 --> 00:00:28.340
Here is the shape of it.

00:00:28.390 --> 00:00:31.630
First, why layers exist at all.

00:00:31.680 --> 00:00:36.760
Second, the five layers of the TCP/IP suite, one floor at a time.

00:00:36.810 --> 00:00:39.110
Third, encapsulation.

00:00:39.160 --> 00:00:44.640
Fourth, the OSI model— the seven-layer rival of the TCP/IP suite that lost.

00:00:44.690 --> 00:00:53.640
And fifth, the answer to the question I am about to ask you, counted out hop by hop.

00:00:54.226 --> 00:00:58.616
Picture something you did today, probably within the last hour.

00:00:58.666 --> 00:01:01.376
Suppose you load a web page.

00:01:01.426 --> 00:01:08.866
Your browser produces one single HTTP request (Hypertext Transfer Protocol) — one message, asking one server for one page.

00:01:08.916 --> 00:01:17.866
Here is the question: how many separate times is that request wrapped, readdressed and unwrapped before the server actually reads it?

00:01:20.236 --> 00:01:29.186
Pause the video and commit to a number — a plain count of wrap-and-unwrap events — and write it down somewhere.

00:01:30.976 --> 00:01:39.926
Section five counts them hop by hop so you can check your answer. The shape of it: three wraps at your laptop, two events at every router on the path, three strips at the server.

00:01:42.916 --> 00:01:51.716
In Session 1 we established that a protocol is an agreement — what to say, when to say it, what to do when something breaks.

00:01:51.766 --> 00:02:00.716
Today's question is quantity: how many agreements does one web page need, and why does stacking them — rather than writing one enormous agreement — turn out to be the design idea that made the Internet possible?

00:02:04.756 --> 00:02:06.616
That is this session's job.

00:02:06.666 --> 00:02:11.430
Everything else is detail.

00:02:11.480 --> 00:02:12.760
Section one.

00:02:12.810 --> 00:02:14.160
Why layers at all.

00:02:14.210 --> 00:02:17.300
One rule-book covers a simple conversation.

00:02:17.350 --> 00:02:26.300
A real system needs a stack of them, and this section shows why engineers chose it on purpose.

00:02:26.444 --> 00:02:29.614
Let us start exactly where Session 1 left off.

00:02:29.664 --> 00:02:33.784
A protocol is the agreement that makes communication possible.

00:02:33.834 --> 00:02:40.564
Chapter 2 of your textbook asks the next question: how many agreements does a real system need?

00:02:40.614 --> 00:02:44.354
For simple communication, the answer is one.

00:02:44.404 --> 00:02:51.204
Two people talking face to face need one simple protocol: greet, take turns, say goodbye.

00:02:51.254 --> 00:02:57.104
One rule-book covers the whole exchange, and nobody has ever needed to write it down.

00:02:57.154 --> 00:03:00.244
Complex communication is different.

00:03:00.294 --> 00:03:09.024
When the task is large, we divide it between layers — each layer takes one slice of the job — and then we need a protocol at EACH layer.

00:03:09.074 --> 00:03:15.024
That is protocol layering, and it is the design idea the rest of this course is built on.

00:03:15.074 --> 00:03:17.784
And what does the stack buy us?

00:03:17.834 --> 00:03:20.064
Three things, in one breath.

00:03:20.114 --> 00:03:24.184
Division of labor — each layer solves one problem well.

00:03:24.234 --> 00:03:31.534
Independence between floors — you can rebuild one layer without touching the others, and slide 7 demonstrates it.

00:03:31.584 --> 00:03:37.764
And the third one, the one with money attached: cheap middle boxes that only need SOME of the layers.

00:03:37.814 --> 00:03:43.794
Without that, every box in the middle of the Internet would have to be as complex as your laptop.

00:03:43.844 --> 00:03:49.794
Slide 17 draws that cheap middle box.

00:03:49.844 --> 00:03:56.024
Before any diagram from the textbook, here is the analogy the whole session lives inside.

00:03:56.074 --> 00:03:59.644
Picture the journey of one letter, and who reads what.

00:03:59.694 --> 00:04:01.104
The letter itself.

00:04:01.154 --> 00:04:03.404
What the sender actually wrote.

00:04:03.454 --> 00:04:08.884
It is read by the recipient — and by no one else, anywhere on the way.

00:04:08.934 --> 00:04:13.414
The letter goes into an envelope, with a name written on the front.

00:04:13.464 --> 00:04:20.774
The envelope is read at the very last step, to hand the letter to the right person in the right house.

00:04:20.824 --> 00:04:25.954
The envelope goes into a courier bag, with a city code on the tag.

00:04:26.004 --> 00:04:33.024
The bag's tag is read at every sorting depot along the way, to choose the bag's next journey.

00:04:33.074 --> 00:04:38.394
And the bag goes into a shipping container, with a routing label on the outside.

00:04:38.444 --> 00:04:47.394
The container label is read by the driver hauling it — and this word matters — the bag is RE-PACKED into a different container at every depot.

00:04:48.234 --> 00:04:50.124
So here is the question.

00:04:50.174 --> 00:04:55.194
The driver hauling that container — which address does he read?

00:04:55.244 --> 00:04:59.754
You said it already: the container label, and only that.

00:04:59.804 --> 00:05:08.164
He does not read the city code, he does not read the name on the envelope, and he certainly does not read the letter.

00:05:08.214 --> 00:05:16.161
That answer is layering, encapsulation and addressing at once, and slide 35 spells it out.

00:05:16.211 --> 00:05:20.061
Now the same idea, in the form your textbook gives it.

00:05:20.111 --> 00:05:26.791
Forouzan's scenario: Maria and Ann are friends who exchange confidential ideas by post.

00:05:26.841 --> 00:05:28.811
Three layers appear.

00:05:28.861 --> 00:05:32.941
Layer three, at the top — the thinking layer.

00:05:32.991 --> 00:05:38.801
Maria talks, meaning she produces the letter; Ann listens, meaning she reads it.

00:05:38.851 --> 00:05:46.861
And notice the dashed line between them: under layer three, both sides hold the identical object — the plaintext letter.

00:05:46.911 --> 00:05:50.331
What Maria wrote is exactly what Ann reads.

00:05:50.381 --> 00:05:55.941
Layer two — the secrecy layer, because the ideas are confidential.

00:05:55.991 --> 00:05:59.351
Maria's side encrypts; Ann's side decrypts.

00:05:59.401 --> 00:06:02.951
And again the identical object: the ciphertext.

00:06:03.001 --> 00:06:07.341
What leaves Maria's layer two is exactly what arrives at Ann's.

00:06:07.391 --> 00:06:09.861
Layer one — logistics.

00:06:09.911 --> 00:06:18.641
Put the ciphertext in an envelope, take it to the post office; on the other side, receive the mail and take the letter out.

00:06:18.691 --> 00:06:21.401
Identical object: a piece of mail.

00:06:21.451 --> 00:06:23.431
Now observe two things.

00:06:23.481 --> 00:06:30.371
First, each layer performs two tasks, and the two tasks are opposites — one for each direction.

00:06:30.421 --> 00:06:31.711
Talk and listen.

00:06:31.761 --> 00:06:33.691
Encrypt and decrypt.

00:06:33.741 --> 00:06:35.451
Send and receive.

00:06:35.501 --> 00:06:40.971
Each layer undoes, on the way in, exactly what its twin did on the way out.

00:06:41.021 --> 00:06:43.171
That is the first principle.

00:06:43.221 --> 00:06:47.101
And second — the post office path at the bottom.

00:06:47.151 --> 00:06:50.541
This is the only real journey in the whole picture.

00:06:50.591 --> 00:06:59.541
Everything above it is a logical connection: Maria's layer three believes it talks straight to Ann's layer three, but nothing actually travels there.

00:07:00.141 --> 00:07:05.761
The dashed lines are imaginary — a logical connection, not a physical one.

00:07:05.811 --> 00:07:09.011
The post office signs only the bottom agreement.

00:07:09.061 --> 00:07:10.351
It moves mail.

00:07:10.401 --> 00:07:14.988
It cannot read letters.

00:07:15.038 --> 00:07:21.718
Now do something rather than watch something. This is where layering stops being a diagram and becomes a reason.

00:07:21.768 --> 00:07:28.478
Suppose Maria and Ann decide their cipher is too weak, and they switch to a much stronger one.

00:07:28.528 --> 00:07:34.298
Layer two — the secrecy layer — is torn out and replaced entirely.

00:07:34.348 --> 00:07:38.988
New algorithm, new keys, new everything inside that floor.

00:07:39.038 --> 00:07:46.748
Pause the video and list everything else in the system that has to change.

00:07:46.798 --> 00:07:50.838
Look up one floor, and down one floor, and write your list.

00:07:50.888 --> 00:07:52.968
Here is the answer: nothing.

00:07:53.018 --> 00:07:54.928
Nothing else changes.

00:07:54.978 --> 00:08:02.818
Layer three still hands down a plaintext letter and still gets one back — it cannot even tell the cipher changed.

00:08:02.868 --> 00:08:09.518
Layer one still posts whatever envelope it is given — it never knew there was a cipher in the first place.

00:08:09.568 --> 00:08:14.398
The renovation happened on one floor, and the other floors did not notice.

00:08:14.448 --> 00:08:21.078
That is why engineers use this design: you can renovate one floor without evacuating the building.

00:08:21.128 --> 00:08:30.078
Here is the precise reason it works, and the vocabulary you need: each layer offers a fixed service to the layer above it, and demands a fixed service from the layer below it.

00:08:32.728 --> 00:08:36.318
Those meeting points are called the interfaces between layers.

00:08:36.368 --> 00:08:42.468
As long as the interfaces hold, what happens inside a floor is that floor's private business.

00:08:42.518 --> 00:08:51.468
This is separation of concerns — and it is why your browser did not need an update when your building's Wi-Fi was upgraded, and why the Wi-Fi did not care when your browser was.

00:08:55.859 --> 00:08:59.879
One more principle before the checkpoint, stated carefully.

00:08:59.929 --> 00:09:04.139
Maria's layer three believes it talks straight to Ann's layer three.

00:09:04.189 --> 00:09:05.869
It never does.

00:09:05.919 --> 00:09:12.579
Each layer behaves as if it were in direct conversation with the same layer on the other side.

00:09:12.629 --> 00:09:19.949
We call these peer processes — same-level layers on the two sides, speaking their own layer's protocol to each other.

00:09:19.999 --> 00:09:27.399
Encrypt on one side, decrypt on the other: that pair is having a conversation, in a very real sense.

00:09:27.449 --> 00:09:29.779
The agreement between them is real.

00:09:29.829 --> 00:09:31.849
But the journey is not.

00:09:31.899 --> 00:09:40.849
What actually happens is this, every single time: data flows DOWN the sender's stack, ACROSS the one physical path at the bottom, and UP the receiver's stack.

00:09:42.959 --> 00:09:44.499
There is no other road.

00:09:44.549 --> 00:09:51.039
The dashed lines between peers carry nothing; the peer connection is logical, not physical.

00:09:51.089 --> 00:09:53.469
So why keep the hallucination?

00:09:53.519 --> 00:09:57.309
Because it is what makes each agreement writable.

00:09:57.359 --> 00:10:06.309
It lets transport-to-transport rules be written without ever mentioning Wi-Fi, and link-to-link rules be written without ever mentioning the browser.

00:10:06.699 --> 00:10:10.779
Every layer gets a small, simple world to reason about.

00:10:10.829 --> 00:10:16.419
Peer-to-peer communication is logical; the physical flow is down, across, and up.

00:10:16.469 --> 00:10:25.196
Write that sentence down — it is worth marks, and it is worth understanding.

00:10:25.436 --> 00:10:26.756
First checkpoint.

00:10:26.806 --> 00:10:31.516
Pause the video and answer these three on paper, without scrolling back.

00:10:31.566 --> 00:10:32.776
One.

00:10:32.826 --> 00:10:36.546
Maria and Ann switch to a stronger cipher.

00:10:36.596 --> 00:10:39.516
What else in the three-layer system has to change?

00:10:39.566 --> 00:10:40.726
Two.

00:10:40.776 --> 00:10:43.986
Each layer performs two tasks.

00:10:44.036 --> 00:10:46.126
How are the two tasks related?

00:10:46.176 --> 00:10:47.346
Three.

00:10:47.396 --> 00:10:51.706
Maria's layer three 'talks to' Ann's layer three.

00:10:51.756 --> 00:10:55.416
What actually travels between them?

00:10:55.466 --> 00:11:00.286
Pause now.

00:11:00.336 --> 00:11:01.036
Answers.

00:11:01.086 --> 00:11:02.176
The first: nothing.

00:11:02.226 --> 00:11:07.326
Layer three still hands down plaintext; layer one still posts an envelope.

00:11:07.376 --> 00:11:14.116
Only the rebuilt floor changes, and that independence is the entire point of layering.

00:11:14.166 --> 00:11:17.986
The second: they are opposites, one per direction.

00:11:18.036 --> 00:11:21.536
Talk and listen, encrypt and decrypt, send and receive.

00:11:21.586 --> 00:11:25.606
Each layer undoes on the way in what its twin does on the way out.

00:11:25.656 --> 00:11:27.896
And the third: nothing at all.

00:11:27.946 --> 00:11:30.206
The peer connection is logical.

00:11:30.256 --> 00:11:39.075
Real data flows only down the stack, across the physical path, and up the other side.

00:11:39.125 --> 00:11:40.415
Section two.

00:11:40.465 --> 00:11:41.835
The TCP/IP model.

00:11:41.885 --> 00:11:46.315
Maria and Ann needed three layers for letters.

00:11:46.365 --> 00:11:52.185
The Internet needs five for bits — the same logic, with a much bigger post office.

00:11:52.235 --> 00:11:58.375
In this section we take the tower one floor at a time.

00:11:58.425 --> 00:12:04.665
Here is the whole suite on one slide, and I am going to build it floor by floor, from the top.

00:12:04.715 --> 00:12:13.665
For each floor, three things: the job, the parcel it makes — its unit — and, later, the address written on that parcel.

00:12:14.065 --> 00:12:17.075
Layer five, the application layer.

00:12:17.125 --> 00:12:22.405
Two running programs exchange messages — process-to-process.

00:12:22.455 --> 00:12:25.175
Its unit is the message.

00:12:25.225 --> 00:12:27.965
Layer four, the transport layer.

00:12:28.015 --> 00:12:35.635
Carry the message from the program on this host to the MATCHING program on the other host — end-to-end.

00:12:35.685 --> 00:12:44.355
Its unit is the segment, or the user datagram, depending which protocol you hire; slide 13 comes back to that.

00:12:44.405 --> 00:12:47.165
Layer three, the network layer.

00:12:47.215 --> 00:12:53.855
Host-to-host, across many networks, with routers choosing the route in between.

00:12:53.905 --> 00:12:56.755
Its unit is the datagram.

00:12:56.805 --> 00:12:59.615
Layer two, the data link layer.

00:12:59.665 --> 00:13:07.245
Move the datagram across ONE link — this LAN, this WAN, this single hop.

00:13:07.295 --> 00:13:09.895
Its unit is the frame.

00:13:09.945 --> 00:13:12.795
And layer one, the physical layer.

00:13:12.845 --> 00:13:17.595
Carry the individual bits as signals on the medium.

00:13:17.645 --> 00:13:20.595
Its unit is the bit itself.

00:13:20.645 --> 00:13:27.275
Say the five units back to yourself before you go on: message, segment, datagram, frame, bit.

00:13:27.325 --> 00:13:31.955
Each of those words means its own layer and no other.

00:13:32.005 --> 00:13:38.255
And the tower is hierarchical: every upper layer is served by the ones below it.

00:13:38.305 --> 00:13:46.035
The application does not carry bits; it is CARRIED, by four floors of machinery it never has to think about.

00:13:46.085 --> 00:13:51.899
The next five slides take one floor each.

00:13:51.949 --> 00:13:55.259
The top floor first: the application layer.

00:13:55.309 --> 00:13:58.229
The job is process-to-process communication.

00:13:58.279 --> 00:14:03.719
A process is simply a running program, and being exact about that matters.

00:14:03.769 --> 00:14:06.919
A browser talks to a web server.

00:14:06.969 --> 00:14:09.679
A mail program talks to a mail server.

00:14:09.729 --> 00:14:13.979
The conversation is between programs, not between machines.

00:14:14.029 --> 00:14:21.369
Your laptop is not browsing the web; a particular program on your laptop is.

00:14:21.419 --> 00:14:23.329
Who lives on this floor?

00:14:23.379 --> 00:14:27.239
Every protocol you know from daily life.

00:14:27.289 --> 00:14:28.289
HTTP for the web.

00:14:28.339 --> 00:14:32.359
SMTP (Simple Mail Transfer Protocol) for mail.

00:14:32.409 --> 00:14:36.359
FTP (File Transfer Protocol) for moving files.

00:14:36.409 --> 00:14:40.419
DNS (Domain Name System) for turning names into addresses.

00:14:40.469 --> 00:14:46.019
If you have heard of a protocol before taking this course, it almost certainly lives here.

00:14:46.069 --> 00:14:54.169
Its parcel is the message, and its addresses are names — someorg.com, somebody@coldmail.com.

00:14:54.219 --> 00:14:57.469
Human-shaped addresses, because humans type them.

00:14:57.519 --> 00:15:00.069
This design runs on trust.

00:15:00.119 --> 00:15:06.829
The application layer does not know, and does not ask, how its message will cross the world.

00:15:06.879 --> 00:15:15.829
It hands the message down and trusts the floors below — and every layer in this tower extends exactly that kind of trust to the one beneath it.

00:15:18.828 --> 00:15:21.778
Layer four: the transport layer.

00:15:21.828 --> 00:15:29.468
The job: carry the message from one program to the matching program on the other host — end-to-end.

00:15:29.518 --> 00:15:38.248
And 'end-to-end' is doing real work in that sentence: no machine in the middle of the network takes any part in this layer's job.

00:15:38.298 --> 00:15:47.248
As far as transport is concerned, the two hosts are connected by one direct logical pipe, however many routers actually sit between them.

00:15:47.448 --> 00:15:52.458
The parcel depends on which courier you hire, because this floor employs two.

00:15:52.508 --> 00:16:01.458
Hire TCP — the Transmission Control Protocol — and the message rides in a segment, with all the safety equipment: ordering, error control, congestion control.

00:16:05.058 --> 00:16:13.248
Hire UDP (User Datagram Protocol) and it rides in a user datagram, with none of it — and it is therefore light and fast.

00:16:13.298 --> 00:16:21.698
Same floor, two very different couriers, and the application chooses based on what it can afford to lose.

00:16:21.748 --> 00:16:29.968
The address is the port number, and be precise about it: ports identify the two PROGRAMS at each end.

00:16:30.018 --> 00:16:32.188
Not the machines.

00:16:32.238 --> 00:16:40.048
Your browser and your mail program share one laptop and one network connection; port numbers are what keep their traffic apart.

00:16:40.098 --> 00:16:49.048
When data arrives at your laptop, the port number is the answer to the question 'which program gets this?'

00:16:49.728 --> 00:16:52.288
Layer three: the network layer.

00:16:52.338 --> 00:16:57.958
This is the layer the middle of the Internet runs on, so give it your attention.

00:16:58.008 --> 00:17:01.808
The job: host-to-host delivery, across many networks.

00:17:01.858 --> 00:17:10.808
From this machine to that machine — across your LAN, across your ISP, across an ocean, into somebody else's data center.

00:17:11.608 --> 00:17:16.598
At every router along the way, one decision is made: which way next?

00:17:16.648 --> 00:17:20.348
Choosing routes is this layer's whole occupation.

00:17:20.398 --> 00:17:26.708
The parcel is the datagram — the transport segment, wrapped in a network header.

00:17:26.758 --> 00:17:35.358
Some books say packet; Forouzan says datagram; at this layer they name the same parcel, and I will use Forouzan's word.

00:17:35.408 --> 00:17:41.798
The address is the IP address, and its character is logical and hierarchical.

00:17:41.848 --> 00:17:49.078
Like a postal address, it encodes WHERE in the world you are — this network, then this host on it.

00:17:49.128 --> 00:17:54.808
It is globally meaningful, and it stays the same from end to end of the journey.

00:17:54.858 --> 00:17:59.738
IP — the Internet Protocol — is deliberately bare.

00:17:59.788 --> 00:18:01.238
No flow control.

00:18:01.288 --> 00:18:02.828
No error control.

00:18:02.878 --> 00:18:04.678
No congestion control.

00:18:04.728 --> 00:18:08.478
Bare delivery, done fast, with no promises.

00:18:08.528 --> 00:18:11.678
That is not an oversight; it is the design.

00:18:11.728 --> 00:18:20.678
If an application needs those guarantees, the transport layer must supply them — and that, precisely, is why TCP exists.

00:18:21.008 --> 00:18:29.958
Keep this pairing in mind: a bare network layer underneath, and a careful transport layer on top when you need one.

00:18:31.328 --> 00:18:33.928
Layer two: the data link layer.

00:18:33.978 --> 00:18:40.018
The job: take the datagram across THIS one link — this LAN, this WAN, this single hop — and no further.

00:18:40.068 --> 00:18:42.568
Its whole world is one link.

00:18:42.618 --> 00:18:49.348
It delivers to the next stop only: the router down the corridor, not the server across the ocean.

00:18:49.398 --> 00:18:54.628
Somebody else — the network layer — worries about the ocean.

00:18:54.678 --> 00:19:03.548
The parcel is the frame, and the frame is the eccentric of the family: it is the only parcel with a header AND a trailer.

00:19:03.598 --> 00:19:11.308
Link addresses go in the header at the front; error-check bits go in the trailer at the tail.

00:19:11.358 --> 00:19:13.808
No other layer adds a trailer.

00:19:13.858 --> 00:19:22.088
The address is the MAC address (Media Access Control): forty-eight bits, flat, with no structure at all.

00:19:22.138 --> 00:19:23.938
Contrast it with IP.

00:19:23.988 --> 00:19:29.678
An IP address is like a postal address — it tells you where in the world the machine is.

00:19:29.728 --> 00:19:35.268
A MAC address is like a serial number — it tells you which machine, and nothing about where.

00:19:35.318 --> 00:19:43.098
It is meaningful on this one network only — local currency — and the link addresses on a parcel change at every hop.

00:19:43.148 --> 00:19:51.028
One more remarkable fact about this floor: TCP/IP does not even define a protocol here.

00:19:51.078 --> 00:19:58.848
Any link technology that can carry a datagram is welcome — Ethernet, Wi-Fi, fiber links, cellular.

00:19:58.898 --> 00:20:07.848
That open door is why the same Internet runs over copper, glass and air without ever noticing the difference.

00:20:08.708 --> 00:20:12.538
And layer one: the physical layer, the ground floor.

00:20:12.588 --> 00:20:21.538
The job: take each bit of the frame and turn it into something physical — a voltage on copper, a pulse of light in glass, a radio wave in the air.

00:20:23.318 --> 00:20:26.648
One bit at a time, onto the medium.

00:20:26.698 --> 00:20:30.758
Its unit is the bit, the smallest parcel in the whole tower.

00:20:30.808 --> 00:20:33.418
This layer does not wrap anything.

00:20:33.468 --> 00:20:40.128
Every other working layer adds something around its cargo; the physical layer adds nothing.

00:20:40.178 --> 00:20:44.068
It shatters the frame into individual bits and signals them, one by one.

00:20:44.118 --> 00:20:52.338
Keep that in mind for the next section — when we count wrappers, the physical layer will not be on the list.

00:20:52.388 --> 00:21:01.338
And it has no address, for a reason you can reconstruct yourself in an exam: its unit is a single bit, and a single bit cannot carry an address.

00:21:03.198 --> 00:21:05.848
There is nowhere to write one.

00:21:05.898 --> 00:21:09.048
So: five layers, but only four address pairs.

00:21:09.098 --> 00:21:13.068
And you now know the reason for that asymmetry, not just the fact.

00:21:13.118 --> 00:21:15.578
One final line for this floor.

00:21:15.628 --> 00:21:22.138
The medium itself — the actual fiber in the wall — sits BELOW even this layer.

00:21:22.188 --> 00:21:27.388
The medium carries signals, not bits, and nothing about it has an address.

00:21:27.438 --> 00:21:36.388
The next session of this course lives exactly there: how a bit becomes a wave, and what that costs.

00:21:36.737 --> 00:21:40.907
Now the question with money in it: who needs how many floors?

00:21:40.957 --> 00:21:48.687
Not every machine carries the whole tower, and the ones that do not are the reason the Internet was affordable to build.

00:21:48.737 --> 00:21:52.617
Your laptop — a host — needs all five.

00:21:52.667 --> 00:21:58.457
It runs the programs, so it needs the application layer, and therefore everything beneath it.

00:21:58.507 --> 00:22:04.477
Both ends of any communication are hosts, and hosts implement the full stack.

00:22:04.527 --> 00:22:07.617
A router needs the bottom three.

00:22:07.667 --> 00:22:15.077
It must reach the network layer, because choosing routes IS the network layer's job — that is what a router is for.

00:22:15.127 --> 00:22:21.447
But it has no business in your transport data or your messages, so those floors simply are not built.

00:22:21.497 --> 00:22:25.577
A router routes datagrams; it never opens your mail.

00:22:25.627 --> 00:22:29.617
And a link-layer switch needs only the bottom two.

00:22:29.667 --> 00:22:35.447
It forwards frames inside one network, and it never even learns that IP exists.

00:22:35.497 --> 00:22:39.457
The switch in the GPL lab is exactly this machine.

00:22:39.507 --> 00:22:45.667
Now step back and look at what this slide is really saying, because it is the third advantage from section one, drawn.

00:22:45.717 --> 00:22:51.617
The middle of the network is dumb on purpose, and cheap on purpose.

00:22:51.667 --> 00:22:57.857
An access switch implements two layers and costs an order of magnitude less than a host.

00:22:57.907 --> 00:23:02.717
A router implements three, and costs less than the servers it serves.

00:23:02.767 --> 00:23:11.717
Cheap, ignorant middle boxes are why the Internet could grow without anyone's permission — nobody had to make the middle smart, because the design never asked it to be.

00:23:13.177 --> 00:23:15.057
And look at the router's stack.

00:23:15.107 --> 00:23:18.647
Bottom floors only, moving parcels it cannot read.

00:23:18.697 --> 00:23:21.737
This is the post office from the Maria-and-Ann slide.

00:23:21.787 --> 00:23:26.946
Same character, bigger network.

00:23:26.996 --> 00:23:28.556
Second checkpoint.

00:23:28.606 --> 00:23:32.786
Same rule — pause, paper, no scrolling back.

00:23:32.836 --> 00:23:34.046
One.

00:23:34.096 --> 00:23:41.056
Name the five TCP/IP layers bottom-up, with the unit each one exchanges.

00:23:41.106 --> 00:23:42.276
Two.

00:23:42.326 --> 00:23:47.436
Why must a router reach the network layer — and why must it go no higher?

00:23:47.486 --> 00:23:48.666
Three.

00:23:48.716 --> 00:23:54.116
Which is the only layer that adds a trailer as well as a header?

00:23:54.166 --> 00:23:58.596
Pause now.

00:23:58.646 --> 00:23:59.536
Answers.

00:23:59.586 --> 00:24:08.536
The first: physical with bits, data link with frames, network with datagrams, transport with segments or user datagrams, and application with messages.

00:24:10.476 --> 00:24:17.936
If you recited them top-down, that is acceptable — but practice bottom-up, because that is how Forouzan numbers them.

00:24:17.986 --> 00:24:24.586
The second: choosing routes is the network layer's own job, so a router must climb exactly that high.

00:24:24.636 --> 00:24:33.076
Transport is end-to-end, between the two hosts only — so a router has no business there, and the floor is simply not built.

00:24:33.126 --> 00:24:42.076
And the third: the data link layer — link addresses in the header, error-check bits in the trailer.

00:24:42.890 --> 00:24:44.360
Section three.

00:24:44.410 --> 00:24:45.810
Encapsulation.

00:24:45.860 --> 00:24:47.570
You now own the tower.

00:24:47.620 --> 00:24:56.570
For the next stretch of this session we put one message in the lift, ride it down, across a router, and back up — and we read what is written on every wrapper.

00:24:57.660 --> 00:25:04.073
This is the densest part of the session; take it slowly.

00:25:04.123 --> 00:25:07.943
We start at the source host, at the top of the tower.

00:25:07.993 --> 00:25:13.113
The application produces the message — say, your HTTP request — and hands it down.

00:25:13.163 --> 00:25:18.583
Now watch the wrapping, one floor at a time.

00:25:18.633 --> 00:25:23.713
Transport wraps the message in TH — the transport header.

00:25:23.763 --> 00:25:29.333
Inside TH live the port numbers: the addresses of the two PROGRAMS.

00:25:29.383 --> 00:25:32.093
The parcel is now a segment.

00:25:32.143 --> 00:25:40.533
The word is mechanical: to encapsulate is to put in a capsule — the payload goes inside, the header goes around it.

00:25:40.583 --> 00:25:48.043
The network layer wraps NH around the segment — source and destination IP addresses.

00:25:48.093 --> 00:25:51.013
The parcel is now a datagram.

00:25:51.063 --> 00:25:53.873
And transport's header just became cargo.

00:25:53.923 --> 00:26:00.903
The network layer does not read TH, does not understand TH, does not care that TH exists.

00:26:00.953 --> 00:26:05.723
It treats everything handed down from above as one opaque payload.

00:26:05.773 --> 00:26:10.583
Every layer does this, and it is the reason the whole scheme works.

00:26:10.633 --> 00:26:14.633
The data link layer adds a header AND a trailer.

00:26:14.683 --> 00:26:21.553
DH carries the link addresses for this one hop; DT carries the error-check bits at the tail.

00:26:21.603 --> 00:26:27.053
The parcel is now a frame — ready for this link, and only this link.

00:26:27.103 --> 00:26:30.253
And the physical layer does not wrap anything.

00:26:30.303 --> 00:26:36.253
It shatters the frame into individual bits and signals them onto the medium.

00:26:36.303 --> 00:26:38.513
Three wraps, then bits.

00:26:38.563 --> 00:26:42.903
Now look back up the slide at the grey block that appears in every row.

00:26:42.953 --> 00:26:49.693
Through all of this — three wrappers, three sets of addresses — the message itself was never touched.

00:26:49.743 --> 00:26:53.153
Not compressed, not edited, not even read.

00:26:53.203 --> 00:26:57.239
Wrapped, only.

00:26:57.289 --> 00:26:59.159
Now the interesting machine.

00:26:59.209 --> 00:27:07.499
The bits cross the first link and arrive at a router — and remember from section two: a router owns the bottom three floors only.

00:27:07.549 --> 00:27:09.569
The frame arrives on link one.

00:27:09.619 --> 00:27:18.209
The data link layer checks the frame is addressed to it — and at the link level it IS; that is exactly why the frame came here.

00:27:18.259 --> 00:27:26.129
So data link strips the link-one envelope: DH-one and DT-one are removed and discarded.

00:27:26.179 --> 00:27:28.719
Link one's frame is now garbage.

00:27:28.769 --> 00:27:30.729
Its whole life was one hop.

00:27:30.779 --> 00:27:36.729
What remains is the datagram: NH, TH, message, intact.

00:27:36.779 --> 00:27:39.979
The datagram goes up one floor.

00:27:40.029 --> 00:27:43.599
The network layer reads NH — and ONLY NH.

00:27:43.649 --> 00:27:51.539
Destination IP address, into the forwarding table, out comes a decision: the next hop is link two.

00:27:51.589 --> 00:27:53.829
That is the router's entire job.

00:27:53.879 --> 00:28:02.829
TH and the message stay sealed — the router does not know whether it is carrying your exam results or a video, and that ignorance is a feature, not a failing.

00:28:05.959 --> 00:28:14.909
Decision made, the datagram goes back down, and data link builds a brand-new frame for link two — new link addresses in DH-two, new trailer in DT-two.

00:28:17.119 --> 00:28:23.539
The parcel has been readdressed at the link level, while the IP addresses inside NH were not touched.

00:28:23.589 --> 00:28:25.519
It leaves on link two.

00:28:25.569 --> 00:28:28.289
Write these two lines down.

00:28:28.339 --> 00:28:30.579
Two links — two frames.

00:28:30.629 --> 00:28:32.959
One datagram, end to end.

00:28:33.009 --> 00:28:41.959
That second line is the identical-objects principle from Maria and Ann: the datagram is the identical object that both hosts' network layers hold, no matter how many frames were born and died carrying it.

00:28:49.455 --> 00:28:51.505
And the destination host.

00:28:51.555 --> 00:29:00.505
The ascent mirrors the descent, so this is brisk. Each floor asks one question and strips one wrapper, and here are all four questions.

00:29:01.265 --> 00:29:04.695
Data link asks: is this frame for me?

00:29:04.745 --> 00:29:06.665
The link address says yes.

00:29:06.715 --> 00:29:10.895
It strips DH and DT, checking the error bits on the way.

00:29:10.945 --> 00:29:13.095
The frame has done its job.

00:29:13.145 --> 00:29:17.095
The network layer asks: is this IP address me?

00:29:17.145 --> 00:29:22.275
Yes — which means the journey is over; there is no next hop to compute.

00:29:22.325 --> 00:29:24.205
It strips NH.

00:29:24.255 --> 00:29:28.825
Transport asks: which program does this belong to?

00:29:28.875 --> 00:29:34.125
The port number in TH answers, and the segment is handed to the right program.

00:29:34.175 --> 00:29:36.155
It strips TH.

00:29:36.205 --> 00:29:39.635
And the application receives the message.

00:29:39.685 --> 00:29:43.685
Ann reads exactly — bit for bit — what Maria wrote.

00:29:43.735 --> 00:29:47.875
Three wrappers on, three wrappers off, nothing else touched.

00:29:47.925 --> 00:29:53.475
The order of the ascent is not a convention someone chose; it is a necessity.

00:29:53.525 --> 00:30:02.475
Each layer removes exactly the header its twin added, in reverse order — because you can only ever read the OUTERMOST label.

00:30:02.705 --> 00:30:07.475
It is the same reason you cannot read a letter without opening the envelope first.

00:30:07.525 --> 00:30:14.072
Decapsulation is forced to mirror encapsulation.

00:30:14.122 --> 00:30:19.982
You have now seen the descent, the router, and the ascent as three separate slides.

00:30:20.032 --> 00:30:26.782
Here is the demonstration — all of it in motion, thirty-eight seconds. Watch the colors.

00:30:26.832 --> 00:30:30.992
Watch it once, clean, without pausing.

00:30:31.042 --> 00:30:38.532
Follow one thing all the way through: the message block, and what happens around it.

00:30:38.582 --> 00:30:42.162
Now replay it, and pause at each wrap.

00:30:42.212 --> 00:30:50.372
At the source: message, then segment, then datagram, then frame, then bits — say the unit names as they appear.

00:30:50.422 --> 00:30:59.372
At the router: watch the frame die and a new one get born, while the datagram inside rides straight through.

00:31:01.722 --> 00:31:09.972
And at the destination: the wrappers come off in exactly the reverse order they went on.

00:31:10.022 --> 00:31:17.932
Before you go on, answer one question from the freeze frame: which machines touched the blue transport header?

00:31:17.982 --> 00:31:23.657
The next slide checks your answer.

00:31:23.707 --> 00:31:26.207
Two questions about what you just watched.

00:31:26.257 --> 00:31:33.727
Answer each one before you let its answer appear — this pair of questions is the entire section, compressed.

00:31:33.777 --> 00:31:35.267
Question one.

00:31:35.317 --> 00:31:44.047
Across the whole journey — source, routers, destination — which machines touched TH, the transport header?

00:31:44.097 --> 00:31:46.057
Only the two hosts.

00:31:46.107 --> 00:31:51.377
Every router carried TH as sealed cargo inside the datagram, never opened, never read.

00:31:51.427 --> 00:31:59.677
Transport is end-to-end — nothing in the middle of the path even has the floor that could read it.

00:31:59.727 --> 00:32:01.247
Question two.

00:32:01.297 --> 00:32:05.197
And the frame headers — DH and DT?

00:32:05.247 --> 00:32:07.997
Different ones on each link.

00:32:08.047 --> 00:32:13.067
Born at one end of a link, dead at the other, replaced at every router.

00:32:13.117 --> 00:32:15.307
Two links, two frames.

00:32:15.357 --> 00:32:19.207
The wrapper is per-hop; the datagram is per-journey.

00:32:19.257 --> 00:32:23.407
If both answers came back right, encapsulation has landed.

00:32:23.457 --> 00:32:27.697
To drive this yourself, open the layer stepper on the course page.

00:32:27.747 --> 00:32:36.697
Step a message down and up the stack one layer at a time, first on the preset 'Host to host, same LAN', then on 'Across one router'.

00:32:37.607 --> 00:32:43.027
Ask yourself at every step: what unit am I holding, and who can read which header?

00:32:43.077 --> 00:32:50.487
Watch particularly how high the switch climbs — layer two and no further — and what the router does to the frame.

00:32:50.537 --> 00:32:59.487
And take the closing sentence with you: each layer reads only its own header, and treats everything inside as opaque payload.

00:32:59.947 --> 00:33:08.221
That is the driver reading the container label — drawn in full, with the machinery showing.

00:33:08.271 --> 00:33:13.011
So far the wrappers were anonymous — time to read what is actually written on them.

00:33:13.061 --> 00:33:19.041
Any communication between two parties needs two addresses: source and destination.

00:33:19.091 --> 00:33:21.731
Five layers, but only four pairs.

00:33:21.781 --> 00:33:23.871
Let us go down the tower.

00:33:23.921 --> 00:33:30.871
The application layer: names. someorg.com; somebody@coldmail.com.

00:33:30.921 --> 00:33:33.891
Human-shaped, because humans type them.

00:33:33.941 --> 00:33:36.901
Transport: port numbers.

00:33:36.951 --> 00:33:41.421
And be precise about what they identify — the PROGRAMS at each end.

00:33:41.471 --> 00:33:42.751
Not machines.

00:33:42.801 --> 00:33:44.291
Programs.

00:33:44.341 --> 00:33:47.421
Network: the IP address.

00:33:47.471 --> 00:33:56.041
Logical, hierarchical, globally meaningful — the whole Internet is its scope, and it is unchanged from end to end.

00:33:56.091 --> 00:33:59.231
Data link: the MAC address.

00:33:59.281 --> 00:34:08.231
Forty-eight bits, flat, no structure — local currency, THIS network only, and as you watched three times today, new at every hop.

00:34:09.301 --> 00:34:11.721
And the physical layer: nothing.

00:34:11.771 --> 00:34:16.631
Its unit is one bit, and a bit cannot carry an address.

00:34:16.681 --> 00:34:18.791
Five layers, four pairs.

00:34:18.841 --> 00:34:21.381
One footnote, one sentence only.

00:34:21.431 --> 00:34:30.381
The headers do one more job besides addressing: each carries a field naming which upper protocol the payload belongs to, so that transport knows whether to hand up to the browser or the mail program.

00:34:33.981 --> 00:34:42.931
That mechanism is called multiplexing and demultiplexing. Section four of this session is where it is taught; no later session returns to it.

00:34:46.784 --> 00:34:51.824
You have watched the descent, the ascent, and the router in between.

00:34:51.874 --> 00:34:57.494
Now here is the same journey with a step button, so you can stop it wherever you are unsure.

00:34:57.544 --> 00:35:06.064
Maria's five floors on the left, Ann's five floors on the right, and the scenario at the top: same LAN, through a switch.

00:35:06.114 --> 00:35:11.504
Every click is exactly one layer's work — no more, no less.

00:35:11.554 --> 00:35:16.004
Step, and the application layer hands down a message.

00:35:16.054 --> 00:35:22.074
Step again, and transport adds its header — TH — and the message becomes a segment.

00:35:22.124 --> 00:35:26.574
Notice the unit name changes at the same instant the header goes on.

00:35:26.624 --> 00:35:30.224
That is not a coincidence; it is the definition.

00:35:30.274 --> 00:35:38.734
Network adds NH and it becomes a datagram; data link adds a header and a trailer and it becomes a frame.

00:35:38.784 --> 00:35:47.734
And at the bottom, the wrapping stops and the frame becomes bits — individual signals on the medium, with no blocks left to draw.

00:35:48.444 --> 00:35:51.184
Then the same thing backwards.

00:35:51.234 --> 00:35:56.554
Every strip on Ann's side is performed by the layer that matches the one that wrapped it.

00:35:56.604 --> 00:35:59.174
Layer two opens what layer two wrote.

00:35:59.224 --> 00:36:02.164
Layer three opens what layer three wrote.

00:36:02.214 --> 00:36:06.154
Nobody peeks upward, and nobody peeks downward.

00:36:06.204 --> 00:36:09.544
Now the scenario across one router.

00:36:09.594 --> 00:36:16.104
Watch the middle column — the router has three floors, not five, and the message stops at layer three.

00:36:16.154 --> 00:36:22.264
It reads the network header, decides where to send it, and then builds a NEW frame for link two.

00:36:22.314 --> 00:36:27.264
Different frame, different data-link header, same datagram inside.

00:36:27.314 --> 00:36:36.264
And if you only care about one floor, put the lens on it — only layer three — and the tool shows you nothing but that layer's work, at both hosts and at the router.

00:36:38.524 --> 00:36:41.834
Thirteen steps in total on this one-router path.

00:36:41.884 --> 00:36:50.587
Step through it once yourself before you answer the session's question, which uses a ten-router path.

00:36:50.827 --> 00:36:57.157
Third checkpoint — and this one is timed in the classroom version, so give yourself sixty seconds.

00:36:57.207 --> 00:36:59.017
Pause and answer on paper.

00:36:59.067 --> 00:37:00.277
One.

00:37:00.327 --> 00:37:05.027
A link-layer switch, forwarding — which address does it read?

00:37:05.077 --> 00:37:06.227
Two.

00:37:06.277 --> 00:37:11.927
A router in Singapore, forwarding your datagram — which address does it read?

00:37:11.977 --> 00:37:13.157
Three.

00:37:13.207 --> 00:37:17.527
The fiber in the wall — how many layers does it hold?

00:37:17.577 --> 00:37:21.617
Pause now.

00:37:21.667 --> 00:37:23.097
Answers.

00:37:23.147 --> 00:37:27.107
One — the link address, the MAC address.

00:37:27.157 --> 00:37:31.877
Layer two is all a switch has; IP is invisible to it.

00:37:31.927 --> 00:37:37.517
Two — the destination IP address, in the network header, and nothing above it.

00:37:37.567 --> 00:37:40.177
The ports and the message stay sealed.

00:37:40.227 --> 00:37:41.447
Three — zero.

00:37:41.497 --> 00:37:44.367
The medium sits BELOW the physical layer.

00:37:44.417 --> 00:37:49.137
It carries signals, not bits, and nothing about it has an address.

00:37:49.187 --> 00:37:58.137
And a warning: if you swapped answers one and two, your scope column is inverted — you have link addresses global and IP local, which is exactly backwards.

00:37:59.447 --> 00:38:02.367
Link is local; IP is global.

00:38:02.417 --> 00:38:10.207
Fix it tonight; the addressing sessions from Session 9 onward depend on it.

00:38:10.257 --> 00:38:11.647
Section four.

00:38:11.697 --> 00:38:14.417
Before we answer the driver — the rival.

00:38:14.467 --> 00:38:18.877
There is a seven-layer model in every textbook, including yours.

00:38:18.927 --> 00:38:22.537
On paper it is more complete than TCP/IP.

00:38:22.587 --> 00:38:29.841
The Internet does not run it, and the reasons why are worth five minutes.

00:38:29.891 --> 00:38:38.841
In the late nineteen-seventies, the ISO — the International Organization for Standardization, a multinational standards body — set out to design the model for connecting all systems: the Open Systems Interconnection model, OSI.

00:38:41.731 --> 00:38:46.831
Seven layers, covering all aspects of network communication.

00:38:46.881 --> 00:38:55.831
From the bottom: physical, data link, network, transport — so far, familiar — and then three more: session, presentation, and application at the top.

00:38:56.981 --> 00:39:04.211
It was thorough, it was elegant, and it was intended to be THE standard, for everyone.

00:39:04.261 --> 00:39:07.631
Now put the five-layer TCP/IP suite beside it.

00:39:07.681 --> 00:39:14.331
Physical, data link, network, transport line up exactly, floor for floor.

00:39:14.381 --> 00:39:16.891
And then look at the top.

00:39:16.941 --> 00:39:23.161
Two floors are missing from TCP/IP: session and presentation.

00:39:23.211 --> 00:39:32.161
TCP/IP's application box swallows all three top floors of OSI — one layer doing, when it needs to, what OSI assigned to three.

00:39:36.471 --> 00:39:45.421
The next slide asks what those two extra floors were supposed to do, and where their jobs went.

00:39:47.366 --> 00:39:51.246
So what did OSI put between transport and application?

00:39:51.296 --> 00:39:55.496
Layer five, the session layer: manage the dialog.

00:39:55.546 --> 00:40:01.946
Open a conversation between the two sides, keep it healthy, close it down properly.

00:40:01.996 --> 00:40:03.756
Decide who speaks when.

00:40:03.806 --> 00:40:12.756
And place checkpoints along a long exchange — so that a two-hour transfer that breaks in the second hour can resume from the last checkpoint instead of restarting from zero.

00:40:14.466 --> 00:40:19.346
Layer six, the presentation layer: translate the data.

00:40:19.396 --> 00:40:28.346
Two different machines may represent information differently — different character codes, different number formats — so somebody must agree on a common representation at the boundary.

00:40:30.046 --> 00:40:38.996
OSI also placed encryption and compression here: transforming the data's form, on the way through, without changing its meaning.

00:40:39.246 --> 00:40:44.826
Those jobs are not fake, and this is the point to be precise about.

00:40:44.876 --> 00:40:48.766
The jobs are real; the FLOORS were not needed.

00:40:48.816 --> 00:40:57.766
TCP/IP never added them, because transport already covers some of their duties, and applications build the rest themselves whenever they actually need it.

00:40:58.756 --> 00:41:07.706
Your browser still encrypts, still compresses, still resumes broken downloads — all of it living inside the application layer, built per-application instead of imposed as a mandatory floor for everyone.

00:41:12.816 --> 00:41:20.706
That is a genuine design disagreement, not an accident: OSI said 'everyone gets these services, as layers'.

00:41:20.756 --> 00:41:24.216
TCP/IP said 'take them if you need them'.

00:41:24.266 --> 00:41:30.116
Keep that disagreement in mind for the next slide.

00:41:30.166 --> 00:41:32.916
So why does the Internet not run OSI?

00:41:32.966 --> 00:41:35.686
Three reasons, straight from your textbook.

00:41:35.736 --> 00:41:38.256
Reason one: too late.

00:41:38.306 --> 00:41:47.256
By the time OSI was ready to be adopted, TCP/IP was fully in place and running, with serious time and serious money already sunk into it.

00:41:49.576 --> 00:41:53.846
Nobody rebuilds a working network to honor a diagram.

00:41:53.896 --> 00:41:56.846
Reason two: never finished.

00:41:56.896 --> 00:42:05.666
Session and presentation had their services listed — but the protocols to deliver those services were never fully defined or built.

00:42:05.716 --> 00:42:08.106
A specification is not a product.

00:42:08.156 --> 00:42:11.226
You cannot deploy a table of contents.

00:42:11.276 --> 00:42:14.606
Reason three: never faster.

00:42:14.656 --> 00:42:21.986
Where OSI implementations were actually built and deployed, they never performed well enough to tempt anyone across.

00:42:22.036 --> 00:42:26.866
Switching has a cost, and there was no prize on the other side.

00:42:26.916 --> 00:42:34.336
The moral, and it is worth writing down because it recurs in engineering forever: deployed-and-working beats elegant-and-promised.

00:42:34.386 --> 00:42:43.336
Remember that sentence in Session 19, when we meet IPv6 — a better design, moving slowly for exactly these reasons.

00:42:44.166 --> 00:42:47.396
And yet — OSI is not gone.

00:42:47.446 --> 00:42:53.096
It survives as vocabulary, and its words are the industry's everyday shorthand.

00:42:53.146 --> 00:42:54.896
A 'layer 2 switch'.

00:42:54.946 --> 00:42:56.956
A 'layer 3 device'.

00:42:57.006 --> 00:42:59.016
A 'layer 7 firewall'.

00:42:59.066 --> 00:43:05.616
The whole industry numbers its boxes with OSI's floor plan, even though the building was never built.

00:43:05.666 --> 00:43:14.616
So learn the seven names: not because the Internet runs them, but because everyone speaks them.

00:43:14.756 --> 00:43:16.166
Fourth checkpoint.

00:43:16.216 --> 00:43:18.036
Pause and answer on paper.

00:43:18.086 --> 00:43:19.296
One.

00:43:19.346 --> 00:43:26.746
Which two layers does OSI have that TCP/IP does not — and where do they sit in the tower?

00:43:26.796 --> 00:43:27.946
Two.

00:43:27.996 --> 00:43:31.636
Give the three reasons OSI lost.

00:43:31.686 --> 00:43:32.836
Three.

00:43:32.886 --> 00:43:36.626
A vendor sells you a 'layer 7 firewall'.

00:43:36.676 --> 00:43:41.086
Which model is that number from — and what does the Internet actually run?

00:43:41.136 --> 00:43:45.186
Pause now.

00:43:45.236 --> 00:43:46.666
Answers.

00:43:46.716 --> 00:43:53.596
One — session and presentation, sitting between transport and application.

00:43:53.646 --> 00:43:59.086
Two — too late: TCP/IP was already deployed, with money sunk in.

00:43:59.136 --> 00:44:05.496
Never finished: the extra layers' protocols were listed but never fully defined or built.

00:44:05.546 --> 00:44:11.396
Never faster: existing implementations gave nobody a reason to switch.

00:44:11.446 --> 00:44:16.746
Three — the number is OSI's; layer seven is OSI's application layer.

00:44:16.796 --> 00:44:20.146
The Internet itself runs the five-layer TCP/IP suite.

00:44:20.196 --> 00:44:29.146
OSI is not deployed; its layer numbering is the industry's standard vocabulary.

00:44:30.715 --> 00:44:32.465
Section five.

00:44:32.515 --> 00:44:39.115
Back to the question from minute one — and this time we count the wraps, hop by hop.

00:44:39.165 --> 00:44:44.231
Get out the number you wrote down.

00:44:44.281 --> 00:44:53.231
Here was the question: one HTTP request, from your browser to the server — how many separate times is it wrapped, readdressed and unwrapped before the server reads it?

00:44:55.861 --> 00:45:04.811
To count, we need a concrete path, so take a typical one: your laptop, the campus switch, ten routers across the Internet, and the server.

00:45:05.761 --> 00:45:08.821
Now count with me, machine by machine.

00:45:08.871 --> 00:45:11.991
Your laptop wraps it three times.

00:45:12.041 --> 00:45:15.041
Transport wraps TH around the request.

00:45:15.091 --> 00:45:17.721
Network wraps NH around the segment.

00:45:17.771 --> 00:45:21.821
Data link wraps DH and DT around the datagram.

00:45:21.871 --> 00:45:29.241
Three wrap events — and then the physical layer signals the bits, which, as you now know, is not a wrap.

00:45:29.291 --> 00:45:31.441
The switch: zero.

00:45:31.491 --> 00:45:36.751
It reads the frame's link address and forwards the frame untouched.

00:45:36.801 --> 00:45:43.231
No wrapper added, no wrapper removed — which is exactly what 'bottom two floors' buys.

00:45:43.281 --> 00:45:46.871
Each router: one strip and one wrap.

00:45:46.921 --> 00:45:55.871
The old frame dies; the network layer reads the IP address and chooses the next link; a new frame is born, with new link addresses.

00:45:56.501 --> 00:46:02.341
Two events per router — and the datagram is readdressed at the link level every single time.

00:46:02.391 --> 00:46:05.941
Ten routers on our path: twenty events.

00:46:05.991 --> 00:46:14.941
And the server strips three times: off comes the frame, off comes the datagram's network header, off comes the transport header — and at last a web server program reads your HTTP request, exactly as your browser wrote it.

00:46:22.131 --> 00:46:24.311
Add it up.

00:46:24.361 --> 00:46:33.311
Three plus twenty plus three: twenty-six separate wrap-and-unwrap events — thirteen wraps and thirteen strips — for one request, on one perfectly ordinary path.

00:46:34.991 --> 00:46:38.731
Compare that with the number you wrote down.

00:46:38.781 --> 00:46:45.321
And the count does not include the request itself: it was never touched, not once, by anything.

00:46:45.371 --> 00:46:54.321
If your path has more routers, the total grows by two per router — the structure, three plus two-per-router plus three, is the real answer; the twenty-six is just our path's arithmetic.

00:47:00.401 --> 00:47:04.111
And now the driver from section one, paid off in full.

00:47:04.161 --> 00:47:07.541
Line the two worlds up, wrapper by wrapper.

00:47:07.591 --> 00:47:10.181
The letter is the message.

00:47:10.231 --> 00:47:16.671
Read by Ann alone — by the application at the far end, and by nothing else in the world.

00:47:16.721 --> 00:47:20.871
The envelope, with a name on it, is the segment.

00:47:20.921 --> 00:47:27.511
Opened at the very last step by Ann's transport layer, and the name on it is the port — which program.

00:47:27.561 --> 00:47:32.261
The courier bag, with its city code, is the datagram.

00:47:32.311 --> 00:47:37.381
Every router on the path reads the bag's IP label — and only that.

00:47:37.431 --> 00:47:40.191
And the container is the frame.

00:47:40.241 --> 00:47:49.191
Read by THIS hop's driver, and re-packed at every depot — exactly like the frame, born and dying on every link.

00:47:49.651 --> 00:47:53.231
So: which address does the driver read?

00:47:53.281 --> 00:47:54.781
The outermost one.

00:47:54.831 --> 00:47:55.841
His own.

00:47:55.891 --> 00:47:59.841
He does not know there is a letter inside, and he does not need to.

00:47:59.891 --> 00:48:04.461
One agreement per job, and each layer reads only its own header.

00:48:04.511 --> 00:48:13.461
That single sentence is layering, encapsulation and addressing at once — and it is why the driver is cheap, the post office is dumb, the letter is private, and the middle of the Internet could scale.

00:48:17.111 --> 00:48:26.061
If your answer at the start was 'the container label, obviously', your instinct was right. This session supplied the vocabulary for it.

00:48:28.769 --> 00:48:32.849
Before the recap, the five mistakes I see every year.

00:48:32.899 --> 00:48:37.839
For each one, predict the correction before I give it.

00:48:37.889 --> 00:48:44.109
Mistake one: 'a router rebuilds all five layers.' No. Bottom three only.

00:48:44.159 --> 00:48:50.599
It reads the network header, swaps the frame, and never opens the transport header or the message.

00:48:50.649 --> 00:48:59.079
If an exam asks what a router does with a segment, the answer is: nothing — it never sees one.

00:48:59.129 --> 00:49:08.079
Mistake two: 'every hop gives the datagram a new IP header.' No. The FRAME is new on every link; the datagram normally survives end to end, identical at both hosts.

00:49:12.309 --> 00:49:18.099
Carry this error into the addressing sessions and subnetting stops making sense.

00:49:18.149 --> 00:49:26.699
Mistake three: 'a link-layer switch reads IP addresses.' No. A switch lives at layers one and two.

00:49:26.749 --> 00:49:30.829
It forwards frames; IP is invisible to it.

00:49:30.879 --> 00:49:37.819
Mistake four: 'a port number identifies a computer.' No. Ports pick the PROGRAM.

00:49:37.869 --> 00:49:39.529
IP picks the host.

00:49:39.579 --> 00:49:42.879
Link addresses pick the stop on this one network.

00:49:42.929 --> 00:49:48.409
Three address types, three different questions being answered.

00:49:48.459 --> 00:49:57.409
And mistake five: 'OSI replaced TCP/IP', or its cousin, 'TCP/IP has seven layers.' No. OSI lost — too late, never finished, never faster — and the Internet runs the five-layer suite.

00:50:01.939 --> 00:50:10.889
The seven-layer picture is a model you must know, not a network that exists.

00:50:12.654 --> 00:50:17.534
Let me close the content by naming exactly what you should be able to do now.

00:50:17.584 --> 00:50:26.534
Explain why complex communication needs a stack of protocols rather than one, and what layering buys — division of labor, independence between floors, and the cheap middle box.

00:50:30.644 --> 00:50:39.554
Recite the five TCP/IP layers bottom-up, with each layer's job and its unit: bits, frames, datagrams, segments, messages.

00:50:39.604 --> 00:50:48.554
Trace one message down the stack, across a router, and back up — naming every header added and removed, in order, and saying who reads what.

00:50:53.894 --> 00:51:02.844
Match the four address pairs to their layers — names, ports, IP, MAC — and say which layer has none, and why.

00:51:03.574 --> 00:51:12.524
And compare OSI with TCP/IP: the two extra layers and what they were for, the three reasons OSI lost, and where its vocabulary survives.

00:51:15.244 --> 00:51:19.464
If any of those feel shaky, the section that covers it is still there.

00:51:19.514 --> 00:51:24.828
This is a video — use it as one.

00:51:24.878 --> 00:51:26.618
Five last questions.

00:51:26.668 --> 00:51:28.638
Pause and answer them on paper.

00:51:28.688 --> 00:51:29.888
One.

00:51:29.938 --> 00:51:32.598
A router receives a frame.

00:51:32.648 --> 00:51:36.038
Which headers does it read — and which does it never open?

00:51:36.088 --> 00:51:37.248
Two.

00:51:37.298 --> 00:51:40.348
Name the unit exchanged at each of the five layers, bottom-up.

00:51:40.398 --> 00:51:42.228
Three.

00:51:42.278 --> 00:51:46.838
Which is the only layer that adds a trailer?

00:51:46.888 --> 00:51:48.108
Four.

00:51:48.158 --> 00:51:51.198
A path crosses two routers.

00:51:51.248 --> 00:51:55.688
How many different frames carry the message — and how many datagrams?

00:51:55.738 --> 00:51:57.008
Five.

00:51:57.058 --> 00:52:02.498
Name the two OSI layers that TCP/IP does not have.

00:52:02.548 --> 00:52:06.598
Pause now.

00:52:06.648 --> 00:52:09.338
Take your time on these.

00:52:09.388 --> 00:52:17.918
One — the link header, to check the frame is for it, and the network header, to choose the next hop.

00:52:17.968 --> 00:52:21.618
It never opens the transport header or the message.

00:52:21.668 --> 00:52:26.278
Two — bits, frames, datagrams, segments or user datagrams, messages.

00:52:26.328 --> 00:52:29.188
Three — the data link layer.

00:52:29.238 --> 00:52:35.508
Four — two routers means three links, so three frames — and one datagram, end to end.

00:52:35.558 --> 00:52:38.288
Five — session and presentation.

00:52:38.338 --> 00:52:46.877
If you got all five, you own Chapter 2 — and Chapter 2 is most of the course's map.

00:52:46.927 --> 00:52:48.427
So take this with you.

00:52:48.477 --> 00:52:54.647
Wrap on the way down, strip on the way up — and read only your own label.

00:52:54.697 --> 00:53:01.757
That is layering, that is encapsulation, that is addressing — and it is most of the map of this course.

00:53:01.807 --> 00:53:09.267
Before the next session, read Forouzan sections three point one to three point three — signals, where bits become electricity.

00:53:09.317 --> 00:53:17.097
And watch the sine-wave clip on the course page; it is thirty-five seconds, and the next session opens assuming you have seen it.

00:53:17.147 --> 00:53:23.247
From memory, before you arrive: the five layers with their units, and the four address pairs.

00:53:23.297 --> 00:53:27.857
Bring a calculator from the next session onward — Chapter 3 computes.

00:53:27.907 --> 00:53:29.777
And two notes for your diary.

00:53:29.827 --> 00:53:38.637
Weekly Online Quiz A1 is live on the course website now — twenty minutes, one attempt, and it closes on Saturday at midnight.

00:53:38.687 --> 00:53:47.637
And Classroom Quiz 1 comes in Week 5, in the first thirty minutes of Session 9 — thirty minutes, twenty marks, in class and on paper.

00:53:48.547 --> 00:53:55.387
Several versions of that paper circulate in the room, so the only working strategy is to do the examples.

00:53:55.437 --> 00:53:59.977
See you in Session 4.
