<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Chaitanya&#39;s Portfolio site</title>
        <link>https://chillygopher.codeberg.page/articles/</link>
        <description>Recent content on Chaitanya&#39;s Portfolio site</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-gb</language>
        <lastBuildDate>Tue, 29 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://chillygopher.codeberg.page/articles/index.xml" rel="self" type="application/rss+xml" /><item>
            <title>How to Calculate IPv4 Subnet Information Fast!</title>
            <link>https://chillygopher.codeberg.page/articles/subnetting-fast/</link>
            <pubDate>Tue, 29 Sep 2026 00:00:00 +0000</pubDate>
            <guid>https://chillygopher.codeberg.page/articles/subnetting-fast/</guid>
            <description>&lt;h2 id=&#34;what-is-subnetting&#34;&gt;&lt;a href=&#34;#what-is-subnetting&#34; class=&#34;header-anchor&#34;&gt;&lt;/a&gt;What is Subnetting?&#xA;&lt;/h2&gt;&lt;p&gt;Subnetting refers to the process of dividing an IP network address space into smaller logical networks by &amp;ldquo;borrowing&amp;rdquo; bits from the host segment of the IP address;&#xA;It enhances security and performance as node communication and broadcast messages are limited to that subnet, It also ensures address space is used efficiently.&lt;/p&gt;&#xA;&lt;h2 id=&#34;calculate-subnet-information&#34;&gt;&lt;a href=&#34;#calculate-subnet-information&#34; class=&#34;header-anchor&#34;&gt;&lt;/a&gt;Calculate Subnet Information&#xA;&lt;/h2&gt;&lt;p&gt;There are 4 key pieces of information we need to calculate about a subnet; the network address, the broadcast address, the host address range and the network address for the next subnet.&lt;/p&gt;&#xA;&lt;p&gt;We will calculate the subnet network address information from a node&amp;rsquo;s IP address &amp;amp; subnet Mask; The first IP address we will be using is 192.168.1.2 with the subnet mask of 255.255.255.0 (or written in CIDR notation as /24, I will talk about CIDR in a different blog post)&lt;/p&gt;&#xA;&lt;h3 id=&#34;calculating-the-subnet-network-address&#34;&gt;&lt;a href=&#34;#calculating-the-subnet-network-address&#34; class=&#34;header-anchor&#34;&gt;&lt;/a&gt;Calculating the Subnet Network Address&#xA;&lt;/h3&gt;&lt;p&gt;This one&amp;rsquo;s quite simple; simply perform a BITWISE AND operation (If the top &amp;amp; bottom values are the same; write them as is, otherwise write them as a 0) on the node&amp;rsquo;s IP address and the subnet mask, In our case it would look like this;&lt;/p&gt;&#xA;&lt;p align=&#34;center&#34;&gt;&#xA;  &lt;img src=&#34;https://chillygopher.codeberg.page/assets/networksection.png&#34; alt=&#34;Calculating subnet network address&#34;/&gt;&#xA;  &lt;sub&gt;A BITWISE AND on 192.168.1.2 and 255.255.255.0 &lt;/sub&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;Converting &lt;code&gt;11000000.10101000.00000001.00000000&lt;/code&gt; into decimal notation gives us 192.168.1.0; Voila! There&amp;rsquo;s our network address, To make this process even faster you can choose to ignore the network portion of the address (the octets denoted with a &amp;ldquo;full&amp;rdquo; subnet mask) and focus entirely on the host section.&lt;/p&gt;&#xA;&lt;h3 id=&#34;calculating-the-subnet-broadcast-address&#34;&gt;&lt;a href=&#34;#calculating-the-subnet-broadcast-address&#34; class=&#34;header-anchor&#34;&gt;&lt;/a&gt;Calculating the Subnet Broadcast Address&#xA;&lt;/h3&gt;&lt;p&gt;Now that we have the network section of the subnet it is extremely easy to calculate the broadcast address, simply write all host bits as a 1 and ignore the network section, in the case of our example the subnet broadcast address would be 192.168.1.255!&lt;/p&gt;&#xA;&lt;p align=&#34;center&#34;&gt;&#xA;  &lt;img src=&#34;https://chillygopher.codeberg.page/assets/broadcast.png&#34; alt=&#34;Calculating Broadcast Address&#34;/&gt;&#xA;  &lt;sub&gt;Flip the host section 0s into 1s &lt;/sub&gt;&#xA;&lt;/p&gt;&#xA;&lt;h3 id=&#34;calculating-the-subnet-host-range&#34;&gt;&lt;a href=&#34;#calculating-the-subnet-host-range&#34; class=&#34;header-anchor&#34;&gt;&lt;/a&gt;Calculating the Subnet Host Range&#xA;&lt;/h3&gt;&lt;p&gt;Now that we have the subnet network address and the subnet broadcast address, it really only gets easier from here: The IP of the first host will be the &lt;code&gt;network address + 1&lt;/code&gt; in our case: 192.168.1.1 and the IP of the last host will be the &lt;code&gt;broadcast address -1&lt;/code&gt; in our case: 192.168.1.254.&#xA;So the host range is 192.168.1.1 through 192.168.1.254, inclusive&lt;/p&gt;&#xA;&lt;p align=&#34;center&#34;&gt;&#xA;  &lt;img src=&#34;https://chillygopher.codeberg.page/assets/range.png&#34; alt=&#34;IP address range&#34;/&gt;&#xA;  &lt;sub&gt;The IP address of the First and Last Host &lt;/sub&gt;&#xA;&lt;/p&gt;&#xA;&lt;h3 id=&#34;calculating-the-next-subnets-network-address&#34;&gt;&lt;a href=&#34;#calculating-the-next-subnets-network-address&#34; class=&#34;header-anchor&#34;&gt;&lt;/a&gt;Calculating the Next Subnet&amp;rsquo;s Network Address&#xA;&lt;/h3&gt;&lt;p&gt;The final bit of information we need, this (like all those before) is also incredibly easy, simply &lt;code&gt;network address of current subnet + 256&lt;/code&gt;  to calculate the network address of the next section; in our example that would equal to 192.168.2.0&lt;/p&gt;&#xA;&lt;p align=&#34;center&#34;&gt;&#xA;  &lt;img src=&#34;https://chillygopher.codeberg.page/assets/next-subnet.png&#34; alt=&#34;Network address of next subnet&#34;/&gt;&#xA;  &lt;sub&gt; Network Address + 256 = next subnet&#39;s network address &lt;/sub&gt;&#xA;&lt;/p&gt;&#xA;&lt;h3 id=&#34;everything-tied-together&#34;&gt;&lt;a href=&#34;#everything-tied-together&#34; class=&#34;header-anchor&#34;&gt;&lt;/a&gt;Everything tied together&#xA;&lt;/h3&gt;&lt;p&gt;I hope you enjoyed learning about this method almost as much as I did, while it is simple I would urge you to practice more subnetting questions using this technique, &lt;a class=&#34;link&#34; href=&#34;https://subnetipv4.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://subnetipv4.com/&lt;/a&gt; is a very intuitive website to practice subnetting&lt;/p&gt;&#xA;&lt;p&gt;Finally, Here&amp;rsquo;s all the information tied together, Have a great day ahead!&lt;/p&gt;&#xA;&lt;p align=&#34;center&#34;&gt;&#xA;  &lt;img src=&#34;https://chillygopher.codeberg.page/assets/tied-together.png&#34; alt=&#34;All the information tied together&#34;/&gt;&#xA;  &lt;sub&gt; All the Information tied together &lt;/sub&gt;&#xA;&lt;/p&gt;</description>
        </item><item>
            <title>Explaining Random Access Protocols</title>
            <link>https://chillygopher.codeberg.page/articles/explaining-random-access-protocols/</link>
            <pubDate>Mon, 21 Sep 2026 00:00:00 +0000</pubDate>
            <guid>https://chillygopher.codeberg.page/articles/explaining-random-access-protocols/</guid>
            <description>&lt;h2 id=&#34;what-is-a-multi-access-computer-network&#34;&gt;&lt;a href=&#34;#what-is-a-multi-access-computer-network&#34; class=&#34;header-anchor&#34;&gt;&lt;/a&gt;What is a Multi-Access Computer Network&#xA;&lt;/h2&gt;&lt;p&gt;A Multi-Access Network allows for multiple nodes to transmit data (send data) over a shared communication medium, such as a cable or radio waves.&lt;/p&gt;&#xA;&lt;p align=&#34;center&#34;&gt;&#xA;  &lt;img src=&#34;https://chillygopher.codeberg.page/assets/Nodes Sharing Link.png&#34; alt=&#34;Image of Nodes sharing a link&#34; title=&#34;Nodes sharing a link&#34;/&gt;&#xA;  &lt;sub&gt;Image of Nodes sharing a common link&lt;/sub&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;These types of networks are generally more cost-effective compared to other types of networks such as those that rely on a central node to forward traffic (like a switch) or networks that offer direct links between each of the hosts, So an approach that relies on neither a central node nor direct links can save an organisation quite a lot of money!&lt;/p&gt;&#xA;&lt;p&gt;There are three major categories of Multi-Access Network Protocols:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Random Access Protocols&lt;/li&gt;&#xA;&lt;li&gt;Controlled Access Protocols&lt;/li&gt;&#xA;&lt;li&gt;Channelised Access Protocols&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Each of these protocols have different methods of controlling access between nodes and all of these protocols have certain advantages and disadvantages.&lt;/p&gt;&#xA;&lt;p&gt;However, for this blog post I will only be considering the Random Access Protocols, as they serve as great examples.&lt;/p&gt;&#xA;&lt;h2 id=&#34;random-access-protocols&#34;&gt;&lt;a href=&#34;#random-access-protocols&#34; class=&#34;header-anchor&#34;&gt;&lt;/a&gt;Random Access Protocols&#xA;&lt;/h2&gt;&lt;p&gt;Random Access Protocols are designed with a simple goal in mind; no node has control over another node, this means that there is no central authority that governs the transmissions, instead the nodes compete with each other to access the medium, therefore the transmission is random (truly earns its name don&amp;rsquo;t you think).&lt;/p&gt;&#xA;&lt;p&gt;The 4 major media access control algorithms classified as random access protocols are:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Pure ALOHA (1970s)&lt;/li&gt;&#xA;&lt;li&gt;Slotted Aloha (1970s)&lt;/li&gt;&#xA;&lt;li&gt;CSMA/CD (Carrier Sense Multi-Access / Collision Detect) (1980s)&lt;/li&gt;&#xA;&lt;li&gt;CSMA/CA (Carrier Sense Multi-Access / Collision Avoidance) (1990s)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3 id=&#34;pure-aloha&#34;&gt;&lt;a href=&#34;#pure-aloha&#34; class=&#34;header-anchor&#34;&gt;&lt;/a&gt;Pure ALOHA&#xA;&lt;/h3&gt;&lt;p&gt;One of the earliest methods for media access control, Pure ALOHA was developed by the University of Hawaii for the ALOHAnet (A wireless LAN) to prevent collisions from happening between nodes transmitting at the same time. Pure ALOHA utilises a simple approach to reduce the number of collisions; It requires all nodes to wait a random amount of time, if one of their previous frames (a data unit sent at the link layer) has collided with another frame.&lt;/p&gt;&#xA;&lt;p&gt;However, this only reduces the rate of collisions and that too insignificantly, making the Pure ALOHA approach impractical for larger networks.&lt;/p&gt;&#xA;&lt;h3 id=&#34;slotted-aloha&#34;&gt;&lt;a href=&#34;#slotted-aloha&#34; class=&#34;header-anchor&#34;&gt;&lt;/a&gt;Slotted ALOHA&#xA;&lt;/h3&gt;&lt;p&gt;To address Pure ALOHA&amp;rsquo;s Shortcomings, Slotted ALOHA was developed as an Improvement, It divides time into slots with each slot being long enough to transmit exactly one frame, therefore if a node fails to transmit frames during the first slot it must wait until the next slot to begin transmitting again.&lt;/p&gt;&#xA;&lt;p&gt;This approach makes slotted ALOHA twice as effective at preventing collisions compared to Pure ALOHA, However, It still is not as efficient as the protocols we will discuss next!&lt;/p&gt;&#xA;&lt;h3 id=&#34;csmacd--csmaca&#34;&gt;&lt;a href=&#34;#csmacd--csmaca&#34; class=&#34;header-anchor&#34;&gt;&lt;/a&gt;CSMA/CD &amp;amp; CSMA/CA&#xA;&lt;/h3&gt;&lt;p&gt;CSMA/CD &amp;amp; CSMA/CA are two of the most well known multi-access network protocols, known for their historical impact and most importantly their application in network engineering courses.&lt;/p&gt;&#xA;&lt;p&gt;We start by explaining the CSMA technology both share; CSMA stands for Carrier Sense Multi-Access which means that nodes can distinguish when a link is idle or busy, If a link is idle, CSMA transmits instantly, if a link is busy then CSMA waits before transmitting, this can still lead to collisions as two or more nodes may find the link to be idle at the same time and frames may collide, this is where CD &amp;amp; CA come in!&lt;/p&gt;&#xA;&lt;h3 id=&#34;collision-detect-with-ethernet&#34;&gt;&lt;a href=&#34;#collision-detect-with-ethernet&#34; class=&#34;header-anchor&#34;&gt;&lt;/a&gt;Collision Detect with Ethernet&#xA;&lt;/h3&gt;&lt;p&gt;Carrier Sense Multi-Access / Collision Detect was primarily used by Shared Ethernet links (802.3) to transmit frames over a shared link (historically Coax), An important feature of the Ethernet implementation of CSMA is that it is a 1-Persistent protocol, which means that nodes continuously check if the link is idle or busy.&lt;/p&gt;&#xA;&lt;p&gt;The CSMA technology as defined above is deployed alongside Collision Detect (CD), which allows nodes to detect when collisions occur, addressing this limitation of CSMA!.&lt;/p&gt;&#xA;&lt;p&gt;Once the frames collide the two nodes involved perform post-collision actions, in Ethernet&amp;rsquo;s case the nodes send a jamming sequence and stop transmission of all further frames. the adaptor nodes then wait a random amount of time before attempting to transmit again, if it fails again it waits exponentially longer (an exponential backoff), nodes try a specific number of times before giving up and reporting an error to the host node.&lt;/p&gt;&#xA;&lt;p&gt;A lovely interactive animation that depicts CSMA/CD can be found at Computer Networking: A Top Down Approach&amp;rsquo;s website; &lt;a class=&#34;link&#34; href=&#34;https://gaia.cs.umass.edu/kurose_ross/animations.php&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://gaia.cs.umass.edu/kurose_ross/animations.php&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Here is an additional Flowchart;&lt;/p&gt;&#xA;&lt;p align=&#34;center&#34;&gt;&#xA;  &lt;img src=&#34;https://chillygopher.codeberg.page/assets/Ethernet Flowchart.png&#34; alt=&#34;Ethernet Flowchart&#34; title=&#34;Flowchart&#34; style=&#34;width: 125%; height: 125%;&#34;/&gt;&#xA;  &lt;sub&gt;A Flowchart depicting the flow of the Ethernet protocol&lt;/sub&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;CSMA/CD has since been phased out in favour of Switched Ethernet, that relies on a central node which a node has a direct connection to using an Ethernet cable, despite this; CSMA/CD serves as a valuable concept to explain multi-access networks to aspiring network engineers.&lt;/p&gt;&#xA;&lt;h3 id=&#34;collision-avoidance-with-wi-fi&#34;&gt;&lt;a href=&#34;#collision-avoidance-with-wi-fi&#34; class=&#34;header-anchor&#34;&gt;&lt;/a&gt;Collision Avoidance with Wi-Fi&#xA;&lt;/h3&gt;&lt;p&gt;Now we talk about CSMA/CA, the sister technology to CSMA/CD; CSMA/CA stands for Carrier Sense Multi-Access with Collision Avoidance and It is used to reduce the rate of collisions on Wireless networks, more specifically Wi-Fi (802.11) (and unlike its sibling technology, it is still used today)&lt;/p&gt;&#xA;&lt;p&gt;Before we begin exploring CSMA/CA we must address the two unique problems that are encountered by wireless transfer;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The Exposed Node Problem: Where a Node can hear the transmission of another node (even though the transmissions do not interfere), this can prevent a node from transmitting as it may incorrectly assume the transmissions from both nodes would collide.&lt;/li&gt;&#xA;&lt;li&gt;The Hidden Node Problem: When two nodes that are hidden from each other communicate with another node between them, they may cause collisions as neither of them are able to detect each other&amp;rsquo;s transmissions, therefore neither of them will be able to detect the collision either, leading to a large number of collisions.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p align=&#34;center&#34;&gt;&#xA;  &lt;img src=&#34;https://chillygopher.codeberg.page/assets/CSMACA Problems addressed.png&#34; alt=&#34;Exposed &amp; Hidden Node Problems&#34; title=&#34;Exposed &amp; Hidden Node Problems&#34; style=&#34;width: 125%; height: 125%;&#34;/&gt;&#xA;  &lt;sub&gt;A Graphic depicting both the problems&lt;/sub&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;To address the exposed node problem, CSMA/CA checks if a node can hear communications from another node, if it cannot then the node can freely transmit, if it can, it waits for the transmission to end. (how does this solve the problem)&lt;/p&gt;&#xA;&lt;p&gt;To circumvent the hidden node problem, Wi-Fi  expects an explicit Acknowledgement (An ACK) from the receiver, A receiver only sends an ACK if the frame arrives and passes the CRC (A Cyclic redundancy check; the details warrant another blog post :), for now It is just an error check), if the ACK is not transmitted the sender re-transmits the frame, this doesn&amp;rsquo;t entirely avoid collisions but ensures the data does end up arriving.&lt;/p&gt;&#xA;&lt;p&gt;Another approach that addresses both the Hidden Node and Exposed Node problem is RTS-CTS frames,&lt;/p&gt;&#xA;&lt;p&gt;While, the RTS-CTS frames are optional to implement for the 802.11 / Wi-Fi standard, they effectively solve both the problems, The Flow can be described as;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The sender transmits a small packet called the RTS (Ready-To-Send) to the receiver,&lt;/li&gt;&#xA;&lt;li&gt;if the RTS arrives and the receiver is willing to receive further frames from the sender, then the receiver sends a CTS (Clear-To-Send) frame,&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;This can effectively counter the hidden node problem as a hidden node that might not hear the RTS may hear the CTS, effectively telling it to stop transmitting for a set amount of time.&#xA;It can also effectively counter the exposed node problem, as a node that hears the RTS but not the CTS can successfully determine that the communication will not collide and that exposed node can transmit frames to other nodes.&lt;/p&gt;&#xA;&lt;p&gt;A diagram depicting the RTS-CTS flow:&lt;/p&gt;&#xA;&lt;p align=&#34;center&#34;&gt;&#xA;  &lt;img src=&#34;https://chillygopher.codeberg.page/assets/RTS-CTS.png&#34; alt=&#34;RTS-CTS&#34; title=&#34;RTS-CTS&#34; style=&#34;width: 55%; height: 55%;&#34;/&gt;&#xA;  &lt;sub&gt;A diagram depicting the RTS-CTS flow&lt;/sub&gt;&#xA;&lt;/p&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;&lt;a href=&#34;#conclusion&#34; class=&#34;header-anchor&#34;&gt;&lt;/a&gt;Conclusion&#xA;&lt;/h3&gt;&lt;p&gt;In this Post, We explored the legacy Pure ALOHA, Slotted ALOHA &amp;amp; CSMA/CD technologies, diving into how they function in acceptable detail, We also explored current technologies such as CSMA/CA and how it attempts to solve the exposed node &amp;amp; hidden node problems allowing wireless transmissions to avoid collision.&lt;/p&gt;&#xA;&lt;p&gt;I hope you enjoyed reading this blog post as much as I enjoyed writing it (A lot!), hope you have a great day ahead!&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>First Blog Post</title>
            <link>https://chillygopher.codeberg.page/articles/first-blog/</link>
            <pubDate>Sat, 22 Aug 2026 23:01:00 +0100</pubDate>
            <guid>https://chillygopher.codeberg.page/articles/first-blog/</guid>
            <description>&lt;p&gt;Hi, Welcome to my site, Please do read my &lt;a class=&#34;link&#34; href=&#34;https://chillygopher.codeberg.page/about&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;About Me&lt;/a&gt; page, I will post more blogs on this site very very soon, Stay tuned until then and have a great time!&#xA;Stay Safe and Stay happy.&lt;/p&gt;&#xA;</description>
        </item></channel>
</rss>
