YouTube2Text

4.2 What's inside a router? Part 2. — Transcript

by JimKurose · 3,505 words · 535 segments · language en · Watch on YouTube

Full transcript

  1. 0:00[Music]
  2. 0:09well now that we've got a really good
  3. 0:11appreciation for the pieces of the
  4. 0:13router the input ports the output ports
  5. 0:15and the switching fabric we're going to
  6. 0:17dive down deep into the topics of packet
  7. 0:20scheduling and buffer management and
  8. 0:22we've seen how important these are with
  9. 0:24the Internet's best effort service model
  10. 0:26packet loss and packet delay have had a
  11. 0:28profound effect on what has to happen
  12. 0:30the transport layers and the application
  13. 0:33layers so now we're going to dive down
  14. 0:35deep into the topics of packet
  15. 0:37scheduling and buffer management and
  16. 0:39we'll take a look at how those can be
  17. 0:41used to control and also mitigate packet
  18. 0:43loss and packet delay well let's get
  19. 0:47started by first taking a look at input
  20. 0:49port queuing remember that we saw
  21. 0:51earlier that input port queuing can
  22. 0:53happen when the routers switching fabric
  23. 0:56is less than the combined rates of its
  24. 0:58incoming links in this case more packets
  25. 1:00can arrive in a unit time then the
  26. 1:02switching fabric can possibly move from
  27. 1:05the input side of the fabric to the
  28. 1:06output side and so queuing can occur on
  29. 1:09the input side a queuing phenomena
  30. 1:12that's unique to the input side of the
  31. 1:14switching fabric is what's known as head
  32. 1:16of the line blocking or hol end of the
  33. 1:19line blocking occurs when packets at
  34. 1:21different input ports want to go to the
  35. 1:24same output port if only one pack at a
  36. 1:27time can be transferred from an input to
  37. 1:29a given output port and if there are K
  38. 1:32packets that want to go to the same
  39. 1:34output port then K minus 1 of those
  40. 1:36packets are going to have to wait on the
  41. 1:38input side of the switch and if packets
  42. 1:41have to wait they can also block the
  43. 1:43packets behind them in their input queue
  44. 1:46from moving forward and this is what's
  45. 1:48known as head of the line blocking take
  46. 1:51a look at this example here where the
  47. 1:53colors of the packets correspond to the
  48. 1:55output port to which they're destined in
  49. 1:57this example say at time T we see the
  50. 2:00top and bottom input ports have a red
  51. 2:03packet destined to the upper output port
  52. 2:06in one clock deck the upper red packet
  53. 2:09is transferred from the input to the
  54. 2:10output side of the switch the blue
  55. 2:13packet in the middle it's also able to
  56. 2:15move from its input port to its output
  57. 2:17port the red packet at the bottom
  58. 2:20however is
  59. 2:21locked from moving to the read output
  60. 2:23port since the packet at the top was
  61. 2:25already transferred there and so the
  62. 2:27green packet behind this lower red
  63. 2:29packet experiences head of the line
  64. 2:31blocking let's now focus on the output
  65. 2:35port side since this is really where the
  66. 2:37action is and let's start by seeing why
  67. 2:40buffering is needed in the first place
  68. 2:42at this output port we have a link with
  69. 2:45transmission rate of our bits per second
  70. 2:47and let's say we have a non-blocking
  71. 2:49switch capable of delivering end times
  72. 2:52our bits per second to the output port
  73. 2:54now we can see why buffering occurs bits
  74. 2:58can be arriving at a rate of end times
  75. 3:00are but bits can only be drained or
  76. 3:03transmitted out at a rate of are
  77. 3:05whenever the arrival rate exceeds the
  78. 3:08departure rate the buffer will fill and
  79. 3:10since buffers are finite there may not
  80. 3:12be enough buffer space to store all of
  81. 3:14the packets that need buffering and
  82. 3:16packets will have to be dropped there
  83. 3:18simply isn't enough memory to hold all
  84. 3:20of the packets that need buffering so
  85. 3:22right here at the output port is where
  86. 3:25congestive packet loss occurs and you
  87. 3:27know it may be tempting to say well it's
  88. 3:30really the switch fabrics fault it's
  89. 3:32delivering packets too fast at a rate of
  90. 3:35end times are when the link can only
  91. 3:37drain at rate R so we should slow the
  92. 3:39fabric down but that's not really the
  93. 3:42cause of the problem is it think back to
  94. 3:44our earlier discussion of principles of
  95. 3:46congestion control the real cause of the
  96. 3:49problem congestion is that there are too
  97. 3:52many transport layer senders at the edge
  98. 3:54of the network sending too many packets
  99. 3:56too fast packets whose paths cross at
  100. 4:00this congested output port in the face
  101. 4:03of buffering and congestion there are a
  102. 4:05couple of decisions that'll need to be
  103. 4:07made at the output port first if there's
  104. 4:10not enough room for all arriving packets
  105. 4:12a packet drop policy will be needed to
  106. 4:14determine which packets are going to be
  107. 4:16dropped and if there are multiple
  108. 4:18packets in the buffer awaiting
  109. 4:19transmission a packet scheduling
  110. 4:21discipline will be needed to choose
  111. 4:23which packets among the many cute
  112. 4:25packets will be transmitted next we'll
  113. 4:28look at both drop and scheduling
  114. 4:30policies in just a second now there are
  115. 4:32a lot of really important idea
  116. 4:34that we just talked about here on this
  117. 4:36slide so make sure you've got it all
  118. 4:38it's really important well you might be
  119. 4:43thinking given buffering is such a big
  120. 4:46concern how much buffering should a
  121. 4:48router have and more to the point you
  122. 4:50might also be thinking well hey
  123. 4:52shouldn't it be a good idea to invest in
  124. 4:54a lot of buffering with a lot of
  125. 4:57buffering there'd be less packet loss
  126. 4:58since there'll be more buffers to
  127. 5:00observe the burstiness and packet flows
  128. 5:02having more buffering must be a good
  129. 5:04thing right well it might surprise you
  130. 5:07that even after 50 years the question of
  131. 5:11how much buffering is the right amount
  132. 5:12of buffering is still pretty much an
  133. 5:14unresolved issue there are some
  134. 5:16recommendations you could take a look at
  135. 5:19RFC 3439 and find a rule of thumb that
  136. 5:22says the amount of buffering should
  137. 5:24equal a typical RTT say a couple hundred
  138. 5:27milliseconds times the output link
  139. 5:29capacity there's also been more a recent
  140. 5:32theoretical research that assumes that
  141. 5:34transport layer senders are generally
  142. 5:36independent of each other and recommends
  143. 5:39dividing the RFC 34:39 amount of
  144. 5:42buffering by the square root of n where
  145. 5:44n is the number of flows crossing the
  146. 5:46link and that's a lot less buffering and
  147. 5:49while you might have the sense that
  148. 5:51large buffers will generally result in
  149. 5:53less loss and you could be right
  150. 5:55large buffers do have a downside large
  151. 5:58buffers mean larger delays and larger RT
  152. 6:01T's large delays are bad for gamers and
  153. 6:04for interactive teleconferencing users
  154. 6:06where tens of milliseconds really do
  155. 6:08matter but maybe even more importantly
  156. 6:11large RTT delays mean that TCP senders
  157. 6:15will be slower to detect and therefore
  158. 6:17react to congestion you might recall
  159. 6:20that when we studied delay based
  160. 6:22congestion control we encountered the
  161. 6:24saying that we want to keep the
  162. 6:25bottleneck link just full enough to keep
  163. 6:28the link busy but no fuller but that was
  164. 6:31from the perspective of the sending
  165. 6:33hosts when we think about the amount of
  166. 6:35buffering we really do want buffers to
  167. 6:37absorb short term statistical
  168. 6:39fluctuation in packet arrival rates and
  169. 6:42to keep the link busy but not to have so
  170. 6:45much buffering that congestion control
  171. 6:47action times become slow and sluggish
  172. 6:50well buffering sort of like salt and
  173. 6:52cooking you've got to find the right
  174. 6:54amount
  175. 6:54just the right amount makes things
  176. 6:56better but too much can really ruin
  177. 6:58things well who would have thought that
  178. 7:01buffering and queuing at an output port
  179. 7:03could actually be so complicated and so
  180. 7:06subtle and you may ask yourself why is
  181. 7:08that and it's really because it's here
  182. 7:11at an output port buffer that the global
  183. 7:15behavior of potentially thousands of
  184. 7:17active senders worldwide are converging
  185. 7:20as their flows all pass through the
  186. 7:22single output link we see the
  187. 7:25convergence of global internet scale
  188. 7:27behavior at this one location deeply
  189. 7:30inside the internet that's pretty cool
  190. 7:34well we're next going to move on to the
  191. 7:37mechanisms for buffer management and
  192. 7:39packet scheduling and will find it
  193. 7:41useful to think of an output port
  194. 7:43abstractly as a queue as shown here of
  195. 7:46course we're all familiar with queuing
  196. 7:48systems in our daily lives banks at
  197. 7:51buses at bus stops at food stores at
  198. 7:54metros and many other places think about
  199. 7:57how many cubes you've been in today
  200. 7:59packets arrive to the queue they wait
  201. 8:02for service and they're eventually
  202. 8:03selected for service receive service and
  203. 8:06then leave the queue the link layer
  204. 8:08functions as the server when a packets
  205. 8:10bits are being transmitted over the
  206. 8:12outgoing link that packets in service if
  207. 8:16an arriving packet emerges from the
  208. 8:17switching fabric to find there's no free
  209. 8:19buffer space either that packets going
  210. 8:21to be dropped and that's known as tail
  211. 8:24drop or an already queued packet could
  212. 8:26be removed from the buffer and dropped
  213. 8:28to make room for this newly arriving
  214. 8:30packet say according to some kind of
  215. 8:32priority mechanism for example there
  216. 8:35might be a policy to drop low priority
  217. 8:37packets say carrying end-user TCP
  218. 8:40traffic rather than high priority
  219. 8:42packets say carrying Network management
  220. 8:44in control packets for the ISP as we
  221. 8:48also learned when we studied Network
  222. 8:50assisted congestion control a buffered
  223. 8:53packet may also be marked with a
  224. 8:55congestion indication to signal that the
  225. 8:57link is becoming congested we learned
  226. 8:59earlier that for the
  227. 9:01internet's explicit congestion
  228. 9:02notification ecn mechanism to bits in
  229. 9:06the IP header type of service field are
  230. 9:08used for ecn marking will see these bits
  231. 9:11in the IP datagram header in the next
  232. 9:13section when we study ipv4 but it's here
  233. 9:17at the output ports and where congestion
  234. 9:18occurs that these bits are going to be
  235. 9:21set we can now look at several packet
  236. 9:24scheduling disciplines that are used in
  237. 9:26practice under first come first serve
  238. 9:29scheduling packets are transmitted
  239. 9:31simply in the order in which they arrive
  240. 9:32to the output port we're all familiar
  241. 9:34with first-come first-serve queuing I'm
  242. 9:36guessing it's what people do the most we
  243. 9:39all join the back of the queue and
  244. 9:40customers are served from the front of
  245. 9:43the queue
  246. 9:43same thing with packets
  247. 9:46we're all familiar with priority queues
  248. 9:48you get that with Airlines platinum
  249. 9:50diamond gold silver or bronze class of
  250. 9:53service they all sound pretty fancy and
  251. 9:55great but you definitely rather be
  252. 9:57platinum than bronze and I think we all
  253. 9:59probably have an intuitive understanding
  254. 10:01of how priority disciplines work having
  255. 10:03been in the lower priority class of
  256. 10:05service and seeing later arriving people
  257. 10:08in higher priority classes getting
  258. 10:10service before us under priority
  259. 10:13scheduling packets arriving at the
  260. 10:15output link are classified into priority
  261. 10:17classes on arrival at the queue as shown
  262. 10:20here where we have a high priority red
  263. 10:23class of traffic and a lower priority
  264. 10:24green class of traffic the priority
  265. 10:27queueing discipline will transmit a
  266. 10:29packet from the highest priority class
  267. 10:30that has a non-empty queue that is has
  268. 10:34packets waiting for transmission the
  269. 10:36choice among packets in that same
  270. 10:37priority class is typically done in a
  271. 10:40first-come first-serve manner this
  272. 10:42animation shows packets arriving from
  273. 10:44the top entering service according to a
  274. 10:46priority discipline and then leaving the
  275. 10:49queue in this example packet one arrives
  276. 10:52finds the queue empty and enters service
  277. 10:55while packet one is in service packet
  278. 10:58two and three arrived when packet one
  279. 11:01finishes both packets two and three are
  280. 11:03buffered but packet three is chosen for
  281. 11:06transmission even though it arrived
  282. 11:07after packet two since it has higher
  283. 11:10priority than back at two and so on
  284. 11:18well we've now learned about the
  285. 11:20priority queuing mechanism but you may
  286. 11:22still be wondering what is it that
  287. 11:25defines a priority class in the first
  288. 11:27place how is it determined what goes
  289. 11:29into priority class 1 or priority class
  290. 11:312 for example and this is actually
  291. 11:33determined by the network operator by
  292. 11:36the ISP the ISP may decide that well
  293. 11:39network management traffic's really
  294. 11:41important it's the highest priority
  295. 11:43class voice-over-ip gets higher priority
  296. 11:46than email and so on and you remember
  297. 11:49that by looking at the transport layer
  298. 11:51port numbers one can determine what type
  299. 11:55of traffic is being carried by that data
  300. 11:57graph now traffic type is one way in
  301. 12:01which priorities could be determined
  302. 12:02another way might be on the basis of
  303. 12:05source or even destination addresses so
  304. 12:09here's another possible way to classify
  305. 12:11traffic into priority classes imagine
  306. 12:14that a company is willing to pay an
  307. 12:16internet service provider to give its
  308. 12:18packets better service packets are less
  309. 12:21likely to be dropped its packets suffer
  310. 12:24less delay as a result if it's a search
  311. 12:26company its search results get to users
  312. 12:28faster if it's voice over IP the voice
  313. 12:31is more responsive if it's streaming
  314. 12:33video there's less spinning meals well
  315. 12:36we've got the scheduling mechanisms to
  316. 12:38do that whether or not a company is able
  317. 12:41to pay for that kind of better service
  318. 12:43actually gets us into the topic of
  319. 12:45what's known as network neutrality we're
  320. 12:47going to cover that in just a second but
  321. 12:49first let's wrap up by looking at a few
  322. 12:51more scheduling disciplines so we've
  323. 12:55seen first-come first-serve and priority
  324. 12:57scheduling under round-robin scheduling
  325. 12:59packets are assigned to classes as with
  326. 13:02priority scheduling however rather than
  327. 13:05there being a strict service priority
  328. 13:07among classes a round-robin scheduler
  329. 13:10alternates service among classes for
  330. 13:13example a round-robin scheduler would
  331. 13:14choose a packet from class 1 followed by
  332. 13:17a packet from class 2 followed by a
  333. 13:19packet from class 3 and so on and if
  334. 13:22there's no packet of a given class the
  335. 13:24scheduler moves on to the next class in
  336. 13:26the schedule
  337. 13:28a generalized form of round-robin
  338. 13:30queuing that's been widely implemented
  339. 13:32in routers and practice is known as
  340. 13:35weighted fair queuing wfq light priority
  341. 13:39and round-robin scheduling arriving
  342. 13:41packets are classified and queued in the
  343. 13:43appropriate per class waiting area we
  344. 13:46see here red green and blue packets
  345. 13:49waiting for their service a weighted
  346. 13:51fair queuing scheduler schedules classes
  347. 13:53in a round-robin like manner first
  348. 13:56serving class 1 then serving class 2
  349. 13:58then serving class 3 and then assuming
  350. 14:01there are just three classes repeating
  351. 14:03that service pattern weighted fair
  352. 14:05queuing differs from round-robin
  353. 14:07in that each class can receive a
  354. 14:10different amount of service in any
  355. 14:11interval of time and here's how it works
  356. 14:14ideally each class of packets I has a
  357. 14:17weight W sub I let's assume that all of
  358. 14:21the weights the sum of W J say sum up to
  359. 14:241 under weighted fair queuing during any
  360. 14:27interval of time during which there are
  361. 14:29class I packets to send class I will
  362. 14:32then be guaranteed to receive a fraction
  363. 14:35of service W sub I that means if the
  364. 14:38link has a rate R then each class of
  365. 14:40service will get a guaranteed minimum
  366. 14:43amount of bandwidth W sub I times R and
  367. 14:46so we can see how weighted fair queuing
  368. 14:49allows some type of a bandwidth
  369. 14:51guaranteed to be made on a per class
  370. 14:53basis network neutrality is an area
  371. 14:58where our technical interests in
  372. 15:00computer networking intersect with
  373. 15:02social political and economic
  374. 15:03considerations well we've already seen
  375. 15:06the mechanisms for sharing resources but
  376. 15:10what about the social political and
  377. 15:11economic considerations about how those
  378. 15:14resources are shared let's take a look
  379. 15:18network neutrality is about the laws and
  380. 15:20policies that govern how an Internet
  381. 15:23service provider can use the traffic
  382. 15:25control mechanisms that we've just
  383. 15:26learned about packet scheduling in
  384. 15:28particular to control network traffic so
  385. 15:31what are some of the questions that
  386. 15:33network neutrality addresses well it's
  387. 15:36about a number of different things it's
  388. 15:38about free speech for example cannon
  389. 15:41Espie refused to carry some types of
  390. 15:43traffic for example certain types of
  391. 15:45news or political opinion it's also
  392. 15:48about encouraging innovation and about
  393. 15:51encouraging competition for example must
  394. 15:54an isp give all companies big and small
  395. 15:57equal treatment of their traffic as you
  396. 16:00probably know different countries have
  397. 16:02been adopting different stances with
  398. 16:04respect to these questions we're going
  399. 16:06to take a look at what's happening in
  400. 16:07the united states since this is well
  401. 16:09documented and has all been playing out
  402. 16:11pretty publicly our textbooks got some
  403. 16:14interesting references about net
  404. 16:16neutrality worldwide that you might want
  405. 16:18to take a look at in 2015 the United
  406. 16:21States Federal Communications Commission
  407. 16:23order on protecting and promoting an
  408. 16:26open Internet defined three clear bright
  409. 16:29line rules associated with network
  410. 16:32neutrality let's take a look at what
  411. 16:34they are the first bright line rule is
  412. 16:37no blocking and here's what it says it
  413. 16:39says that an isp quote unquote shall not
  414. 16:42block lawful content applications
  415. 16:45services or non-harmful devices subject
  416. 16:49to reasonable network management in
  417. 16:51quote now there's a lot packed in there
  418. 16:54the word lawful and applications
  419. 16:57services and devices well this rules
  420. 17:00about blocking traffic and there
  421. 17:02actually was a case involving an ISP
  422. 17:05that had a practice of blocking its
  423. 17:07customers from using vonage which is a
  424. 17:09voice over IP service that competed with
  425. 17:13this is p's own telephone service that
  426. 17:16would not be allowed and notice the
  427. 17:18phrase subject to reasonable network
  428. 17:21management will cover network management
  429. 17:23when we cover the network layer control
  430. 17:25plane but note here that it is allowable
  431. 17:27to block traffic for network management
  432. 17:29purposes say if the networks been
  433. 17:31degraded and then only trickles of
  434. 17:33traffic can get through then it's best
  435. 17:35that network management traffic be able
  436. 17:37to get through of course the question of
  437. 17:39what reasonable network management is is
  438. 17:41left open to interpretation
  439. 17:43the second bright-line rule is no
  440. 17:47throttling that is an isp quote unquote
  441. 17:50shall not impair or degrade lawful
  442. 17:53Internet
  443. 17:53effect on the basis of Internet content
  444. 17:55application or service or use of a non
  445. 17:58harmful device again subject to
  446. 18:01reasonable network management note here
  447. 18:04the words impaired or degrade there was
  448. 18:07a case not too long ago where an ISP was
  449. 18:10judged to be interfering with BitTorrent
  450. 18:12peer-to-peer traffic and it was doing
  451. 18:15this by internally creating and sending
  452. 18:17TCP reset packets to BitTorrent client
  453. 18:21and servers executing at the end host
  454. 18:23this caused the host to close their
  455. 18:25BitTorrent connections basically the ISP
  456. 18:28was closing the TCP connection
  457. 18:30underneath the BitTorrent application
  458. 18:32whose traffic it really didn't want and
  459. 18:35then finally there's the bright-line
  460. 18:36rule of no paid prioritization
  461. 18:43this means for example that video
  462. 18:45streaming traffic from all video
  463. 18:47streaming service providers must be
  464. 18:49treated the same for example that one
  465. 18:52streaming video service provider cannot
  466. 18:54pay to get its packets better service on
  467. 18:57their way to the customer and of course
  468. 18:59we've seen how this can be done from a
  469. 19:01technical point of view via priority
  470. 19:03queuing well you might ask why no paid
  471. 19:06prioritization since paying for a
  472. 19:08priority service seems well almost like
  473. 19:10a fact of life at least here in the
  474. 19:12United States well one of the arguments
  475. 19:15is that if say a video streaming service
  476. 19:17provider can pay for better service and
  477. 19:20if that successful incumbent the
  478. 19:23existing service provider can pay a lot
  479. 19:25then this introduces a high barrier to
  480. 19:28entry for new competitors and of course
  481. 19:30some countries want to encourage market
  482. 19:33competition but there are counter
  483. 19:35arguments to this claiming that creating
  484. 19:37additional revenues for an ISP by having
  485. 19:40paid prioritization is a good thing from
  486. 19:43a competitive point of view since that
  487. 19:45makes the ISP marketplace more lucrative
  488. 19:47and so more companies will want to
  489. 19:49invest in the ISP market or ISPs will
  490. 19:52want to invest more in their
  491. 19:54infrastructure and then finally there
  492. 19:57are laws going back almost a hundred
  493. 19:59years that have regulated the telephone
  494. 20:01network as a telecommunications service
  495. 20:04provider but there's much less
  496. 20:06regulation of information service
  497. 20:09providers so what is an ISP is it a
  498. 20:12telecommunication service provider or an
  499. 20:15information service provider well it
  500. 20:17turns out from a regulatory standpoint
  501. 20:19the answer to this question matters a
  502. 20:22lot in the US but the answer to this
  503. 20:25question has really not yet been finally
  504. 20:27determined
  505. 20:29well these bright-line rules are from a
  506. 20:312015 u.s. FCC order more recent FCC
  507. 20:36orders have actually rewritten much of
  508. 20:38that 2015 order
  509. 20:40so until laws are written and until
  510. 20:42there's further litigation and case law
  511. 20:44adopted I think it's fair to simply say
  512. 20:47that the situation continues to evolve
  513. 20:49and I think that's true in many
  514. 20:51countries it's interesting that we've
  515. 20:54had the ability to do
  516. 20:55prioritization since the internet first
  517. 20:57became public nearly 30 years ago so
  518. 21:00although the Internet has a strong
  519. 21:02technical foundation as we've seen three
  520. 21:04decades later our social political and
  521. 21:07economic policies governing this
  522. 21:09creation that have not yet been fully
  523. 21:11defined or agreed upon well that wraps
  524. 21:15up our discussion of packet scheduling
  525. 21:17and packet buffering and also what I
  526. 21:19hope was an interesting sidebar into the
  527. 21:21topic of network neutrality and more
  528. 21:23generally it wraps up our discussion of
  529. 21:26what's inside a router remember we also
  530. 21:28looked at input ports output ports and
  531. 21:30switching fabrics coming up next we're
  532. 21:33going to take a look at the Internet
  533. 21:34Protocol ipv4 so stay tuned for that
  534. 21:50you
  535. 21:52[Music]

About this transcript

This page contains the full transcript of 4.2 What's inside a router? Part 2. by JimKurose, generated from the public captions YouTube serves with the video. The transcript has 3,505 words across 535 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.