You need to prepare packages as part of pre-requisites:
- libelf-dev
- libpcap0.8-dev
- cmake
- g++
- dynagen (https://packages.debian.org/wheezy/all/dynagen/download)
- ifconfig (net-tools)
- bridge-utils
Installing libelf-dev and libpcap0.8-dev:
:# apt-get install libelf-dev && apt-get install libpcap0.8-dev
Installing g++:
:# apt-get install g++
Installing cmake:
:# wget http://www.cmake.org/files/v2.8/cmake-2.8.3.tar.gz
:# tar xzf cmake-2.8.3.tar.gz
:# cd cmake-2.8.3
:# make
:# make install
Installing dynagen:
Add this line to /etc/apt/sources.list repo:
deb http://ftp.de.debian.org/debian wheezy main contrib
:# apt-get update
:# apt-get install dynagen
Installing dynamips:
:# git clone https://github.com/GNS3/dynamips
:# cd dynamips/
:# mkdir build && cd build
:# cmake ..
Ok, let’s enjoy it by your own self.
Let’s start from easy part.
This is the topology.
You can refer to this tutorial. (http://www.netexpertise.eu/en/systems/linux/virtual-cisco-router.html)
We are going to create bridge to connect PC and router.
:# brctl addbr br0
:# ifconfig br0 up
:# ifconfig eth1 0.0.0.0
:# brctl addif br0 eth1
:# ifconfig br0 10.10.105.200 netmask 255.255.255.0 up
Notes:
– br0 is the bridge
– eth1 is an non main IP interface (it can be eth1 or others)
– br0 and eth1 IPs can be defined.
Build your own config file
Let’s create the file
As Example: config.net
:# nano config.net
Fill this configuration to config.net
[localhost]
[[ 7200 ]]
image = /root/c7200-js-mz.124-3.bin
ram = 128
[[ROUTER R1]]
console = 2001
f0/0 = NIO_tap:tap0
Notes:
– Don’t forget to download the cisco c7200 image.
– If you don’t have internet quota for connecting you to the world, please reach the closest Wifi corner.
For open port to dynamips, kindly execute this syntax.
:# dynamips -H 7200 &
The syntax above is used to make it run in the background process.
Next, run the dynagen.
:# dynagen <config file>
:# dynagen config.net
Connect the router to bridge.
:# brctl addif br0 tap0
:# ifconfig tap0 up
Next, check connection with telnet.
:# telnet localhost <console number>
Console number was gotten by running dynagen config. It will bring you to the console and run list, it will return number, called consolle number.
Try to check connection to your bridge.
:# ping <your IP bridge>
Maybe that’s all for now. Thanks!
Notes:
Translated from: https://medium.com/@boysuganda7/documentation-of-using-dynamips-cisco-c7200-5054fa4c44fc