Lab1 GNS3 Configuration PDF
Lab1 GNS3 Configuration PDF
1.1 Details
Aim: The aim of this lab is to begin using the GNS3 network simulator and configure Cisco
virtual routers. Cisco Routers will be added to a virtual network, and basic networking and
security configurations will be performed on the devices.
This will give a foundation to investigate practical network security using virtual network
devices within a virtual lab environment in the weeks to come.
1.2 Activities
Download GNS3 latest version all-in-one (includes Dynamips, Qemu/Pemu, Putty and WinPCAP)
for Windows. GNS3 also runs very well on a Linux system.
Run the Setup executable, and install any of the components which are not already installed.
Change the Working directory for Dynamips to somewhere on a local drive, which you have
permissions to write to, such as C:\temp.
Click the Test Button (and wait), to check the underlying Dynamips engine is working correctly.
You may need to Allow GNS3 access through the host firewall, as shown below.
We need to set up the Paths, both for GNS Projects (we will create a new project for each lab), and
for the Cisco Device OS Images.
Click the Project directory button , and create a new folder Projects, to save your simulated
network topologies in - as shown below. This would typically be under the GNS directory but in the
lab use the c:\temp\GNS locations.
Save the file in the GNS Images directory you created earlier, such as shown below.
In Settings>Platform, Select the c7200 Router Platform. We now need to tell GNS3 to use the
downloaded OS to emulate this Router. Click the Image File button , and select the downloaded
Cisco OS from the Images directory, as shown below.
This window simulates the adding/removal of network interface modules on a physical router.
Compare the available modules, with the modules on the physical Cisco routers in the labs if you
have access, or google for router/interface adapter details.
This console window simulates an administrator physically connecting to the router with a laptop,
via the routers console port, and using a command line to configure, as illustrated below. This
Command Line Interface (CLI) allows the configuration of the router using the Cisco IOS Command
language.
Router
System
Administrator
Router Console
Interface
If the router terminal is in the configuration mode, as shown below, exit by typing no
Would you like to enter the initial configuration dialog? [yes/no]: no
Press RETURN to get started!
Router>
You should notice a drop in CPU usage immediately. If not try another idelpc value.
Note: Setting the idlepc value for the IOS we are using is a very important step. When a Cisco
IOS is running, it can consume up to 100% of the CPU. This will cause the system to become
sluggish and will prevent building more complex topologies. However, if an idlepc value is set CPU
usage is reduced dramatically. The IOS is put into a sleep state when it is not in use and is woken
only when it is necessary.
To assist with the cisco router configuration commands the following can be used:
http://www.cisco.com/en/US/docs/ios/preface/usingios.html
Cisco router CLI has many different Command Modes, each giving access to a range of commands.
When the router boots, the command line is in User Exec Command Mode, with the Router>
prompt.
Try the show running-config command. An error should be generated, as this mode does not
have permissions for the command.
Router> enable
Router#
View the available commands using ? and scroll back up the console window to compare the
command sets.
Questions
Q: Are there more or less commands available in Privileged Exec Command Mode?
View the routers configuration file with the command show running-config. It should be similar to
the figure below with no IP Addresses or Passwords set up. <SPACE> and <RETURN> can be used
to scroll page or line at a time. A full default configuration for a Cisco router is shown in Appendix 1.
Network Security Network Simulation with GNS3 – Rich Macfarlane 11
The following shows Router Command modes with the commands to navigate between them. The
associated prompts are shown on the bottom right.
Router>
Router#
Router(config)
Note the prompt has now changed to show the new router name.
Questions
Q: Does the Routers name in GNS change when we change the hostname?
If you want to remove a configuration command from the router, simply negate the command by
using the no command in from of any command. For example:
Router17(config)# no hostname Router17
Router(config)#
To move from a higher command mode to a lower mode, use the exit command or CTRL+C, and to
move from Priv Exec to User Exec use disable:
Password security relies not only on the cryptographic algorithm used, but also the password
selected. Weak, easy to remember password will be used in the labs, but longer, more complex
passwords should always be used in production environments.
The enable password is now set to cisco. The result of this can be seen by doing the following:
Router1(config)# exit
Router1# disable
Router1> enable
Password: cisco
Network Security Network Simulation with GNS3 – Rich Macfarlane 13
Router1#
Questions
View the routers configuration file again, using the show run command, from the appropriate
command mode.
Questions
Q: What are the last 5 characters of the privileged command mode password?
Try setting the privileged exec password a second time to the same value: cisco.
Router1# config t
Router1(config)# enable secret cisco
View the routers configuration file again, using the show run command, from the appropriate
command mode.
Questions
Q: What security are the last 5 characters of the privileged command mode password?
The encrypted password is shown in the configuration details for the router which can be a problem
if configurations are printed. The secret 5 shows it is a MD5 hash of the plaintext password.
Questions
Q: Why would details about the organisation, the network, or the device being logged into be a bad
idea in a banner message?
Q: What would be the global configuration command to remove the MOTD banner?
Questions
The network adapter, we added to the router earlier has to be assigned a network layer address, or
IP Address, to be able to communicate with other devices.
Router1(config)# interface fa0/0
Router1(config-if)# description TO THE LAN 192.168.100.x NETWORK
Router1(config-if)# ip address 192.168.100.1 255.255.255.0
Router1(config-if)# no shutdown
Router1(config-if)# exit
Router1#
Check the devices network interfaces and their current states again.
Questions
Q: Does the interface have an IP Address, and what is the current state now?
Set the hostname Router2. Assign its interface the IP Address 192.168.100.2
Cable a link between the 2 network interfaces, using the button, selecting manual
Test Connectivity
From the first Router use the ping command to test connectivity between the interfaces. The ping
command uses ICMP packets and can be used to check if a device/interface exists, and is responding.
Questions