How to use the GNS3 WorkBench Labs

I’ve managed to get GNS3 Desktop installed, and have tested that my IOS for a 3725 or 2600 or 2691 router works.

How do I use the GNS3 WorkBench Labs?

Let’s distinguish between Labs and Exercises – they work slightly differently – Labs continue your configuration from where you last saved them, Exercises have a pre-defined starting point that is always the same.  The subtlety different lesson on How to use the GNS3 WorkBench Exercises is here.

All the Labs (as described in this tutorial) are from the Standard Layouts collection found on the Desktop.  Double clicking the Standard Layouts opens a folder of labs, so we’ll start with the Linear2Routers – Stand Alone Lab (continue) layout.

Now in this lesson I am going to cover:

  • How to to start a GNS3 WorkBench Lab session
  • How to use the VPCs application
  • How to start the virtual routers
  • How to configure the virtual routers
  • How to save your configurations
  • How to quit the GNS3 WorkBench environment cleanly
  • How to continue a previous Lab session
  • How to clear your configurations and start a new session.

Task 1: start a GNS3 WorkBench session

Double-click on the Linear2Routers – Stand Alone Lab (continue) icon.  This will start three processes:

1. The GNS3 application will start, and depending on the speed of your PC, it may appear sooner or later than the Instructions window.  For now though, we need to focus on the Instructions window described below.

2.  A page of instructions will appear in text format in a konsole window.  This konsole window will become the main focus of your entire session, so take note of it.  If the window is covered by the GNS3 application, bring it to the front.

3. Notice that the Instructions Window has two tabs, Instructions, and VPCs.  VPCs is the 3rd application that started when you double-clicked on the Linear2Routers – Stand Alone Lab (continue)

Task 2: use the VPCs application

After you have read the Instructions, Click on the VPCs tab. Remember, clicking on the Instructions tab will bring you back to the instructions.  Clicking on the VPCs tab will show you the VPCs window, and you should see that there have been two Virtual PCS configured with IP addresses. The Prompt showing:


indicates that your VPCs focus is Virtual PC number 1.  There are 9 Virtual PCs, and you can switch to Virtual PC number 2 by entering the digit 2 and pressing <Enter>.  Note how the prompt changes to:


Your job in this exercise is to get the two PCs pinging each other.  Lets start by making sure that your focus is back at PC #1 (type 1<Enter>) and then enter the show command.  This will show you the IP address and default gateway for each of the PCs.

Now try some pings.  Firstly, ping your own IP address.  That should work.  Then ping your default gateway (that won’t work, we haven’t even started the routers yet) and then ping the IP address of PC#2 – that won’t work either, but you will see something interesting in the output.  Examine my session below:

VPCS 1 >show 

NAME   IP/CIDR              GATEWAY           MAC                LPORT  RPORT
PC1        00:50:79:66:68:00  20000  30000
PC2        00:50:79:66:68:01  20001  30001
PC3             00:50:79:66:68:02  20002  30002
PC4             00:50:79:66:68:03  20003  30003
PC5             00:50:79:66:68:04  20004  30004
PC6             00:50:79:66:68:05  20005  30005
PC7             00:50:79:66:68:06  20006  30006
PC8             00:50:79:66:68:07  20007  30007
PC9             00:50:79:66:68:08  20008  30008

VPCS 1 >ping icmp_seq=1 time=0.001 ms icmp_seq=2 time=0.001 ms icmp_seq=3 time=0.001 ms icmp_seq=4 time=0.001 ms icmp_seq=5 time=0.001 ms

