Archive

Posts Tagged ‘Ubuntu’

Dynamips – findings

January 9, 2011 Leave a comment

So I have made some more findings about Dynamips

  • Running more hypervisors is not more effecient than running one, will load balance over cores anyway
  • GNS3 is just a hassle, stick with Dynagen if you have a set topology

This means that in my previous post it is only necessary to run two hypervisors, one local and one remote. I decided to run R1-R4 on my laptop and everything else on my other computer. This keeps the load at around 35% on my laptop and 75% on the other computer. It’s good that my laptop doesn’t get so high CPU load because I use it to run all the telnet sessions. I am using Putty to login to the console since this is what is used at the R&S lab.

Dynamips – loadbalanced hypervisors

January 8, 2011 8 comments

As most CCIE candidates know Dynamips runs much better on Linux. Many of us run Windows at work or as our primary OS and might be afraid to mess around with partitioning and dual booting. There is a safer alternative that is called WUBI (Windows UBuntu Installer). WUBI installs Ubuntu like a regular program and it can be removed via add/remove programs. WUBI adds an option at boot to boot either Ubuntu or Windows. If you don’t choose anything Windows will boot. Get WUBI here.

I use my laptop to run labs but it’s not that powerful. It’s a Core 2 duo @ 2.13 GHz with 4GB RAM and runs Windows 7 Professional as primary OS. I can run the full INE topology at 75% CPU that is with only the base configs. I have another computer that is used as a HTPC, its a Core 2 duo @ 2.33 GHz with 2GB RAM and Windows XP as primary OS. I got the idea to try to load balance with the two computers. I started out booting Ubuntu on one computer and Windows on the other but I ran in to all sorts of issues. I decided to run Ubuntu on both computers and with WUBI its easy and safe to do so and still keep your Windows (take backups just in case!). Getting the load balancing to work turned out to be more difficult than expected, that is why I hope people can benefit from this blogpost.

Start by installing Ubuntu on both computers via WUBI and boot the computers. You need to install Dynamips and Dynagen, if you want to install GNS3 also. Either use the Synaptic package manager and search for the programs or from a terminal:

sudo apt-get install dynamips

Repeat this step for Dynagen and GNS3 if wanted. The great thing with Synaptic and apt-get is that it will check dependencies and download everything needed. If you want to control the second computer from the first one configure remote desktop settings.



When using both local and remote hypervisors you cannot use localhost in your .net file, use the real IP instead. Put entries like this in your .net file:

[192.168.1.65:7200]
udp = 10000
workingdir = /Applications/Dynagen/sample_labs/internetworkexpert/working
[[3725]]
image = /Applications/Dynagen/images/c3725-adventerprisek9-mz.124-15.T10.extracted.bin
ram = 128
ghostios = True
idlepc = 0x614ac21c

I use two hypervisors per computer so the next entry will be 192.168.1.65:7201 and udp = 10100. Then after that I have 192.168.1.67:7202 and udp = 10200 which is the other computer.

You need to create directories to put the files, this is done with mkdir:

cd /
mkdir Applications
cd Applications
mkdir Dynagen
cd Dynagen
mkdir images

The reason I created these directories is that is what INE uses in their .net file (I use their workbooks). You can download the .net files and base configs here.

Make sure that the dir ‘working’ that is created from the zip file has the right permissions (write) otherwise Dynagen will crash when it tries to write log files and other files to the dir.

INE and I use an uncompressed IOS to boot the devices faster. To uncompress the image you can use unzip:

unzip c3725-adventerprisek9-mz.124-15.T10.bin
Archive: c3725-adventerprisek9-mz.124-15.T10.bin
warning [c3725-adventerprisek9-mz.124-15.T10.bin]: 28328 extra bytes at beginning or within zipfile
(attempting to process anyway)
inflating: C3725-AD.BIN

To change the filename use mv

mv C3725-AD.bin c3725-adventerprisek9-mz.124-15.T10.extracted.bin

Now everything should be in place. Start GNS3 and choose ‘open network file’ and import the .net file. I will attach mine to show how it is done. If paths to directories or to the IOS image is wrong the import will fail so typing the right names is critical.

You should now have load balancing between the computers. I was able to go down from 75% CPU to around 45-50 with this setup. If you have any questions post them in comments. Here is the .net file.

Categories: CCIE, Dynamips, Linux Tags: , ,

Ubuntu on a stick

July 20, 2010 Leave a comment

Since I have started studying for the CCIE I needed a lab. I don’t have the space/money to get a dedicated home lab so I have to use Dynamips and GNS3 instead.

It is well known that Dynamips runs better on Linux, I am by no means experienced in Linux but Ubuntu is very easy to run. Since I wanted to use the laptop I have at work I didn’t want to risk doing a dual boot and messing up the MBR or something like that. Booting on a live-cd would work but then I wouldn’t be able to save anything.
Instead I installed Ubuntu on an USB memory stick. The capacity of it is 2GB which means I can have 1GB for installing stuff and saving topologies etc.

Start by downloading Ubuntu. I have 4GB RAM so I used the 64 bit version.
Follow the instructions on Ubuntus homepage which means downloading Universal USB Installer.

I used these settings:

Make sure you don’t have anything important on it before you do the format. You want to use persistence if you want to be able to save on the USB. If you have a larger USB you can choose
a larger filesystem so you have more space available.

When the installer is done you can boot from the memory stick. You might have to change the boot order in BIOS if Ubuntu doesn’t start.

I then followed this guide.

If you extract the files to / the .net file will be correct if you are using the same IOS. If you are using another version you have to update the .net file.
The important thing is to run multiple hypervisors which will be done if you use the .ini that is supplied.

Following this guide I was able to run 15 routers at about 60-70% CPU and around 1.5GB RAM. My laptop is a HP Elitebook 2530p Core 2 Duo L9600@2.13GHz with 4GB RAM installed. I run Windows 7 when I don’t
lab and now I can boot Ubuntu from an USB when I want to lab without having to mess with my regular harddrive. If you have any issues post them in comments and I will try to give feedback.

Categories: GNS3, Technology Tags: , , ,
Follow

Get every new post delivered to your Inbox.

Join 615 other followers