0% found this document useful (0 votes)
278 views128 pages

Using GNS3 and VirtualBox Virtualize Network Test-Labs - Tashi Wangchuk

GNS3 is a free and open-source network emulation software that allows users to design and test network topologies without physical hardware. The document discusses how to install and configure GNS3, add IOS images for routers and EtherSwitch routers, and set up basic network emulation using GNS3 and VirtualBox virtual machines. Key steps include downloading and installing GNS3, configuring the GNS3 server, adding IOS images, allocating RAM, and specifying network adapters. This allows for emulation of Cisco routers and switches to build virtual network test labs.

Uploaded by

Liz Mar Cielo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
278 views128 pages

Using GNS3 and VirtualBox Virtualize Network Test-Labs - Tashi Wangchuk

GNS3 is a free and open-source network emulation software that allows users to design and test network topologies without physical hardware. The document discusses how to install and configure GNS3, add IOS images for routers and EtherSwitch routers, and set up basic network emulation using GNS3 and VirtualBox virtual machines. Key steps include downloading and installing GNS3, configuring the GNS3 server, adding IOS images, allocating RAM, and specifying network adapters. This allows for emulation of Cisco routers and switches to build virtual network test labs.

Uploaded by

Liz Mar Cielo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 128

Virtualize Network Test-Labs

Using GNS3 and VirtualBox


Virtualize Network Test-Labs
Using GNS3 and VirtualBox
TASHI WANGCHUK
Dedicated to students
and
my small family
Acknowledgement
Firstly I would like to sincerely thank all my past and present
students of both Computer Hardware and Networking as well as
Computer System and Network of Jigme Namgyel Engineering
College (Royal University of Bhutan). It was with you all that I have
learned so much and I am writing now.
I don’t want to forget my colleagues for being one of the encouraging
factors to go on with the idea of coming up with a book and of course
my small family for bearing with my share of problems and hassles
too.
My immense gratitude goes out to Kezang Wangmo for being very
supportive in my endeavor of writing and also for designing this
Book’s cover in a very special way, the way I liked and wished for.
Finally to all the students who have bought a copy of this book and I
look forward to getting valuable feedback and suggestions for
improving the future editions.
Virtualize Network Test-Labs
Using GNS3 and VirtualBox
Install and Configure GNS3
Emulation and Simulation
Configuring GNS3
Adding IOS Image for the Router
Adding IOS for the EtherSwitch Router
Further Reading
Install and Configure VirtualBox
Download and Install VirtualBox
Virtual Machine Settings
General Settings
System Settings
Display Settings
Storage Settings
Network Settings
Installing Operating System on the VM
Further Reading
Creating Adaptors and Cloning VMs
Host-Only Networking
Creating VirtualBox Host-Only Ethernet Adaptors
Removing VirtualBox Host-Only Ethernet Adaptors
Virtual Machine (VM) States
Saving and Discarding VM’s State
Cloning VMs
Further Reading
Exporting and Importing Appliances
Exporting as Virtual Machine as Appliance
Importing Virtual Machines as Appliance
Removing Virtual Machines
Further Reading
Integrating VMs with GNS3
Adding VMs
Browsing End Devices
Further Reading
Creating a GNS3 Network Topology
Creating and Saving Projects
Configuring the Windows 7 (End device)
Creating Links Between the Devices
Status of the Devices and Nodes
Verifying the Network Adaptors
Starting the Devices
Further Reading
Configure and Test Network
Network Scenario
Accessing and Configuring Router
Configuring Router’s Interface 0/0
Configuring Router’s Interface 0/1
Configuring DHCP Service
Configuring NAT
Testing the Network
Further Reading
Chapter 1
Install and Configure GNS3
The best way to practice and learn Network Services Administration
without having to buy any hardware is by building a Virtual Lab. An
open source software, GNS3 can be used for building a Virtual Lab
which we can download and use for free. Today, GNS3 is used by
thousands of network engineers worldwide to emulate, configure,
test and troubleshoot networks. It allows running a small topology
consisting of a few devices on your laptop or desktop. In this chapter,
we will learn to install and configure the GNS3, and also add the IOS
images.

Emulation and Simulation


The GNS3 emulates the hardware of a device and run the actual
images on the virtual device. We can use the IOS of a real, physical
Cisco router and run that on a virtual, emulated Cisco router in
GNS3 and simulate the features and functionality of a device such
as a router.

Downloading GNS3
The GNS3 software can be obtained from the official website of the
GNS3. However, before we get to download, we have to signup if we
don’t have an account or login if we already have an account
created. Follow the link https://www.gns3.com/ and download the
software appropriate for your Operating System.
At the time of this writing, GNS3 Version 2.1.5 (for Windows)
was released, however, it appeared to be behaving in an
unexplainable way and instead Version 2.0.0a3 is used in this
book. You can continue to use the latest GNS3 Version or the
one used in this book as most of the basic features and
functionalities remain similar.

The following screen would be shown for downloading in the GNS3


official download page. The download is available for Mac and Linux
as well but in this book, the platform used is Windows. However, you
can choose to use either Linux, Mac or Windows, depending on the
convenience.

Figure 1.1: GNS3 Download Options


Installing the GNS3
After the download is complete, run the software as administrator
and then the GNS3 setup will begin. Click the “Next” button.

Figure 1.2: GNS3 Setup Welcome Screen


In the next screen, choose “I Agree” for the License agreement to
proceed with the installation.

Figure 1.3: License Agreement Screen


Allow GNS3 to create a “Start Menu” folder with the default name
GNS3 by clicking the “Next” button.

Figure 1.4: Startup Menu Folder Selection


The GNS3 software depends on several other programs to function.
These dependencies along with GNS3 are all chosen by default for
installation, if not choose all and click the “Next” button to continue.

Figure 1.5: GNS3 Component selection for installation


A default location is chosen for GNS3. Click the “Install” button to
accept the default location and to begin the actual installation of files.

Figure 1.6: Choosing the installation location


Click “Next” to proceed with the installation and then the installation
would be complete.

Figure 1.7: Installation Complete Screen


Choose “No” and then click “Next”.

Figure 1.8: Solarwinds Standard Toolset Option


Click “Finish” and complete the GNS3 installation.

Figure 1.9: GNS3 setup Complete Screen


Configuring GNS3
Immediately after the installation is complete, you will be shown the
following screen. Choose “Run only legacy IOS on my computer”
and then click “Next”.

Figure 1.10: Choosing GNS3 Server Type


