{"id":2002,"date":"2019-06-22T17:10:45","date_gmt":"2019-06-22T17:10:45","guid":{"rendered":"http:\/\/wiki.thomasandsofia.com\/?p=2002"},"modified":"2020-05-06T00:35:23","modified_gmt":"2020-05-06T00:35:23","slug":"section-5-osi-layer-4-transport-layer","status":"publish","type":"post","link":"https:\/\/wiki.thomasandsofia.com\/?p=2002","title":{"rendered":"Section 5: OSI Layer 4 &#8211; Transport Layer"},"content":{"rendered":"<hr \/>\n<p><a href=\"http:\/\/wiki.thomasandsofia.com\/?p=1990\">&lt; Section 4<\/a> | <a href=\"\/course-introduction\/\">Home<\/a> | <a href=\"\/section-6-the-osi-network-layer\/\">Section 6 &gt;<\/a><\/p>\n<p>11% Complete<\/p>\n<h1>The Transport Layer Header, TCP and UDP<\/h1>\n<p><a href=\"https:\/\/www.udemy.com\/cisco-icnd1\/learn\/lecture\/8589334#overview\" target=\"_blank\" rel=\"noopener\">https:\/\/www.udemy.com\/cisco-icnd1\/learn\/lecture\/8589334#overview<\/a><\/p>\n<h2>Transport Layer<\/h2>\n<ul>\n<li>The Transport layer provides transparent transfer of data between hosts and is responsible for end-to-end recovery and flow control<\/li>\n<li>Flow control is the process of adjusting the flow of data from the send to ensure that the receiving host can handle it.\n<ul>\n<li>If this is enabled and the receiving host cannot keep up with the sender, there is a mechanism in place telling the sender to slow down.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Session Multiplexing<\/h2>\n<ul>\n<li>Session multiplexing is the process by which a host is able to support multiple sessions simultaneously and manage the individual traffic streams over a single link.<\/li>\n<\/ul>\n<p><a href=\"http:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/multi.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2007\" src=\"http:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/multi.png\" alt=\"\" width=\"619\" height=\"207\" srcset=\"https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/multi.png 619w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/multi-300x100.png 300w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/multi-150x50.png 150w\" sizes=\"auto, (max-width: 619px) 100vw, 619px\" \/><\/a><\/p>\n<p>Port Numbers<\/p>\n<ul>\n<li>The Layer 4 destination port number is used to identify the upper layer protocol (i.e. which application the data is for).\n<ul>\n<li>HTTP uses Port 80<\/li>\n<li>SMTP uses Port 25<\/li>\n<\/ul>\n<\/li>\n<li>The sender also adds a source port number to the Layer 4 header<\/li>\n<li>The combination of source and destination port numbers can be used to track sessions<\/li>\n<\/ul>\n<p><a href=\"http:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/ports.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2008\" src=\"http:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/ports.png\" alt=\"\" width=\"623\" height=\"138\" srcset=\"https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/ports.png 623w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/ports-300x66.png 300w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/ports-150x33.png 150w\" sizes=\"auto, (max-width: 623px) 100vw, 623px\" \/><\/a><\/p>\n<p>Side Note: Stateful firewalls work by allowing data from the network back into the network from an outside host by validating the initial traffic was initiated from within the network.<\/p>\n<h2>TCP<\/h2>\n<ul>\n<li>TCP (Transport Control Protocol) and UDP (User Datagram Protocol) are the most common layer 4 protocols.<\/li>\n<li>TCP is connection oriented.\u00a0 Once a connection is established, data can be send bidirectionally over that connection.<\/li>\n<li>TCP carries out sequencing to ensure segments are processed in the correct order and none are missing.<\/li>\n<li>TCP is reliable.\u00a0 The receiving host sends acknowledgments back to the sender.\u00a0 Lost segments are resent.<\/li>\n<li>TCP performs flow control.\n<ul>\n<li>A type of speed control \/ throttle<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>TCP Three-Way Handshake<\/p>\n<ul>\n<li>SYN (Syncronize) &gt; SYN-ACK (Sync Acknowledgement) &gt; ACK<\/li>\n<\/ul>\n<p><a href=\"http:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/3-way.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2009\" src=\"http:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/3-way.png\" alt=\"\" width=\"605\" height=\"220\" srcset=\"https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/3-way.png 605w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/3-way-300x109.png 300w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/3-way-150x55.png 150w\" sizes=\"auto, (max-width: 605px) 100vw, 605px\" \/><\/a><\/p>\n<h3>TCP Header Encapsulation Overview<\/h3>\n<p><a href=\"http:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/encapov.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2010\" src=\"http:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/encapov.png\" alt=\"\" width=\"604\" height=\"301\" srcset=\"https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/encapov.png 604w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/encapov-300x150.png 300w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/encapov-150x75.png 150w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/a><\/p>\n<h3>TCP Header<\/h3>\n<p><a href=\"http:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/tcpheader.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2011\" src=\"http:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/tcpheader.png\" alt=\"\" width=\"554\" height=\"288\" srcset=\"https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/tcpheader.png 554w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/tcpheader-300x156.png 300w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/tcpheader-150x78.png 150w\" sizes=\"auto, (max-width: 554px) 100vw, 554px\" \/><\/a><\/p>\n<ul>\n<li>Source and Destination Ports<\/li>\n<li>Sequence number<\/li>\n<li>Ack number<\/li>\n<li>Size of Header<\/li>\n<li>Code bits and Window are used for Flow Control<\/li>\n<li>Checksum for data integrity<\/li>\n<li>Urgent (Optional)<\/li>\n<li>Options (Optional, duh!)<\/li>\n<li>Data<\/li>\n<\/ul>\n<h2>UDP &#8211; User Datagram Protocol<\/h2>\n<ul>\n<li>The User Datagram Protocol sends traffice &#8216;best effort&#8217;<\/li>\n<li>UDP is not connection oriented.\u00a0 There is no handshake connection setup between the hosts<\/li>\n<li>UDP does not carry out sequencing to ensure segments are processed in the correct order or that none are missing.<\/li>\n<li>UDP is NOT RELIABLE.\u00a0 The receiving host does not acknowledge if the data was ever received.<\/li>\n<li>UDP does not perform flow control<\/li>\n<li>If error detection and recovery is required, it is up to the upper layers to provide it.<\/li>\n<\/ul>\n<h3>UDP Header<\/h3>\n<p><a href=\"http:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/udpheader.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2012\" src=\"http:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/udpheader.png\" alt=\"\" width=\"427\" height=\"172\" srcset=\"https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/udpheader.png 427w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/udpheader-300x121.png 300w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2019\/06\/udpheader-150x60.png 150w\" sizes=\"auto, (max-width: 427px) 100vw, 427px\" \/><\/a><\/p>\n<h1>TCP vs UDP<\/h1>\n<ul>\n<li>Application developers will typically choose to use TCP for traffic which requires reliability.<\/li>\n<li>Real-time applications such as voice and video can&#8217;t aford the extra overhead of TCP so they use UDP.\n<ul>\n<li>i.e. latency sensitive data<\/li>\n<\/ul>\n<\/li>\n<li>Some applications can use both TCP and UDP.<\/li>\n<\/ul>\n<p>Common Applications and Ports<\/p>\n<ul>\n<li>TCP\n<ul>\n<li>FTP: 21<\/li>\n<li>SSH: 22<\/li>\n<li>Telnet: 23<\/li>\n<li>HTTP: 80<\/li>\n<li>HTTPS: 443<\/li>\n<\/ul>\n<\/li>\n<li>UDP\n<ul>\n<li>TFTP: 69<\/li>\n<li>SNMP: 161<\/li>\n<\/ul>\n<\/li>\n<li>TCP &amp; UDP\n<ul>\n<li>DNS: 53<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&lt; Section 4 | Home | Section 6 &gt; 11% Complete The Transport Layer Header, TCP and UDP https:\/\/www.udemy.com\/cisco-icnd1\/learn\/lecture\/8589334#overview Transport Layer The Transport layer provides transparent transfer of data between hosts and is responsible for end-to-end recovery and flow control Flow control is the process of adjusting the flow of data from the send to ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/wiki.thomasandsofia.com\/?p=2002\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2002","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/2002","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2002"}],"version-history":[{"count":6,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/2002\/revisions"}],"predecessor-version":[{"id":2834,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/2002\/revisions\/2834"}],"wp:attachment":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2002"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2002"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2002"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}