Subnetting for Complete Idiots: Part I

Little-professor-1Let me first start off by saying that I do not actually think that I am a complete idiot, however it being educated by the Georgia Public School system I can safely say that there are a few subjects where my knowledge is lacking. Specifically mathematics. Honestly everything else that you might have missed learning in high school you can pretty much pick up along the way just by picking up a book or through a bit of on the job training. But not math — its just one of those things that you are never going to find yourself learning for fun.


Now why are we talking about mathematics? Because we are about to jump face first into Subnetting. But instead of attempting to cram every bit of it in our brains in one sitting, we are going to sit back and take our time and learn it step by step. As a matter of fact we are not even really going to talk about subnetting today. Rather we are just going to talk a bit about binary math.


Now, I'm not about to write an article explaining binary or base-2 number systems, no there are plenty of articles our there that explain it. Here and here are a couple.

What I am going to show you is this little table, which you need to memorize.




You need to memorize 20 through 27th. You need to know that if you add up sum of 20 to 27th it equals 256. You need to memorize.


Why is this important – well if you recall an IP address is 32 bits in lenght and is made up for 4 seperate octets. The chart above represents an octet with the maxiumim number possible being 256 and the minimum being one.

Note that this is where we are going to stop for today — all you need to walk away with is an understanding of how the chart above relates to an octet of a IP address.


Related articles

Subnets and prefixes
Understanding and performing IPv4 subnetting
Calculating the number of bits in a Subnet Mask in C#
Netting the concept of subnets

HomeLab: Simple DHCP Service Configuration on a Cisco Router

Cartoon-golfer-009Sometimes when I learn something new in the world of technology, I am often amazed that something that I assumed was technically advanced is rather quite simple.

Such is the case with configuring DHCP on a Cisco Router. I mean, is it just me or do network guys sometimes act as if everything that they do is takes elite technical skills and tons of experience. Don’t get me wrong, I know that networking is not exactly easy. But can we just agree to admit that once in a while some things are easier done than said. Anyway, for me this was the case with configuring a DHCP pool on a Cisco Router.

In this instance I was working on getting a new virtual machine up and running on my ESXi host. This particular appliance needed to boot via dhcp so you could access its web interface. So I jumped on my 2621xm and created the pool.

First we enable the dhcp service

r-2621-1(config)#service dhcp

Then we create a pool

r-2621-1(config)#ip dhcp pool LabPool

Next we set a few bits and bobbles so that clients can route.

r-2621-1(dhcp-config)#domain-name localdomain

In this case I wanted to exclude a bunch of ips from the range

r-2621-1(dhcp-config)#ip dhcp excluded-address

Now save your config with copy run start.

The command below shows me all my dhcp clients

r-2621-1#show ip dhcp binding
Bindings from all pools not associated with VRF:
IP address          Client-ID/              Lease expiration        Type
Hardware address/
User name          0050.569a.7dbe          Oct 16 2013 11:21 PM    Automatic

This handy command shows me information pertaining to my pool

r-2621-1#show ip dhcp pool

Pool LabPool :
Utilization mark (high/low)    : 100 / 0
Subnet size (first/next)       : 0 / 0
Total addresses                : 254
Leased addresses               : 1
Pending event                  : none
1 subnet is currently in the pool :
Current index        IP address range                    Leased addresses          –        1
r-2621-1#show ip dhcp conflict

Related articles

HomeLab: Simple Cisco EIGRP Setup
Cisco DHCP Client Lease Time
HomeLab: Simple SSH Setup on a Cisco Router
HomeLab: Cisco 2621 Router Password Recovery/Factory Reset
Configuring InterVLAN Routing on a Layer 3 Switch and providing DHCP to multiple subnets Part 1

HomeLab: Configure a Range of Ports on a Cisco Switch

Kenmore-oven-stove-range-repairFirst off let me say that its really good practice to configure ports one by one, at least when you are starting out in the network world, as the repetition of typing the same thing over and over helps you to remember the proper commands. Hell this is one of the reasons that I blog the stuff that I do… I'm trying to make sure that I do not forget what I just learned.