In the options shown, keep the “Server path” and “Port” to defaults,
set the “Host binding” to 127.0.0.1 in case if it is set to something
different. Click “Next” and proceed with the configuration.

Figure 1.11: Local GNS3 Server setting


Upon the successful configuration validation and connection to the
server, click “Next”.

Figure 1.12: Local Server Validation Status


On the summary screen of the configuration, click “Finish”.

Figure 1.13: Local Server Configuration Summary


Adding IOS Image for the Router
The following template takes us through the adding of router’s IOS to
be used with the GNS3. Choose “Add an IOS router using a real IOS
image (supported by Dynamips)” and click “OK” to continue.

Figure 1.14: IOS Importing Options


In this step, we have to browse to a location where your router’s IOS
is stored and select the IOS image to be used.

Figure 1.15: Browsing to the IOS Image location


Once the IOS is chosen and loaded, click “Yes” button to start
decompressing the IOS image.

Figure 1.16: Decompressing the loaded IOS image


Once the image decompression is completed, click “Next” to
continue.

Figure 1.17: Path to the loaded IOS image


In the “Name” and “Platform” options, leave to the defaults and
continue by clicking “Next” button.

Figure 1.18: IOS router name and platform details


In this step, you have to allocate the amount of RAM size for the IOS
and it is recommended to keep it to the default or allocate a bit
higher. Allocating too much or too less would cause issues in the
router startup. Assign the required amount of RAM as per the
requirement and then click “Next” button.

Figure 1.19: Memory allocation for the IOS


Here, we can specify the type and the number of interfaces to be
created whenever new router instances are initiated. In the following,
two fast ethernet interfaces (C7200-IO-2FE) are specified to be
created for a router in every instance. Once it is specified correctly
as per the need, click “Next” to proceed.

Figure 1.20: Default Network Adaptor specification


The Idle-PC value helps in reducing the percentage of CPU usage
whenever we have to run multiple instances of routers at the same
time. So, click on the “Idle-PC finder” button and wait for the system
to find the suitable value for the IOS image. Once the Idle-PC value
if found, accept the value by clicking “OK” and then click “Finish”.

Figure 1.21: Finding Idle-PC Value for the IOS


When the process is complete, your IOS must be listed in the IOS
routers list. Further, to accept the changes to take effect, click
“Apply” and then “OK”.

Figure 1.22: Imported Router IOS List


When the IOS adding is completed, GNS3 takes directly to the
creation of the project. It shows a dialog box where we can specify
the name of the project and the default location of the project to be
saved is shown. At this point, click the “Cancel” and abort the project
creation step.

Figure 1.23: New project dialog box


Adding IOS for the EtherSwitch Router
In the previous step, you have added an IOS image to be used as
the router. Now, in the following steps, we will try to add an IOS
image of a router to be used as an EtherSwitch Router. After the
launching of the GNS3 application, go to Edit --> Preferences -->
Choose “IOS routers”. Here, we get options either to add new,
decompress, edit or delete the IOS routers. For now, in order to add
new click on the “New” button.

Figure 1.24: Adding more IOS Images


Choose “New Image” option, browse to the location where you have
stored the IOS of the router, choose to decompress the image and
then click “Next” to proceed.

Figure 1.25: Choosing New IOS Image


Here, we have to provide a descriptive name, platform and select
“This is an EtherSwitch router” option for our router and then click
“Next”.

Figure 1.26: Router IOS to EtherSwitch Option


Allocate the required amount of RAM size for the IOS and click
“Next” to continue.

Figure 1.27: Memory allocation for the EtherSwitch Router


In this step, don’t forget to add a module with 16 interfaces, since our
intention is to use it as a switch. So, selecting NM-16ESW is
recommended in this step and continue by clicking “Next”.

Figure 1.28: Specifying Default Ethernet Adaptors


Click “Next” to proceed with the setting.

Figure 1.29: Specifying WIC module options


Look for the Idle-PC value and click “Finish”. Even if the Idle-PC
value is not found by the system, you can continue by clicking
“Finish”.

Figure 1.30: Idle-PC Value for EtherSwitch Router


Once the setting is complete, we have to accept by clicking “Apply”
and then “OK”.

Figure 1.31: Imported IOS Image List

This completes the adding of IOS images to be used while working


with GNS3. In case, a number of IOS images are required, the same
procedure can be followed and added. Here, c7200 will be used as a
router while EtherSwitch router is going to be used as a switch.

Further Reading
Cisco IOS images for Dynamips. (n.d.). Retrieved April 06, 2018, from
https://docs.gns3.com/1-kBrTplBltp9P3P-AigoMzlDO-ISyL1h3bYpOl5Q8mQ/
GNS3 Labs | CCNP | CCNA Labs. (n.d.). Retrieved April 05, 2018, from
http://commonerrors.blogspot.com/2012/12/gns3-installation-and-configuration-on.html
GNS3 Labs | CCNP | CCNA Labs. (n.d.). Retrieved April 05, 2018, from
http://commonerrors.blogspot.com/2014/10/add-router-ios-in-gns3-10-beta2.html
How to Add Router IOS Image in GNS3. (2016, July 16). Retrieved April 06, 2018, from
https://protechgurus.com/how-to-add-router-ios-image-in-gns3/
Introduction. (n.d.). Retrieved April 05, 2018, from
https://docs.gns3.com/1PvtRW5eAb8RJZ11maEYD9_aLY8kkdhgaMB0wPCz8a38/index.ht
ml
Chapter 2
Install and Configure VirtualBox
The Oracle VM VirtualBox Manager is an open source virtualization
software developed by the Oracle. It allows running a wide range of
guest operating systems including Windows, MAC, Solaris, and
Linux. In this chapter, we will install the Oracle VM VirtualBox
Manager and also learn to install CentOS 7 as the Guest Operating
System.

Download and Install VirtualBox


The VirtualBox is available for download for Linux, Windows and
Mac. At the time of writing this book, the latest version available for
the Windows platform was 5.2.8. To download the latest version of
the VirtualBox for the appropriate platform follow the URL
https://www.virtualbox.org/wiki/Downloads which is the official
download link.
When the download is complete, you can install it on the host which
could be running any operating system.

Creating Virtual Machine in the VirtualBox


