Network Troubleshooting, A deep dive!

When troubleshooting a network problem, you have only one objective. This is to understand how your network works! Without observing the normal behavior of your network and identifying what needs to happen, picking up what is broken, what is not the norm, what is not flowing in the wrong direction, will forever be a dream.

Speaking about dreams, let us fire up those imagination cells and paint a picture about a fictional network. This network, let’s say it is a basic network connecting 2 computers to a printer and to the Internet. These computers belong to two very different human beings. One concerned on sales and the other on production. Sales is always concerned on how much production can output and production is always concerned on what the sales projections look like. But the trick here is that the two humans refuse to collaborate and share information with each other unless it goes through email. That way they each know that the information shared is deliberate and not freely accessed.

Did I mention these two humans where brothers? Yup competitive at that, as well. Always trying to do better than the other. Yes, and you are the lucky one that they approach to setup their network.

Brace yourself…

Part 1: The Design Phase

Well, you think back to you Cisco ENT training days and confirm in your thoughts that all you really need here is the following equipment:

  • Internet connection
  • Router
  • Switch
  • Two computers
  • 1 printer

That’s it right? , hmmm…something is missing…the brothers think to themselves. They look down at their smartphones and BAMMM!! Stars!! Drum Rolls!! IDEA!! “What about WiFi? We want free WiFi”, they say. You begin to giggle but hold it back. They might get WiFi but they will also end up paying for it at the end of the day, you grin internally and agree, “yes, we can deliver WiFi as well”, deliberately forgetting the word free in your promise.

  • WiFi Access point

So, we have a network! Nope, we have endpoints! These endpoints need to still be connected to each other with network cable to truly represent a network. A Network, defined, is a group of connected devices that share common resources and information.

So how do we begin to connect these endpoints together to setup a network?

While the router is the bread winner in this design and provides the internet access, the switch is the real deal in keeping the communication channels open between each device connected to it. And the other devices, well they all access the internet and make use of the common resources like the printer. (See diagram 1 for a depiction of what a connected network would look like)

Diagram 1: A Basic Network Layout

Now that we can see how the devices physically connect to each other, this still does not tell us how they will know how to communicate to each other. Being able to physically and logically identify each connected device uniquely will greatly help our crusade in getting better communication flow between these connected devices.

We heat up the old stamping iron in our fireplace and we press hard on each device to physically mark them… (Insert evil laugh emoji) OK we don’t do the above.

Each device that is network capable is given a unique set of letters and numbers by its manufacturer called the MAC Address (Media Access Control Address). This is a 12 character address displayed either in 3 sets of 4 characters each or 6 sets of 2 characters each. E.g. C0-91-34-33-F0-80

Network packets that flow from one device to the next are populated with the details of where it’s coming from and where it’s going too. These details include the Source Mac Address and the Destination Mac Address. Each packet must contain the mac address of the destination device so that when the packet passes a device, that device knows where to the send the packet too next.

All switches maintain a Mac Address table. This table maps each port number with the mac address learned from that port on the switch. Therefore when Human 1’s laptop sends packets to the printer, the switch intercepts the packets from the port connected to laptop 1 and passes it on to the port connected to the printer. This is what we call “LAYER 2 switching”. This is the movement of network packets by simply relying on knowing each devices Mac address. Layer 2 networking is limited to devices being connected to a common switch or stack of switches because layer 2 networking is heavily dependent on a well maintained MAC Address Table.

Now that we have highlighted the need for MAC Addresses which is the physical address of a device, let us explore the logical address of a device. This is known as the IP address. An IP address is made up of 4 octets. We call it an octet because each octet when displayed in the computer language called binary, is made up of 8 digits represented by either a 0 or a 1. These groups of 8 binary digits when converted into a decimal number can fall anywhere between the number 1 and 255 inclusive.

E.g. 192.168.0.1 (Decimal)

11000000.10101000.00000000.00000001 (Binary)

This logical address remains static in a network packet while the mac address in a network packet changes after each device the packet passes through. This allows for network packets to travel far beyond the boundaries of a single switch or series of connected switches.

Remember we planted the seed earlier that a MAC address is learned by the port on a switch?

This process populates a MAC address table with the learned mapping. This is achieved by each device sending a “hello” packet to announce itself on the network. These “hello” packets help populate the switches MAC address tables so that the switch knows exactly which port each device is saying hello from.  The Magic truly happens when a device tries to send a network packet to another device but does not know the mac address of the device it needs to send it too. This is because devices are more commonly identified by their logical addresses than the physical addresses.

Say for example, that laptop 1 with IP address 192.168.0.10 wants to send a print job to the printer with IP address 192.168.0.15, the laptop formulates the packet details with the source MAC address of Laptop 1, the Source IP address of laptop 1, the destination IP address of the Printer but a wildcard destination mac address. In order words it gets in front of the stage with a Mic in Hand and the speakers facing the crowd and asks the question, “Who is IP Address 192.168.0.15?”

