Saturday, 26 December 2015


Leave a Comment


Welcome to the second part of the VLAN network tutorial. Here am going to get our network up and running by walking you through some configurations. If you miss the first part please click here. Am actually doing this using a network simulator called cisco packet tracer but the configuration is pretty much the same on life routers. So sit back, relax and ignite your brain as I’m about to unveil one of the coolest networking secrets.


Before moving on to configuring VLAN in our network, I’ll like list out the basic steps that must be followed to make it work in a network of switches and routers installed with the cisco internetworking operating system (IOS).
To route between VLANs, one must go through four basic steps;

  • ·         Configure and name VLANs
  • ·         Assign switch ports to VLANs
  • ·         Subnet VLANs
  • ·         Configure trunk Ports (Port connecting the switch to the router)
  • ·         Configure inter-VLAN routing ( on the router) by:

    1.  Creating subinterfaces for each VLAN
    2.  Specifying the encapsulation method

Our case study network topology is composed of a router, switch and some hosts. The network has been subnetted using class C IP addresses with subnet mask which will accommodate 14 valid host in each subnet (VLAN) as shown in the diagram below:

The subinterfaces are the default gateways to of the VLANs and take the first valid IP addresses in the subnets.

Switch Configuration
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 10
Switch(config-vlan)#name admin
Switch(config)#vlan 20
Switch(config-vlan)#name sales
Switch(config)#vlan 30
Switch(config-vlan)#name marketing
Switch(config)#interface f0/1
Switch(config-if)#no sh
Switch(config-if)#no shutdown
Switch(config-if)#switchport mo
Switch(config-if)#switchport mode acc
Switch(config-if)#switchport mode tr
Switch(config-if)#switchport mode trunk
Switch(config-if)#switchport tr
Switch(config-if)#switchport trunk en
Switch(config-if)#switchport trunk ?
allowed Set allowed VLAN characteristics when interface is in trunking mode
native Set trunking native characteristics when interface is in trunking
Switch(config)#interface f0/2
Switch(config-if)#switchport mode acc
Switch(config-if)#switchport mode access
Switch(config-if)#switchport acc
Switch(config-if)#switchport access vl
Switch(config-if)#switchport access ?
vlan Set VLAN when interface is in access mode
Switch(config-if)#switchport access v
Switch(config-if)#switchport access vlan 10
Switch(config-if)#interface f0/3
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#interface f0/4
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 30
%SYS-5-CONFIG_I: Configured from console by console

Switch#copy ru
Switch#copy running-config st
Switch#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...

Router Configuration
ROUTER#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
ROUTER(config)#interface f0/0
ROUTER(config-if)#no sh
ROUTER(config-if)#no shutdown

ROUTER(config-if)#int f0/0.10

ROUTER(config-subif)#encapsulation do
ROUTER(config-subif)#encapsulation dot1Q
% Incomplete command.
ROUTER(config-subif)#encapsulation dot1Q ?
<1-1005> IEEE 802.1Q VLAN ID
ROUTER(config-subif)#encapsulation dot1Q 10
ROUTER(config-subif)#ip add
ROUTER(config-subif)#ip address
ROUTER(config-subif)#int f0/0.20

ROUTER(config-subif)#encapsulation dot1Q 20
ROUTER(config-subif)#ip address
ROUTER(config-subif)#int f0/0.30

ROUTER(config-subif)#encapsulation dot1Q 30
ROUTER(config-subif)#ip address
ROUTER#copy run
ROUTER#copy running-config st
ROUTER#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...

Configure your PCs using the scope of IP addresses in our network diagram and you’re good to go. As more and more hosts are added to the VLANs, all you need to do is assign them IP addresses in the subnet range indicated in the network diagram. But remember that in our case study only 14 valid IP addresses are available for each subnet(VLANs) since we are considering a medium-sized enterprise.

CONCLUSION: Well that’s all there is to the configuration. I hope this has been of help to your intellect and I’ll like to thank you for reading.
Read More

Tuesday, 22 December 2015


Leave a Comment

It is no news that offices around the world depend on the processing power of computers to successfully run their day to day business. It is also important to know that offices that connect these computers together in whatever form are seen to be more organized and corporate than those that do not. Computer networking, the connection of various computers and devices (e.g. printers, scanners) for the purpose of resource sharing comes in different flavors. The type of networking solution employed depends on the size of the office as well as the operations carried out.
This post is focused on providing networking solutions to medium-sized offices using the concept of virtual local area networks. I’ll start by telling you what LANs and VLANs actually are, after which I’ll discuss how VLANs can be implemented in networking offices.

This tutorial is targeted at individuals with basic knowledge of networking, especially how to cable a network as well as bring up routers and switches and perform basic configurations. If you are also preparing for the Cisco Certified Network Associate (CCNA) this tutorial will be of benefit for you since VLAN configuration is one of the CCNA exam objectives.

To get this tutorial completely dialed in you need to have in your possession the following:

  • ·         Switch
  • ·         Router
  • ·         Straight through cables
  •      At least 3 PCs

You can get used switches and routers on ebay for around 30 dollars each and the prices keep dropping. They’re old ones actually but will be okay for this tutorial. Now I know not everybody can afford them and that is why you should get the cisco packet tracer network simulator if you fall in the this category. Those preparing for CCNA exam should be familiar with it. Other simulators you can use are router sim and GNS3.


Local Area Network (LAN)
This is the connection of computing devices on a local segment for the purpose of sharing files and services (e.g. print services, internet connection etc.). Devices such as hubs and switches are used along with the right cabling to actualize local area networking. Switches are more optimal than hubs as they provide advanced functions like segmentation, MAC address learning and make forward/filter decisions for sending and receiving frames based on the addresses learned.