Once the installation of the VirtualBox is completed, launch the
Oracle VM VirtualBox Manager and click on the “New” to create a
new Virtual Machine. Here we will create a Virtual Machine for
installing the CentOS 7 Operating System.
Figure 2.1: Oracle VM VirtualBox Manager’s interface
In the following, we have to specify the name of the Virtual Machine,
type of the Operating System and the version. As we are intending to
install CentOS 7, the type is going to be Linux and then the version
as Red Hat (64-bit), since CentOS is a Red Hat family. Click “Next”
to continue.

Figure 2.2: Assigning name and type of OS


In the following, VirtualBox automatically assigns memory size to the
virtual Machine but if there is more memory to be spared, you can
increase as per the need and availability. However, assigning lower
than the recommended would pose issues. Click “Next” to continue.

Figure 2.3: Allocating memory size for the VM


In this screen, if we already have a pre-configured Virtual Hard Disk
(VHD) file, select the “Use an existing virtual hard disk file” and
select the VHD that you want to use. If you want to create a new
virtual hard disk, select “Create a virtual hard disk now” and click the
“Create” button.

Figure 2.4: Virtual hard disk option


For the Hard disk file type, you can select any of the VHD disk types
depending on your choice. By default, the disk type selected is VDI.
Let’s keep it to “VMDK (Virtual Machine Disk)” and click “Next”.

Figure 2.5: Virtual hard disk file type


In the following, choose “Dynamically allocated” and click “Next”. If
you select dynamically allocated option, VirtualBox will use the disk
space from the hard disk only when the virtual machine’s data
increase. This option is suitable for the disk optimization.

Figure 2.6: Choosing Dynamically allocated storage


Type the disk file name and select the location where you want to
save it. Specify the size of the hard disk as well. Else, we can keep it
to the defaults and click “Create”.

Figure 2.7: Virtual hard disk file location and size


We have completed creating a new virtual machine in VirtualBox for
installing CentOS 7. The virtual machine will get listed as shown in
the following figure.

Figure 2.8: Created virtual machine listed


Virtual Machine Settings
In order for the virtual machine to function the way we expect it to,
we have to perform some of the required changes in the settings
under various sections. So, to change the settings for the particular
virtual machine, we can Right-click and choose settings. This will
launch the settings screen for the particular virtual machine.
General Settings
The first section of the setting window is “General”, which has four
tabs. The “Basic” tab allows us to specify the virtual machine name,
operating system type, and the version of guest OS.

Figure 2.9: VM’s general settings (Basic)


The “Advanced” tab allows specifying the snapshot folder location
and drag-and-drop option between the host and guest machines. So,
here the snapshot location is set to default, the “Shared Clipboard”
and “Drag’n’Drop” are set to Bidirectional. Click OK to save the
changes.

Figure 2.10: VM’s general settings (Advanced)


System Settings
The “System” section of the setting has three tabs. In the
“Motherboard” tab, we can adjust the allocated size of the memory
and the order of bootable media to install the guest operating
system. So, it becomes important for us to select and set the boot
order based on our requirement. Here, the “Optical” is selected and
is taken to the first.

Figure 2.11: VM’s system settings


In the Processor and Acceleration tabs, leave the settings to
the default at this time. We will make changes to those settings
whenever required.

Display Settings
In the “Display” section, we can leave the settings of all the tabs to
the defaults for the time being.
Storage Settings
Under the “Storage” section, we can customize the settings related
to the storage devices such as HDD, VHD, and CD/DVD. More
importantly, since we are going to install the CentOS 7 as the Guest
Operating System, we have to browse to a location where we have
stored the ISO file of the CentOS 7.

Figure 2.12: VM’s storage settings


Network Settings
This section allows attaching the virtual machine to the desired
network. Choose the network type that fulfills your requirement. As of
now, we will leave it to the defaults and click “OK”.

Figure 2.13: VM’s network settings


Installing Operating System on the VM
In the previous steps, we have installed Oracle VM VirtualBox
Manager, created a Virtual Machine and the configuration settings
for the Virtual Machine was completed.
In this section, we will try to install the CentOS 7 as the operating
system on the Virtual Machine (CentOS-FTP-Srv). Installing the
CentOS 7 on the Virtual Machine is almost similar to installing on a
host machine. Follow the steps indicated below to install on the
Virtual Machine:
Before we start, we need to have in place, the installation media
(DVD or ISO) of the guest operating system which we are intending
to install. In our case, we need to have CentOS 7 DVD or the ISO
file.
If you have more than one virtual machine, make sure that you
select the particular virtual machine and click the “Start” button.

Figure 2.14: Selecting a VM to start


To use an ISO image file for CentOS 7 as an installation media, click
“Devices”, choose “Optical Drives” and then “Choose disk image”
option. Browse and select the desired ISO image of CentOS 7 that
you want to use as an installation source. This step is required only if
you have not done the image selection in the previous steps.

Figure 2.15: Selecting an ISO file for installation


You may consider resetting the virtual machine to restart it if the
booting failed message appears. To reset the virtual machine, go to
“Machines” and then click the “Reset”.

Figure 2.16: Resetting VM


Once the reset command is given, the reset confirmation dialog box
would appear. Click “Reset” to confirm the reset action and then
proceed with the installation.

Figure 2.17: Resetting confirmation


From this point onwards, the procedure is similar to installing
CentOS 7 as a host Operating System on a real hardware. For this
virtual machine, the CentOS 7 minimal install is only required to be
carried out.
If you require the virtual machine to fit the whole display screen
use Ctrl (right) + F key combination, or if you want the virtual
machine to be viewed in a scaled mode use Right Ctrl + C key
combination. Also, in case if your mouse cursor gets caught up
inside the Virtual Machine’s window, use Ctrl (right) key to let
you move and click out of the Virtual Machine’s window.

Figure 2.18: Installation process (started)


Once the installation is complete, you can start using the Virtual
Machine by clicking “Reboot”.
Figure 2.19: Installation process (completed)
The installation process is shown here as fast forward steps.
The rest of the steps are skipped assuming that the learner is
equipped with the basics of Linux Operating System
installation. In case you are a beginner, get a copy of the book
Linux System Administration (A Hands-on Guide).

Once the booting completes, the similar login screen would be


displayed for the CentOS 7 minimal install.
Figure 2.20: Login prompt of the VM
When you are done with the use of the Virtual Machine, you can
close the Virtual Machine by choosing one of the options shown
when you click to close the Virtual Machine window. Choosing the
first option would save the current state of the virtual machine and
when you start the machine next time, you would be able to continue
from where you left the previous time. If you wanted to shutdown
properly, the second option is used, while choosing the third option
equates to switching off the system using the power off button on a
real system. So, to shut down, choose the second option and click
“OK”.
Figure 2.21: Shutting down the Virtual machine