VPCS 1 >ping
host ( not reachable

VPCS 1 >ping
host ( not reachable

Notice that the output for the ping to shows the output “host ( not reachable” rather than “host ( not reachable” as you might expect, since after all you were trying to ping!  Hopefully your mind is saying ‘Of course – before the Virtual PC could send a ping to, it would have to resolve the MAC address of its default gateway, and it tried and failed so THAT’S WHY the reply comes back “host ( not reachable”.’

Task 3: start the virtual routers

It’s time now to focus on the GNS3 window.  Bring this window to the front, and you should see the layout of the lab.  If necessary, resize the sides of the window so you can see the entire topology. You can also zoom in and zoom out using Ctrl++ and Ctrl+

Notice the three featured icons in the picture above.  Click the Start all devices icon and observe that the icons for R1 & R2 in the Status icons section turn green to indicate that the routers R1 & R2 have now started.  You will also notice that the interface status markers between the two routers turn green as well.

Task 4: configure the virtual routers

Now with your routers started, click the Telnet to all IOS icon, and your konsole window will gain two new tabs (careful – don’t click on the Telnet icon more than once – if you can’t see you original konsole window, bring it to the front now).

Click the tab of the router you wish to configure first – R1 or R2, then click inside the window, and hit <Enter>. You may have to be a bit patient here, as it may take some time for the routers to boot up.

The routers will actually be now running the last saved configuration (hence the word Continue in the name of the shortcut to the lab).  For this exercise I will assume that there are no saved configurations, and so the routers will soon start with the standard default blank configuration dialogue:

Would you like to enter the initial configuration dialog? [yes/no]:

Answer No, and go ahead and configure the routers with IP addresses, but at this stage without any routing.  If you are not confident you can do this on your own, cut and paste the sessions below:

For router R1

config term
hostname R1
interface fa0/0
ip address
no shut
interface s0/0
clock rate 64000
ip address
no shut
write mem

and of course, router R2

config term
hostname R2
interface fa0/0
ip address
no shut
interface s0/0
clock rate 64000
ip address
no shut
write mem

Check that one router can ping the serial interface of the other router, and it would be a good idea now, to click on the VPCs tab and check that VPC 1 can ping its default gateway, and VPC 2 an ping its default gateway – of course they won’t be able to ping each other yet because you haven’t configured routing!

Task 5: save your configurations

If you look at the end of the Instructions, you will see a summary of what I’ll describe here:

If you wish to save your configs and continue at a later time, make sure you 
do BOTH 
a) save your configs (using 'copy running-config startup-config') AND 
b) save your network file (click file->save) from GNS3.

Note that the past command you issued for each router was write memory (which executes a no-nonsense copy running-config startup-config) – in other words, you saved your configuration – but don’t get too excited, you haven’t saved it from within the GNS3 environment yet – so it may not be completely saved yet – you still have to export your configurations from GNS3 so that they will be loaded again next time you run the lab.

For now, I’m going to tell you that the easiest way to export your most recently saved configurations is to click File->Save from within GNS3. This will export your configurations to the configs directory of your project, and you should see the following output in the Dynagen management console for Dynamips window at the bottom of your GNS3 workspace.

Now if you have saved your configurations, and exported them (saved from GNS3) then I am going to next explore how you quit the GNS3 WorkBench environment and start up again from where you left off.

Task 6: quit the GNS3 WorkBench environment cleanly

Quitting is a 3 step process (you can skip step 1, but I want you to see what happens)

Step 1 is to stop the routers. This can be done by clicking the big red Stop every device icon at the top of your GNS3 workspace, or (in version 0.7.3) by clicking Device->Stop.

Notice that when you stop all the devices, your console sessions for each of the routers disappears from the main konsole window.

Step 2 is to quit GNS3 – this is easily achieved by clicking File->Quit in GNS3

Step 3 is the step most people forget, and then they come to grief if they try to start another session.  This is the step to close the konsole window where the Instructions are displayed and the VPCs session is running. This can be done easily by clicking File–>Quit form the konsole application.

Task 7: continue a previous session

NOTE: The method described below is relevant for any of the Standard Layout labs.  The other labs use a different method

Now back at the desktop, open the Standard Layouts folder again if necessary, and double-click on the Linear2Routers – Stand Alone Lab (continue) exercise again.  The launch should be just the same as last time, and once the GNS3 application and the Instructions/VPCs konsole session is started, start your routers using the green Start every device button, and open the router console sessions by clicking on the Telnet to all devices button.

This time the routers should start with the same configuration they had when you last saved your configurations earlier, and you can complete the exercise.

Here’s the config you can paste in to complete the exercise using static routes – you might prefer to finish the exercise using RIP instead.

Router R1

config term
ip route
write mem

Router R2

config term
ip route
write mem

Once you have completed the configuration, test if your PCs can ping each other now, by clicking on the VPCs tab and using the ping command, and also try the tracert command:

VPCS 1 >ping icmp_seq=1 timeout icmp_seq=2 time=9.124 ms icmp_seq=3 time=9.974 ms icmp_seq=4 time=9.967 ms icmp_seq=5 time=9.235 ms

VPCS 1 >tracert
traceroute to, 64 hops max
 1   5.425 ms  10.867 ms  18.088 ms
 2   8.902 ms  10.815 ms  6.281 ms
 3   9.824 ms  16.034 ms  14.760 ms

Task 8: clear your configurations and start a new session

Fantastic.  The final task is to see how to clear the current configurations.  You may be used to the idea of using the erase startup command on a Cisco router, however, the configs were exported to the lab’s config directory, so next time we start this exercise, we are going to be presented with the configurations we last exported by saving the configs within the GNS3 application.

There is an explanation of how to do this in the Instructions – so click on the Instructions tab and read the message at the end of the text:

If you wish to save your configs and continue at a later time, make sure you
a) save your configs (using 'copy running-config startup-config') AND
b) save your network file (click file->save) from GNS3.  You can reset the lab
later by running the 'startup.0 (delete saved configs)' script from the
'/opt/GNS3/Project/Linear2Routers' directory.

So to clear the configs, we are going to run a script called startup.0 (delete saved configs) outside of the GNS3 application. This will delete the files in the configs directory and start a session with no configs.  Do you remember how to shut down the GNS3 WorkBench environment properly? There were three steps involved, and they are recorded above.

Shut down GNS3 WorkBench using the 3 steps described earlier in this lesson in Task 6, and close any items on the desktop.

Now back at the desktop, double-click the icon labelled GNS3 Files – More exercises here. This is actually a folder, and contains shortcuts to all the /opt/GNS3/Project directories.  You are looking for the Linear2Routers directory.  When you find it, double-click on it.  This time, the program won’t start, but you will get to see some of the scripts and configuration files that live behind the scenes of GNS3 WorkBench.

Locate the startup.0 (delete saved configs) script – it has a little red icon with a white “x” on it.

When you find it, double click on it, and you will be presented with 4 options. Run in Terminal, Display, Cancel and Run.

You should choose Run, but it you choose Run in Terminal the script will still run, but you will have to confirm some of the actions, but you can see a little more clearly what is going on BUT you have to be careful you don’t close the terminal window or it will close every program it spawned – including GNS3.

Notice that when the GNS3 application starts, it displays a message in the Dynagen management console for Dynamips window at the bottom of your GNS3 workspace saying:

Dynagen management console for Dynamips (adapted for GNS3)
Copyright (c) 2008 GNS3 Project

=> Local configuration configs/R1.cfg cannot be found for router ROUTER R1,
use configuration /opt/GNS3/Project/Linear2Routers/configs/R1.cfg instead
Local configuration configs/R2.cfg cannot be found for router ROUTER R2,
use configuration /opt/GNS3/Project/Linear2Routers/configs/R2.cfg instead

This message appears simply because there are no saved configurations – which was the purpose of the task!

End of Lesson


28 Responses to How to use the GNS3 WorkBench Labs

  1. Nice and detailed for older version of gns3.. 🙂

  2. Nice and detailed for older version of GNS3..

  3. Redd says:

    Is there a list of which order to do the labs, and where could I find it?

  4. Xi Chen says:

    Hi Mr. Red,
    It is a great tool to learn R&S knowledge. I have a quesiton, i am using the recommended IOS but the CPU in VM is still high. Is this expected? After i apply the idle PC value, i.e. in one of the lab node, how to save them?

  5. LOUBNA says:

    please , i want to connect a router with a host by console cable but i don’t find console cable in link available in GNS3
    can you help me to solve this problem

  6. samn says:

    when i start Exercises, this error display and i cant run Exercises
    exception detected stopping importation
    please help me

    • rednectar says:

      This can mean there is a “\” character in the config where a “/” was expected.
      Which exercise? Which version of GNS3 is running on your distribution (to find out, enter ver in the GNS3 Console, and look at the first line of output)

  7. TechieXXX says:

    Probably the only (idiot) in Bangkok who has spent his Saturday night in this fashion lol.

    p.s. also tried it on my macbook pro using the 64bit .dmg installer, same slow console connection

  8. rednectar says:

    You have been busy! Thanks for the info – I’ll watch out I don’t get caught

  9. TechieXXX says:

    Dynamips 0.2.8-RC3-community binary for Linux (32-bit) SLOW
    Dynamips 0.2.8-RC2 binary for Linux (32-bit) FAST 🙂 🙂 🙂

  10. TechieXXX says:

    ok it’s the dynamips version, the old one, no problem, the latest community version, slow.

  11. TechieXXX says:

    Grrr what is your secret? lol I haven’t tried updating the way you’ve described it yet but have tried installing a brand new ubuntu 12.04 32bit on VMware workstation 8, I then followed these instructions on how to do a manual install of GNS3 0.8.2 on ubuntu. Everything works great except for the console…which still works at…well console speed, it works just like actually plugging a console cable into an physical router at the default 9600baud with lines scrolling in line by line. I’ve tried recreating the settings found on your appliance into the VMware image of ubuntu 12.04 with the newer GNS but to no avail. I have this problem not only on ubuntu, but it’s the same on XP 32bit SP3 and win7 (I dual boot on that right now). The AUX works great….but I don’t want to type in ‘terminal monitor’ on all 26 routers if you don’t mind ;). Tried editing the baseconfig.txt with terminal monitor…haven’t gotten that to work either/yet. Only place I have a good/fast console speed is in your wonderful appliance…..but why? ….he asked while desperately trying to stay positive lol. Will attempt to upgrade your appliance now and see if that works, btw should I delete the (contents of) /opt/GNS3/ directory before unzipping/tarring the new version into it?

    Any help would be greatly appreciated,

    A frustrated techie 😉

  12. techieXXX says:

    0.8.2. has been released 😉 ….pretty please, or perhaps some assistance on how to manually update your wonderful appliance

  13. Ceejay says:

    I have used GNS3 workbench a bit and found it very easy to use – thanks for that.

    I am however trying to get more experience with GNS3 itself and I am now running a newer version on my PC.

    All the labs and exercises included in workbench;
    1.where do you obtain these sort of labs/exercises

    2.are the labs easily transferable to another version of GNS3, would there be much involved apart from copying some files.

    Appreciate your help,

    thanks again

    • rednectar says:

      Hi Ceejay,

      To answer your questions

      1.where do you obtain these sort of labs/exercises

      The labs and exercises I have mostly written myself, some are adapted from Odom Wendell’s CCNA books, and some even from examples found on the Cisco website.

      2.are the labs easily transferable to another version of GNS3, would there be much involved apart from copying some files.

      The labs are written around a series of shell scripts that copy a set of pre-prepared configs to the configs directory, start a vpc session, display a set of instructions then run GNS3.
      They COULD be transferred to another version of GNS3 but NOT easily.

      These should work with any version of GNS3 running on Linux or OS X so long as your install uses the same file locations – basically everything under /opt/GNS3. You might have to change the permissions of the script files to make them executable before they will run though. As for running on Windows, you’d have to try and find equivalent commands in the MS CLI to replicate the scripts, or find a way to run bash scripts on Windows.

      If you want to use the newest version of GNS3, the best option at the moment is to upgrade your GNS WorkBench install – I did a post on the forum to describe how to do this.

      When 0.8.2 is released, I’ll release a new version of GNS3 WorkBench.

    • rednectar says:

      Hi Kamran – I’ve put your link up – I can’t verify the problem the site claims re 2600 images – but I do tend to stick to 3725 or 3640 IOSs myself.
      Chris (RedNectar)

  14. juzzforlaugh says:

    how can i copy the IOS files to the GNS3 workbench?

  15. rednectar says:

    Frank – if you open up a console on the Ubuntu VM, then:
    cd /opt/GNS3/Project/ICND1\ Configuration\ Test/
    sudo chmod +s compare.configs.2

    Then now you can run the compare script – I warn you -it’s pretty horrible, and simply compares two files – as you can see below, the output is, well almost indecipherable! I clearly need a better way of testing the validity of the lab. Of course, you can always just look at the configs in the “/opt/GNS3/Project/ICND1 Configuration Test/configs.2 (solution)” directory and compare them yourself!

    About to compare files – if there is NO output your answer exactly matches mine
    Press <Enter> to begin compare
    < !
    < enable secret 5 $1$sNLY$KgIXMAyec8/zLvh5fU8n9/

    > enable secret 5 $1$iZfh$ViaSCwjs2xqOhJo.vHVaw1
    > network
    < !
    Press <Enter> to exit

    • anubisg1 says:

      the problem is that it doesn’t really help at 100%…

      what about if you have:

      int loopback 0
      ip add
      router ospf 1
      network area 0

      and i have

      int loopback 0
      ip add
      ip ospf 1 area 0

      those are pretty much the same solution… so who’s right than? 🙂

      or for example, i use a different “network” line

      you must be really specific or it might not help

      • rednectar says:

        Like I said before, the compare script is pretty horrible, and simply compares two files. Anyone who can come up with a foolproof way of testing the validity of a configuration, and IMPLEMENT it, I’d love to hear from you! There would be some possibilities if you investigated a script that logs into the router and issues a few show commands, but would take a lot of work to be foolproof.

  16. Bill says:

    Dear Mr. red,

    How can we know if we did solve the lab correctly or No? There is no indication that the work was correct or no?

    • rednectar says:

      Hi Bill,
      This is a problem I’d like to solve. I’m sad to say that at the present moment, there is no real way to see if you solved the lab correctly other than “it looks like it works”. I did attempt to have one exercise (the ICND1 configuration Test) do a crude check, by comparing your saved config with my “solved” config – and you had to be able to understand the instructions
      “When complete you can compare your configurations by

      a) saving your configs (using ‘copy running-config startup-config’) AND
      b) saving your network file (click file->save) from GNS3 AND
      c) running the compare.configs.2 script from the
      ‘/opt/GNS3/Project/ICND1 Configuration Test’ directory.”

      …which clearly no-one has attempted – because if they did they would have reported that it doesn’t work (I forgot to make the compare.configs.2 script executable)

      Meanwhile, back to your problem – I can see the need to make the instructions clearer and to give a definite “test” at the end of the exercise. The new versions of vpcs allow you to run scripts, so I might be able to (in the future) have the exercise finish by getting you to load a script from vpcs that tests if your config is working, or I may have to add some more detailed explanations.

      In the meantime, I’m happy to help out via this page if you have any particular problems.

      • Frank says:

        Hey rednectar,

        is there a way to execute or make work these compare.configs.2 files??

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.