<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Hamza Yahaya on Medium]]></title>
        <description><![CDATA[Stories by Hamza Yahaya on Medium]]></description>
        <link>https://medium.com/@Hamza_Y?source=rss-71cd9a65e5e6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*EPvmjZkCSme02BbS.jpeg</url>
            <title>Stories by Hamza Yahaya on Medium</title>
            <link>https://medium.com/@Hamza_Y?source=rss-71cd9a65e5e6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 21:24:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Hamza_Y/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Those IP addresses, those Netblocks, those Subnets !!!]]></title>
            <link>https://medium.com/@Hamza_Y/those-ip-addresses-those-netblocks-those-subnets-6198956b880c?source=rss-71cd9a65e5e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/6198956b880c</guid>
            <category><![CDATA[subnet]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[cisco]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[tcp-ip]]></category>
            <dc:creator><![CDATA[Hamza Yahaya]]></dc:creator>
            <pubDate>Sat, 12 Aug 2017 14:00:06 GMT</pubDate>
            <atom:updated>2017-08-12T14:00:06.859Z</atom:updated>
            <content:encoded><![CDATA[<p>This write does not explain IP addresses and the representation of IP addresses. For more on this please see <a href="https://www.udacity.com/course/networking-for-web-developers--ud256"><em>here</em></a><em>.</em></p><p>What this is about:</p><ul><li>IPv4 addresses</li><li>Netblocks and Subnets</li></ul><p>What this is not about:</p><ul><li>IPv6 addresses</li><li>An Introduction to Networking and IP</li></ul><blockquote>A friend said to me he often sees IPv4 addresses represented as xxx.xxx.xxx.xxx/xx where the Xs represent a number, e.g. <strong>198.51.100.0/22 . </strong>He then asked what the <strong>/22 </strong>represents.</blockquote><p>To answer what he asked directly, the <strong>/22 </strong>represents the <em>network block</em> or the <em>netblock</em>.</p><p>Devices on the same network, like in an office environment or a school often have IP addresses that are similar to each other. This is to say, these devices have IP addresses whose Prefixes are the same:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0bXpXZKPAuf35uVObz30Pw.jpeg" /></figure><p>Source:<a href="https://www.udacity.com/course/networking-for-web-developers--ud256"> udacity.com</a></p><p>From the above diagram, the computers’ (hosts) IP addresses all have a Prefix of <strong><em>198.51.100 </em></strong>and differ in the last octet or 8-bit value. These computers are in the same <strong><em>network block</em></strong><em> </em>or <strong><em>netblock.</em></strong></p><p>The computers or hosts in the above diagram are in <strong><em>/24</em></strong> network block which can be represented as <strong><em>198.51.100.0/24</em></strong> This means this network has a 24-bit network part:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wIVfJdP5rwW4RyfDTaf8eQ.jpeg" /></figure><p>Source:<a href="https://www.udacity.com/course/networking-for-web-developers--ud256"> udacity.com</a></p><p>Networks differ in sizes, a network with a longer prefix such as the one above has less addresses for hosts whereas, networks with shorter prefixes will have more addresses that can be assigned to hosts:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y1Exe3lMjcstH2_Eadt4gQ.jpeg" /></figure><p>Source:<a href="https://www.udacity.com/course/networking-for-web-developers--ud256"> udacity.com</a></p><p>To determine the number of hosts that can be obtained from a network such as <strong><em>198.51.100.0/22:</em></strong></p><ul><li>Since <strong><em>/22 netblock </em></strong>= 10 bits for the host part</li><li>2¹⁰ = 1024</li></ul><p>This means there will be 1024 addresses available within this network. However the first and last addresses are reserved, and in most cases the router within the network is assigned the first address. So there will be 1021 addresses available for hosts.</p><p>The way to determine the bits for the host part of a network for example the <strong>/22 </strong>netblock above in order to determine the number of addresses available for hosts, remember that Ipv4 addresses are 32-bit addresses meaning which are in 4 octets and each octet has an 8 bit value. For a netblock such as /<strong><em>22 </em></strong><em>, </em>it can be represented in 32-bit as :</p><p>→ 11111111111111111111110000000000</p><p>==&gt; the above has 22 Ones because this is a <strong>/22 </strong>netblock and the other numbers are Zeros. When you count the Ones and the Zeros, they are 32 in total (32-bit)</p><p>dividing this into 4 octets:</p><p>→ 11111111 11111111 11111100 00000000</p><p>==&gt; each octet has 8 amount of numbers</p><p>Now to determine the possible number of IP addresses, count the number of Zeros, which amount to <strong>10.</strong></p><p>Then simply 2¹⁰ to get the number of IP addresses in this netblock.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6198956b880c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Vagrant to set up a Rails Development Environment on Windows.]]></title>
            <link>https://medium.com/@Hamza_Y/quick-guide-to-set-up-an-image-for-local-development-58c50a5889d5?source=rss-71cd9a65e5e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/58c50a5889d5</guid>
            <category><![CDATA[vagrant]]></category>
            <category><![CDATA[virtualbox]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Hamza Yahaya]]></dc:creator>
            <pubDate>Tue, 28 Jul 2015 08:49:22 GMT</pubDate>
            <atom:updated>2015-07-29T09:25:28.688Z</atom:updated>
            <content:encoded><![CDATA[<p>Using Vagrant to set up a Rails Development Environment on Windows.</p><p>Introduction : Vagrant is a tool that can be used to set up the same Operating System in development as can be used in production with the help of a virtual machine.<br>One might be on Windows Operating System but can run a Linux development environment with the help of Vagrant and a virtual machine.</p><p>Pre-requisites:<br>A — Download Vagrant at <a href="http://www.vagrantup.com/downloads.html">http://www.vagrantup.com/downloads.html</a><br>B — Download Virtual Box at <a href="https://www.virtualbox.org/wiki/Downloads">https://www.virtualbox.org/wiki/Downloads</a><br>C — Download Git SCM at <a href="https://git-scm.com/downloads">https://git-scm.com/downloads</a></p><p>Plugins Installations Set Up:<br>1 — Launch Git bash that was previously installed<br>type in “vagrant plugin install vagrant-vbguest”<br>This will automatically get the the virtual box of the host Guest addtions on the guest system.</p><p>2- In Git Bash again, type in “vagrant plugin install vagrant-librarian-chef-nochef”<br>Chef can be ran automatically when the machine is started.<br>These 2 process will take a few minutes to complete.</p><p>Vagrant Config Setup:<br>1 — On Git Bash, Chage Directory to a Ruby Project directory.<br>Type in “vagrant init”<br>Type in “touch Cheffile” → creates a file called Cheffile</p><p>Chef file Setup:<br>Paste the following code in the Chef file:</p><p>site “<a href="http://community.opscode.com/api/v1">http://community.opscode.com/api/v1</a>&quot;<br>cookbook ‘apt’<br>cookbook ‘build-essential’<br>cookbook ‘mysql’, ‘5.5.3’<br>cookbook ‘ruby_build’<br>cookbook ‘nodejs’<br>cookbook ‘rbenv’, git: ‘<a href="https://github.com/aminin/chef-rbenv&#39;">https://github.com/aminin/chef-rbenv&#39;</a><br>cookbook ‘vim’</p><p>The Chef file contains the cookbooks that will be used for the project, kinda like a Ruby Gemfile.</p><p>Vagrant File Setup:<br>The Operating System and Chef configuration for the virtaul machine to be used are defined in this file.</p><p>For this set up, Ubuntu 14.04 trusty 32-bit will be used (change to “trusty64” if you need to use 64-bit).<br>It will forward to port 3000 from the Virtaul machine to the local computer.<br>Chef setup Ruby 2.2.1 and MySQL inside the virtual machine</p><p>1 — Replace the vagrant file contents with the following :</p><p># -*- mode: ruby -*-<br># vi: set ft=ruby :<br>VAGRANTFILE_API_VERSION = “2”<br>Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # Use Ubuntu 14.04 Trusty Tahr 64-bit as our operating system config.vm.box = “ubuntu/trusty64” # Configurate the virtual machine to use 2GB of RAM config.vm.provider :virtualbox do |vb| vb.customize [“modifyvm”, :id, “ — memory”, “2048”]<br>end<br># Forward the Rails server default port to the host<br>config.vm.network :forwarded_port, guest: 3000, host: 3000<br># Use Chef Solo to provision our virtual machine<br>config.vm.provision :chef_solo do |chef| chef.cookbooks_path = [“cookbooks”, “site-cookbooks”] chef.add_recipe “apt” chef.add_recipe “nodejs” chef.add_recipe “ruby_build” chef.add_recipe “rbenv::user” chef.add_recipe “rbenv::vagrant” chef.add_recipe “vim” chef.add_recipe “mysql::server” chef.add_recipe “mysql::client” # Install Ruby 2.2.1 and Bundler # Set an empty root password for MySQL to make things simple1 chef.json = { rbenv: { user_installs: [{ user: ‘vagrant’, rubies: [“2.2.1”], global: “2.2.1”, gems: { “2.2.1” =&gt; [ { name: “bundler” } ] } }] }, mysql: { server_root_password: ‘’ } } end<br>end</p><p>Running Vagrant:<br>- On Git Bash, type in “vagrant up”<br>You should see the following :<br>#==&gt; default: Checking if box ‘ubuntu/trusty64’ is up to date…<br>#==&gt; default: Clearing any previously set forwarded ports…<br>#==&gt; default: Installing Chef cookbooks with Librarian-Chef…<br>#==&gt; default: The cookbook path ‘/Users/chris/code/test_app/site-cookbooks’ doesn’t exist. Ignoring…<br>#==&gt; default: Clearing any previously set network interfaces…<br>#==&gt; default: Preparing network interfaces based on configuration…<br># default: Adapter 1: nat<br>#==&gt; default: Forwarding ports…<br># default: 3000 =&gt; 3000 (adapter 1)<br># default: 22 =&gt; 2222 (adapter 1)<br>#==&gt; default: Running ‘pre-boot’ VM customizations…<br>#==&gt; default: Booting VM…<br>#==&gt; default: Waiting for machine to boot. This may take a few minutes…<br># default: SSH address: 127.0.0.1:2222<br># default: SSH username: vagrant<br># default: SSH auth method: private key<br># default: Warning: Connection timeout. Retrying…<br>#==&gt; default: Machine booted and ready!<br>#==&gt; default: Checking for guest additions in VM…<br>#==&gt; default: Mounting shared folders…<br># default: /vagrant =&gt; /Users/chris/code/test_app<br># default: /tmp/vagrant-chef-1/chef-solo-1/cookbooks =&gt; /Users/chris/code/test_app/cookbooks<br>#==&gt; default: VM already provisioned. Run `vagrant provision` or use ` — provision` to force it</p><p>The type in “vagrant ssh”<br>You should see the following<br>vagrant ssh<br>#Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0–24-generic x86_64)<br>#<br># * Documentation: <a href="https://help.ubuntu.com/">https://help.ubuntu.com/</a><br>#<br># System information disabled due to load higher than 1.0<br>#<br># Get cloud support with Ubuntu Advantage Cloud Guest:<br># <a href="http://www.ubuntu.com/business/services/cloud">http://www.ubuntu.com/business/services/cloud</a><br>#<br>#<br>#vagrant@vagrant-ubuntu-trusty-64:~$</p><p>This will take time for the first time.After any changes are made to the vagrant or chef file, you will need to type in “vagrant ssh”</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58c50a5889d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>