Further Reading
P. (2016, July 27). CCNA. Retrieved from
https://protechgurus.com/category/virtualbox/page/2/
Chapter 1. First steps. (n.d.). Retrieved from https://www.virtualbox.org/manual/ch01.html
Configuring virtual machines. (n.d.). Retrieved from
https://www.virtualbox.org/manual/ch03.html
Creating a New Virtual Machine in VirtualBox. (n.d.). Retrieved from
https://docs.oracle.com/cd/E26217_01/E26796/html/qs-create-vm.html
How to install VirtualBox on Windows 7, 8, and 10? (2018, January 29). Retrieved from
https://www.smarthomebeginner.com/install-virtualbox-on-windows/
Installation details. (n.d.). Retrieved from https://www.virtualbox.org/manual/ch02.html
Installing and Configuring CentOS 7 on Virtualbox. (2017, February 09). Retrieved from
http://resources.infosecinstitute.com/installing-configuring-centos-7-virtualbox/#gref
ProTechGurus. (2016, July 28). How To Install Windows 10 on VirtualBox. Retrieved from
https://protechgurus.com/install-windows-10-virtualbox/
Stegner, B. (2017, October 18). How to Use VirtualBox: User’s Guide. Retrieved from
https://www.makeuseof.com/tag/how-to-use-virtualbox/
Chapter 3
Creating Adaptors and Cloning VMs
Oracle VM VirtualBox Manager has made working with it very easy.
We have to install a particular Guest Operating System on a Virtual
Machine in VirtualBox only once; then it allows to clone the virtual
machine saving our time and efforts. Also, if multiple VMs are to be
used, we can also create virtual adaptors. In this chapter, we will
look into creating VirtualBox Host-only Ethernet Adaptors and the
clones of a VM.

Host-Only Networking
In Host-Only Adaptor the Host machine and the Guest VMs are on a
private network, where the Host can provide DHCP services to the
Guest VMs. In order to configure the Host-Only networking, we have
to create a required number of VirtualBox Host-only Ethernet
Adapter(s). The requirement of the VirtualBox Host-Only Ethernet
Adaptors actually depends on the number of the guest VMs to be
used for the networking.
By default, one VirtualBox Host-Only Ethernet Adaptor is created
when the Oracle VM VirtualBox Manager application is installed. The
VirtualBox Host-Only Ethernet Adaptor will be listed under the “Host-
only Adaptor” as shown in the following figure.
Figure 3.1: Default VirtualBox Host-Only Ethernet Adaptor
If more adaptors are required as per the networking plan,
accordingly we have to create the required numbers. Assuming that
we require seven VirtualBox Host-Only Ethernet Adaptors excluding
the first adaptor, we will go onto the creation of the adaptors.
Creating VirtualBox Host-Only Ethernet
Adaptors
To create the VirtualBox Host-Only Ethernet Adaptors, in the
VirtualBox Manager Window (Figure 3.2), click on the “Global Tools”.

Figure 3.2: Oracle VM VirtualBox Manager window


The following screen (Figure 3.3) would be displayed. By default,
“Host network Manager” tab would be selected and the “Create”,
“Remove” and “Properties” buttons would be featured. This would
enable us to create new adaptors, remove the existing ones and
check their properties accordingly. In Figure 4.3, the first adaptor,
VirtualBox Host-Only Adaptor is listed and now we can click the
“Create” button to create the second adaptor and add to the list.

Figure 3.3: Host Network Manager window


After clicking the “Create” button, the second adaptor would be
created and added to the list. The second adaptor would be
indicated by “VirtualBox Host-Only Ethernet Adaptor #2”. The
following figure (Figure 3.4) shows two VirtualBox Host-Only
Ethernet Adaptors, the first and the second respectively. However,
unlike the second adaptor, the first doesn’t have any number
indication.

Figure 3.4: VirtualBox Host-Only Ethernet Adaptors


Following the same steps, create the remaining five adaptors by
clicking the “Create” button consecutively. Finally, you would be
having seven adaptors as shown in the figure below:

Figure 3.5: All the VirtualBox Host-Only Ethernet Adaptors listed

Removing VirtualBox Host-Only Ethernet


Adaptors
In case, we have more than the required number of adaptors, we
can delete the excess adaptors by selecting the adaptors and
clicking the “Remove” button. Any time creating new adaptors or
deleting the extra can be done from this window.
Viewing Properties of the Adaptors
Selecting an adaptor and clicking the “Properties” button gives
options either to “Configure Adaptor Automatically” or to “Configure
Adaptor manually”. Selecting either one requires some network
setting details as per the existing network or the planned network. In
the following, VirtualBox Host-Only Ethernet Adaptor #7 is chosen
and the properties are displayed:

Figure 3.6: Configuring Host-Only Ethernet Adaptor automatically


Choosing “Configure Adaptor Automatically” and enabling DHCP
Server would allow the VirtualBox to assign IP addresses and on the
other hand, if we wanted to configure adaptor automatically using the
DHCP Server other than the in-built VirtualBox’s DHCP Server, then
it is recommended to choose “Configure Adaptor Automatically” and
leave the “Enable Server” option unchecked in the DHCP Server tab
as shown below:

Figure 3.7: Disabling VirtualBox’s in-built DHCP Server


The VirtualBox Host-Only Ethernet Adaptors can be set to
“Configure Adaptor Automatically” without enabling the
VirtualBox’s in-built DHCP Server, so that we can use our own
DHCP Server to assign the IP addresses without the
interference of the VirtualBox’s in-built DHCP Server.
Virtual Machine (VM) States
When the attempt is made by the users to close the running Virtual
Machine in the VirtualBox by either clicking the close button or by
pressing the Host and the Q key combination, the VirtualBox would
prompt the user with the options as shown in the following figure
(Figure 3.8):

Figure 3.8: Options for closing Virtual Machine


Depending on your need, choose one of these options and choose
OK. The description of each of these states are explained below:

Save the machine state: The virtual machine will be


