Last changed: 19.04.2017
Setup Cisco Lab with GNS3
Cisco devices can be found in many networks worldwide. To test attacks and to search for vulnerabilites it can be handy to have a flexible lab which can emulate different devices.
The following describes how such a lab can easily be setup with the Graphical Network Simulator 3.
install Ubuntu VM
I chose Ubuntu 16.04 as a Virtualbox VM and added another network interfaces. In the advanced network settings of the VM promiscuous mode has to be allowed for both interfaces.
install GNS3 in Ubuntu
The recent version of GNS3 can be installed by adding a ppa.
sudo add-apt-repository ppa:gns3/ppa
sudo apt-get update
sudo apt-get install gns3-gui
download Cisco image
You can find a list of recommended Cisco images on
docs.gns3.com.
As I was testing the lab setup from the book "Gray Hat Hacking" I chose
c3725-adventerprisek9-mz.124-15.T14.bin
.
start gns3
To prevent the Ubuntu OS from interfering in our network settings I recommend disabling the NetworkManager. Afterwards the GNS3 server and client can be started.
sudo systemctl stop NetworkManager
sudo systemctl disable NetworkManager
sudo ip l s enp0s3 up
sudo ip l s enp0s8 up
gns3-server --local
gns3
add a new router
A new router can be added via the menu in GNS3.
Edit -> Preferences...
Dynamips -> IOS routers -> New
The default settings should do. Use the Idle-PC finder to automatically determine the optimal value.
setup network
In the test lab we connect the network interfaces of the virtual router with the network interfaces of the Ubuntu VM. We can achieve this by using the icons on the left side of our GNS3 window and right click on the device to configure respectively. I added two seperate clouds to improve readability.
Browse Routers -> drag and drop Cisco device
Browse End Devices -> add two clouds
configure clouds -> add one linux ethernet NIO to each cloud
Add a link -> Cisco fa0/0 to cloud1
Add a link -> Cisco fa0/1 to cloud2
import config file in router
start router and open console
Now we can connect other VMs in Virtualbox with the network interfaces of the Ubuntu VM and are connected with the virtual Cisco router.