Showing posts with label Dynamips Labs. Show all posts
Showing posts with label Dynamips Labs. Show all posts

Thursday, April 9, 2009

Dynamips and switches IE lab Part 2




I finished all the cabling and installation of quad NICs. Luckily, Ubuntu automatically detected all the quad NICs without crying for drivers. It would have been real mess without cable ties. Remember to verify whether your dynamips router's physical interface goes to correct switchport on the real switch through the show cdp neighbors command.

Friday, April 3, 2009

Dynamips with Switches

Since I am running a full scale dynamips lab, I decided to connect dynamics to real switches. I'll be using 4x3550, with 3x quad port NICs. I will do a couple rented rack sessions to familiarize myself with features specific to 3560.

Initially when I decided to go for quad port NICs after foraying through myriad forums, I realised most of the quad NICs were PCI cards. And this posed to be a huge problem because I only have two PCI slots on my motherboard. Dismayed that I would have to resort to changing the motherboard (recently bought...no way) or go with USB NICs, which would be a pain due driver compatiblity issues with linux, I decided to give it one final try. Fortunately, I have 3 PCI express slots and quick search revealed that Intel Pro/1000 PT Server adapter would be the best choice, expensive but worth it.

So at present I have ordered 2x Dlink DFE-580Tx and 1x Intel Pro/1000 PT Server adapter. Hopefully, it should arrive next week. Meanwhile, I spent most of yesterday, changing initial config files for backbone and nonbackbone routers for IE ver4.10 VOL2, VOL3 and IE ver5 VOL1 to be compatible with my setup of dynamips. I only have couple of changes, eg: R3,R4,R5,R6 use F0/0 and F2/0 instead of E0/0 and E0/1 and the routers will be connected to real switches. I also created 2 .net files for IE ver 4 vol 2 and vol 3 labs [ie.410.vol2.net , ie.410.vol3.net]. So when I am going to do for example, lab 2 from vol 2, I do and find a replace of "X", where X is the directory containing initial configs for routers, in the cnfg parameter of the ie.410.vol2.net file.
The good thing with real switches would be the capability to directly paste the switch configs I do the labs and do most of the switching sections.

I have two more labs in IE VOL1, bridging and switching and QoS. I found most VOL1 labs to alright, but then again I havent started full scale labs.

Saturday, March 21, 2009

Dynamips proccessor utilisation

As I mentioned before, I have started working on IE work books. However, as soon as I ran the complete topology (no IGP, BGPetc) , with minimal configuration on non backbone routers, CPU utilization on an average was 55% and 30% for the two dynamips processes.

Yesterday I decided to give a test once again with different idlepc values, and voila it has reduced CPU usages to 14% and 12% for the two dynamips processes respectively.

Observation
1) Rather than using only idlepc values, which dynamips states is a potentially better idlepc value (* entries), test with all the idlepc values (including un* values), one after the other to see what works best for you.
2) Remember if you have started a router, then simply telnet to it and leave at that #prompt, even if you're not configuring it.

How to find the idlepc value?
Start one router (eg:R1), get a list of possible idlepc values. Apply them one by one and observe the cpu utilisation with top or htop command in linux. With one router and a good idlepc value, on an average my cpu utilisation is approx 2% or less.

I tried with one of the idlepc values, which was not * and it happened to be the value which I found is
the best rather than dynamips * ones. I had been using only * values assuming it was the best, ignoring un * entries.

Note: I run Dynamips on Ubuntu 64bit 8.10, with Quad Core 9400 with 4GB Ram.
Tip: For IE Vol1 labs, only start devices that you require in the lab exercise.


Wednesday, October 1, 2008

Dynamips Reduced Processor Utilisation





I am extremely elated to share the good news on my Dynamips test, i.e Internetwork Expert Toplogy . I have got my CPU usage close to 38% - 46%. I had earlier reported my disappointment in not being able to reduce processor utilization below 70%- 80%
And here comes the tip of the day to reduce CPU usage.






Below are System Specs

  • OS :Ubuntu 8.04 64 Bit
  • Processor : Intel Core 2 Duo Processor T9400
  • IOS image : c3640-jk9o3s-mz.124-10c.bin