stopped from running and VirtualBox completely saves the
VM’s state to the user’s local disk. The virtual machine will
resume operation and the programs will be available from
the point where you left, when you start it again. The user’s
computer will resume operation and the programs will still
be available.
Send the shutdown signal: This option will send the ACPI
shutdown signal to the Virtual Machine, which is similar to
pressing the power button on a real computer.
Power off the machine: This option also permits the virtual
machine to stop running but it does not save the state of the
VM. This option is similar to pulling the power cord from the
real computer hardware which would cause potential loss of
information. In the next start, the system will have to go
through an extensive inspection of the virtual disks. The
same results as powering off the machine will be achieved
when pressing the “Discard” button in the main window of
VirtualBox.
Saving and Discarding VM’s State
While working with the VirtualBox, it pays to save the machine state
sometimes and start the VM whenever we need. This saves the time
taken for not having to start the VM all over again every time we
require to work. So, to save the machine state, choose the VM which
you wanted to save its state and click on the close button. Upon
clicking the close button, the options as shown in the following figure
would be displayed; choose “Save the machine state” and click “OK”.

Figure 3.9: Saving the virtual machine state


Once the machine state is saved, the corresponding VM state would
appear as saved in the VirtualBox VM list as shown in the following
figure (Figure 3.10):

Figure 3.10: Saved machine state


If the machine state had been saved successfully, we will find the
“Discard” button enabled in the display menu. So, if you wish to
discard the saved machine state, simply clicking the “Discard” button
would remove the saved details of the VM and the next time when
we require to work with the VM, we won’t be able to continue from
the point where we left earlier.
Cloning VMs
Cloning a Virtual Machine will result in the creation of an exact copy
of the selected virtual machine in the VirtualBox. Cloning saves the
time that otherwise would be spent in creating a virtual machine with
similar features and settings. Cloning a virtual machine is useful in a
number of ways. For example, if you wanted to do some
experiments with a virtual machine configuration or want to test the
different guest operating systems or want to take the backup a VM,
creating a clone of a virtual machine would be a wise decision. In
this section, we will learn to make clones of the virtual machines.
Assuming that the CentOS on the virtual machine (CentOS-FTP-Srv)
is required to be cloned, we will proceed with the cloning of the
virtual machine.
Launch the Oracle VM VirtualBox Manager and select the desired
virtual machine from the list to be cloned, if in case you have multiple
virtual machines created. In the figure 3.11, CentOS-FTP-Srv is
going to be cloned. Since it is only the virtual machine, by default it
gets selected.
Before you start to clone, make sure that the selected virtual
machine is not in the “Saved” sate. If it is in the saved state, we
have to discard the saved state and then only start to clone.
Figure 3.11: Selected Virtual Machine in the list
To create a clone, after selecting, right-click and click Clone in the
options provided as shown in the figure 3.12:

Figure 3.12: Showing the clone option


You will be prompted to choose a name for the clone and asked
whether you want to reinitialize the MAC of the network card(s)
included with the machine. In the virtual machine name field, you can
set to something different from the machine (base) where you are
cloning from and must choose the “Reinitialize the MAC address of
all network cards” option. Here, the name is set to CentOS-DHCP-
Srv and the option is chosen to reinitialize the MAC addresses of the
network cards as shown in the figure 3.13. Click “Next” to continue.

Figure 3.13: Naming the clone and reinitializing network cards


We have the option to either choose the “Full clone” or the “Linked
clone”. Choosing the “Full clone” would create independent disks for
the cloned virtual machine which will enable us to move resources
easily around. So, choose the “Full clone” option and click the
“Clone” button to proceed.

Figure 3.14: Choosing the Clone Type


Upon the completion of the cloning process, the cloned virtual
machine will appear in the virtual machine list with the name which
we have specified to change.

Figure 3.15: Showing the Cloned VM in the list

Further Reading
Canepa, G. (n.d.). Cloning, exporting, importing, and removing virtual machines in
VirtualBox. Retrieved from
https://www.systemcodegeeks.com/virtualization/virtualbox/cloning-exporting-importing-
removing-virtual-machines-virtualbox/
Host-only Networking in VirtualBox. (n.d.). Retrieved from
http://condor.depaul.edu/glancast/443class/docs/vbox_host-only_setup.html
Host-only Networking in VirtualBox. (n.d.). Retrieved from
http://condor.depaul.edu/glancast/443class/docs/vbox_host-only_setup.html
ProTechGurus. (2016, July 29). How To Clone Virtual Machine in VirtualBox. Retrieved from
https://protechgurus.com/clone-virtual-machine-virtualbox/
VirtualBox 5: Saving the State of the Machine - GROK Knowledge Base. (n.d.). Retrieved
from https://software.grok.lsu.edu/article.aspx?articleid=13463
Wallen, J. (n.d.). Clone and move virtual machines in VirtualBox. Retrieved from
https://www.techrepublic.com/blog/tr-dojo/clone-and-move-virtual-machines-in-virtualbox/
Chapter 4
Exporting and Importing Appliances
In the situations, where you will have to copy the virtual machine files
from one system to another system, exporting and importing the
virtual machines as a virtual appliance (VA) is a good way. A virtual
appliance is a virtual machine file which consists of a pre-configured
operating system (OS) environment as a single application.
Exporting the virtual machines as appliances is one of the easiest
and most reliable ways to move VMs from one host to another host.
In this section, we will learn to export the virtual machines as a
virtual appliance and import it to another system.

Exporting as Virtual Machine as Appliance


To export the virtual machine as an open virtual appliance (OVA),
launch the Oracle VM VirtualBox Manager, go to the “File” menu and
then to the “Export Appliance” as in figure 4.1:
Figure 4.1: Exporting Appliance menu
In order to be able to export as an appliance, your selected
virtual machine should not be running. In case if it is running, it
must be powered-off. Even if the virtual machine is in the saved
state, the exporting will not be allowed unless the saved state is
discarded.
In the window presented after choosing “Export Appliance”, locate
and select the Virtual Machine to be exported and click Next (Figure
4.2).

Figure 4.2: Virtual Machine selection for exporting as an appliance


In the next, we are supposed to give a name for the exported
appliance file with an extension and browse to the location to save
the exported appliance file (Figure 4.3).

Figure 4.3: Exported Appliance Settings


By default, the exported file will be saved with ova extension in
the default location. If the extension is ova, the appliance is
going to be in a single file whereas if ovf extension is chosen,
several files are going to constitute the exported appliance. Just
keeping to the defaults should be working fine.
In the appliance settings, leaving the information, click the “Export”
button to start the exporting process.

Figure 4.4: Appliance settings


The exporting process would take few minutes to complete and once
the process gets completed, the exported appliance with an ova
extension is expected to be in the location you have selected for
saving. Copying it and saving it to the other safe locations will not
have any problem with the exported file.

Figure 4.5: Exported Virtual Machine as an appliance


