Sunday, May 4, 2008
How to use extended-range vlans in the NM-16ESW
In case that you don't already know, in the latest IOS (> 12.4(15)T) you can use extended-range vlans (1006-4094) in your dynamips router/switch (using the NM-16ESW module). Also the vlan database mode is not recommended anymore and you can use the latest config-vlan submode. That way you can replicate more closely the various vendor labs.
I'm using a 3725 as switch, so this is its config in the net file:
[[3725]]
image = /usr/share/cisco-ios/c3725-adventerprisek9-mz.124-15.T5.extracted.bin
ram = 148
disk0 = 8
disk1 = 0
# The idlepc value hasn't been tested extensively, so it might not work in your case.
idlepc = 0x6148b594
The tricky part is that you don't get any indication of this capability; it's like a hidden command. But if you try to configure it, it'll be accepted and it'll work fine.
SW1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#vlan ?
accounting VLAN accounting configuration
ifdescr VLAN subinterface ifDescr
SW1(config)#vlan 2567
SW1(config-vlan)#name VLAN-2567
SW1(config-vlan)#^Z
SW1#
Configure this vlan under an interface:
SW1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#int f1/1
SW1(config-if)#switchport access vlan ?
<1-4094> VLAN ID of the VLAN when this port is in access mode
SW1(config-if)#switchport access vlan 2567
SW1(config-if)#^Z
SW1
Verify the vlan:
SW1#sh vlan-sw br
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa1/0, Fa1/4, Fa1/5, Fa1/6
Fa1/7, Fa1/8, Fa1/9, Fa1/10
Fa1/11, Fa1/12, Fa1/13, Fa1/14
Fa1/15
13 VLAN0013 active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
2567 VLAN-2567 active Fa1/1
Verify the spanning-tree:
SW1#sh spanning-tree vlan 2567
VLAN2567 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 32768, address c200.04f8.0001
Configured hello time 2, max age 20, forward delay 15
We are the root of the spanning tree
Topology change flag set, detected flag set
Number of topology changes 2 last change occurred 00:00:19 ago
from FastEthernet1/2
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 1, topology change 16, notification 0, aging 300
Port 42 (FastEthernet1/1) of VLAN2567 is forwarding
Port path cost 19, Port priority 128, Port Identifier 128.42.
Designated root has priority 32768, address c200.04f8.0001
Designated bridge has priority 32768, address c200.04f8.0001
Designated port id is 128.42, designated path cost 0
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
BPDU: sent 193, received 0
Extended-range VLANs are not saved in the VLAN database; they are saved in the switch that runs the configuration file.
SW1#sh run | b vtp
vtp mode transparent
!
vlan 2567
name VLAN-2567
!
If you get the following message while trying to configure the vlan under an interface, try to shut the interface, reenter the vlan and then unshut the interface:
SW1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#int f1/1
SW1(config-if)#switchport access vlan 2567
% Warning: port will be inactive in non-ethernet VLAN
SW1(config-if)#^Z
SW1#sh int f1/1 switchport
Name: Fa1/1
Switchport: Enabled
Administrative Mode: static access
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: native
Negotiation of Trunking: Disabled
Access Mode VLAN: 2567 ((Inactive))
Trunking Native Mode VLAN: 1 (default)
Trunking VLANs Enabled: ALL
Trunking VLANs Active: 2567
Protected: false
Priority for untagged frames: 0
Override vlan tag priority: FALSE
Voice VLAN: none
Appliance trust: none
SW1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#int f1/1
SW1(config-if)#shut
SW1(config-if)#no switchport access vlan 2567
SW1(config-if)#switchport access vlan 2567
SW1(config-if)#no shut
SW1(config-if)#^Z
SW1#sh int f1/1 switchport
Name: Fa1/1
Switchport: Enabled
Administrative Mode: static access
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: native
Negotiation of Trunking: Disabled
Access Mode VLAN: 2567 (VLAN-2567)
Trunking Native Mode VLAN: 1 (default)
Trunking VLANs Enabled: ALL
Trunking VLANs Active: 2567
Protected: false
Priority for untagged frames: 0
Override vlan tag priority: FALSE
Voice VLAN: none
Appliance trust: none
Also, as you may already know, vtp must be in transparent mode if you want to configure extended-range vlans:
SW1#sh vtp status
VTP Version : 2
Configuration Revision : 0
Maximum VLANs supported locally : 36
Number of existing VLANs : 6
VTP Operating Mode : Server
VTP Domain Name :
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0xF5 0xBA 0x45 0x80 0xA7 0x6B 0x76 0x88
Configuration last modified by 0.0.0.0 at 3-1-02 00:07:07
Local updater ID is 0.0.0.0 (no valid interface found)
SW1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#vlan 2567
SW1(config-vlan)#name VLAN-2567
SW1(config-vlan)#exit
% Failed to create VLANs 2567
Extended VLAN(s) not allowed in current VTP mode.
%Failed to commit extended VLAN(s) changes.
SW1(config)#
*Mar 1 00:02:23.247: %SW_VLAN-4-VLAN_CREATE_FAIL: Failed to create VLANs 2567: extended VLAN(s) not allowed in current VTP mode
If you get the following error while trying to change vtp mode, you can erase and then squeeze the flash in order to fix it:
SW1#conf t
SW1(config)#vtp mode server
Setting device to VTP SERVER mode
% not enough space on flash to store vlan database. trying squeeze...
squeeze in progress...
% error squeezing flash - (Unknown error 0)
SW1#squeeze flash:
Squeeze operation may take a while. Continue? [confirm]
squeeze in progress...
%Error squeezing flash (Unknown error 0)
SW1#erase flash:
Erasing the flash filesystem will remove all files! Continue? [confirm]
Erasing device... ...NOT erased
Erase of flash: complete
SW1#squeeze flash:
Squeeze operation may take a while. Continue? [confirm]
Squeeze of flash complete
At the end, reload this switch from inside dynagen and everything should be fine.
Saturday, April 5, 2008
CCIE practice - My new desktop environment in Ubuntu
After having taken the decision to move to Ubuntu for all the future dynamips labs, i sat down and tried to create a comfortable desktop environment in Ubuntu like the one i had in Windows.
By default Ubuntu comes with 2 workspaces. I added one more (right click on a workspace in the bottom/right corner, choose Preferences and increase the number of columns), so i'm having 3 in total. I'll be using the 2nd workspace for all my routers' consoles and the 3rd one for all my switches' consoles. The 1st one is going to be used for everything else; browser windows, new shells, etc. You can very easily move between workspaces by using this keyboard shortcut: CRTL+ALT+Left/Right Arrow.
I then created 10 new launchers (6 for routers, 4 for switches) in the bottom panel. You can add them in the top panel if you like, or you can create a new panel and add them there. You can also use a dock utility or anything else that can group icons and execute programs by clicking on them. As i have already written in a previous post of mine, i prefer the concept of a window per router/switch instead of using the terminal server and a single window for all the routers/switches. After all, in the lab you're given the option of both.
I also created 10 icons for these launchers, each one representing a router or a switch : R1-R6 and SW1-SW4 (you can see my icons below). Since i'm not a graphic designer, you can always use your own icons if you don't like mine. The icons are stored in a new directory i created under "/usr/share/icons/", called "dynamips".
In order to create a launcher, you can do the following:
Right click on the panel you want to add the launcher on and choose "Add to Panel...". Then choose "Custom Application Launcher" and enter the following:
Type : Application
Name : R1
Command : xterm -T R1 -geometry 80x30 -fn -*-fixed-medium-r-*-*-13-*-*-*-*-*-iso8859-* -sb -sl 5000 -rightbar -e telnet 127.0.0.1 2001
For every router/switch, you'll have to change the "R1" word (in Name and Command) and the "2001" port (in Command). The port number should be the same as the console port for this router/switch in your net file.
In the command field you can use your own terminal program if you don't like xterm. The options i used for xterm are the following:
-T R1 : title of the window
-geometry 80x30 : dimensions of the window in columns x rows
-fn -*-fixed-medium-r-*-*-13-*-*-*-*-*-iso8859-* : font used in the window (you can use "xfontsel" to see the available fonts)
-sb : display a scrollbar in the window
-sl 5000 : keep 5000 lines of scroll buffer
-rightbar : display the scrollbar on the right of the window
-e telnet 127.0.0.1 2001 : execute this command into the xterm window (this command has to be the last one)
There are many tricks to avoid configuring all these parameters for all routers/switches.
i.e. you can create an alias of xterm with these options (besides the -T, -e and maybe -geometry) already defined and use that command instead:
alias xterm-dynamips='xterm -fn -*-fixed-medium-r-*-*-13-*-*-*-*-*-iso8859-* -sb -sl 5000 -rightbar'
or you can define them in the .Xresources file in your home dir (and restart X), but then these will have effect for every xterm window.
If you don't want to allow Ubuntu/Gnome to automatically choose the positions that the xterm windows open, you can be more specific in the "-geometry" option. In my case, where i have 2 different workspaces for the xterm windows and a resolution of 1280x1024, i used the following options for each router/switch.
Workspace 2
R1 : -geometry 80x30+0+0
R2 : -geometry 80x30+680+0
R3 : -geometry 80x30+0+660
R4 : -geometry 80x30+680+660
R5 : -geometry 80x30+0+330
R6 : -geometry 80x30+680+330
Workspace 3
SW1 : -geometry 80x30+0+0
SW2 : -geometry 80x30+680+0
SW3 : -geometry 80x30+0+660
Sw4 : -geometry 80x30+680+660
On the top/left corner of the "Create Launcher" window you can see the default icon used for this kind of launcher. By clicking it, you can change it and use the one i said above.
After repeating this process for every router and switch, you'll end up with something like this in the bottom panel :
If you want to move each icon as close as possible to the other, you can right click at the icon you want to move and choose "Move" from the menu. That way you can have very precise placement of your icons.
Keep in mind that all these launchers are saved as text files in the "~/.gnome2/panel2.d/default/launchers" directory :
xxx@ubuntu:~/.gnome2/panel2.d/default/launchers$ ls -al
total 56
drwx------ 2 xxx xxx 4096 2008年04月05日 20:37 .
drwx------ 3 xxx xxx 4096 2008年03月29日 18:13 ..
-rw-r--r-- 1 xxx xxx 5538 2008年04月05日 15:57 gnome-terminal.desktop
-rw-r--r-- 1 xxx xxx 330 2008年04月05日 20:36 xterm-1.desktop
-rw-r--r-- 1 xxx xxx 328 2008年04月05日 20:36 xterm-2.desktop
-rw-r--r-- 1 xxx xxx 332 2008年04月05日 20:37 xterm-3.desktop
-rw-r--r-- 1 xxx xxx 363 2008年04月05日 20:32 xterm-4.desktop
-rw-r--r-- 1 xxx xxx 365 2008年04月05日 20:32 xterm-5.desktop
-rw-r--r-- 1 xxx xxx 365 2008年04月05日 20:32 xterm-6.desktop
-rw-r--r-- 1 xxx xxx 367 2008年04月05日 20:32 xterm-7.desktop
-rw-r--r-- 1 xxx xxx 365 2008年04月05日 20:35 xterm-8.desktop
-rw-r--r-- 1 xxx xxx 367 2008年04月05日 20:35 xterm-9.desktop
-rw-r--r-- 1 xxx xxx 330 2008年04月05日 20:36 xterm.desktop
xxx@ubuntu:~/.gnome2/panel2.d/default/launchers$
and each one of them has the following contents:
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Type=Application
Terminal=false
Icon[en_US]=/usr/share/icons/dynamips/SW3.png
Exec=xterm -T SW3 -geometry 80x30+0+660 -fn -*-fixed-medium-r-*-*-13-*-*-*-*-*-iso8859-* -sb -sl 5000 -rightbar -e telnet 127.0.0.1 2009
Icon=gnome-panel-launcher
GenericName[en_US]=
Name[en_US]=SW3
Name=SW3
If you're wondering where are the 3 BB routers, the answer is that i don't need to have console access to them all the time. I can always access them through the telnet command of dynagen, when i need to.
Clicking on any icon, won't do anything right now, because dynamips is not running. So start dynamips, then start all routers/switches through dynagen and voila! You have 2 workspaces filled with xterm windows.
In order to display the 6 routers' windows in the 2nd workspace and the 4 switches in the 3rd workspace, you have to click on the 6 R1-R6 icons while viewing the 2nd workspace and then move to the 3rd workspace and click the 4 SW1-SW4 icons.
There is also a program available (DevilsPie) if you want to define the workspace where each application window opens automatically, but it relies on pre-defined scripts.
I must admit that the feeling is much better in comparison to my Windows environment. I have access to all windows simultaneously and if i want i can move the SW1-SW4 windows to the same workspace as the R1-R6 ones, in order to resemble my Windows environment more closely.
Finally, some hints for xterm:
Ctrl + Left mouse click opens a menu with options for logging to a file (the default name is something like Xterm.log.ubuntu.2008年04月05日.18.54.10.12838, where 12838 is the current xterm process number).
Ctrl + Right mouse click opens a menu with options for changing the font size.
Ctrl + Middle mouse click opens a menu with various options regarding xterm appearance/behavior.
Posted by Tassos at 18:15 4 comments
Saturday, March 29, 2008
Installing Ubuntu 8.04 & dynamips/dynagen
Today i decided to install Ubuntu again, but this time without using the wubi installer. So i was going to use a partition solely for linux.
It took me around 3 hours and here is the procedure for all of you...
Download latest Ubuntu Desktop LiveCD (8.04 beta was available when i did it). You can run it from the CD before installing it (that's what LiveCDs are all about), if you want to check for any problems (i unfortunately found some regarding my hard disks).
Please keep in mind that this Ubuntu version is still beta, so you shouldn't try it in a production environment. Also, wubi-installer is finally included officially with Ubuntu 8.04, something that could make you life easier, especially if you need more than just a trial run. So you have these 3 options:
1. Run the Ubuntu LiveCD
2. Install Ubuntu in your windows partition (through wubi)
3. Install Ubuntu in a different partition
For my CCIE preparation i used the 2nd option (you can read more details here); this time i'm using the 3rd one.
After you have tried the LiveCD and you have found and solved all booting problems, you can proceed and install Ubuntu in a free partition in your hard disk. I used a 30 GB partition for the root (/) partition and another 2 GB one for the swap partition (i could use a different one for /home too). You don't need to create them before the installation. The installation process can create them, as long as you have some free space (or a windows partition not needed).
Regarding my run/install problems, i had to add the "irqpoll" option to the boot options, because otherwise Ubuntu wouldn't recognize my SATA hard disks (i was getting "ata qc timeout" & "ata revalidation failed" messages). I guess it must be a problem having to do with the JMicron controller of the Abit IP35Pro motherboard (i searched the linux kernel bugs and i found many cases about it). I also removed the "quiet" and "splash" options from the boot parameters line, because i wanted to watch the whole boot process (i don't like things happening behind my back).
You can use the F6 key before installing (or the grub menu options after Ubuntu has been installed) in order to change the boot options. This is before booting/loading Ubuntu. There is a gui (search for "QGRUBEditor" in Synaptic) for changing permanently these options after you have installed/loaded Ubuntu (besides the obvious method of editing the "/boot/grub/menu.lst" file).
After Ubuntu has been installed and loaded correctly, make sure you have connectivity to the internet (i met some problems with my network setup -having ethernet adapters losing their ip addresses- and i had to run "ifdown eth1" & "ifup eth1"). Then run the Update Manager and install all the available updates (i found around 250).
Reboot and everything should be working fine at this time. If not, search for help in the Ubuntu forums, or try the stable 7.10 version. After all, you should already know that Linux is still harder to learn than Windows.
Ok, let's start the Dynamips/Dynagen installation now...
Open Synaptic Package Manager and search for "dynamips". You should find 2 packages : "dynamips 0.2.7-0.2.8RC2-1" & "dynagen 0.10.1-1" (or possibly a newer version of them). Install both of them (i suppose you know how to use Synaptic, or you can use "sudo apt-get").
Now you should have both packages correctly installed. If you run them through a terminal window, you should get the following output:
xxx@ubuntu:~$ dynamips
Cisco Router Simulation Platform (version 0.2.8-RC2-x86)
Copyright (c) 2005-2007 Christophe Fillot.
Build date: Nov 26 2007 06:40:51
Please specify an IOS image filename
Usage: dynamips [options]
xxx@ubuntu:~$ dynagen
Usage: dynagen [options]
xxx@ubuntu:~$ dynagen --version
dynagen 0.10.1.090807
I guess you already have some (already decompressed) IOS around (if it's compressed, try the "unzip -p" command). Otherwise you wouldn't mess with dynamips; would you? For my CCIE preparation i used latest 3640 & 3725 12.4 IOS; you can choose other if you like. Create a directory under /usr/share and put your IOS there. Of course you can choose another directory; i just liked the idea of sharing ;)
xxx@ubuntu:~$ sudo mkdir /usr/share/cisco-ios
You can always copy them from your windows directories (which get automatically mounted once you open them through the file browser/nautilus), like it was in my case (sda1, the 1st partition of my first sata hard disk, is drive letter C: in my windows):
xxx@ubuntu:~$ sudo cp "/media/sda1/Program Files/Dynamips/images/c3640-ik9o3s-mz.124-17a.extracted.bin" /usr/share/cisco-ios/
xxx@ubuntu:~$ sudo cp "/media/sda1/Program Files/Dynamips/images/c3725-adventerprisek9-mz.124-17a.extracted.bin" /usr/share/cisco-ios/
Now change the IOS file permissions and make them readable from everyone (you can always use more strict permissions, if you know how and why):
xxx@ubuntu:~$ sudo chmod 744 /usr/share/cisco-ios/*
xxx@ubuntu:~$ cd /usr/share/cisco-ios/
xxx@ubuntu:/usr/share/cisco-ios$
xxx@ubuntu:/usr/share/cisco-ios$ ls -al
total 144876
drwxr-xr-x 2 root root 4096 2008年03月29日 17:52 .
drwxr-xr-x 286 root root 12288 2008年03月29日 17:43 ..
-rwxr--r-- 1 root root 65954968 2008年03月29日 17:50 c3640-ik9o3s-mz.124-17a.extracted.bin
-rwxr--r-- 1 root root 82221348 2008年03月29日 17:52 c3725-adventerprisek9-mz.124-17a.extracted.bin
Create a new directory in your home folder, where you'll be storing your own labs. I like to use a folder on the Desktop, so i can very easily manage it (keep in mind that there are other ways too, if you want to put a folder on the desktop). Create another directory inside it, for your first lab. Also, inside each lab directory you'll need to create a working directory for all the "temporary" files (like nvram contents and ghost-ios files) used for your labs.
xxx@ubuntu:~$ cd Desktop/
xxx@ubuntu:~/Desktop$ mkdir cisco-labs
xxx@ubuntu:~/Desktop$ cd cisco-labs/
xxx@ubuntu:~/Desktop/cisco-labs$
xxx@ubuntu:~/Desktop/cisco-labs$ mkdir lab1
xxx@ubuntu:~/Desktop/cisco-labs$ cd lab1/
xxx@ubuntu:~/Desktop/cisco-labs/lab1$
xxx@ubuntu:~/Desktop/cisco-labs/lab1$ mkdir working
The directory structure should be like the following:
/home/xxx/Desktop/
/home/xxx/Desktop/cisco-labs/
/home/xxx/Desktop/cisco-labs/lab1/
/home/xxx/Desktop/cisco-labs/lab1/working/
/home/xxx/Desktop/cisco-labs/lab2/
/home/xxx/Desktop/cisco-labs/lab2/working/
and so on...
Create the following file ("lab1.net" is your test lab) using your favorite editor. I like vi, you can use gedit.
############
# Lab test
############
autostart = False
[localhost:7200]
# Don't forget to change this for every new lab
workingdir = /home/xxx/Desktop/cisco-labs/lab1/working
[[3640]]
# Specify 3640 IOS image on Linux here:
image = /usr/share/cisco-ios/c3640-ik9o3s-mz.124-17a.extracted.bin
#
ram = 128
disk0 = 0
disk1 = 0
# idlepc values are specific to each ios
idlepc = 0x605a5040
mmap = True
ghostios = True
sparsemem = true
[[Router R1]]
model = 3640
console = 2001
slot0 = NM-1FE-TX
F0/0 = SW1 F1/1
[[Router R2]]
model = 3640
console = 2002
slot0 = NM-1FE-TX
F0/0 = SW1 F1/2
[[Router SW1]]
model = 3640
console = 2007
slot1 = NM-16ESW
Now, while in lab1 directory, start dynamips in hypervisor mode and put it in the background (there is still no need to run it as root). Then press enter to see the shell prompt again.
xxx@ubuntu:~/Desktop/cisco-labs/lab1$ dynamips -H 7200 &
[1] 15052
xxx@ubuntu:~/Desktop/cisco-labs/lab1$ Cisco Router Simulation Platform (version 0.2.8-RC2-x86)
Copyright (c) 2005-2007 Christophe Fillot.
Build date: Nov 26 2007 06:40:51
Hypervisor TCP control server started (port 7200).
xxx@ubuntu:~/Desktop/cisco-labs/lab1$
Start dynagen with your first lab as a parameter:
xxx@ubuntu:~/Desktop/cisco-labs/lab1$ dynagen lab1.net
Reading configuration file...
Shutdown in progress...
Shutdown completed.
CPU0: carved JIT exec zone of 64 Mb into 2048 pages of 32 Kb.
NVRAM is empty, setting config register to 0x2142
C3600 instance 'ghost-c3640-ik9o3s-mz.124-17a.extracted.bin-localhost' (id 3):
VM Status : 0
RAM size : 128 Mb
NVRAM size : 128 Kb
Chassis : 3640
IOS image : /usr/share/cisco-ios/c3640-ik9o3s-mz.124-17a.extracted.bin
Loading ELF file '/usr/share/cisco-ios/c3640-ik9o3s-mz.124-17a.extracted.bin'...
ELF entry point: 0x80008000
C3600 'ghost-c3640-ik9o3s-mz.124-17a.extracted.bin-localhost': starting simulation (CPU0 PC=0xffffffffbfc00000), JIT enabled.
C3600 'ghost-c3640-ik9o3s-mz.124-17a.extracted.bin-localhost': stopping simulation.
Network successfully loaded
Dynagen management console for Dynamips
Copyright (c) 2005-2007 Greg Anuzelli
=>
Let's see the routers and the switches now:
=> list
Name Type State Server Console
R1 3640 stopped localhost:7200 2001
R2 3640 stopped localhost:7200 2002
SW1 3640 stopped localhost:7200 2007
Ok, let's start them:
=> start R1
CPU0: carved JIT exec zone of 64 Mb into 2048 pages of 32 Kb.
NVRAM is empty, setting config register to 0x2142
C3600 instance 'R1' (id 1):
VM Status : 0
RAM size : 128 Mb
NVRAM size : 128 Kb
Chassis : 3640
IOS image : /usr/share/cisco-ios/c3640-ik9o3s-mz.124-17a.extracted.bin
Loading ELF file '/usr/share/cisco-ios/c3640-ik9o3s-mz.124-17a.extracted.bin'...
ELF loading skipped, using a ghost RAM file.
ELF entry point: 0x80008000
C3600 'R1': starting simulation (CPU0 PC=0xffffffffbfc00000), JIT enabled.
100-VM 'R1' started
=> start R2
CPU0: carved JIT exec zone of 64 Mb into 2048 pages of 32 Kb.
NVRAM is empty, setting config register to 0x2142
C3600 instance 'R2' (id 2):
VM Status : 0
RAM size : 128 Mb
NVRAM size : 128 Kb
Chassis : 3640
IOS image : /usr/share/cisco-ios/c3640-ik9o3s-mz.124-17a.extracted.bin
Loading ELF file '/usr/share/cisco-ios/c3640-ik9o3s-mz.124-17a.extracted.bin'...
ELF loading skipped, using a ghost RAM file.
ELF entry point: 0x80008000
C3600 'R2': starting simulation (CPU0 PC=0xffffffffbfc00000), JIT enabled.
100-VM 'R2' started
=> start SW1
CPU0: carved JIT exec zone of 64 Mb into 2048 pages of 32 Kb.
NVRAM is empty, setting config register to 0x2142
C3600 instance 'SW1' (id 0):
VM Status : 0
RAM size : 128 Mb
NVRAM size : 128 Kb
Chassis : 3640
IOS image : /usr/share/cisco-ios/c3640-ik9o3s-mz.124-17a.extracted.bin
Loading ELF file '/usr/share/cisco-ios/c3640-ik9o3s-mz.124-17a.extracted.bin'...
ELF loading skipped, using a ghost RAM file.
ELF entry point: 0x80008000
C3600 'SW1': starting simulation (CPU0 PC=0xffffffffbfc00000), JIT enabled.
100-VM 'SW1' started
=> list
Name Type State Server Console
R1 3640 running localhost:7200 2001
R2 3640 running localhost:7200 2002
SW1 3640 running localhost:7200 2007
=>
Let's telnet to R2:
=> telnet R2
By default a new xterm window opens, with the following output:
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connected to Dynamips VM "R2" (ID 2, type c3600) - Console port
% Please answer 'yes' or 'no'.
Would you like to enter the initial configuration dialog? [yes/no]: n
Press RETURN to get started!
We repeat the same procedure for every router/switch and we're ready to start our configuration.
In case you need to change the telnet client used by dynagen, you can edit the appropriate line found in file " /etc/dynagen.ini":
# Uncomment below for Linux
telnet = xterm -T %d -e telnet %h %p> /dev/null 2>&1 &
After you have finished with your lab and want to exit dynagen and dynamips, you can do the following:
=> exit
Exiting...
Shutdown in progress...
Shutdown completed.
xxx@ubuntu:~/Desktop/cisco-labs/lab1$ pkill dynamips
xxx@ubuntu:~/Desktop/cisco-labs/lab1$
[1]+ Terminated dynamips -H 7200
This is it! You should now have a fully working dynamips environment under latest Ubuntu 8.04.
Posted by Tassos at 17:08 14 comments
Wednesday, February 6, 2008
CCIE practice - My dynamips environment
This is the PC i used during my practice:
Abit IP35Pro
Core2Duo E6550 (@2.66)
2 GB DDR2 RAM
320GB HD
Windows XP & Ubuntu
I started using WindowsXP, but soon i found out that i couldn't run concurrently>10 routers (i didn't insist too much on trying this). So i switched to Ubuntu, where after 1 week of trial & error, i managed to create my home environment and then run the sample lab that is provided free at IE's site. You can find more information on a previous post of mine about this setup.
Afterwards, i started creating mini labs on this setup, based on the topology of IE's sample lab, "stealing" ideas from the 2 CCIE Practical Studies books and adapting them to a specific physical topology. I started using 3640s as routers and switches (using 12.3(14)T7) but i had a lot of issues with spanning-tree & transparent vtp (it was like spanning tree was getting stuck). So i decided to use 3725s as switches, 3640s as routers and move both routers and switches to latest 12.4 IOS (12.4(17a) at that time).
Although everything was working fine in Ubuntu, i had to switch to Windows quite often in order to check some other material i had there, especially my email (although i could read my new emails from inside Ubuntu, i couldn't read the old ones). Also, i was experiencing strange crashes once in a while in Ubuntu, when restarting dynagen. So i decided to give it one more try and transfer the dynamips/dynagen setup to Windows again.
I had already found the ideal idlepc values for my routers' ios on Ubuntu, so i was going to use the same on Windows. The biggest difference between Ubuntu & Windows, was that i had to use the sparsemem option in dynagen on Windows (only for routers) in order to decrease memory usage, but even after that, Ubuntu was still using less memory. Also, cpu usage was a little bit higher in Windows, but as long as it stayed below 15%, is wasn't a problem. Having full configurations on all 13 routers/switches kept the cpu around 40% busy, which was fine by me (in Ubuntu it was under 20%). At the same time, memory usage was around 1.4GB on Windows and under 1 GB in Ubuntu.
I used 2 dynamips processes in order to split the memory usage per process (Windows is said to have a problem with this) and i assigned all routers in one process and all switches + bb routers in the other process (pretty much like IE's dynamips setup). Btw, you can find a lot of useful info about dynamips/dynagen in http://7200emu.hacki.at/index.php.
This is the general routers/switches dynagen setup i used on Windows:
[[3640]]
image = C:\images\c3640-ik9o3s-mz.124-17a.extracted.bin
ram = 128
disk0 = 0
disk1 = 0
idlepc = 0x605a5040
mmap = True
ghostios = True
sparsemem = true
[[3725]]
image = C:\images\c3725-adventerprisek9-mz.124-17a.extracted.bin
ram = 128
disk0 = 8
disk1 = 0
idlepc = 0x62379ed0
mmap = True
ghostios = True
It took me a while until i was able to initialize the setup for every mini-lab i was having. I was spending around 2 hours in order to prepare my setup for each mini-lab. But, after creating a xls table with the differences between my physical topology and the mini-lab topologies, i managed to bring this time down to 20-30 minutes.
I also used the same topology for all the Mock Labs, which helped me a lot. There were some issues with L2 features not supported by dynamips, but i wasn't worried because i knew most of this stuff. Nevertheless, i had a scrap paper near me where i was taking notes and i also used it for writing down all the config commands i couldn't configure. That way i was able to grade myself in everything, even in things dynamips didn't support.
One thing that i didn't regret of, is that when i was redoing my Mock Labs using dynamips, i did every possible task, even the ones that seemed silly and were repeated quite a few times. There were times that i was thinking how boring is to configure something for nth time, but i knew i had to do it if i wanted to succeed.
Lastly, i had created a pdf file like the following (i created it in Excel, then converted it to PDF and printed it), where for every Mock Lab i was writing the task number, the task points, whether i though i had completed it and some notes about tricky things or things to be looked later.
After finishing each lab, i was comparing my solution to the proctor's one and i was grading myself. Mostly i was giving myself lower grades for all alternative solutions, until i was 100% sure that my solution was correct too. That way, after finishing all Mock Labs, i was able to see in what parts i had repeatedly made mistakes so that i could focus more on these.
My final advice :
Try to be organized! It'll make your preparation much easier.
Try to repeat things! It'll make you exam much easier.
In the meanwhile, i have already decided what exam i'm going to try next, but i won't reveal it until the poll ends. Of course my pre-preparation has already started...
Btw, i 'm also searching for a new job. Last weekend i rewrote my CV (it has been a long time since i had updated it) and i have already found 3 "candidate" companies which seem very interesting. But i won't do anything until the end of this month, because i'm waiting for an offer from my current job.
Posted by Tassos at 15:29 13 comments
Monday, November 19, 2007
1st pass finished - IE's sample lab finished
Yesterday i finished the 1st step of my CCIE preparation!!!!
I have read (once) all chapters from the lab blueprint and during the last 4 days i was trying to run the sample lab provided at IE's site.
My system is a Core2Duo E6550 with 2 GB ram running WindowsXP & Ubuntu 7.04 (through wubi). These are the conclusions i came into after finishing the sample lab on Ubuntu (WindowsXP was too memory hungry):
1) 2 GB ram in Linux are more than enough to run 14 routers with full configuration ("ghostios" option used).
2) You have to change the idlepc value for each router after major reconfigurations, in order to keep the cpu load as low as possible (i used htop for monitoring it).
Regarding the 2nd one, this is what i did:
I found out that most of the times, idlepc counts around 50 are the good ones, despite what dynagen says. Try changing the idlepc value (choosing 1 out of proposed 10) until you get 5%-10% cpu load for all currently running routers/switches.
I had to repeat the "find the idlepc value" steps 3-4 times for each router/switch, until i finished the core part of the lab (just before IP Multicast). At that time, cpu load was around 7-10%. After that, there was a minor increase for the extra configuration till the end, but that didn't have any impact on the L2/L3 functionality. If i didn't change the idlepc values, then when the cpu load was going above 70%, i was having L2/L3 issues with routing protocols reseting, interfaces going down, etc.
When i finished the lab, i noticed that having all routers with full configuration caused a cpu load around 20-30%, sometimes peaking to 50% (probably due to the BGP scanner and/or the "wr mem" command). I guess, that could have been lower, if i was experimenting with the idlepc values while being at the final config.
I had many cpu issues when i was using the access server (TermServ) to access the routers. Maybe console access through it or traffic passing through the tap0/br0 interface in linux, is causing increased cpu load. I decided to use the -default- tabbed xterm from Gnome (it was a little annoying closing/opening windows, but it worked fine).
I met a lot of issues with 3640s as switches running 12.3(14)T7. I changed them to 3725s running 12.4(17a) and everything worked fine till the end.
PS: There were some times that, while starting dynamips, the whole system became stuck (cpu load 100%) and i had to reboot it. I still don't know what was causing this (i haven't checked if dynamips has reported something on its log). If dynagen was successfully started, then everything was working fine afterwards.
Note to dynagen/dynamips authors: A feature to find/change the idlepc value, regardless if it's already known, would be a welcome addition. Then i wouldn't have to stop/start dynagen after each change in the net file (while trying to find the best idlepc value).
Note to IE's sample lab authors: There is an issue (probably in the initial config) with a BB router not having eigrp authentication configured, when starting. I had to manually change it.
For those who are wondering how i did in the sample lab... i failed with 70%. But i'm quite satisfied, because all the tasks i missed where due to me not understanding the exact meaning of a subtask, or providing wrong values (bits vs bytes) due to oversight. And on Friday i have my first mock lab...50% is the goal.
Posted by Tassos at 10:45 8 comments
Labels: CCIE, dynagen, dynamips, Internetwork Expert, ubuntu