How to configure Router-on-a-stick

How to Configure Router On A Stick at GNS3

Overview

Router-on-a-stick is a type of router configuration in which a single physical interface routes traffic between multiple VLANs on a network. In order to perform inter-vlan routing, the router must accept VLAN tagged traffic on the trunk interface coming from the adjacent switch and internally routing between the VLANs using the sub-interface.

Sub-interfaces are virtual interfaces that are created on a single physical interface. When a physical interface is divided into these virtual interfaces, the router still considers them to be directly connected interfaces with subnets assigned to them and can route in between them. So, in router-on-a-stick configuration, each VLAN is assigned to the different sub-interface at the router physical interface.

Topology

Router-on-a-stick

Router-on-a-stick

At router-on-a-stick diagram, you will find out that we have three virtual PC and two routers, the router “R0” is used to perform the inter-vlan routing and the router “SW0”is used as a switch. Because cisco catalyst switch can not be emulate in GNS3, so in this scenario, I used cisco c2600 router to provide the switch interfaces. By default, GNS3 does not provide the virtual PC so you must install it to your computer by yourself. My recommendation tutorials which will help you in configuring virtual PC at your computer are shown below:

1. VPCS Official Website

2. Adding Hosts/PCs to GNS3 – VPCS Configuration Guide

In our example we will have three vlans:

VLAN 100   : 192.168.10.0/24

VLAN 200   : 152.118.83.0/24

VLAN 99    : 172.32.10.0/29

Before you run the router-on-a-stick configuration, keep in your mind that the PC1 (ip address 192.168.10.15/24)  is at VLAN 100, the PC2 (ip address 152.118.83.15/24)  is at VLAN 200 and the PC3 (ip address 172.32.10.4/29)  is at VLAN99. In SW0, I set the IP address and default gateway for VLAN 99 for management purposes. In order to use the default gateway at SW0, we need to enter “no ip routing” command at global configuration mode at SW0.

The last thing that you must not forget is to add three vlans (vlan 99, vlan 100 and vlan 200) in both router R0 and SWO vlan database:

Example at SW0:

SW0#

SW0#vlan database

SW0(vlan)#vlan 99

VLAN 99 added:

Name: VLAN0099

SW0(vlan)#vlan 100

VLAN 100 added:

Name: VLAN0100

SW0(vlan)#vlan 200

VLAN 200 added:

Name: VLAN0200

SW0(vlan)#apply

APPLY completed.

SW0(vlan)#

After we have finished the configuration of vlan database between two routers, now we should be able to ping PC2 from PC1 or PC3 from PC1 and also VLAN 99 from PC1 to verify the connectivity.

I enclose herewith the link to Download the router-on-a-stick configuration. I hope you enjoy this tutorial and thank you for reading it.

Hermin

How to Install RTLinux on RedHat 9

Please click the link below to access the short tutorial for installing RTLinux on RedHat 9

how-to-install-real-time-linux-on-redhat-9

Short Tutorial for installing Comedi & Comedilib

Comedi (Control Measurement and Device Interface) is a collection of device driver for data acquisition board. The specification of my computer system is

a. RTLinux 3.2-rc-1 from www.rtlinux-gpl.org

b. Linux Kernel 2.4.21 from kernel.org

c. Redhat 9

d. Comedi from RTLinux 3.2-rc-1 in “drivers” folder

e. Comedilib 0.7.22 from www.comedi.org

Below are the steps of installing comedi and comedilib in RTLinux :

1. Step 1 (Preparation)

– Modify the file “fs.h” in /usr/src/rtlinux/drivers/comedi/include/linux/fs.h become

/* linux/fs.h compatibility header

*/

# ifndef __COMPAT_LINUX_FS_H_

# define __COMPAT_LINUX_FS_H_

# include <linux/version.h>

# define KILL_FASYNC(a,b,c) kill_fasync(&(a),(b),(c))

# include_next <linux/fs.h>

# endif- Please check your kernel version which has already been patched with rtlinux. Use command prompt “uname -r” in shell prompt

- Upgrade the “swig” for linux redhat 9. The swig version must above 1.3.x

2. Step 2 (Configuration and Install)

- Do configuration inside the comedi folder, by typing “./configure”. After that type “make config” . And fill the name of location of linux installation folder. Remember this linux folder must be patched by rtlinux. Then, fill the name of location of rtlinux folder.

- type “make” for compile

- type “make install”

- After the comedi has been successfully installed in the system. Type “make dev” for making device files

3. Step 3 (Test the Driver) – Install driver module by using command: (ni_pcimio is the driver which is suitable for my data acquisition board)

“/sbin/modprobe ni_pcimio “

- for checking the message from this action, type “dmesg” in shell prompt

4. Step 4 (Install Comedilib)

- “./configure” in comedilib folder

- make

- make install

5. Step 5 ( Modify /etc/modules.conf )

If we type the command “/sbin/modprobe -c | grep comedi”, we get no result ( something like ” alias char-major-98 comedi”). We must modify modules.conf file by adding

“alias char-major-98 comedi”

in that file.

6. Step 6 (Showing the board information)

- use command like this below to show the information about our board:

“cat /proc/comedi”

Reference :

1. http://he3.dartmouth.edu/pci-ioc/LinuxIOC_2.html

2. http://www.comedi.org/cgi-bin/viewvc.cgi/comedi/Documentation/comedi/

Impression on Schlumberger Employee Selection Process

On 8 January 2008, I followed the Schlumberger open recruitment for final year student in University of Indonesia. It was about 300 candidates applying for this selection process as field engineer. Most of them are student from Univesity of Indonesia, but some of them are also come from ITB, USU, and overseas university.

The selection process on that day was divided into two parts, the first part is speaking (approximately same as TOEFL IBT test) and the second part is focus group discussions (FGD). I have already tried this kind of selection for three times. But at the end, I failed. :(

But I did not totally disappointed, because every time I follow the Schlumberger employee selection process, I learn something new and existing and what my mistakes are. In the first selection, it is speaking test selection. You have to pick up one question from a bunch of given question. There is no correct or wrong answer, but there is a brilliant and most sensible answer. On this kind of selection process, Schlumberger does not seems like to find a valedictorian but it seems like to find someone who can cleverly convey his idea in succinct and analytical answer. Really, I learn this after I ask some of my successful friend.

The second part of selection process is focus group discussions. In this process, we were given the sample case about how to survive in boat accident and how we make a good decisions in saving some important items. So, we must a grade of importance to these items, and must give reason in our presentation. I really did not know exactly how to win this second quest but I found out that in focus group discussion, we must not be too ego or too submissive and this kind of attitude can ruin the entire groups. I sincerely do not know exactly the best tips for win this quest, and I still need to learn more. May be I can try another employee selection process, he he :)

At last, I do not even regret even though I have failed. I just believe that learning constantly and perfectly, can give the greatest success in our life.

Please give your comment :) , Thanks a lot.