Tutorial 2: 802.1d - Spanning Tree Protocol

In this next tutorial, we will dive into a hands on lab to see how Spanning Tree Protocol works up close.   Before we do, I will be diverting some time into a program called dynamips.   It is an essential tool to set up before proceeding.


To those of you who have read my introduction on Spanning Tree, "Welcome back."
If you haven't, you can read it here.

I've broken this next tutorial into two parts because I have been playing with dynamips and really haven't gotten a chance to build out the proper lab scenario yet.

That being said, this first part will be dedicated to the ins-and-outs of setting up dynamips.


What is dynamips?

The greatest emulator invented
(to learn about cisco)
(when you don't have a budget)
 

From what I can tell, this little piece of software allows you to generate very complicated virtual labs wherein the simulated hardware is so realistic that it can run full version of some Cisco IOS.   You can even extend it out to a real interface and real world cisco devices will be able to interop with it just fine.

Let's get right to it.

There are two flavors of dynamips i'm interested in,
one for windows and one for linux (there's one for os x too if that's your thing.)

If you are running XP and have a CCO login, you can follow right along and have a cisco environment up by the end of this tutorial.   If you don't have access to cisco's ios, you may need to find a study partner who does and work together before proceeding.

When ready...

  1. Install dynamips from dynagen's site.
    • Follow the link on their site to install WinPcap
  2. Log into cisco and download IOS for the hardware we need.
    • The one I will be using here today is for the 3640 (jk9o3s-mz.123-14.T7).
    • Save this image into "%ProgramFiles%\dynamips\images"
    • It's the highest end device supported that has the switch module "NM-16ESW".
    • This IOS and cisco model will let us do most of the things we need for now.
       

Once you have everything in place.

Start up dynamips in Hypervisor Mode:
Start->Run-> open:[ "%ProgramFiles%\dynamips\dynamips.exe" -H 7250 ]



Download these dynagen file I've put together for you to any folder and launch the .net file.

stp.net
c3600_SW1_nvram
c3600_SW2_nvram
c3600_SW3_nvram

If you run this file and you don't see the following:
Poke around the configuration files and review the tutorial from dynagen.

Type console SW1 (through SW3) to get into the corresponding cisco switch.

And if you are successful, we've only got one more maintanence step to do before we have our first lab.

At this point you should see your Idle CPU vaporized.

<Carriage Return> on each of the telnet console to get to the user mode promt and free up some CPU.
The idlepc value I set in the config file was from the user prompt so you will need to be there for the system to know that the switch is really idle.

If your cpu does not free up, please read about how to set the best idlepc value.
 
Next, let's explore our new cisco devices.

We can quicly verify if 3640's can see each other by simply typing show cdp neighbor.



Pat yourself on the back once you are here.  

Don't worry about breaking anything, as these are all virtual machines and can be recreated in an instant.

To go back to the original setup:  Type exit in the dynagen => prompt.  
Copy back the nvram files above and you're good to go with a fresh clean start.
 
About the stp.net file:

#############################################
#  Back to basics:
#     STP Lab
#     Viet Hoang
#        http://blog.viet-emilie.com
#
#  Configuration for Spanning Tree Demo
#
#############################################

model = 3640
ghostios = true
sparsemem = true

[127.0.0.1:7250]
    
    [[3640]]
        image = \Program Files\Dynamips\images\c3640-jk9o3s-mz.123-14.T7.bin
        ram = 128
        idlepc = 0x60531428
    
    [[Router SW1]]
        slot1 = NM-16ESW
        F1/2 = SW2 F2/1
        F1/3 = SW3 F3/1
        
    [[Router SW2]]
        slot2 = NM-16ESW
        F2/3 = SW3 F3/2

    [[Router SW3]]
        slot3 = NM-16ESW
  • Set up global default device to 3640 if not specified.
  • Along with a few memory saving parameters.
     
  • Activate the 3640 using image file: c3640-jk9o3s-mz.123-14.T7.bin.
  • Set the ram needed for this IOS & Device.
  • Free up CPU by defining Idle state.
     
  • Define three 3640's identified as SW1, SW2, SW3.
  • Offset the NM-16ESW in slot to match SW for visual reference.
  • SW1 is connected (bi-directional) to SW2 & SW3.
  • SW2 is connected (bi-directional) to SW3.

Now we've got our loop and prep'd for our next segment.

See you again soon!

-vth

Comments

There have been no comments made on this article. Why not be the first and add your own comment using the form below.

Leave a comment

Commenting is restricted to registered users only. Please register or login now to submit a comment.