When the printer hears this question it responds to laptop 1 with its own MAC address. Thereby allowing Laptop 1 to replace the wildcard destination mac address with the true mac address of the printer. This wildcard mac address is always initially the mac address of the devices default gateway.

So now that we semi understand how packets flow from one device to the next just by having the information in it of the source and destination IP Address and Mac Address. We can make the assumption that we can finally get to the internet, right? Well that’s assuming that accessing the internet is obtainable just by knowing the IP address of where you want to browse too, right? Hmmm… something about this story doesn’t sit quite right yet. If I recall, accessing the internet involves knowing the name or series of names of the website you want to browse too. This entails managing or maintaining some sort of list that knows the IP Address of every single name there is for a website out there.

Luckily for us, the IT folks out there have provided this list for us in the form of a Domain Name Service or in short DNS. This service is publicly accessible to use as a cheat sheet if you will to allow your device to determine the IP address of a website you are browsing.

The Recap:

Switches allow for more than one network capable device to connect to each other locally in a common space.  DNS allows those devices to break loose from the confines of that common space and allow the devices to reach out and touch the World Wide Web.

A part 2 to this story coming to you soon, showing you how freedom is obtained by cutting loose those network cables.

When someone says “it’s a network problem”, the right response is…

To Network Engineers out there, those four simple words evolve into the worst statement ever. My email is not emailing, it’s a network problem; the internet is slow, it’s a network problem; the actors/actresses are not sexy enough in this movie, it’s a network problem…

When is it ever not a network problem??? It’s seems like it’s the easiest area to blame all problems on, right?…probably because it’s this space filled with questions, raised eyebrows and higher grade terminology used deliberately to confuse the weak and befuddle the brave…

Well, I hope to, in this journey you are about to take with me, de-mystify the world of networks for you…at least I hope to try…

What is a network?

A network in the simplest of terms is a group of connected thingymajiggy’s (well known as electronic devices) that share common resources and information. The electronic device can be a laptop, a pc, a printer, a mobile phone, a television, and yes even your fridge. If you haven’t already realised it, you are using the biggest network in the world right now, reading this piece…yes we all love it and call it affectionately “The Internet” / “the world wide web”/ “The Net”.

To hone in the understanding of networks, let us take a smaller look at networking and break this down a bit further.

Let us paint the scenario, shall we…

It’s assignment season…You are armed with your sturdy laptop and you have just finished typing your final year assignment. You click “save”. The little hour glass icon dances around for a bit and bam…just like that, your hard earned effort is loaded into the matrix. But wait, you realise that your lecturer is pretty old school and likes things printed…(i know what you’re thinking, does he recycle? I DON’T KNOW!), either way, you need to print your assignment before its too late to submit. Your printer is connected via cable to your home router (the little box in your house with a couple of cables connected to it and flashing lights). Your laptop is connected to the Home Wifi . Holding breath, dramatic pause…The moment… The assignment needs to get from your laptop to the printer. You click the “print” button….and you slowly turn your gaze onto the printer….and then….silence….that awkward moment when you may very well have a network problem…eeek!

Let us take a break from the scenario to explain the purpose of why networks exist. Computers were invented to capture information, process information and store information. Networks were then invented to share information between the various computers that stored this information. Getting information from one computer/device to another was and still is the sole purpose for the existence of networks till this very day. Information is converted into, what the tech industry calls binary, which is then turned into electrical signals that travel on various types of media like copper cables, fibre cables and no cables (wireless) from one device to the next.

In order to achieve this objective, each device needs to know of the existence of the next device. This is achieved by each device telling every device about its physical address (also known as the MAC or media access control address). The MAC address is essential for information to flow from device to device in a local area network (LAN). When we move beyond the local area network we start getting into the topic of logical addresses also famously known as the IP Address (Internet Protocol Address).

A Local Area Network can be defined as a group of electronic devices connected to the same wired network device or same wireless network name. These network devices have evolved over the years to become more and more intelligent in the way it moves information from one device to another… But that’s another topic for another day…

So when someone says it’s a network problem, I always, this is important, start to grin ever so slightly and respond with the following kind questions:

  1. What is the objective that you are trying to achieve here?
  2. What in your opinion is not happening correctly?

These very simple questions will often at a 99.9 % success rate always arm the Network Engineer with two very valuable pieces of information, namely:

  1. The Source device and
  2. The Destination device

It’s all very easy from there, if you are the actual network administrator for the network in question. Although, If you don’t already administer the network where the problem occurs, and in most scenarios, this is the case, you may need to follow up those questions with a few more questions, like (Oh, by the way this is when that family member comes to you with their technology problem because they think you know the answer):

  1. Is the device you are trying to connect too switched on?
  2. Are both the source and destination devices connected to the network?
  3. Can you see the lights flashing on the network device?
  4. What are the IP addresses of the source and destination devices?

There is one important point to take away from this story, which is, there is a very urgent need to separate facts from assumptions and then vitally important to build your understanding of the situation from only the facts of the story. With a keen eye on Networking basics and a clear understanding of the “network problem”, solving it becomes a walk in the park.

I will cover a few network troubleshooting techniques in my next post…stay connected…