Importing Virtual Machines as Appliance
In the previous part, we have learned how to export a virtual
machine as an appliance, in which the exporting process bundled all
of the virtual machine resources into a single file with an ova
extension. Now, to import the virtual machine, go to “File” menu and
then choose “Import Appliance” as in Figure 4.6:

Figure 4.6: Import Appliance option


In the next, you will then be prompted to browse your system to look
for the file with an ova extension as shown in Figure 4.7 and then
click “Next”.

Figure 4.7: Browsing to the file location for importing


In the appliance settings information, the name must not be same as
the already existing virtual machine. If the virtual machine with the
same name exists, then change the name to something different by
double-clicking. In figure 4.8, the name of the virtual machine is
changed to CentOS-Web-Srv, leaving the rests of the settings as it is
and the “Reinitialize the MAC address of all network cards” option is
checked. To proceed, click the “Import” button.

Figure 4.8: Import Appliance settings


During the process of importing, the appliance and storage
settings of the virtual machine would be shown as they were set
originally when it was first created. You can edit those settings
and information by double clicking on the corresponding textbox
and enter the desired value.
Importing of the virtual machine would take few minutes to complete
and will result in creating a virtual machine with the name specified
in the appliance settings. In figure 4.9, CentOS-Web-Srv is the
imported appliance from the file.

Figure 4.9: List of Virtual Machines


Removing Virtual Machines
It so happens that some of the virtual machines which we have used
for testing the configurations can serve no purpose; keeping those
virtual machines would just occupy space and the list become long.
It is a good idea to delete one or more of such virtual machines
which serves no good purpose.
To delete the intended virtual machine from the list, select and right
click on the virtual machine in the list as shown in the figure 4.10 and
choose “Remove”.

Figure 4.10: Removing Virtual Machine option


We will not be allowed to remove a running virtual machine. For
this we have to power off the virtual machine and then only
remove it from the list.
In the next screen, we are prompted to choose one of the options. To
remove the virtual machine along with its virtual hard disks, click
“Delete all files” button as in the figure 4.11.

Figure 4.11: Removing virtual machine


Self Activity:
Applying the concept of creating the virtual machines, installing the
operating system and cloning; create at least 6 virtual machines with
CentOS operating system and then also create one virtual machine
for installing Windows (Windows XP, Windows 7, Windows 8 or
Windows 10).
In the Figure 4.12, CentOS-DHCP-Srv, CentOS-Web-Srv, CentOS-
DNS-Srv, CentOS-Mail-Srv, CentOS-Yum-Srv are clones made from
CentOS-FTP-Srv (Base) and Windows 7 a new virtual machine
created with Windows 7 as the operating system.

Figure 4.12: Cloned and new Virtual Machines created

Further Reading
4.7.2 Exporting Virtual Machines to Virtual Appliances. (2017, October 03). Retrieved from
https://docs.oracle.com/cd/E64076_01/E64081/html/vmcon-repositories-assemblies-
export.html
D. (2017, September 13). How to Import/Export OVA Files in VirtualBox. Retrieved from
https://www.maketecheasier.com/import-export-ova-files-in-virtualbox/
Stanisic, S. (2017, January 09). Exporting virtual machine as an appliance in the Oracle
VirtualBox. Retrieved from https://mivilisnet.wordpress.com/2016/04/04/exporting-virtual-
machine-as-an-appliance-in-the-oracle-virtualbox/
VirtualBox 5: Importing and Exporting Virtual Machines - GROK Knowledge Base. (n.d.).
Retrieved from https://software.grok.lsu.edu/article.aspx?articleid=13838
Wallen, J. (n.d.). How to import and export VirtualBox appliances from the command line.
Retrieved from https://www.techrepublic.com/article/how-to-import-and-export-virtualbox-
appliances-from-the-command-line/
Chapter 5
Integrating VMs with GNS3
Till this point, we have created virtual machines and the clones of it
in the Oracle VM VirtualBox Manager for CentOS and Windows 7. In
order for us to be able to use the virtual machines inside the GNS3
virtualized network, we have to link virtual machines existing in the
Oracle VM VirtualBox to the GNS3 so that those VMs would be
available for use in the GNS3 topologies. In this section we will learn
to add the existing VMs to the GNS3.

Adding VMs
Launch the GNS3 application, close the Project dialog box if it
appears as shown in figure 5.1.

Figure 5.1: Launching the GNS3 application


Then go to the “Edit” menu and then click “Preferences” button. The
following screen would be displayed and from the list, select the
“VirtualBox VMs” using the mouse and then click “New” button to
start adding the VMs to the GNS3.

Figure 5.2: VirtualBox VM templates


The GNS3 and the VirtualBox are interconnected, and the GNS3 has
the knowledge of where to find VMs. When the “New” button is
clicked, GNS3 would take a moment to populate the list of VMs
available in the VirtualBox and it will list in the VM list dropdown list.
From the populated dropdown list, select whichever VM is desired to
be available in the GNS3 network topologies and click “Finish”
button. As in figure 6.3, I want CentOS-FTP-Srv to be available in
the GNS3 topology, so I choose it from the list and click “Finish”.

Figure 5.3: Choosing from the populated VM list


Immediately after the “Finish” button is clicked, the VM will be listed
in the VirtualBox VM templates list with other details. Click the
“Apply” button and if other VMs are desired to be available in the
GNS3 topology as well, click the “New” button and follow the same
procedure.

Figure 5.4: Linking the selected VM to GNS3


Finally, when all the VMs are linked and listed, click “OK” to apply the
changes. In figure 5.5, all the VMs that I wish to be available for use
in the GNS3 topology are listed in the VirtualBox VM template,
including the Windows 7 VM. Now click “OK” to apply the changes
and the VMs should be available for use.

Figure 5.5: All the VMs listed


Browsing End Devices
After that, if we go to “Browse End Devices” (circled) in figure 5.6,
then choosing the “Installed category” of the End devices, all the
VMs which we have linked would appear in the list. In case, any of
the devices are not listed, follow the steps required for adding the
VMs and continue.

Figure 5.6: Browsing for the End Devices