Anyway, this is a quick and dirty one that I cannot remember to save my life.  In this instance I wanted to configure a few ports on a 2950 that I plan to use to replace my 2960, as my 2960 is destined for bigger and better things given its layer 3 capabilities.

Note the spaces between the first port in the range, the dash, and the last port in the range.

s-2950-1.localdomain(config)#interface range fastEthernet 0/9 – 16
s-2950-1.loc(config-if-range)#description vlan 1 ports
s-2950-1.loc(config-if-range)#switchport mode access
s-2950-1.loc(config-if-range)#switchport access vlan 1
s-2950-1.loc(config-if-range)#spanning-tree portfast

%Warning: portfast should only be enabled on ports connected to a single
 host. Connecting hubs, concentrators, switches, bridges, etc… to this
 interface  when portfast is enabled, can cause temporary bridging loops.
 Use with CAUTION

%Portfast will be configured in 8 interfaces due to the range command
 but will only have effect when the interfaces are in a non-trunking mode.

s-2950-1.loc(config-if-range)#spanning-tree bpduguard enable
s-2950-1.localdomain#copy run start


Related articles

HomeLab: Simple SSH Setup on a Cisco Router
HomeLab: Cisco 2621 Router Password Recovery/Factory Reset
HomeLab: Cisco 3550 Switch Software Configuration Guide
MDH Lab – Securing STP

HomeLab: Cisco Switch Boot Alternate IOS Image

D20ce96499a806b4So this one is not exactly pulitzer prize material, but it took me a bit to find the correct answer as I was not searching with the correct search terms. After all I am a systems administrator by trade, not a network administrator, so you are going to have to give me a break if I don't speak your special little Cisco Router/Switch language.

Anyway, I actually ran into a device that had a large enough flash that it did not ask me if I wanted to delete the existing IOS image during an IOS upgrade. Wow, two IOS images in flash, how novel.

So here is the process for changing your boot img.

Obviously you need to log into the switch first. Needless to say you must turn the device on first as well.

Check out your flash images via the command below.

s-3500-2#show flash:

Directory of flash:/

  2  -rwx     1751867   Mar 01 1993 00:06:57  c3500xl-c3h2s-mz.120-5.wc3b.bin
  3  -rwx         556   Mar 01 1993 00:00:41  vlan.dat
  4  -rwx          25   Mar 01 1993 00:00:35  snmpengineid
  5  -rwx        2068   Mar 01 1993 00:05:39  config.text.old
  7  -rwx     1811552   Mar 01 1993 01:17:44  c3500xl-c3h2s-mz.120-5.WC17.bin
  8  -rwx          43   Mar 01 1993 01:24:40  env_vars
  9  -rwx        2077   Mar 01 1993 01:24:56  config.text

3612672 bytes total (40448 bytes free)

Then in config terminal mode run the following command – subsitute your bin file name.

s-3500-2(config)#boot system flash:c3500xl-c3h2s-mz.120-5.WC17.bin

My tftp server is a Linux box, setup instructions are HERE


Related articles

HomeLab: Cisco 2621 Router Password Recovery/Factory Reset
HomeLab: Basic Syslog Configuration on Cisco Catalyst Devices
HomeLab: Upgrading Cisco IOS Via tftp on RHEL
HomeLab: Simple Cisco EIGRP Setup

HomeLab: Simple Cisco EIGRP Setup

Sugar_skull_by_nickgo79EIGRP (Enhanced Interior Gateway Routing Protocol), is a Cisco proprietary routing protocol (until recently). When a router runs EIGRP, it keeps a copy of its neighbors routing table. If I router cannot find a route it its, or its neighbor's routing table, it will query its neighbors who in turn query their neighbors.

Exactly how routing protocols work is serious business, but dont worry we are not going to go into that here. Below is the process that I used to setup EIGRP on a Cisco 2811.

Before we do anything, lets get into Configuration mode (conf t).

