How do I use the GNS3 WorkBench Exercises?
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 Labs is here.
For this lesson, we will use one of the ICND1 Exercises. The process described here is the same for the ICND2 Exercises, and the Odom’s (and other) Examples.
Now in this lesson I am going to cover:
- How to to start a GNS3 WorkBench Exercise 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 Exercise session
Task 1: start a GNS3 WorkBench exercise session
Double-click on the ICND1 Exercises icon on the Desktop, then double-click on the ICND1 2Routers exercise. 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 eGNS3 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 icon.
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 172.16.1.10/24 172.16.1.1 00:50:79:66:68:00 20000 30000 PC2 172.17.1.10/24 172.17.1.1 00:50:79:66:68:01 20001 30001 PC3 0.0.0.0/0 0.0.0.0 00:50:79:66:68:02 20002 30002 PC4 0.0.0.0/0 0.0.0.0 00:50:79:66:68:03 20003 30003 PC5 0.0.0.0/0 0.0.0.0 00:50:79:66:68:04 20004 30004 PC6 0.0.0.0/0 0.0.0.0 00:50:79:66:68:05 20005 30005 PC7 0.0.0.0/0 0.0.0.0 00:50:79:66:68:06 20006 30006 PC8 0.0.0.0/0 0.0.0.0 00:50:79:66:68:07 20007 30007 PC9 0.0.0.0/0 0.0.0.0 00:50:79:66:68:08 20008 30008 VPCS 1 >ping 172.16.1.10 172.16.1.10 icmp_seq=1 time=0.001 ms 172.16.1.10 icmp_seq=2 time=0.001 ms 172.16.1.10 icmp_seq=3 time=0.001 ms 172.16.1.10 icmp_seq=4 time=0.001 ms 172.16.1.10 icmp_seq=5 time=0.001 ms VPCS 1 >ping 172.16.1.1 host (172.16.1.1) not reachable VPCS 1 >ping 172.17.1.10 host (172.16.1.1) not reachable
Notice that the output for the ping to 172.17.1.10 shows the output “host (172.16.1.1) not reachable” rather than “host (172.17.1.10) not reachable” as you might expect, since after all you were trying to ping 172.17.1.10! Hopefully your mind is saying ‘Of course – before the Virtual PC could send a ping to 172.17.1.10, 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 (172.16.1.1) 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 on the 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>. Now you may have to be a bit patient here, as it may take some time for the routers to boot up, but since there are no saved configurations, the routers should 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
enable config term hostname R1 interface fa0/0 ip address 172.16.1.1 255.255.255.0 no shut exit interface s0/0 clock rate 64000 ip address 192.168.8.1 255.255.255.0 no shut end write mem
and of course, router R2
enable config term hostname R2 interface fa0/0 ip address 172.17.1.1 255.255.255.0 no shut exit interface s0/0 clock rate 64000 ip address 192.168.8.2 255.255.255.0 no shut end 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
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 you can continue with this lab later. Note that not all Labs are set up to allow you to continue – check the last lines of the instructions to see. If (like this one) is says something like…
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. If you do this, you can continue your lab later by running the 'startup.continue' script from the '/opt/GNS3/Project/ICND1 2Routers' directory.
…then you will be able to save now and come back to the lab later. But first, you will have to export your configurations.
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.
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 3easily by clicking File–>Quit form the konsole application.
Task 7: continue a previous session
NOTE: The method described below is relevant for many of the Exercises. Not ALL exercises will allow you to “continue”, and the Standard Layout labs use a different method described here.
Recall that earlier, we had read in the instructions that:
…you can continue your lab later by running the ‘startup.continue‘ script from the
‘/opt/GNS3/Project/ICND1 2Routers‘ directory.
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.
Find the ICND1 2Routers shortcut, and 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.continue script – it has a little red heart icon 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.
This time when you start the routers, they 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 RIP – you might prefer to finish the exercise using static routes instead.
enable config term router rip version 2 network 172.16.0.0 network 192.168.8.0 end write mem
enable config term router rip version 2 network 172.17.0.0 network 192.168.8.0 end 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 172.17.1.10 172.17.1.10 icmp_seq=1 timeout 172.17.1.10 icmp_seq=2 time=9.124 ms 172.17.1.10 icmp_seq=3 time=9.974 ms 172.17.1.10 icmp_seq=4 time=9.967 ms 172.17.1.10 icmp_seq=5 time=9.235 ms VPCS 1 >tracert 172.17.1.10 traceroute to 172.17.1.10, 64 hops max 1 172.16.1.1 5.425 ms 10.867 ms 18.088 ms 2 192.168.8.2 8.902 ms 10.815 ms 6.281 ms 3 172.17.1.10 9.824 ms 16.034 ms 14.760 ms
Fantastic. You have completed the first part of the exercise – I’ll leave you on your own to complete the configuration so that you can telnet from one router to the other, and to shut down GNS3 cleanly as described in Step 6.
End of Lesson