Steps to Reduce CPU utilisation
  • Calculate your idlepc using method detailed in the Dynamips/ Dynagen tutorial (Calcuating idlepc values)
  • Start all devices {start /all}
  • Make sure you telnet to all devices and leave it at the router prompt, even if your not using the device. Once all devices have their router prompts you'll see the cpu usage drastically reducing.
I observed during my tests that simply starting all devices would still leave your processor utilisation high. However, telnetting to all devices and leaving them at the router prompt dramatically reduced processor utilization.

Tuesday, September 30, 2008

Dynamips results

So far no luck, my cpu is still running at 70-80% when I run 11 devices. I'll probably run some more tests this weekend to see if I can bring that down. However, I am still planning to buy equipments of ebay as I have bought 60% already.

I'd use dynamips as a platform to simulate scenarious on devices, which ofcourse are too expensive to afford. I have also completed 20% of my reading. I must say it feels good to refresh and learn new concepts, especially when you say "I havent thought about it from that angle".

Saturday, September 27, 2008

Dynamips on Ubuntu 8.04 64 bit (Toshiba A300/U01)

Finally I got my hands on Dynamips. I decided to run it on Ubuntu 8.04 64bit. After installing Ubuntu 64bit on my Toshiba A300/U01, I ran into a couple of problems with my RealTek network card not being detected correctly. However this issue had already been solved and I was able to fix it using the following link.

http://www.jamesonwilliams.com/hardy-r8168.htm

After getting my network card to work, I installed Dynamips. Below is the process. I was able to get a lot of details from regarding this from ( http://ubuntuforums.org/showthread.php?p=5282100)

1) Create a directory for Dynamips

sudo mkdir /opt/dynamips

2) Change to the directory

cd /opt/dynamips

3) Goto dynagen website and download the latest version. At the time of writing this, the latest realease was
"dynagen 0.11.0"

4) Copy the location of the file. For instance, in Firefox , right-click the link and select copy link location.

5) Download dynagen using wget (paste the copied link of the dynagen here)
sudo wget http://downloads.sourceforge.net/dyna-gen/dynagen-0.11.0.tar.gz?modtime=1208688475&big_mirror=0

6)Extract the tar ball
tar -xvzf dynagen-0.11.0.tar.gz


7) Goto the directory

cd /opt/dynamips/dynagen-0.11.0

8) The README.txt file in this directory gives you the version of Dynamips required.

vi README.txt



The highlighted section above tells us to use atleast version 0.2.8-RC1 or higher of Dynamips.

9) Goto Dynamips blog and wget the amd64 (64bit version)

http://www.ipflow.utc.fr/blog
/

Change back to /opt/dynamips directory

cd /opt/dynamips

sudo wget http://www.ipflow.utc.fr/dynamips/dynamips-0.2.8-RC2-amd64.bin

Note: Above file is the 64bit version of dynamips, since I am running it on Ubuntu 8.04 64bit

9) Change the permission of the downloaded file

sudo chmod 755
dynamips-0.2.8-RC2-amd64.bin

10) Create symbolic links for dynamips and dynagen

cd /usr/bin
sudo ln -s /opt/dynamips/
dynamips-0.2.8-RC2-amd64.bin dynamips
sudo ln -s /opt/dynamips/dynagen-0.11.0/dynagen dynaged

12) Create a directory for your IOS images
cd /opt/dynamips sudo mkdir images

13) Download the IOS images and place it in
/opt/dynamips/images directory
All ready to run DYNAMIPS!!!


1) Navigate to

cd /opt/dynamips/
dynagen-0.11.0/sample_labs/simple1

2) Edit simple1.net file

sudo gedit simple1.net


Specify the correct path of your images, in this case /opt/dynamips/images/XXXXXX.bin.
Also change RAM size as required by the IOS.


Save and Exit.


3) Run the Dynamips process

sudo dynamips -H 7200 &

4) Use dynagen to load simple1.net file

sudo dynagen simple1.net
5) At => prompt type ? for a list of options. List command will show the devices available as configured in the .net file.

6) Telnet to a device.
Telnet R1

Note: You can also use your favorite programs such putty and telnet to localhost:2000 etc

In the next section, I'll discuss how to configure idlepc values so that your CPU is not on 100%, when you load several devices in your lab.