Loading Configs at Startup in Dynagen

June 24, 2008
By Aaron Conaway

Here’s a quick one for you. In Dynagen, if you want to load a configuration when you first fire up the router instance, you can use the cnfg tag in your NET file like this.

cnfg = /home/jac/labs/cfg/R0.cfg

If you put that in your dynagen NET file under a router, the contents of that file will be loaded into the router configuration when it’s brought up. This is great if you already have a configuration to use in another lab or if you want to load a basic configuration on startup. Please be warned, though; if you make changes to your router instance via the CLI and restart dyangen, the configuration changes you made will be gone.  Be sure to remove that line from the NET before you restart dynagen.

Aaron Conaway

I like to lean my head to the left, hit it with the palm of my right hand, and document what knowledge falls out.

Website - More Posts

Tags: ,

3 Responses to Loading Configs at Startup in Dynagen

  1. Arden Packeer on June 24, 2008 at 16:49

    Another way of doing it is to:

    1. Save your config while in the router (ie. wr or copy run start)
    2. Goto your dynagen console and type: save /all

    This is like the import option with the cnfg command, but the configs will be stored as base64 encoded “blobs” right in your network file in the .net file. It will insert a line that says config = .

    When you next start up your lab with a .net file it will ask if you want to import them.

    Hope this helps!

  2. Aaron Conaway on June 24, 2008 at 17:57

    Good stuff, Arden. I had no clue what “save” actually did. Now I know, and knowing’s half the battle.

  3. Adam Jones on June 25, 2008 at 00:26

    206-unable to extract config of VM ‘R1′

    Just make sure that you have written out a startup-config!!
    (It’s caught me out more than once!)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Calendar

June 2008
S M T W T F S
« May   Jul »
1234567
891011121314
15161718192021
22232425262728
2930  

Switch to our mobile site