Further Reading
Import VirtualBox VM template to GNS3. (2016, January 24). Retrieved from http://www.it-
tutorials.net/import-virtualbox-vm-template-to-gns3/
Install an appliance from the GNS3 Marketplace. (n.d.). Retrieved from
https://docs.gns3.com/1MAdxz0BSEAfGM7tA-w-o3TMmf8XOx7nBf0z6d9nRz_c/
Integrating GNS3 and VirtualBox. (n.d.). Retrieved from
https://digi.ninja/blog/gns_vbox_basic_lab.php
Technical Documentation. (n.d.). Retrieved from
https://docs.cumulusnetworks.com/display/VX/GNS3 and VirtualBox
Using VirtualBox linked clones in the GNS3 network simulator. (2017, January 03).
Retrieved from http://www.brianlinkletter.com/using-virtualbox-linked-clones-in-the-gns3-
network-simulator/
Video - How to Connect GNS3 to VirtualBox in Windows 8. (n.d.). Retrieved from
https://www.interfacett.com/blogs/how-to-connect-your-gns3-environment-to-a-virtual-box-
in-windows-8/
VMs in GNS3: Add VirtualBox servers to your network lab. (2018, March 09). Retrieved
from https://www.ictshore.com/gns3/vms-in-gns3-virtualbox/
Chapter 6
Creating a GNS3 Network Topology
We have looked into the installation and the configuration of the
required applications for building a virtualized network. To continue, it
is presumed that all the required applications are installed and
configuration is being made accordingly by following the previous
chapters. As we go on, you would be getting familiarized with the
toolbars and the interface slowly. To begin with, we will create a
small network as a test bed for learning purpose.

Creating and Saving Projects


Launch the GNS3 application, click on the New Blank Project button
indicated with an arrow in figure 6.1. Give a name of the project and
click “OK” button to create a project keeping the location to the
default.

Figure 6.1: Creating a new project


After the project is being created, you would be able to drag and
drop the devices to the workspace. First, we will drag and drop a
cloud to represent an Internet in our project (Network-One). For this,
you can click on the Browse End Devices (1) and the list of end
devices would be displayed. Choose the Cloud (2), drag and drop to
a location as desired (3) in the workspace. The cloud should appear
in the workspace as shown in figure 6.2.

Figure 6.2: Creating a Cloud to represent the Internet


After adding a cloud, we will bring a router to the workspace by
clicking on the Browse Routers (1), and then choose the available
router (2). Drag and drop the desired router to a location in the
workspace as shown in figure 6.3.

Figure 6.3: Creating a router


In the next, we will drop the Ethernet switch into the workspace. In
order to create an ethernet switch, click on the Browse switches (1),
choose Ethernet switch (2) and then drag and drop it into the
workspace as shown in figure 6.4.

Figure 6.4: Creating an Ethernet switch


In a similar way, we will add one appliance (Windows 7) into the
workspace by clicking on the Browse End Devices (1), choosing
Windows 7 (2) and dragging and dropping into the workspace as
shown in figure 6.5.

Figure 6.5: Creating Windows 7 (end device)


Configuring the Windows 7 (End device)
Before we give connections to the devices, we need to configure the
appliance to allow the GNS3 to use any configured VirtualBox
Adaptor. For this, right-click on the Windows 7 placed in the
workspace and click on the Configure as indicated in figure 6.6.

Figure 6.6: Configuring Windows 7


Upon clicking the configure option, the following window would be
displayed. Choose the Network Tab (1), tick “Allow GNS3 to use any
configured VirtualBox adaptor” (2), apply the setting and click “OK”.

Figure 6.7: Allow GNS3 to use any configured VirtualBox adaptor


Creating Links Between the Devices
In order to create the links between the devices, click on the “Add a
Link” button and take the mouse to the workspace where the devices
are placed. The mouse cursor would change to a plus like sign (+),
with that left-click on the Cloud-1 and the “Ethernet” option would
appear. Click on the “Ethernet” option and then take your cursor to
the router (R1) and left-click. Two interfaces as options would appear
to choose from in order to connect the Cloud-1 (1) and the router
(R1). Just to follow, choose FastEthernet0/0 and the connection
between the Cloud-1 and the router (R1) would be complete with
that.
To connect the router (R1) and the Ethernetswitch-1, click on the
router and choose the other interface which is not in use
(fastEthernet0/1) and then when you click on the Ethernetswitch-1,
you would be shown a number of interfaces to choose. Just to follow
choose Ethernet0. This completes the connection between the router
(R1) and the Ethernetswitch-1.
Finally, to complete the connection between the Ethernetswitch-1
and the Windows 7-1, after clicking Ethernetswitch-1, choose
Ethernet1 from the options and then choose Ethernet0 from
Windows 7-1.
Figure 6.8: Complete links between the devices
Once the adding of the links is completed, press the Esc key on the
keyboard to enable you to carry out other tasks. At this point your
cursor must be changed to the normal one.
Status of the Devices and Nodes
In the GNS3 workspace, the Cloud and the generic Ethernet
Switches are always on (started) by default. The links of connections
on these devices and nodes are shown by green circular points
indicating that the devices are started or kept on.
On the other hand, the routers and appliances are not started by
default. The red square points on the connection links indicate that
the devices and nodes are powered-off or not yet started. Once
these devices are started, the red square points would change to
green circular points. In the following figure 6.9, the router (R1) and
Windows 7-1 are off, which is why the links bear red square points.

Figure 6.9: Status of the devices and nodes


Verifying the Network Adaptors
To start using the devices placed in the workspace, we have to start
the devices whichever are required, but before that it is important to
verify the network adaptors assigned to the appliances. A single
network adaptor must not be assigned to more than one appliance.
To verify, launch the Oracle VM VirtualBox Manager, choose the
appliance for which the adaptor is to be verified, right-click on the
selected appliance which is used in the GNS3 workspace and
choose the Settings.

Figure 6.10: Settings option


In the Settings window, select Network (1) and then on the Adaptor 1
tab, choose “Host-only Adaptor”. In the next, choose the VirtualBox
Host-only Ethernet Adaptor whichever is not assigned to other
appliances. Check the “Cable connected” option and click “OK”
button.

Figure 6.11: Settings window


In the above figure 6.11, the VirtualBox Host-only Adaptor #2
must not be assigned to any other appliances since it is
assigned to Windows 7. If you have multiple appliances used
on the GNS3 network, the adaptor must be verified for any
possible double assignment to avoid problems.

Starting the Devices


To be able to make use of the devices, we have to start the devices.
The devices can be started all at a time or one by one. To start the
devices all at a time, the play-like button (Start/resume all nodes)
must be clicked. This will start or resume all the suspended or
stopped nodes placed in the GNS3 network.
Figure 6.12: Starting or resuming all the nodes
If we want to start the nodes individually, we have to right-click the
node to be started and choose the “Start” option as indicated in the
figure below.