Virtual LAN
Basically, a virtual LAN is a logical grouping of users by function. With virtual LANs,  network hosts that perform similar tasks are grouped into separate VLANs. To illustrate this further, consider an organization with different departments or sections, say finance, sales and advertising departments. Each of these departments can be put in their VLANs so that data meant for only staffs working in the sales department are not necessarily broadcasted to the rest of the network. Broadcast control is one of the major benefits of using VLANs. VLANs also enhance network security, and increase the number of broadcast domains while decreasing their size. This means that in a network without routers, the OSI layer 3 function of broadcast control can only be achieved at layer 2 by implementing VLANs. 

The use of VLAN in a network is a cost-benefit solution for organizations that do not want to spend much on routers but still desire network flexibility and scalability.

Someone out there may be asking; what if these sections in separate VLANs need to communicate in order to share general information? Shouldn’t there be a way to link them?
The answer to that question is inter-VLAN routing.
Inter-VLAN routing allows for communication between VLANs and to make this happen, we need a router.


We are now going to use the case study of a fictional organization named iDAP with 3 different departments namely; sales, admin, and marketing to illustrate how VLAN can be implement using a switch and a router. The diagram below is the iDAP’s network topology.


The cable connections are done using straight through cables.
The tutorial continues in the second part which is a step by step guide to configuring VLAN in our network using cisco routers and switches or those with cisco inter-network operating system (IOS) installed. Try to get some good Cisco switches and routers to implement this network.

Read More

Saturday, 12 December 2015

The Place Of Algorithms In Computer Science

Leave a Comment

The word "Algorithm" may not seem to be a new word to computer scientists and IT junkies out there, though some newbies may still find it strange just as some who are familiar with the word really don't know the powerful problem-solving capabilities attached to it. Let us start this post with what an algorithm is before exploring its importance to computer programming.

What Is An Algorithm?

Simply put, an algorithm is a finite sequence of instructions aimed at accomplishing a specified task. It can also be defined according to a paper from MIT as a well defined computational procedure that accept some values, or a set of values and give out some values, or a set of values as output.
There are many types of algorithms that have been developed and have been applied to solve a wide set of problems. Some are even biologically inspired, that is they were developed after thorough observation of how some animals behave. A good example of this is the ant colony algorithm that was developed based on how ants search for food.

Importance To Computer Science

The importance of studying algorithms cannot be overemphasized especially in the programming field. Algorithms equip computer scientists with a general way or standard for solving specific kinds of problem with some been updated with different versions as more research work is been done. The scientist can implement this algorithms using any technology they prefer. For example sorting and searching algorithms can be implemented using any programming language of choice, be it Java, C, C++, C# and so on.

Custom algorithms can also be written to fit into the solution of a particular problem a scientist may be tasked with. This is a very good programming practice and more success has been recorded doing this than just approaching a problem in a haphazard manner. Pseudocodes (algorithms written using less formal notations so that they can be easily read)  are normally written before commencement of a programming exercise to act as a guide and positively affect the program flow. Pseudocodes also make it easy to properly place comments in our programs.

Efficiency comes with analysis of algorithms as this allows a computer scientist to know which is most optimal for a particular problem. Algorithms requires some resources to execute. A good knowledge of how much of these resources (especially running time and space in terms of memory) the algorithms use allows one to be able point out which is best for accomplishing a particular task. For example the sorting algorithm known as selection sort work very well on a small set of data while a much larger database requires sorting algorithm like merge sort.


Having gone through what an algorithm is all about and some of its importance, i hope readers out there will embrace this technical way of solving problems. Algorithms sometimes may seem difficult to implement especially when there is complex task at hand but there's always a lot to gain in the long run.
Read More

Thursday, 25 June 2015


Leave a Comment

A thread is an independent sequence of execution within the context of a parent process. Threads share the resources of parent process but are separately and independently scheduled. Aside hybrid threads, there are two main kinds of threads – user-level threads and kernel-level threads. In user-level threads, the kernel knows nothing about user-level threads and manages them as if they were single threaded processes while in kernel-level threads; the kernel knows about and manages the threads. This write up is all about comparing implementation of kernel-level and user-level threads in the four operating systems listed above.

An important characteristics of windows operating system is its support for threads. Windows support the use of multiple threads of execution within a single process. Multiple threads within the same process may execute on different processors (using symmetric multiprocessing) simultaneously. Windows uses one to one relationship thread model. That is there is one to one relationship of user level thread to the kernel level thread. Each user-level thread simply
maps on to its own kernel-level thread. In windows, each thread contains separate user and kernel stacks.

Traditional UNIX systems support a single thread of execution per process, while modern UNIX systems typically support multiple kernel level threads per process. UNIX implements many to one model which maps many user level threads to one Kernel level thread. Thread management is done in user space. When thread makes a blocking system call, the entire process will be blocks. Only one thread can access the Kernel at a time, so multiple threads are unable to run in parallel on multiprocessors

Linux has a unique implementation of threads. To the Linux kernel, there is no concept of a thread. Linux implements all threads as standard processes. The Linux kernel does not provide any special scheduling semantics or data structures to represent threads. Instead, a thread is merely a process that shares certain resources with other processes. Using a mechanism similar to the lightweight processes of Solaris, user-level threads are mapped into kernel-level processes. Multiple user-level threads that constitute a single user-level process are mapped into kernel-level processes that share the same group ID.

Solaris implements multilevel thread support designed to provide considerable flexibility in exploiting processor resources. In Solaris, user-level threads is implemented through a threads library in the address space of a process. These are invisible to the OS. The kernel threads are fundamental entities that can be scheduled and dispatched to run on one of the system processors.

Some operating systems like Windows distinguish the concept of process and threads while others like Linux does not. UNIX operating system and some of its variants share common attributes including threads implementation.
Read More