<?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>Archive on punt2cpu</title>
    <link>https://punt2cpu.net/archive/</link>
    <description>Recent content in Archive 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/archive/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>Flow control 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;In a nutshell, flow control lets a receiver ask its neighbor to stop sending for a short time. Defined in IEEE 802.3 Annex 31B (&lt;a href=&#34;https://en.wikipedia.org/wiki/Ethernet_flow_control&#34;&gt;Wikipedia&lt;/a&gt;). The idea itself is old, &lt;a href=&#34;https://www.rfc-editor.org/info/rfc59/&#34;&gt;RFC 59&lt;/a&gt; from 1970 was already arguing about &amp;ldquo;cease on link&amp;rdquo; for ARPANET.&lt;/p&gt;
&lt;p&gt;Some quick facts :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;receiver buffers get full, it sends a PAUSE frame to the link partner&lt;/li&gt;
&lt;li&gt;EtherType 0x8808, destination 01:80:C2:00:00:01&lt;/li&gt;
&lt;li&gt;pause time in quanta of 512 bit times, 0 means resume&lt;/li&gt;
&lt;li&gt;one hop only, switches don&amp;rsquo;t forward PAUSE&lt;/li&gt;
&lt;li&gt;it stops the whole link, no idea about priorities or QoS&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Where it&amp;rsquo;s used :&lt;/p&gt;</description>
    </item>
    <item>
      <title>Mounting the iscsi target and checking performance.</title>
      <link>https://punt2cpu.net/2018/01/31/mounting-the-iscsi-target-and-checking-performance/</link>
      <pubDate>Wed, 31 Jan 2018 18:06:58 +0000</pubDate>
      <guid>https://punt2cpu.net/2018/01/31/mounting-the-iscsi-target-and-checking-performance/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Installing – Let&amp;rsquo;s use Debian based manager&lt;/strong&gt; :&lt;/p&gt;
&lt;p&gt;Apt-get install open-iscsi&lt;/p&gt;
&lt;p&gt;Apt-get install iperf&lt;/p&gt;
&lt;p&gt;Apt-get install nload&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Scanning for targets :&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Iscsiadmin -m discovery -t st -p target_ip&lt;/p&gt;
&lt;p&gt;Iscsiadm -m node -u&lt;/p&gt;
&lt;p&gt;Iscsiadm -m node &amp;ndash;login&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Check if you see the object :&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Lsblk&lt;/p&gt;
&lt;p&gt;New disk should appear in dev - like &lt;strong&gt;sdx \-sdx1&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How to partition (if wasn’t partitioned yet)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Fdisk /dev/sdc&lt;/p&gt;
&lt;p&gt;N&lt;/p&gt;
&lt;p&gt;P&lt;/p&gt;
&lt;p&gt;Enter&lt;/p&gt;
&lt;p&gt;w&lt;/p&gt;
&lt;p&gt;Mkfs.ext4 /dev/sdx1&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Connecting the drive to system&lt;/strong&gt;&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>BGP overview</title>
      <link>https://punt2cpu.net/2017/12/08/bgp-overview/</link>
      <pubDate>Fri, 08 Dec 2017 17:52:10 +0000</pubDate>
      <guid>https://punt2cpu.net/2017/12/08/bgp-overview/</guid>
      <description>&lt;p&gt;Would like to put some facts about most famous routing protocol.&lt;/p&gt;
&lt;p&gt;BGP - Border Gateway Protocol&lt;/p&gt;
&lt;p&gt;According to &lt;a href=&#34;https://en.wikipedia.org/wiki/Border_Gateway_Protocol&#34;&gt;Wikipedia&lt;/a&gt; currently we are using the version (BGP4), which was published as &lt;a href=&#34;https://tools.ietf.org/html/rfc4271&#34;&gt;RFC 4271&lt;/a&gt; in 2006.&lt;/p&gt;
&lt;p&gt;BGP4 has been in use on the Internet since 1994.&lt;/p&gt;
&lt;p&gt;Basically the world was changed by the 3 napkin protocol, the story and the picture are on &lt;a href=&#34;http://thenetworkcollective.com/2017/09/hon-li-bgp/&#34;&gt;Network Collective Podcast&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Its simplified finite state machine can be found on &lt;a href=&#34;https://en.wikipedia.org/wiki/Border_Gateway_Protocol&#34;&gt;Wikipedia&lt;/a&gt;.&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>VRRP Concepts</title>
      <link>https://punt2cpu.net/2017/11/03/vrrp-concepts/</link>
      <pubDate>Fri, 03 Nov 2017 16:19:21 +0000</pubDate>
      <guid>https://punt2cpu.net/2017/11/03/vrrp-concepts/</guid>
      <description>&lt;p&gt;Some quick facts :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Protocol - 112; Multicast address 224.0.0.18; Preemption Enabled(by default);Priority=100 + highest IP; Timers 1/3.6;Only master sends hellos;&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;**During the re-election all members will send multicast packets with same virtual source MAC - switch may see port flapping in that moment. **&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Can&amp;rsquo;t advertise less than a 1 second timer - because of 1 byte field which can be 0 or 1, timers needs to be set on each router locally if you want to have a lower than 1 sec.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You better set the timers equally otherwise you might have two master scenario&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What problem does it solves ? :&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>