Figure 6.13: Starting the selected node individually


Finally, if we have started all the required nodes, the points on the
connection links would appear as green circular points as in the
following figure.

Figure 6.14: All the nodes started


Since the Oracle VM VirtualBox Manager and the GNS3 are linked,
when the individual virtual machines are started from the GNS3
network, the virtual machines’ operating systems would start to boot
and appear as shown in the figure below.

Figure 6.15: Started Virtual Machine linked to the GNS3

Further Reading
Configuring the GNS3 Topology. (n.d.). Retrieved from
https://www.freeccnaworkbook.com/workbooks/ccna/configuring-the-free-ccna-workbook-
gns3-topology
Connecting GNS3 to Real Networks. (2016, March 14). Retrieved from
http://www.smartpctricks.com/2014/06/connecting-gns3-real-networks.html
GNS3 Graphical User Interface. (n.d.). Retrieved from
https://docs.gns3.com/1NjJlvu176VG4mq7qAl4wDo79P7pmOaiaa-c7kW5htuo/index.html
Network device simulation with GNS3. (n.d.). Retrieved from https://frinx.io/ftpp/network-
device-simulation-with-gns3
Your First GNS3 Topology. (n.d.). Retrieved from
https://docs.gns3.com/1wr2j2jEfX6ihyzpXzC23wQ8ymHzID4K3Hn99-qqshfg/
Chapter 7
Configure and Test Network
Once the creation of the network topology in the GNS3 is completed,
it is time for us to be able to access the nodes and start configuring.
In this chapter, based on the network topology created in the
previous chapter, we will access the nodes and configure, so that the
virtual network becomes functional. Finally, the configured network
created in the GNS3 will be tested for the functionality.

Network Scenario
Before we go onto accessing and configuring the nodes, let us
consider the following network scenario to get a clear picture of the
sample network. In this network, the cloud which is connected to the
ethernet adaptor of the host computer is treated as a connection to
the internet. On the interface 0/1 of the router (R1) the IP address
assigned is 172.168.30.1/24 and the other consideration is, the
Windows 7 device would be assigned the IP address dynamically
from the DHCP service configured on the router (R1), where NAT is
also configured on the same router.
Finally, when the configurations are completed, the Windows 7
device should be able to browse and access the web services
hosted outside of this network.
Figure 7.1: Network scenario
Accessing and Configuring Router
Once the router is being started, to configure it we have access to it.
Unlike the virtual machines, the routers when started doesn’t show
up for access immediately. We can have access to the router’s
console by right-clicking the router and choosing the “Console”
option.

Figure 7.2: Opening the router’s console for access


By clicking on the console option, the selected router’s console
would be opened for making configuration changes to the particular
router. If the configurations have to be made, we can make it using
the console.

Figure 7.3: The router’s console


The other way to access the router is by using the “Console connect
to all nodes” button. However, when we use this button, the consoles
of all the nodes would be opened up for us.

Figure 7.4: The “Console connect to all nodes” button


Configuring Router’s Interface 0/0
To configure the router’s interfaces, we will use the console and the
following commands can be used for configuring the first interface to
get an IP address assigned from the host network’s DHCP. Although,
technically, assigning IP address to a router is not recommended for
a production environment, we are doing here since we are not
having access to the real ISP. The host network is assumed as an
ISP for our virtual network.
R1# conf t
R1(config)# interface fastEthernet 0/0
R1(config-if)# ip address dhcp
R1(config-if)# no shutdown
R1(config-if)# end
R1# wr
R1# show ip interface brief
Configuring Router’s Interface 0/1
As per the scenario we have, assign 172.168.30.1/24 on to the
router R1’s interface f0/1 which is connected to the switch.
R1#conf t
R1(config)#interface fastEthernet 0/1
R1(config-if)#ip address 172.168.30.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#end
R1#wr
Configuring DHCP Service
For the devices used in the workspace to receive the IP addresses
from the router, the following commands can be used to configure
the DHCP service on the router.
R1#conf t
R1(config)#ip dhcp pool internal-clients
R1(dhcp-config)#network 172.168.30.0 255.255.255.0
R1(dhcp-config)#default-router 172.168.30.1
R1(dhcp-config)#dns-server aaa.bbb.ccc.ddd
R1(dhcp-config)#end
R1#wr
In the above, in the place of aaa.bbb.ccc.ddd, you are expected
to use the DNS server’s IP address of your network.

Configuring NAT
The following commands can be used for configuring the NAT on the
router so that the devices which are assigned IP addresses by the
DHCP service configured on the router would be able to make a
request to the computers on the internet.
R1#conf t
R1(config)#access-list 1 permit 172.168.30.0 0.0.0.255
R1(config)#ip nat inside source list 1 interface fastEthernet 0/0 overload
R1(config)#interface fastEthernet 0/1
R1(config-if)#ip nat inside
R1(config-if)#exit
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip nat outside
R1(config-if)#end
R1#wr
Testing the Network
The basic configuration required is completed and the client device
(Windows 7) in the GNS3 network should be able to get the IP
address assigned dynamically and also should be able to browse the
internet.
For the verification, use the ipconfig command in the Windows 7
virtual machine’s command prompt. The details of the IP address
assigned would be shown in the output section of the command
prompt as shown below.

Figure 7.5: Assigned IP details on the Windows 7 device


The same concept of creating a network topology in GNS3,
configuring and testing the network can be applied to other networks
of similar nature.
Further Reading
ProTechGurus. (2016, July 16). How to Connect Router to Cloud in GNS3. Retrieved from
https://protechgurus.com/connect-router-cloud-in-gns3/
ProTechGurus. (2016, August 31). How To Use VPCS in GNS3. Retrieved from
https://protechgurus.com/how-to-use-vpcs-in-gns3/
Step By Step Using And Configuring GNS3 Cisco Router simulator. (2010, May 25).
Retrieved from https://www.routemybrain.com/step-by-step-using-and-configuring-gns3-
cisco-router-simulator/
VPCs Tutorial. (2014, August 16). Retrieved from https://rednectar.net/archives/vpcs-
tutorial/
Wilkins, S. (2012, July 11). Basic Configuration for GNS3 Labs. Retrieved from
https://www.pluralsight.com/blog/tutorials/basic-configuration-for-gns3-labs
Your First Cisco GNS3 Topology. (n.d.). Retrieved from https://docs.gns3.com/1d1huu6z9-
wWGD_ipTSQZqy2mpaxiqzymu-YQo6at_Jg/index.html

You might also like