in

CCIE - Internetwork Expert's Online Community

Latest post 11-07-2008 11:00 AM by kratz101. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 11-04-2008 12:45 PM

    • kratz101
    • Top 150 Contributor
    • Joined on 11-04-2008
    • Posts 13
    • Points 170

    Trouble setting up the right idlepc value

    Hello,

    I have recently started working towards that elusive CCIE. Since I do not have racks to practice, I was planning on preparing for it using Dynamips on Windows. I wanted to get a bit of hands-on on it before I buy the IE Dynamips workbook. However, I'm having issues settting up the right idlepc value. I'm currently using c3640-jk9o3s-mz.124-12.bin. My PC specs are Intel(R) Core(TM) 2 CPU 6600@ 2.4 Ghz, 2 GB RAM. I tried setting up the idlepc value through the following steps

    (1) Commented all idlepc values in the .net file
    (2) Started Dynagen and ran 'start R1'
    (3) Ran 'idlepc get R1' and selected the values it displayed as most appropriate
    (4) Ran 'idlepc copy R1 /all' and then ran 'idlepc save /all'
    (5) Ran 'start /all'

    At this point I see that the CPU gets hung after starting a few routers or in subsequent tries, starts all routers and then gets hung. CPU is consistently at 100%

    Alternately, I also tried copying down all the values it gave me for R1 in step 3 into the IE .net file for the 2 instances using the value system displayed as most appropriate. When I then started Dynagen with this new file, it gave me an error stating "dynagen error in loading .net file" referring to the selected idlepc value.

    Appreciate if I can get to know what I'm doing wrong or if I can use a specific idlepc value in the .net file for the 2 instances. I' also pasting at the end the current .net file output with all idlepc values commented. Let me know if I need to change any settings to improve the performance.

    I'm also hoping that the idlepc value once set will be used everytime on re-starting the Hypervisor and Dynagen. Do let me know if there is any setting I need to get the same configured.

    Many thanks...Kartik

    *********************** .NET FILE **********************

    ##############################################################################################
    #                                                           
    # Internetwork Expert Routing & Switching topology Version 4.0 mappings for dynamips/dynagen
    #  by: Brian McGahan, CCIE #8593
    bmcgahan@internetworkexpert.com
    #
    # For more information:
    #  Dynamips: http://www.ipflow.utc.fr/index.php/Cisco_7200_Simulator
    #  Dynagen:  http://dyna-gen.sourceforge.net/
    #  Hacki’s Forum: http://hacki.at/7200emu/index.php
    #  Internetwork Expert's Forum: http://forum.internetworkexpert.com
    #
    ##############################################################################################

    ##################################################
    #
    # Define global router parameters for instance 1
    #
    ##################################################

    autostart=false
    [localhost:7200]

    workingdir = C:\Program Files\Dynamips\sample_labs\internetworkexpert\working

    [[3640]]
     #
     # Specify 3640 IOS image on Windows here:
     image = C:\Program Files\Dynamips\images\c3640-jk9o3s-mz.124-12.extracted.bin
     #
     # Specify 3640 IOS image on Linux here:
     # image = /ios/c3640-jk9o3s-mz.124-12.extracted.bin
     #
     ram = 128
     disk0 = 0
     disk1 = 0
     # Choose an idlepc value from the below
     # idlepc = 0x60530870
     # idlepc = 0x60530890
     # idlepc = 0x60530a58
     # idlepc = 0x60530abc
     # idlepc = 0x605310c4
     # idlepc = 0x605e92e8
     # idlepc = 0x605e9364
     # idlepc = 0x60531394
     # idlepc = 0x605313d0
     # idlepc = 0x605313ec
     mmap = true
     # ghostios = true
     

    ###########################
    #
    # Define router instances
    #
    ###########################

     [[Router R1]]
      model = 3640
      console = 2001
      autostart = false
      slot0 = NM-1FE-TX
      slot1 = NM-4T
      F0/0 = SW1 F1/1
      S1/0 = FRSW 1
      cnfg = C:\Program Files\Dynamips\sample_labs\internetworkexpert\initial.configs\R1.initial.config.txt

     [[Router R2]]
      model = 3640
      console = 2002
      autostart = false
      slot0 = NM-1FE-TX
      slot1 = NM-4T
      F0/0 = SW2 F1/2
      S1/0 = FRSW 2
      cnfg = C:\Program Files\Dynamips\sample_labs\internetworkexpert\initial.configs\R2.initial.config.txt

     [[Router R3]]
      model = 3640
      console = 2003
      autostart = false
      slot0 = NM-4E
      slot1 = NM-4T
      S1/0 = FRSW 3
      S1/1 = FRSW 13
      S1/2 = R1 S1/1
      S1/3 = R2 S1/1
      E0/0 = SW1 F1/3
      E0/1 = SW3 F1/3
      cnfg = C:\Program Files\Dynamips\sample_labs\internetworkexpert\initial.configs\R3.initial.config.txt

     [[Router R4]]
      model = 3640
      console = 2004
      autostart = false
      slot0 = NM-4E
      slot1 = NM-4T
      E0/0 = SW2 F1/4
      E0/1 = SW4 F1/4
      S1/0 = FRSW 4
      S1/1 = R5 S1/1
      cnfg = C:\Program Files\Dynamips\sample_labs\internetworkexpert\initial.configs\R4.initial.config.txt

     [[Router R5]]
      model = 3640
      console = 2005
      autostart = false
      slot0 = NM-4E
      slot1 = NM-4T
      E0/0 = SW1 F1/5
      E0/1 = SW3 F1/5
      S1/0 = FRSW 5
      cnfg = C:\Program Files\Dynamips\sample_labs\internetworkexpert\initial.configs\R5.initial.config.txt

     [[Router R6]]
      model = 3640
      console = 2006
      autostart = false
      slot0 = NM-4E
      slot1 = NM-4T
      E0/0 = SW2 F1/6
      E0/1 = SW4 F1/6
      S1/0 = FRSW 6
      cnfg = C:\Program Files\Dynamips\sample_labs\internetworkexpert\initial.configs\R6.initial.config.txt
       
     [[Router SW1]]
      model = 3640
      console = 2007
      autostart = false
      slot1 = NM-16ESW
      F1/7 = SW2 F1/7
      F1/8 = SW2 F1/8
      F1/9 = SW2 F1/9
      F1/10 = SW3 F1/7
      F1/11 = SW3 F1/8
      F1/12 = SW3 F1/9
      F1/13 = SW4 F1/7
      F1/14 = SW4 F1/8
      F1/15 = SW4 F1/9
      cnfg = C:\Program Files\Dynamips\sample_labs\internetworkexpert\initial.configs\SW1.initial.config.txt


    ##################################################
    #
    # Define global router parameters for instance 2
    #
    ##################################################

    [localhost:7201] # Talk to the 2nd dynamips process on port 7201
     udp = 11000     # Change the base udp port to 11000 (the default is 10000)

     workingdir = C:\Program Files\Dynamips\sample_labs\internetworkexpert\working

     [[3640]]
     #
     # Specify 3640 IOS image on Windows here:
     image = C:\Program Files\Dynamips\images\c3640-jk9o3s-mz.124-12.extracted.bin
     #
     # Specify 3640 IOS image on Linux here:
     # image = /ios/c3640-jk9o3s-mz.124-12.extracted.bin
     #
     ram = 128
     disk0 = 0
     disk1 = 0
     # Choose an idlepc value from the below
     # idlepc = 0x60530870
     # idlepc = 0x60530890
     # idlepc = 0x60530a58
     # idlepc = 0x60530abc
     # idlepc = 0x605310c4
     # idlepc = 0x605e92e8
     # idlepc = 0x605e9364
     # idlepc = 0x60531394
     # idlepc = 0x605313d0
     # idlepc = 0x605313ec
     mmap = true
     # ghostios = true
     
     
    ###########################
    #
    # Define router instances
    #
    ###########################

     [[Router SW2]]
      model = 3640
      console = 2008
      autostart = false
      slot1 = NM-16ESW
      F1/10 = SW3 F1/10
      F1/11 = SW3 F1/11
      F1/12 = SW3 F1/12
      F1/13 = SW4 F1/10
      F1/14 = SW4 F1/11
      F1/15 = SW4 F1/12
      cnfg = C:\Program Files\Dynamips\sample_labs\internetworkexpert\initial.configs\SW2.initial.config.txt

     [[Router SW3]]
      model = 3640
      console = 2009
      autostart = false
      slot1 = NM-16ESW
      F1/13 = SW4 F1/13
      F1/14 = SW4 F1/14
      F1/15 = SW4 F1/15
      cnfg = C:\Program Files\Dynamips\sample_labs\internetworkexpert\initial.configs\SW3.initial.config.txt

     [[Router SW4]]
      model = 3640
      console = 2010
      autostart = false
      slot1 = NM-16ESW
      cnfg = C:\Program Files\Dynamips\sample_labs\internetworkexpert\initial.configs\SW4.initial.config.txt

     [[Router BB1]]
      model = 3640
      console = 2011
      autostart = false
      slot1 = NM-4T
      S1/0 = BB3 S1/0
      S1/1 = FRSW 21
      cnfg = C:\Program Files\Dynamips\sample_labs\internetworkexpert\initial.configs\BB1.initial.config.txt

     [[Router BB2]]
      model = 3640
      console = 2012
      autostart = false
      slot0 = NM-4E
      E0/0 = SW2 F1/0
      cnfg = C:\Program Files\Dynamips\sample_labs\internetworkexpert\initial.configs\BB2.initial.config.txt

     [[Router BB3]]
      model = 3640
      console = 2013
      autostart = false
      slot0 = NM-4E
      slot1 = NM-4T
      E0/0 = SW3 F1/0
      cnfg = C:\Program Files\Dynamips\sample_labs\internetworkexpert\initial.configs\BB3.initial.config.txt

    [[Router TermServ]]
      model = 3640
      console = 2000
      autostart = false
      #
      # Specify your local host's loopback here from the network device list
      # Too add a loopback in windows:
      # http://support.microsoft.com/kb/839013
      #
      E0/0 = NIO_gen_eth:\Device\NPF_{9BF31B4C-27E1-447F-B35A-7FBAFCDAA816}
      cnfg = C:\Program Files\Dynamips\sample_labs\internetworkexpert\initial.configs\RSTermServ.initial.config.txt

     [[FRSW FRSW]]

      # R1 to FRSW
      1:102 = 2:201
      1:103 = 3:301
      1:113 = 13:311
      1:104 = 4:401
      1:105 = 5:501

      # R2 to FRSW
      2:203 = 3:302
      2:213 = 13:312
      2:204 = 4:402
      2:205 = 5:502

      # R3 to FRSW
      3:304 = 4:403
      3:305 = 5:503
      13:314 = 4:413
      13:315 = 5:513

      # R4 to FRSW
      4:405 = 5:504

      # R6 to FRSW
      6:51 = 21:51
      6:100 = 21:100
      6:101 = 21:101
      6:201 = 21:201
      6:301 = 21:301
      6:401 = 21:401

    ***************************************************

    • Post Points: 5
  • 11-05-2008 2:51 PM In reply to

    • kratz101
    • Top 150 Contributor
    • Joined on 11-04-2008
    • Posts 13
    • Points 170

    Re: Trouble setting up the right idlepc value

    Folks,

    Appreciate if I can get some help to get me moving in the right direction. Kindly assist.

    Many thanks...Kartik

    • Post Points: 20
  • 11-06-2008 1:49 AM In reply to

    • tyco666
    • Top 100 Contributor
    • Joined on 09-11-2008
    • Posts 13
    • Points 140

    Re: Trouble setting up the right idlepc value

    Hi Kartik,

    First, http://7200emu.hacki.at/ is your best friend !!!! This forum answers most common questions with dynamips/dynagen. Second, read the dynagen tutorial  - http://dynagen.org/tutorial.htm.

    Some dot points in brief:

    1. It is not as black and white as you are trying to do - there is a lot of grey there as well. It may take a little fiddling around but worth the effort because once set, you won't have to come back to it. I assume you know that idlepc value are image dependent - if you  change IOS image you need to redo the idlepc vlaues.

    2. You need to watch CPU utilisation while setting idlepc values - aim is to have the CPU running as low as possible for the selected idlepc value.

    3. Start the process as you have been doing, only run one router instance - make sure you telnet to the router, get it to an enable prompt and let it settle down i.e. wait a few minutes. Check CPU - it will probably running high at this stage - don't worry, thats normal.

    4. When the router is sitting nice and quiet, do the "idlepc get R1" - select the best value as shown by a star (don't worry if there is no star - more on that shortly) and observe CPU. It should drop down.

    5. Now its time to tweak for best value. I have found the star is not necessarily always the best value (most times it is but sometimes not). Do "idlepc show R1" and cycle through, selecting all the values one by one, note which ones offer the lowest CPU. When you change the value, let things idle for a few minutes.

    6. The next bit is something I have been doing to verify the idlepc value really is the best. This is my own thing so take it or leave it - I offer no pros/cons fo rthis at all. Select the value that runs the CPU at its lowest for R1 and now start R2 (keep R1 running).

    7. Again, telnet to R2, get to a prompt and let it settle. CPU will be running high again. Now do "idlepc get R2" - check the values it returns, they will most likely be the same as for R1. Choose the same value that you have for R1 and observe CPU - it should drop down. Now the CPU level will be higher running 2 routers but hopefully still pretty low. Now  you can start to play around a bit between the two routers, changing idlepc and looking for a value that offers the lowest CPU running both routers. NB The values have to be the same for both routers. (I have used this method with a some success in acheiving low CPU -  it is time consuming for often little gain. BUT, I have also made a big difference with some IOS images with this method).

    8. When you are happy with the value, paste it into the .net file (or write it to the db file for IOS images - however you want to handle it) and restart the .net file. Start running up the routers (I recommend starting them up bit by bit - trying to run them all up at the same time is bad). Telnet to each router and get them to a prompt as they boot. Watch CPU again - it should climb with each router you start. Depending on numerous factors, hopefully you can get to 9-10 routers with CPU not running too hard.

    9. Use ghostios (ghostios = true) !!!! From dynagen tutorial " The Ghostios option can significantly reduce the amount of real host RAM needed for labs with multiple routers running the same IOS image"

    HTH,

    Steve

    • Post Points: 20
  • 11-06-2008 5:49 PM In reply to

    • kratz101
    • Top 150 Contributor
    • Joined on 11-04-2008
    • Posts 13
    • Points 170

    Re: Trouble setting up the right idlepc value

    Thanks Steve for your inputs. However, I ran into a couple of issues. After checking the right idlepc value which was 0x604cbca8 in my case, I updated the .net file accordingly along with changing the ghostios settings. When I do this and restart the Hypervisor and Dynagen, the Dynagen screen lists an error stating "Invalid line at line 41" referring to the idlepc value that I have selected in the .net file. Find below my modified .net file for reference. Appreciate if you can let me know what I'm doing wrong here.

    [[3640]]
     #
     # Specify 3640 IOS image on Windows here:
     image = C:\Program Files\Dynamips\images\c3640-jk9o3s-mz.124-12.extracted.bin
     #
     # Specify 3640 IOS image on Linux here:
     # image = /ios/c3640-jk9o3s-mz.124-12.extracted.bin
     #
     ram = 128
     disk0 = 0
     disk1 = 0
     # Choose an idlepc value from the below
     # 0x604c88e8
     # 0x604c9368
     # 0x603e1b04
       0x604cbca8
     # 0x60503e24
     # 0x605a4fd0
     # 0x605a5048
     # 0x603dd794
     # 0x603dd7f4
     # 0x603dd83c
       mmap = true
       ghostios = true

    Thanks...Kartik

    • Post Points: 20
  • 11-06-2008 6:28 PM In reply to

    • unionivy
    • Top 75 Contributor
    • Joined on 07-24-2008
    • Posts 21
    • Points 405

    Re: Trouble setting up the right idlepc value

    The idlepc command is missing.

    idlepc = 0x604cbca8

    • Post Points: 20
  • 11-06-2008 7:05 PM In reply to

    • kratz101
    • Top 150 Contributor
    • Joined on 11-04-2008
    • Posts 13
    • Points 170

    Re: Trouble setting up the right idlepc value

    Thanks unionivy for pointing it out. With this idlepc value and other settings in my .net file (Note - I also added sparsemem =  true) , my CPU utilization with all devices running without any config is still high (~ 70%). Is there any other setting I need to play with to get my CPU utilization down to a reasonable number?

    Thanks...Kartik

    • Post Points: 20
  • 11-06-2008 8:24 PM In reply to

    • unionivy
    • Top 75 Contributor
    • Joined on 07-24-2008
    • Posts 21
    • Points 405

    Re: Trouble setting up the right idlepc value

    Kartik,

    Please try the following

    1.Extract/unzip the image file.

    2.idlepc = 0x605c8b40 (try this value. Its very hard to identify which idlepc is good the pc).

    3. Do you use latest version of Dynamips.

    4. mmap = false, ghostios = true

    5. For volume I , I was using single pc and for volume two you need two pcs to run the entire lab.

     

     

    • Post Points: 20
  • 11-07-2008 11:00 AM In reply to

    • kratz101
    • Top 150 Contributor
    • Joined on 11-04-2008
    • Posts 13
    • Points 170

    Re: Trouble setting up the right idlepc value

    Hello unionivy,

    I'm already using the extracted image file and latest version of Dynamips. Also tried with mmap = false settings and the idlepc value you suggested - that is consuming much more CPU utilization than the current value.

    Anything else that may be of help?

    Thanks...Kartik

    • Post Points: 5
Page 1 of 1 (8 items)