YouTube2Text

OSI Model: A Practical Perspective - Part 2 - Networking Fundamentals - Lesson 2 — Transcript

by Practical Networking · 2,594 words · 444 segments · language en · Watch on YouTube

Full transcript

  1. 0:01hello welcome to another video from the
  2. 0:02first module of my new course on
  3. 0:04networking fundamentals
  4. 0:05this module will teach you everything
  5. 0:07you need to know to understand how
  6. 0:09packets move through the internet
  7. 0:11in this video we'll continue our
  8. 0:12discussion of the osi model from a
  9. 0:14practical perspective
  10. 0:16in the first part of this lesson we
  11. 0:17unpacked how layer 1 layer 2 and layer 3
  12. 0:20contribute to the overall goal of
  13. 0:21networking
  14. 0:23we discussed that layer 1 the physical
  15. 0:24layer was responsible for transporting
  16. 0:26ones and zeros across the wire
  17. 0:29we then illustrated how if this host has
  18. 0:31some data needs to send to this host
  19. 0:33it needs to start by adding a layer 3
  20. 0:35header which will facilitate carrying
  21. 0:37the data from one end to the other
  22. 0:39then a new layer 2 header will be added
  23. 0:41to carry the data from one hop to the
  24. 0:43next
  25. 0:44this will continue across the entire
  26. 0:46path between these two hosts
  27. 0:48if you haven't watched that video go
  28. 0:50ahead and pause this video and watch
  29. 0:52that one first
  30. 0:53there'll be a link in the description
  31. 0:54otherwise we'll continue right where we
  32. 0:56left off by discussing layer 4 of the
  33. 0:58osi model
  34. 0:59the transport layer the overall goal of
  35. 1:03the transport layer of the osi model
  36. 1:05is what i'm going to call service to
  37. 1:07service delivery
  38. 1:08let me explain what i mean by that here
  39. 1:10is a computer
  40. 1:12this computer has an ip address and has
  41. 1:14a mac address
  42. 1:16in a pretty common scenario whoever is
  43. 1:18using this computer has a web browser
  44. 1:20open and is browsing the web
  45. 1:22but maybe at the same time that user is
  46. 1:24also running some sort of chat program
  47. 1:26something like slack or discord or irc
  48. 1:29and at the very same time that user
  49. 1:30might
  50. 1:31also be running some sort of online game
  51. 1:33well
  52. 1:34each of those programs is meant to send
  53. 1:36and receive data on the wire
  54. 1:38all that data will be destined to this
  55. 1:40layer 3 header to accomplish end to end
  56. 1:42delivery
  57. 1:43and this layer 2 headers to accomplish
  58. 1:45hop to hop delivery
  59. 1:47the question then is how do we make sure
  60. 1:50the right program
  61. 1:51receives the right packets well that's
  62. 1:53where layer 4 comes into play
  63. 1:55layer 4 is there to distinguish data
  64. 1:57streams it's going to take all the
  65. 1:59incoming data
  66. 2:00and make sure that the right program
  67. 2:02receives the right data
  68. 2:05just like layer 3 had an addressing
  69. 2:07scheme to do
  70. 2:08end-to-end delivery and layer 2 had an
  71. 2:10addressing scheme to do
  72. 2:12hopped hop delivery layer 4 is also
  73. 2:14going to be using its own addressing
  74. 2:16scheme to accomplish its goal of service
  75. 2:18to service delivery
  76. 2:20layer 4's addressing scheme involves
  77. 2:22ports
  78. 2:23now there are two sets of ports there's
  79. 2:25zero to sixty five thousand for tcp
  80. 2:28and zero to sixty five thousand for udp
  81. 2:31tcp and udp are two different strategies
  82. 2:34for distinguishing data streams
  83. 2:36tcp favors reliability and udp favors
  84. 2:39efficiency
  85. 2:41both tcp and udp are simply different
  86. 2:43strategies for accomplishing the goal of
  87. 2:45layer 4.
  88. 2:46their inner workings are both
  89. 2:48significant and fascinating but
  90. 2:49unfortunately they are outside the scope
  91. 2:51of this lesson
  92. 2:52they will both be covered in detail in a
  93. 2:54later lesson in this course
  94. 2:56but the way they work is that every
  95. 2:58single program that's expected to
  96. 2:59receive
  97. 3:00or send data on the wire is going to be
  98. 3:02associated with a particular port number
  99. 3:04then when data arrives on the wire it's
  100. 3:07going to include
  101. 3:07a layer 4 header in addition to the
  102. 3:10layer 3 and the layer 2 header that
  103. 3:11we've already discussed
  104. 3:13that layer 4 header will indicate which
  105. 3:14particular program should be receiving
  106. 3:16that data
  107. 3:17and that's what layer four is going to
  108. 3:18use to make sure the right program
  109. 3:20receives the right
  110. 3:21ones and zeros so that's a high level
  111. 3:24overview of how layer four distinguishes
  112. 3:26data streams
  113. 3:28but let's pick it apart in more detail
  114. 3:32here is a client and three servers as we
  115. 3:34discussed in the first lesson
  116. 3:36a server is nothing more than a computer
  117. 3:38which is running software which knows
  118. 3:40how to respond to specific requests
  119. 3:44each of these pieces of software is
  120. 3:46assigned a predefined
  121. 3:47well-known port number which correlates
  122. 3:49to the underlying network
  123. 3:51application let's say bank.com is
  124. 3:54listening for secure web request
  125. 3:56using https which is assigned tcp port
  126. 3:59443
  127. 4:00and the server for site.com is
  128. 4:02responding to general web requests using
  129. 4:04http
  130. 4:06which by default listens on tcp port 80.
  131. 4:09and this chat server is running irc
  132. 4:12which stands for internet relay chat
  133. 4:14which is an online chat application
  134. 4:15which runs on udp port 6667
  135. 4:19when the client is making a request to
  136. 4:21these servers it's not only making a
  137. 4:22request to the ip address it's also
  138. 4:25going to make a request to the specific
  139. 4:26port in question
  140. 4:28then for each request made by the client
  141. 4:30the client is going to choose a random
  142. 4:32port number to use as the source port
  143. 4:34for the connection
  144. 4:36so a connection from our client to
  145. 4:38site.com would look like this
  146. 4:42includes a source port of 9999 that's
  147. 4:45the port that the client randomly
  148. 4:46selected for this particular connection
  149. 4:48the destination of this packet is
  150. 4:50destined to the ip address of site.com
  151. 4:53going to tcp port 80 which is the http
  152. 4:56application
  153. 4:57keep in mind that the source and
  154. 4:59destination ip addresses are going to
  155. 5:01exist in the layer 3 header of the
  156. 5:02packet
  157. 5:03and the source and destination port are
  158. 5:05going to exist in the layer 4 header of
  159. 5:07the packet
  160. 5:09now this randomly selected source port
  161. 5:11is actually very important
  162. 5:13it is actually the port the client will
  163. 5:15listen to for the response to the
  164. 5:17original request
  165. 5:19meaning when this server responds to
  166. 5:21this web request
  167. 5:22that packet will look like this notice
  168. 5:25the destination port
  169. 5:27is 9999 that's the same port that was
  170. 5:30initially selected by the client
  171. 5:31randomly on the outbound initial packet
  172. 5:35so for all connections there is always a
  173. 5:37source port and a destination port that
  174. 5:39are involved
  175. 5:40the destination port is typically
  176. 5:42governed by the application in use
  177. 5:44and the source port is randomly selected
  178. 5:46by the client
  179. 5:47so our connection from the client to
  180. 5:49site.com has the following attributes
  181. 5:52it is a tcp connection from this ip
  182. 5:54address and port
  183. 5:55to this ip address and port notice that
  184. 5:58in the initial packet
  185. 6:00this was the source and this was the
  186. 6:02destination
  187. 6:03and in the response packet it's the
  188. 6:04exact opposite this was the source
  189. 6:07and this was the destination
  190. 6:10this process occurs for each connection
  191. 6:12made by the client
  192. 6:13in each case the client is selecting a
  193. 6:15new random source port
  194. 6:18this makes it so that when all these
  195. 6:19servers respond whatever comes back
  196. 6:21on port 8888 will be given to the web
  197. 6:24browser
  198. 6:25and whatever comes back on port 7777
  199. 6:28will be given to the irc client
  200. 6:30in this way the data streams are kept
  201. 6:32isolated from each other
  202. 6:34these ports will ensure that the right
  203. 6:36application gets the right data
  204. 6:40this process also allows the client to
  205. 6:42make multiple connections to the same
  206. 6:43server
  207. 6:44consider when you are browsing the
  208. 6:46internet i imagine you've often had
  209. 6:48multiple tabs open to the same website
  210. 6:50well the reason each of those browser
  211. 6:51tabs don't accidentally display the data
  212. 6:53from another tab
  213. 6:55is that each time you open a new tab
  214. 6:57your client meaning your web browser
  215. 6:59generates a new random source port
  216. 7:03so that is how data streams are
  217. 7:04distinguished from one another
  218. 7:06it is a function of udp or tcp which are
  219. 7:09both layer 4 protocols
  220. 7:11and again layer 4's ultimate goal is
  221. 7:12what i'm calling service to service
  222. 7:14delivery of data
  223. 7:18which finally brings us to the last
  224. 7:20three layers of the osi model
  225. 7:22back when they first created the osi
  226. 7:24model each of these layers had a
  227. 7:26distinct function
  228. 7:27independent from the rest however
  229. 7:29currently
  230. 7:30the distinction between these layers is
  231. 7:32somewhat vague
  232. 7:33every application is in fact free to
  233. 7:35implement the functions of layer 5 6 and
  234. 7:377 as they choose
  235. 7:38therefore often these three layers are
  236. 7:41simply considered as a single
  237. 7:43universal application layer in fact
  238. 7:46the other popular internet communication
  239. 7:48model actually does
  240. 7:49exactly that the tcp model combines all
  241. 7:52the functions of the osi layers 5
  242. 7:546 and 7 into a single layer
  243. 7:58now the goal of this module is to teach
  244. 8:00you how data flows
  245. 8:01through the internet and the most
  246. 8:03critical layers to understand for that
  247. 8:04is layers one through four
  248. 8:06therefore we aren't going to pick apart
  249. 8:08the original intended distinction
  250. 8:10between layers 5 6 and 7. if you're
  251. 8:13curious however
  252. 8:14go ahead and let me know in the comments
  253. 8:16below and i can cover it in another
  254. 8:17video
  255. 8:18as for us we're going to follow the tcp
  256. 8:20model's lead and simply consider
  257. 8:22all three of these layers as the
  258. 8:24application
  259. 8:29so now that we've talked through the
  260. 8:31entire osi model i want to show you
  261. 8:33what's actually happening when hosts are
  262. 8:35communicating to each other using this
  263. 8:36networking stack
  264. 8:38this host has an application that's
  265. 8:40going to generate data that is meant to
  266. 8:41be sent to the other side
  267. 8:43what that host is going to go through is
  268. 8:45what's known as the encapsulation
  269. 8:46process
  270. 8:47that data will be first sent to layer 4.
  271. 8:50layer 4 is going to add a header to that
  272. 8:52data which can facilitate the goal of
  273. 8:54layer 4 which is service to service
  274. 8:56delivery
  275. 8:57in this case it is a tcp header which is
  276. 8:59going to include
  277. 9:00the source port and destination port for
  278. 9:02this particular data
  279. 9:04the construct of a layer 4 header plus
  280. 9:06data is known as a segment
  281. 9:08that segment is going to be passed down
  282. 9:10the osi stack
  283. 9:12to the next layer in this case layer 3
  284. 9:14the network layer
  285. 9:15and the network layer is going to add
  286. 9:17another header to this data
  287. 9:19this header is going to facilitate the
  288. 9:21goal of layer 3 which is end to end
  289. 9:23delivery meaning in this header you'll
  290. 9:25have something like a source ip address
  291. 9:27and a destination iputrus
  292. 9:31the construct of a layer 3 header and
  293. 9:33its data is known as a packet
  294. 9:36now notice that inside the data of the
  295. 9:38packet is the layer 4 header that was
  296. 9:40above it
  297. 9:41but from layer 3's perspective it
  298. 9:43doesn't know or doesn't care what's
  299. 9:44inside that data
  300. 9:45it's simply a bunch of ones and zeros
  301. 9:47that need to be delivered to the other
  302. 9:49end
  303. 9:50either way layer 3 will then take that
  304. 9:52packet and hand it off to layer 2
  305. 9:54and layer 2 will once again add another
  306. 9:56header to that data
  307. 9:58to accomplish layer 2's goal of hop to
  308. 10:00hop delivery
  309. 10:01meaning this header will include
  310. 10:03something like a source mac address and
  311. 10:04a destination mac address
  312. 10:06the construct of a layer 2 header and
  313. 10:08its ensuing data is known as a frame
  314. 10:11and that frame gets converted into ones
  315. 10:13and zeros and finally put
  316. 10:15on the wire on the other side the
  317. 10:17receiving host is going to do the
  318. 10:19opposite process it's going to do d
  319. 10:22encapsulation
  320. 10:23meaning it's going to take those ones
  321. 10:25and zeros off the wire to convert them
  322. 10:26back into their frame
  323. 10:28layer two is going to look at the layer
  324. 10:29two header to make sure that it is
  325. 10:31indeed addressed to this
  326. 10:32host's nic if it is it's going to
  327. 10:35discard that header and pass that up the
  328. 10:37stack
  329. 10:38then layer 3 is going to look at the ip
  330. 10:40header to confirm it is indeed addressed
  331. 10:42to this host's ip address if it is it's
  332. 10:45going to discard that layer 3 header and
  333. 10:47pass it up the stack
  334. 10:48to the transport layer layer 4 will then
  335. 10:51take a look at the layer 4 header
  336. 10:52to identify the port that this data is
  337. 10:54destined to and will deliver the data to
  338. 10:57the appropriate application
  339. 10:58the application can then finally process
  340. 11:00the data
  341. 11:02that is the process of encapsulation and
  342. 11:04de-encapsulation
  343. 11:06notice each layer is going to add
  344. 11:07information to the data
  345. 11:09in order to accomplish its goal
  346. 11:13and this brings us to the final idea i
  347. 11:14want to communicate to you about the osi
  348. 11:16model
  349. 11:17throughout this lesson we've mentioned
  350. 11:19that networking devices
  351. 11:21operate at specific layers for example
  352. 11:23switches and routers operate at layer 2
  353. 11:25and layer 3 respectively what that means
  354. 11:28is that they only look into the datagram
  355. 11:30up to their respective layer for example
  356. 11:33switches which are layer 2 devices
  357. 11:35are only looking at the frame meaning
  358. 11:37they're only looking at the layer 2
  359. 11:39header to make a decision
  360. 11:40they're not looking inside the data
  361. 11:42payload into the layer 3 and layer 4
  362. 11:44headers which we know exists there
  363. 11:46they're only looking up to the layer 2
  364. 11:48header
  365. 11:49moreover we've discussed that there are
  366. 11:51various protocols which operate at
  367. 11:52specific layers
  368. 11:54for instance the ip protocol is a layer
  369. 11:563 protocol
  370. 11:57tcp and udp are layer 4 protocols
  371. 12:01that said neither of these are strict
  372. 12:04rules
  373. 12:05there are exceptions to each of these
  374. 12:06that exist
  375. 12:08for example if you take a router which
  376. 12:10typically operates at layer 3
  377. 12:12but configure access list on that router
  378. 12:15now that router is looking into the
  379. 12:16layer 4 header to make a decision
  380. 12:18so the router isn't purely a layer 3
  381. 12:20device anymore
  382. 12:22moreover earlier in this lesson we
  383. 12:24discussed the arp protocol and we
  384. 12:25discussed how arp
  385. 12:26links a layer 2 address to a layer 3
  386. 12:28address links an ip address to a mac
  387. 12:30address
  388. 12:31which means arp doesn't purely fit in
  389. 12:33layer 3 nor does it purely fit in layer
  390. 12:352.
  391. 12:36the point i'm trying to make is that the
  392. 12:38osi model is simply a model
  393. 12:40it's not rigid rules that everything in
  394. 12:42networking adheres to
  395. 12:44it's simply a way to conceptualize what
  396. 12:46is required for data to flow
  397. 12:48through the internet and that wraps up
  398. 12:50our lesson on the osi model
  399. 12:53the main takeaway for this lesson is
  400. 12:55understanding that each layer of the osi
  401. 12:57model
  402. 12:57has a specific function that contributes
  403. 12:59the overall goal
  404. 13:01of allowing two hosts to share data with
  405. 13:03one another
  406. 13:04each layer uses its own addressing
  407. 13:06scheme to accomplish their various goals
  408. 13:08and finally there are various devices
  409. 13:10and protocols which operate at specific
  410. 13:12layers of the osi model
  411. 13:14which serve in accomplishing each
  412. 13:16layer's goal but do keep in mind
  413. 13:18exceptions do exist in the next lesson
  414. 13:21we'll be looking at everything a host
  415. 13:23does to put data on the wire
  416. 13:24but that's it for this lesson i hope you
  417. 13:27enjoyed this video
  418. 13:28i want to thank you for watching and
  419. 13:30i'll see you in the next lesson when we
  420. 13:31discuss
  421. 13:32everything a host does when
  422. 13:33communicating on the internet
  423. 13:35hey youtube i hope you enjoyed that free
  424. 13:37lesson for my new course on networking
  425. 13:39fundamentals
  426. 13:39i'll be releasing the entire first
  427. 13:41module for free here on youtube
  428. 13:43i want this course to be the ultimate
  429. 13:45networking fundamentals course and since
  430. 13:47i'm still scoping out the outline you
  431. 13:48could have a say in what topics will be
  432. 13:49covered
  433. 13:50let me know in the comments below what
  434. 13:52subjects you want included in this
  435. 13:53course
  436. 13:54otherwise remember to like and subscribe
  437. 13:56and of course if you learned something
  438. 13:57from this video the best way to thank me
  439. 13:59is to share this video
  440. 14:00it's a small act of gratitude but one i
  441. 14:02appreciate greatly
  442. 14:04i hope you enjoyed this lesson i want to
  443. 14:06thank you for watching and we'll see you
  444. 14:07in the next one

About this transcript

This page contains the full transcript of OSI Model: A Practical Perspective - Part 2 - Networking Fundamentals - Lesson 2 by Practical Networking, generated from the public captions YouTube serves with the video. The transcript has 2,594 words across 444 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.