r-2811-1#conf t


Your first step is going to be to enable IP Routing on your device. But before you do so, make sure that you have configured a Gateway of Last Restort. I did not and had to hook up the old console cable.

The IP of this router is, and its directly connected to, which is its last resort first hop, so lets configure that .

r-2811-1(config)#ip route


Ok so now lets enable IP Routing

r-2811-1(config)#ip routing


Now lets start EIGRP and chose an AS number. Note that I used 10 on the other three routers in my setup so thats what we are going to use here.

r-2811-1(config)#router eigrp 10


Now we need to tell the router what networks are connected to it (or in this case, will be connected to it). This is the information that the router will share with its neighbors.



In this instance my ourside interface is on, and its inside interface will serve up

Dont forget to save your work

r-2811-1#copy run start


Related articles

HomeLab: Simple SSH Setup on a Cisco Router
HomeLab: Cisco 2621 Router Password Recovery/Factory Reset
Hour 40: OSPF the new advanced link-state protocol
Route Redistribution: Protocol Rules + EIGRP Redistribution
Hour 31: IGP Review EIGRP

HomeLab: Basic Syslog Configuration on Cisco Catalyst Devices

FrontiervilleblueoxIn my homelab setup I am dumping syslog on all my devices to my Linux desktop. Have not figure out what I am going to do with it yet, but I see myself either setting up Splunk or Greylog in the near future. Note, a while back I wrote a post on how to configure rsyslog on RHEL 6 – s0 if you are interested you can find that post here.

So lets get down to brass tacks and configure some freaking syslog.

In this instance we are configuring syslog redirection on a Cisco 3548xl switch. Note we are in configure terminal mode.

First we must tell our device to insert timestamps on

s-3550-1(config)#service timestamps log datetime

Now we tell the device where to send the syslog messages


Now we tell the device which log levels to send to the syslog server. In this instance I am sending warning level messages and above. This is pretty verbose, but its a home lab so I am not worried about a slew of log messages pounding my syslog server.

s-3550-1(config)#logging trap warning

For reference I am including the logging levels below.

Emergency: 0

Alert: 1

Critical: 2

Error: 3

Warning: 4

Notice: 5

Informational: 6

Debug: 7

Now lets review what we have done with the show logging command

s-3550-1#show logging
Syslog logging: enabled (0 messages dropped, 0 flushes, 0 overruns)
    Console logging: level debugging, 13 messages logged
    Monitor logging: level debugging, 0 messages logged
    Buffer logging: level debugging, 13 messages logged
    File logging: disabled
    Trap logging: level warnings, 13 message lines logged
        Logging to, 0 message lines logged


Note that this procedure is exactly the same on my Cisco 2621 switch.


Related articles

HomeLab: The Cisco 3560G
HomeLab: Simple SSH Setup on a Cisco Router
HomeLab: Cisco 3550 Switch Software Configuration Guide
Using Good Old Syslog When Troubleshooting (by Tony Fortunato)
HomeLab: Configuring the NTP Client on a Cisco Catalyst Switches
[PATCH 1/9] syslog_ns: add syslog_namespace and put/get_syslog_ns

HomeLab: Cisco 3550 Switch Software Configuration Guide

Product_data_sheet09186a00800913d7-1So I got my hands on a couple of these old switches for my lab setup. They are better than the 2950s (have to use crossover cables on those ancient things) that I also have in the giant hardware stack in my lab, but not at all as nice as the 2960s that I have.

My particular 3550s (well at least the first one that I powered up) has a whopping 3mb cache which really stinks since Cisco has made IOS images for this switch free to download.

Anway, here is the software config guide. I am sure that I will be referencing this in the not so distant future.

Cisco 3550 Switch Software Configuration Guide

Related articles

HomeLab: Configuring the NTP Client on a Cisco Catalyst Switches
HomeLab: Upgrading Cisco IOS Via tftp on RHEL
HomeLab: The Cisco 3560G
HomeLab: Cisco 2621 Router Password Recovery/Factory Reset