<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Network Fundamentals on punt2cpu</title>
    <link>https://punt2cpu.net/categories/network-fundamentals/</link>
    <description>Recent content in Network Fundamentals on punt2cpu</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Thu, 22 Feb 2018 18:36:52 +0000</lastBuildDate>
    <atom:link href="https://punt2cpu.net/categories/network-fundamentals/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>More about TCP</title>
      <link>https://punt2cpu.net/2018/02/22/more-about-tcp/</link>
      <pubDate>Thu, 22 Feb 2018 18:36:52 +0000</pubDate>
      <guid>https://punt2cpu.net/2018/02/22/more-about-tcp/</guid>
      <description>&lt;p&gt;Just finished the TCP course from **INE ** :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&#34;https://streaming.ine.com/c/ccie-rs-understaning-tcp&#34;&gt;CCIE R&amp;amp;S: Understanding Transmission Control Protocol (TCP) &lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Really recommend this to anyone who is interested in a bit deeper dive of how TCP works, great quality content, **&lt;a href=&#34;https://www.linkedin.com/in/keith-bogart-2a75042/&#34;&gt;Keith Bogart&lt;/a&gt; **is doing amazing job as instructor !&lt;/p&gt;
&lt;p&gt;Some TCP facts which I didn&amp;rsquo;t mentioned in my previous post :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Before TCP connection is established TCP goes through the following steps:&lt;/li&gt;
&lt;li&gt;Closed Initial State&lt;/li&gt;
&lt;li&gt;Active Open (APP notifies the CPU and requests for service time) - client side&lt;/li&gt;
&lt;li&gt;Transmission Control Block setup process  - CPU creates TCB to keep track of each new TCP connection - for each TCP session we create a new TCB with unique identifier (socket - &lt;strong&gt;SRC IP; SRC TCP Port; DST IP; DST TCP Port&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;Initial sequence number will be random to prevent attacks on TCP&lt;/li&gt;
&lt;li&gt;When TCB is ready we are sending SYN(x random Seq# number) - this is called a &lt;strong&gt;Syn Sent State&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Receiving Syn(y random seq# number from server) + ACK (seq# x + 1)&lt;/li&gt;
&lt;li&gt;Sending ACK(seq# y+1) for that&lt;/li&gt;
&lt;li&gt;TCP Client side state changes to Established&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is Active Open - TCB creation process, initiated only per need of client.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Flowcontrol IEEE 802.3x</title>
      <link>https://punt2cpu.net/2018/02/21/a-bit-about-old-l2-flow-control/</link>
      <pubDate>Wed, 21 Feb 2018 19:04:19 +0000</pubDate>
      <guid>https://punt2cpu.net/2018/02/21/a-bit-about-old-l2-flow-control/</guid>
      <description>&lt;p&gt;Old known stuff, probably for everybody who is somehow related to networking, but anyway, putting it here too.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Ethernet_flow_control&#34;&gt;IEEE 802.3x&lt;/a&gt; - Wikipedia link&lt;/p&gt;
&lt;p&gt;If QoS is enabled and you like to prioritize the traffic, flow control needs to be disabled,as it doesn&amp;rsquo;t care about any higher level prioritization, just when ingress traffic is coming in faster than receiver can accept it, flow control will kick in and send pause frames until the ingress-egress rate will be equalized or ingress rate is lower than egress of that interface.&lt;/p&gt;</description>
    </item>
    <item>
      <title>End to End delay</title>
      <link>https://punt2cpu.net/2017/12/09/end-to-end-delay/</link>
      <pubDate>Sat, 09 Dec 2017 17:30:50 +0000</pubDate>
      <guid>https://punt2cpu.net/2017/12/09/end-to-end-delay/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/End-to-end_delay&#34;&gt;End to end delay&lt;/a&gt; is the time from when we sent the first bit of the first line until last bit arrives to destination.&lt;/p&gt;
&lt;p&gt;Basically everything can be determined except queuing delay - it&amp;rsquo;s an unpredictable variable.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Packetization delay</title>
      <link>https://punt2cpu.net/2017/12/09/packetization-delay/</link>
      <pubDate>Sat, 09 Dec 2017 17:20:28 +0000</pubDate>
      <guid>https://punt2cpu.net/2017/12/09/packetization-delay/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Transmission_delay&#34;&gt;Packetization delay&lt;/a&gt; is basically how close together we can pack a bits.&lt;/p&gt;
&lt;p&gt;So it&amp;rsquo;s the time from when the first to the last bit of a packet is transmitted.&lt;/p&gt;
&lt;p&gt;Formula would be : Packetization delay = &lt;strong&gt;P&lt;/strong&gt;(size) / &lt;strong&gt;R&lt;/strong&gt;(transmit rate)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Propagation delay</title>
      <link>https://punt2cpu.net/2017/12/09/propagation-delay/</link>
      <pubDate>Sat, 09 Dec 2017 17:15:12 +0000</pubDate>
      <guid>https://punt2cpu.net/2017/12/09/propagation-delay/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Propagation_delay&#34;&gt;Propagation delay&lt;/a&gt; - &lt;strong&gt;l&lt;/strong&gt; is the amount of time it takes for a single bit to travel over a link at propagation speed &lt;strong&gt;c&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Formula would be PropagationDelay=&lt;strong&gt;l&lt;/strong&gt;(cable lenght)/&lt;strong&gt;c&lt;/strong&gt;(speed)&lt;/p&gt;</description>
    </item>
    <item>
      <title>TCP congestion control</title>
      <link>https://punt2cpu.net/2017/12/08/tcp-congestion-control/</link>
      <pubDate>Fri, 08 Dec 2017 22:34:06 +0000</pubDate>
      <guid>https://punt2cpu.net/2017/12/08/tcp-congestion-control/</guid>
      <description>&lt;p&gt;As we know TCP is called reliable - connection-oriented protocol. But why ?&lt;/p&gt;
&lt;p&gt;Basically because it keeps the data in its buffer before and after sending it, it makes sure that data was delivered in sequence and receiver send the confirmation about received data (ack). Otherwise data will be re-transmitted there are different ways to re-send the data, let&amp;rsquo;s explore some of them.&lt;/p&gt;
&lt;p&gt;So what is happening under the hood of this massive (big overhead comparing to UDP protocol).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Finite State Machines (FSM)</title>
      <link>https://punt2cpu.net/2017/12/08/finite-state-machines-fsm/</link>
      <pubDate>Fri, 08 Dec 2017 16:39:34 +0000</pubDate>
      <guid>https://punt2cpu.net/2017/12/08/finite-state-machines-fsm/</guid>
      <description>&lt;p&gt;Great approach of understanding how the protocol or program should work is to check it&amp;rsquo;s &lt;a href=&#34;https://en.wikipedia.org/wiki/Finite-state_machine&#34;&gt;FSM&lt;/a&gt; - Finite State machine.&lt;/p&gt;
&lt;p&gt;It describes the processes of protocol, where it starts and how and where it ends.&lt;/p&gt;
&lt;p&gt;STATE 1 -&amp;gt; STATE2 -&amp;gt; STATE3.&lt;/p&gt;
&lt;p&gt;For example we can check the TCP FSM on &lt;a href=&#34;http://www.tcpipguide.com/free/t_TCPOperationalOverviewandtheTCPFiniteStateMachineF-2.htm&#34;&gt;tcpipguide.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;There you can see the procedure of syn, synack, ack. Also we can see how connection is being closed using Fin or timeouts.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ARP - Address Resolution Protocol</title>
      <link>https://punt2cpu.net/2017/12/08/arp-address-resolution-protocol/</link>
      <pubDate>Fri, 08 Dec 2017 13:52:00 +0000</pubDate>
      <guid>https://punt2cpu.net/2017/12/08/arp-address-resolution-protocol/</guid>
      <description>&lt;p&gt;ARP resolves the mapping issue between two different size protocols.&lt;/p&gt;
&lt;p&gt;It allows to MAP an IP(32 bit) and MAC(48 bit) together.&lt;/p&gt;
&lt;p&gt;How does it work in a nutshell :&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s assume that we have two hosts on different networks - A and B, we want them to communicate with each other, what will happen when host A will try reaching the host B for the first time (arp cache empty) :&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;As we can determine by ip and subnet mask combination that host B is on another network , Host A will send a broadcast packet which will contain the following fields :&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;HW : 1 (Ethernet)&lt;/li&gt;
&lt;li&gt;Protocol : 0x0800 IP&lt;/li&gt;
&lt;li&gt;HW length : (6) 48 bit&lt;/li&gt;
&lt;li&gt;Protocol length : (4) 32-bit&lt;/li&gt;
&lt;li&gt;OPCode : 1 (&lt;strong&gt;Request&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;H/W &lt;strong&gt;Source&lt;/strong&gt; : aa:aa:aa:aa:aa:aa - &lt;strong&gt;MAC of host A&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Protocol &lt;strong&gt;source&lt;/strong&gt; : 192.168.0.2 - &lt;strong&gt;IP of host A&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;HW &lt;strong&gt;Dest&lt;/strong&gt; - ff:ff:ff:ff:ff:ff - &lt;strong&gt;MAC of broadcast address&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Protocol &lt;strong&gt;dest&lt;/strong&gt; 192.168.0.1 - **ip of gateway **&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Gateway will respond with ARP reply&lt;/p&gt;</description>
    </item>
    <item>
      <title>A bit of TCP history</title>
      <link>https://punt2cpu.net/2017/12/04/a-bit-of-tcp-history/</link>
      <pubDate>Mon, 04 Dec 2017 21:07:28 +0000</pubDate>
      <guid>https://punt2cpu.net/2017/12/04/a-bit-of-tcp-history/</guid>
      <description>&lt;ul&gt;
&lt;li&gt;1974: 3-way handshake&lt;/li&gt;
&lt;li&gt;1978: TCP and IP split into TCP/IP&lt;/li&gt;
&lt;li&gt;1983: Jan 1, ARPAnet switches to TCP/IP&lt;/li&gt;
&lt;li&gt;1986: Internet begins to suffer a congestion collapse&lt;/li&gt;
&lt;li&gt;1987-8: Van Jacobson fixes TCP, publishes seminal TCP paper (Tahoe)&lt;/li&gt;
&lt;li&gt;1990: Fast recovery was added (Reno)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Taken from Stanford university Networking course.&lt;/p&gt;
&lt;p&gt;Link : &lt;a href=&#34;https://lagunita.stanford.edu/courses/Engineering/Networking-SP&#34;&gt;https://lagunita.stanford.edu/courses/Engineering/Networking-SP&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Error Detection - Checksum</title>
      <link>https://punt2cpu.net/2017/09/29/error-detection-checksum/</link>
      <pubDate>Fri, 29 Sep 2017 10:16:30 +0000</pubDate>
      <guid>https://punt2cpu.net/2017/09/29/error-detection-checksum/</guid>
      <description>&lt;p&gt;So how does the checksum works ?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Both devices needs to agree on checksum number - will it be odd or even&lt;/li&gt;
&lt;li&gt;The higher the number is the more precise is the check&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let&amp;rsquo;s take the example from one of YouTube videos with a great explanation of how Checksum is working.&lt;/p&gt;
&lt;p&gt;Taking the numbers which we want to transmit :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;25 11 12 7 13 4&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Both devices should agree on checksum - let it be number &lt;strong&gt;16&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>A bit info about ICMP, ping and traceroute</title>
      <link>https://punt2cpu.net/2017/09/28/a-bit-info-about-icmp-ping-and-traceroute/</link>
      <pubDate>Thu, 28 Sep 2017 07:43:25 +0000</pubDate>
      <guid>https://punt2cpu.net/2017/09/28/a-bit-info-about-icmp-ping-and-traceroute/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve went through &lt;a href=&#34;https://www.rfc-editor.org/rfc/rfc792&#34;&gt;RFC 792&lt;/a&gt; and would like to share some basic (high level) info about ICMP and how we are using it.&lt;/p&gt;
&lt;p&gt;ICMP is the Internet Control Message Protocol :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;runs over the network layer, so it&amp;rsquo;s encapsulated in IP datagrams&lt;/li&gt;
&lt;li&gt;unreliable, simple datagram service, no retransmission if a message doesn&amp;rsquo;t reach the destination&lt;/li&gt;
&lt;li&gt;an ICMP message takes the IP header of the original datagram plus the first 8 bytes of its payload, then gets marked with a type and code. Types and codes are in RFC 792 and the &lt;a href=&#34;https://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml&#34;&gt;IANA registry&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;host unreachable - the datagram reaches the last router, but that router doesn&amp;rsquo;t know where the host is&lt;/li&gt;
&lt;li&gt;port unreachable - the port in the packet isn&amp;rsquo;t recognized on the receiver&amp;rsquo;s side&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;How ping uses ICMP :&lt;/p&gt;</description>
    </item>
    <item>
      <title>The TCP and UDP segment format</title>
      <link>https://punt2cpu.net/2017/09/22/the-tcp-segment-format-and-how-it-works/</link>
      <pubDate>Fri, 22 Sep 2017 14:17:55 +0000</pubDate>
      <guid>https://punt2cpu.net/2017/09/22/the-tcp-segment-format-and-how-it-works/</guid>
      <description>&lt;p&gt;Putting this here just for reference as repeating Stanford Networking course.&lt;/p&gt;
&lt;p&gt;Some of important fields in &lt;strong&gt;TCP&lt;/strong&gt; Segment :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Destination port&lt;/strong&gt; - tells the TCP layer which application should get the bytes on ether end.&lt;/p&gt;
&lt;p&gt;**Source port **Says where the data should get back, when app starts sending the data it generates unique source port number - to be able to receive the data back. (to differentiate the connection between host A and B)&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
