0% found this document useful (0 votes)
21 views

GNS3+0.7.2使用手册+v2

The document is a quick start guide for installing GNS3 version 0.7.2 on Windows, Linux, and Mac OS, detailing the necessary steps and components for setup. It includes links to relevant resources and instructions for installing dependencies like Dynamips and Qemu. The guide provides specific commands for various Linux distributions, including Debian, Ubuntu, and CentOS, to facilitate the installation process.

Uploaded by

Badal Aseh
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)
21 views

GNS3+0.7.2使用手册+v2

The document is a quick start guide for installing GNS3 version 0.7.2 on Windows, Linux, and Mac OS, detailing the necessary steps and components for setup. It includes links to relevant resources and instructions for installing dependencies like Dynamips and Qemu. The guide provides specific commands for various Linux distributions, including Debian, Ubuntu, and CentOS, to facilitate the installation process.

Uploaded by

Badal Aseh
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/ 100

Graphical Network Simulator

GNS3 Windows
Linux MAC OS Cisco IOS GNS3 dynagen
TOP, dynagen net Cisco IOS
dynamips.

GNS3 0.7.2 Cisco Router Cisco ASA Cisco PIX Cisco IDS/IPS Juniper
Router qemu
Wireshark TOP

GNS3

http://www.gns3.net GNS3’s primary Web site


http://wiki.gns3.net GNS3’s Wiki site
http://www.ipflow.utc.fr/blog/ Dynamips blog
http://dyna-gen.sourceforge.net/ Dynagen
http://www.ipflow.utc.fr/bts/ Dynamips/Dynagen bug tracking
http://7200emu.hacki.at Hacki’s forum
http://www.netemu.cn/bbs/ Netemu
bbs.net527.cn

1
By www.netemu.cn/bbs & bbs.net527.cn
GNS3 Quick Start Guide for Windows Users
1 GNS3 0.7.2
http://cdnetworks-kr-2.dl.sourceforge.net/project/gns-3/GNS3/0.7.2/GNS3-0.7.2-win32-all-in-one.exe

2 GNS3 0.7.2 next (win7 )

2
By www.netemu.cn/bbs & bbs.net527.cn
@ GHS 3 o. 1. 2 S et up _ 1 1:1 1囚 l
Choose Start tdenu Folder
Ch 口口5 日 a 5tart 阿巴 nu f 口 Ider f口 r the GN53 日, 7 , 2sh口 rtcuts ,

5elect the 5tart 问 enu folder in which y口 uw口 uld like to cr田 te the 口「口 gram's sh口 rtcuts , you
can als 口 enter a name t口 create a new f 口 Ider ,

l理
写E主主卫士
Acunetix web Vulnerability 5 日 nner 6

~
Ad口 be Design Premium C53
Aut 口 it ACN
Bochs 2 .4, 5
B口 rland 口el口 hi 7
C口 deGear Rad 5tudi口 2日口9
口 ynagen
Excel工且暗
GN53
Kmplayer plus
Lazarus

NwllsoftInstall 5ystem 112.44

l <~础 II 哇哇? j [ Cancel

@ GHS3 O. 1. 2 Setup 回国国 l


Choose Components
Ch 口口 se which features 口 f GN53 日, 7 , 2γ口 u want t 口 install ,

Check the c口 mp口 n日 nts y口 u want t口 install and uncheck the c 口 mp口 nents y口 ud口 n't want t 口
install , Click Next t口 E口门 tinue ,

5日 lect c 口 mp口 nents to install:

Dynamips 口, 2 , 8 RC2
回 Qemu 口, 11 ,口口atched
回 GN53 身寄电睛里口包盟主
过此软件 p 这里
早用矗择了

5pace required: 56 , 6 问E

Nwllsoft Install5ystem 112 , 44

I <~础 l~ Next > ~ [ Cancel I

3
By www.netemu.cn/bbs & bbs.net527.cn
m 叩S3 O. 1. 2 Setu 回国国 l
Choose I nstall Location
Ch 口口 se the f口 Ider in which t 口 install GNS3 日 .7.2.

Setu 口 will install GNS3 口 .7.2 in the f口11 口 wing f口 Ider. T口 install in a different folder J click Br口wse
and 5日 lect an 口 ther f口 Ider. Click Install t口 start the installati 口 n.

Destinati 口 nF口 Ider

Ml~回国咱国国 I [ B[I
Space required: 56.6 问E
Space availabl曰: 7.7G 日

Nulls口ft Install5ystem '1 2.44

[ <~础 l~时

@ GHS3 O. 1. 2 Setup 国. .
Inslalling
Please wait while GNS3 日 .7.2 is being installed.

-- v--aE ... E muwr RdnvnvE


E巳 护llI

E
n『 ­
L「」 - ­


X

trk
E

E - - - - - - F- -


E
­
L电

Extr act: bz2. 口 yd


Extract: c口 nfigs口ec
Extr act: dynamips-start. cmd
Extr act: gns3. exe
Extract: g门 s3.ic口
Extract: libgcc_s_dw2-1.dll
Extr act: mingwm 1 日 .dll
Extr act: msvcr9口 .dll
Extr act: putty. exe
Extract: 口γth口门26.dll
Extr act: pywintypes26. dll 星|
Extr act: qemuwr apper. exe
.~JI
Nulls口ft Install5ystem '1 2.44

< Back Next> Cancel

4
By www.netemu.cn/bbs & bbs.net527.cn
3 GNS3

gns3 GNS3 GNS3


GNS3 :

5
By www.netemu.cn/bbs & bbs.net527.cn
TOP 中设备之
TOP绘制区域 问端口连接的
状态,~及设
备运行状态

Frame R elay 时 it由

PC 虚拟网络设备型
MubSI'I 号选择区填 Dyn.g四 m 四.g.m."t oo"sol. for Dynamips (.d.pt.d for GlIS 3)
Copyri ght (0) 2008 GlIS 3 Proj .ot

=>
控制台区域,可~完全使用
d...nagen 的命令

瞌 λ 或者量 λ 所有虚斟世岳
阳配置宜件
停止所布置备
编量工程主

口O

显示在 b 名薛 telnetß 所高 IOS

--> IOS hypervisors IOS Hypervisors

6
By www.netemu.cn/bbs & bbs.net527.cn
IOS IOS

7
By www.netemu.cn/bbs & bbs.net527.cn
4
Perferences

General 3 GNS3 GUI

8
By www.netemu.cn/bbs & bbs.net527.cn
9
By www.netemu.cn/bbs & bbs.net527.cn
Dynamips dynamips hypervisors

10
By www.netemu.cn/bbs & bbs.net527.cn
Capture:

Qemu
GNS3 ASA,Juniper

11
By www.netemu.cn/bbs & bbs.net527.cn
GNS3 Quick Start Guide for Linux Users
GNS3 on Debian Squeeze for 32bit/64bit apt-get
debian-testing-i386-kde-CD-1.iso //32bit debian
debian-testing-amd64-kde-CD-1.iso //64bit debian
1.

2. dx.mirrors.sohu.com mirrors.163.com
apt-get update
apt-get install kdebase // 400 MB 1G kdebase
GNS3 pyqt,qt4,sip,python
apt-get install gns3 // GNS3, dynamips

12
By www.netemu.cn/bbs & bbs.net527.cn
GNS3 on Ubuntu 10.04 for 32bit/64bit apt-get
1. dx.mirrors.sohu.com mirrors.163.com

2. :

3. à à

13
By www.netemu.cn/bbs & bbs.net527.cn
4. deb http://mirrors.163.com/debian sid main non-free

5.

apt-get update

, :NO_PUBKEY
EA8E8B2116BA136C

apt-key adv --recv-keys --keyserver keyserver.Ubuntu.com 16BA136C

EA8E8B2116BA136C 8

apt-get update

6. gns3 gns3

14
By www.netemu.cn/bbs & bbs.net527.cn
GNS3

15
By www.netemu.cn/bbs & bbs.net527.cn
qt4-qtconfig python-sip python-qt python

16
By www.netemu.cn/bbs & bbs.net527.cn
GNS3 0.7.2 on Debian/Ubuntu 32bit/64bit
For 32bit

1.
apt-get install build-essential python2.5 python-sip4 python-qt4 dynagen

2. GNS3
wget http://cdnetworks-kr-2.dl.sourceforge.net/project/gns-3/GNS3/0.7.2/GNS3-0.7.2-src.tar.bz2
tar zxvf GNS3-0.7.2-src.tar.bz2 -C /opt
cd opt
mv /opt/GNS3-0.7.2-src /opt/GNS3
mkdir /opt/GNS3/Dynamips
mkdir /opt/GNS3/IOS

3. Dynamips x86
cd /opt/GNS3/Dynamips
wget http://www.ipflow.utc.fr/dynamips/dynamips-0.2.8-RC2-x86.bin
chmod +x ./dynamips-0.2.8-RC2-x86.bin

4. KDE GNOME
python "/opt/GNS3/gns3"

For 64bit

1.
apt-get install build-essential python2.5 qt4-dev-tools pyqt4-dev-tools dynagen

2. GNS3
wget http://cdnetworks-kr-2.dl.sourceforge.net/project/gns-3/GNS3/0.7.2/GNS3-0.7.2-src.tar.bz2
tar zxvf GNS3-0.7.2-src.tar.bz2 -C /opt
mv /opt/GNS3-0.7.2-src /opt/GNS3
mkdir /opt/GNS3/Dynamips
mkdir /opt/GNS3/IOS

3. Dynamips amd64
cd /opt/GNS3/Dynamips
wget http://www.ipflow.utc.fr/dynamips/dynamips-0.2.8-RC2-amd64.bin
chmod +x ./ dynamips-0.2.8-RC2-amd64.bin

4. KDE GNOME
python "/opt/GNS3/gns3"

17
By www.netemu.cn/bbs & bbs.net527.cn
GNS3 on Centos 5.4/Redhat 5.4/Fedora 12

1.
yum -y install python python-devel xorg-x11-proto-devel libXext-devel
yum -y install gcc-c++

2. qt4 pyqt4 sip4,


cd /tmp
wget http://61.160.250.243:1000/GNS3/GNS3-0.7.2-src.tar.bz2
wget http://61.160.250.243:1000/GNS3/PyQt-x11-gpl-4.5.2.tar.gz
wget http://61.160.250.243:1000/GNS3/qt-x11-opensource-src-4.5.1.tar.gz
wget http://61.160.250.243:1000/GNS3/sip-4.8.1.tar.gz

3. Qt4
cd /tmp
tar zxvf qt-x11-opensource-src-4.5.1.tar.gz
cd qt-x11-opensource-src-4.5.1
./configure -nomake examples -nomake demos -qt-gif -no-exceptions -debug -qt3support //
gmake // 1 -3
gmake install // 30
export PATH=/usr/local/Trolltech/Qt-4.5.1/bin:$PATH

4. sip
cd /tmp
tar zxvf sip-4.8.1.tar.gz
cd sip-4.8.1
python configure.py
make
make install

18
By www.netemu.cn/bbs & bbs.net527.cn
5. PyQt
cd /tmp
tar zxvf PyQt-x11-gpl-4.5.2.tar.gz
cd PyQt-x11-gpl-4.5.2
python configure.py
make // 30
make install

6. GNS3
cd /tmp
tar jxvf GNS3-0.7.2-src.tar.bz2 -C /opt
mv /opt/GNS3-0.7.2-src /opt/GNS3

7.
mkdir /opt/GNS3/Dynamips
mkdir /opt/GNS3/IOS
cd /opt/GNS3/Dynamips
wget http://www.ipflow.utc.fr/dynamips/dynamips-0.2.8-RC2-x86.bin //for 32bit
chmod +x ./dynamips-0.2.8-RC2-x86.bin
wget http://www.ipflow.utc.fr/dynamips/dynamips-0.2.8-RC2-amd64.bin //for 64bit
chmod +x ./dynamips-0.2.8-RC2-amd64.bin

8. python "/opt/GNS3/gns3"

9. GNS3
python /opt/GNS3/gns3

19
By www.netemu.cn/bbs & bbs.net527.cn
20
By www.netemu.cn/bbs & bbs.net527.cn
CentOS 5.4
1.
cd /etc/yum
wget http://blackopsoft.com/el5/RPM-GPG-KEY-blackop
rpm --import RPM-GPG-KEY-blackop
rpm -i http://blackopsoft.com/el5/RPMS/noarch/blackop-el5-repo-1.0-2.noarch.rpm

2. PyQt4
yum -y install PyQt4

3. GNS3
cd /tmp
wget http://61.160.250.243:1000/GNS3/GNS3-0.7.2-src.tar.bz2
tar jxvf GNS3-0.7.2-src.tar.bz2 -C /opt
mv /opt/GNS3-0.7.2-src /opt/GNS3

4.
mkdir /opt/GNS3/Dynamips
mkdir /opt/GNS3/IOS
cd /opt/GNS3/Dynamips
wget http://www.ipflow.utc.fr/dynamips/dynamips-0.2.8-RC2-x86.bin //for 32bit
chmod +x ./dynamips-0.2.8-RC2-x86.bin
wget http://www.ipflow.utc.fr/dynamips/dynamips-0.2.8-RC2-amd64.bin //for 64bit
chmod +x ./dynamips-0.2.8-RC2-amd64.bin

5. python25 "/opt/GNS3/gns3"

6. GNS3
python2.5 /opt/GNS3/gns3 python25 /opt/GNS3/gns3

21
By www.netemu.cn/bbs & bbs.net527.cn
KDE GNS3

22
By www.netemu.cn/bbs & bbs.net527.cn
23
By www.netemu.cn/bbs & bbs.net527.cn
GNOME GNS3

24
By www.netemu.cn/bbs & bbs.net527.cn
25
By www.netemu.cn/bbs & bbs.net527.cn
CentOS GNS3 KDE,GNOME

26
By www.netemu.cn/bbs & bbs.net527.cn
Compilation Qemu for Juniper Olive/ASA/IDS/PIX

Compilation Qemu in GNS3 on Centos/Redhat/Fedora


1.
yum install ncurses ncurses-devel zlib zlib-devel SDL SDL-devel libpcap libpcap-devel

2. qemu 0.11.0,
cd /opt/GNS3
wget http://download.savannah.gnu.org/releases/qemu/qemu-0.11.0.tar.gz
tar zxvf qemu-0.11.0.tar.gz
cd qemu-0.11.0
wget http://downloads.sourceforge.net/gns-3/qemu-0.11.0-olive.patch?download
patch -p1 -i qemu-0.11.0-olive.patch
./configure --target-list=i386-softmmu
make
make install

Compilation Qemu in GNS3 on Debian/Ubuntu


1.
apt-get install libncurses5-dev zlib1g-dev libsdl-dev libpcap-dev

2. qemu 0.11.0,
cd /opt/GNS3
wget http://download.savannah.gnu.org/releases/qemu/qemu-0.11.0.tar.gz
tar zxvf qemu-0.11.0.tar.gz
cd qemu-0.11.0
wget http://downloads.sourceforge.net/gns-3/qemu-0.11.0-olive.patch?download
patch -p1 -i qemu-0.11.0-olive.patch
./configure --target-list=i386-softmmu
make
make install

27
By www.netemu.cn/bbs & bbs.net527.cn
Building More Complex Topologies

TOP :

2 Cloud

28
By www.netemu.cn/bbs & bbs.net527.cn
Windows :
Cloud

29
By www.netemu.cn/bbs & bbs.net527.cn
Linux
Cloud

Router

30
By www.netemu.cn/bbs & bbs.net527.cn
Manual

Router telnet

31
By www.netemu.cn/bbs & bbs.net527.cn
Adding PCs to Your Topology

PC PC

Using the Virtual PC Simulator

VPCS IPV4/IPV6 PC VPCS 9 PC


Dynamips UDP lport 20000~20008 rport 30000~30008
0.16c :
cygwin1.dll // vpcs.exe windows
vpcs.exe //windows
vpcs //32bit linux
vpcs_64 //64bit linux
vpcs.osx //MAC
startup.vpc //startup-config vpcs
VPCS

?
1~9 9 PC
ip IP PC IP ip 192.168.1.2 24 192.168.1.1
ping address .
startup.vpc
1
ip 192.168.1.2 24 192.168.1.1
2
dhcp

32
By www.netemu.cn/bbs & bbs.net527.cn
3
ip 172.21.0.2 24 172.21.0.1

Linux vpcs chmod 777 vpcs

VPCS GNS3 VPCS PC

Cloud NIO UDP 30000


127.0.0.1 20000 OK

TOP,
VPCS 1 R4

33
By www.netemu.cn/bbs & bbs.net527.cn
Using a Router that Acts Like a PC

PC

Router(config)# no ip routing //
Router(config)# interface fa0/0
Router(config-if)# ip address address subnet_mask // IP
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# ip default-gateway gateway_address //

34
By www.netemu.cn/bbs & bbs.net527.cn
Using your Real PC

VMWare PC
Building More Complex Topologies

Using the TVPC

TVPC VPCS :TVPC IPV6 IPV4 TVPC


PC UDP Dynamips pcap TVPC

lport rport

IP

35
By www.netemu.cn/bbs & bbs.net527.cn
GNS3 Cloud NIO UDP 30000
192.168.1.113 20000 OK

TOP,
TVPC R4

TVPC R4

36
By www.netemu.cn/bbs & bbs.net527.cn
Using Terminal Programs

For Putty on windows

---> ---> Terminal Settings , :


putty.exe -telnet %h %p //GNS3 for Windows putty

For SecureCRT on windows

---> ---> Terminal Settings , :


“SecureCRT.exe ” /script “DyRouter.vbs ” /arg %d /T /telnet %h %p

"D:\Program Files\SecureCRT\SecureCRT.EXE" /script "D:\Program Files\SecureCRT\DyRouter.vbs" /arg


%d /T /telnet %h %p
"D:\Program Files\SecureCRT\SecureCRT.EXE" //SecureCRT.exe
"D:\Program Files\SecureCRT\DyRouter.vbs" // DyRouter.vbs

For Gnome-terminal on Linux

---> ---> Terminal Settings , :


gnome-terminal -t %d -e ‘telnet %h %p’ > /dev/null 2 >&1 &
shell

For Kconsole on Linux

---> ---> Terminal Settings , :


kconsole --new-tab -p tabtitle=%d -e telnet %h %p > /dev/null 2 >&1 &
shell

37
By www.netemu.cn/bbs & bbs.net527.cn
Memory and CPU Usage

Memory Usage

---> Dynamips ---> Dynamips :


Enable ghost IOS support , Enable mmap support , Enable JIT sharing support , Enable sparse
memory support
Enable ghost IOS support Windows dynamips
2G Linux dynamips 3G

38
By www.netemu.cn/bbs & bbs.net527.cn
CPU Usage

CPU idle-pc CPU


Idle PC idle-pc
GNS3 idle-pc

39
By www.netemu.cn/bbs & bbs.net527.cn
Simulation Layer Switch

3640 NM-16ESW
3620 NM-16ESW
16ESW

NM-16ESW

NM-16ESW

40
By www.netemu.cn/bbs & bbs.net527.cn
Simulation Multi-Layer Switch

2600 2691 3660 3725 3745 slot0


NM-16ESW

F0/0 F0/1 VLAN


VLAN
VLAN vlan database VLAN IOS
VLAN
VLAN show vlan-switch

Packet Capture

For Windows
Wireshark 1.2.9
http://media-2.cacetech.com/wireshark/win32/WiresharkPortable-1.2.9.paf.exe
GNS3---> ---> Capture capture wireshark
.

41
By www.netemu.cn/bbs & bbs.net527.cn
For Linux

Debian/Ubuntu apt-get install wireshark wireshark /usr/bin/wireshark

CentOS/Fedora yum install wireshark wireshark-gnome , wireshark


/usr/sbin/wireshark

GNS3---> ---> Capture capture wireshark .

Wireshark

Capture
OK Wireshark

Wireshark Wireshark Ctrl+R Reload


cap
Wireshark Capture

42
By www.netemu.cn/bbs & bbs.net527.cn
Emulate IPS in GNS3

Create hda and hdb Disk File

1 GNS3 IPS start.bat IPS install.bat diskcreate.bat

2 IPS Start.bat
qemu -hda ips-disk1.img -hdb ips-disk2.img -m 512 -smbios type=1,product="IDS-4215" -net
nic,model=e1000 -net nic,model=e1000 -net nic,model=e1000

3 IPS Install.bat
qemu -hda ips-disk1.img -hdb ips-disk2.img -m 512 -smbios type=1,product="IDS-4215"
-cdrom ..\IPS-K9-cd-1.1-a-6.0-5-E3.iso -boot d
IPS

4 diskcreate.bat,
qemu-img create -f vmdk ips-disk1.img 512M
qemu-img create -f vmdk ips-disk2.img 4000M

5 diskcreate.bat IPS install.bat qemu

K IPS ( 2
)

43
By www.netemu.cn/bbs & bbs.net527.cn
6 IPS Start.bat IPS grub

e grub , e

44
By www.netemu.cn/bbs & bbs.net527.cn
init=loadrc init=1 Linux
b Linux IPS Linux

45
By www.netemu.cn/bbs & bbs.net527.cn
Linux shell
/loadrc
/etc/init.d/rc.init

7 vi /etc/init.d/ ids_functions

vi /etc/init.d/ ids_functions
vi /845

46
By www.netemu.cn/bbs & bbs.net527.cn
47
By www.netemu.cn/bbs & bbs.net527.cn
48
By www.netemu.cn/bbs & bbs.net527.cn
9 IPS
shell :reboot qemu

49
By www.netemu.cn/bbs & bbs.net527.cn
10 IPS Start.bat IPS 9
OK

3 IPS Start.bat 3
GNS3 6
cisco CISCO
1

50
By www.netemu.cn/bbs & bbs.net527.cn
Emulate IPS in GNS3

1 GNS3 ----> Qemu ----> IDS hda hdb

2 IDS IDS GNS3

GNS3 6 IDS O( _ )O~


IDS grub 10 3
61.160.250.243:1000/IPS ,IDS cisco net527

51
By www.netemu.cn/bbs & bbs.net527.cn
PIX Firewall Emulation

1 -----> Qemu PIX

serial number valid activation keys PIX

PIX

52
By www.netemu.cn/bbs & bbs.net527.cn
Cisco ASA Emulation

ASA asa802-k8-sing.gz ASA ASA


ASA ASA

GNS3 ASA ASA

ASA IP 192.168.1.113 , 127.0.0.1 ASA


ASA IP 192.168.1.111,ASA1 192.168.1.113 ASA2 192.168.1.111
GNS3 0.7.2

TOP
1 asa802-k8.bin kernel vmlinuz initrd
ASA asa802-k8-sing.gz ASA asa802-k8-muti.gz
initrd e100 e1000 http://61.160.250.243:1000

GNS3 ASA --> --> qemu


General Setting

53
By www.netemu.cn/bbs & bbs.net527.cn
ASA :

2 ASA ASA1 ASA2,TOP

ASA QEMU

54
By www.netemu.cn/bbs & bbs.net527.cn
“console”

55
By www.netemu.cn/bbs & bbs.net527.cn
1 ( ) FLASH
FLASH FLASH
26M OK FLASH ^_^

asa802-k8-sing.gz FLASH /mnt/disk0/lina_monitor

asa802-k8-muti.gz FLASH
/mnt/disk0/lina -m

PS: ASA ciscoasa>

56
By www.netemu.cn/bbs & bbs.net527.cn
57
By www.netemu.cn/bbs & bbs.net527.cn
6 ASA

58
By www.netemu.cn/bbs & bbs.net527.cn
show flash:,

FLASH ASA FLASH


show flash: 0
ASA ASA show flash:,FLASH

wr copy run start ASA

boot config disk0:/.private/startup-config


copy running-config disk0:/.private/startup-config

59
By www.netemu.cn/bbs & bbs.net527.cn
asa802-k8-muti.gz
mkdir disk0:/csco_config
mkdir disk0:/csco_config/97
mkdir disk0:/csco_config/97/customization
mkdir disk0:/csco_config/97/customization/Template
mkdir disk0:/csco_config/97/bookmarks
mkdir disk0:/csco_config/97/bookmarks/Template
mkdir disk0:/csco_config/97/webcontent
mkdir disk0:/csco_config/locale
mkdir disk0:/csco_config/locale/LC_MESSAGES
mkdir disk0:/var
mkdir disk0:/var/log
mkdir disk0:/csco_config/locale/ja
mkdir disk0:/csco_config/locale/ja/LC_MESSAGES
mkdir disk0:/csco_config/locale/fr
mkdir disk0:/csco_config/locale/fr/LC_MESSAGES

60
By www.netemu.cn/bbs & bbs.net527.cn
3 ASA
ciscoasa(config)# hostname ASA1
ASA1(config)# int e0/0
ASA1(config-if)# ip add 192.168.1.1 255.255.255.0
ASA1(config-if)# nameif out
ASA1(config-if)# nameif outs
ASA1(config-if)# nameif outside
INFO: Security level for "outside" set to 0 by default.
ASA1(config-if)# no sh
ASA1(config-if)# end
ASA1# ping 192.168.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
ASA1# ping 192.168.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/20/80 ms

ciscoasa(config)# host ASA2


ASA2(config)# int e0/0
ASA2(config-if)# ip add 192.168.1.2 255.255.255.0
ASA2(config-if)# nameif outside
INFO: Security level for "outside" set to 0 by default.
ASA2(config-if)# no sh
ASA2(config-if)# end
ASA2# ping 192.168.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/8/10 ms

ASA PING

ASA
1) TOP 1

61
By www.netemu.cn/bbs & bbs.net527.cn
ASA O( _ )O ~

3) 192.168.1.111 GNS3
qemuwrapper-start.cmd,
qemuwrapper --listen=192.168.1.111 --port=10525
--workdir=f:\workdir\temp
192.168.1.113 GNS3
qemuwrapper-start.cmd,
qemuwrapper --listen=192.168.1.113 --port=10525
--workdir=k:\workdir\temp

workdir
--> GNS3 --> Qemuwrapper Qemuwrapper
GNS3 qemuwrapper-start.cmd
3 Qemuwrapper qemuwrapper-start.cmd workdir

qemuwrapper-start.cmd

62
By www.netemu.cn/bbs & bbs.net527.cn
63
By www.netemu.cn/bbs & bbs.net527.cn
64
By www.netemu.cn/bbs & bbs.net527.cn
4) TOP asa1 e0 asa2 e0

6) gns3 GNS3 ( GNS3 )


ASA1.NET workdir none workdir
192.168.1.113 workdir=k:\workdir\temp
192.168.1.111 workdir=f:\workdir\temp
qemuwrapper-start.cmd workdir
ASA
TOP 3 4 , ASA1 ASA2 192.168.1.111
qemu

65
By www.netemu.cn/bbs & bbs.net527.cn
7)
ciscoasa> en
Password:
ciscoasa# conf t
ciscoasa(config)# host ASA1
ASA1(config)# int e0/0
ASA1(config-if)# ip add 192.168.1.1 255.255.255.0
ASA1(config-if)# nameif outside
INFO: Security level for "outside" set to 0 by default.
ASA1(config-if)# no sh
ASA1(config-if)# end
ASA1# ping 192.168.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/4/10 ms
ASA1#

ciscoasa> en
Password:
ciscoasa# conf t
ciscoasa(config)# host ASA2
ASA2(config)# int e0/0
ASA2(config-if)# ip add 192.168.1.2 255.255.255.0
ASA2(config-if)# nameif outside
INFO: Security level for "outside" set to 0 by default.
ASA2(config-if)# no sh
ASA2(config-if)# end
ASA2# ping 192.168.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/14/50 ms
ASA2#

PING

66
By www.netemu.cn/bbs & bbs.net527.cn
192.168.1.111 192.1681.67 192.168.1.113 TOP

192.168.1.113 GNS3
192.168.1.111 Dynagen 0.11.0, dynamips 7200
IOS:c3640-jk9o3s-mz.124-16a.bin c3660-jk9o3s-mz.124-15.T13.bin
dongnan_working
IOS F
192.168.1.67 Dynagen 0.11.0, dynamips 7200
IOS:c3640-jk9o3s-mz.124-16a.bin c3660-jk9o3s-mz.124-15.T13.bin
dongnan_working
IOS D

1 GNS3 192.168.1.111 192.168.1.67 Dynamips Server


Dynagen dynamips-start.cmd
dynamips-start.cmd start /belownormal "Dynamips" cmd /c ""%dynamips%" -H 7200
& pause"

2 GNS3 à IOS Hypervisors à Hypervisors

67
By www.netemu.cn/bbs & bbs.net527.cn
3 192.168.1.111 192.168.1.67 Hypervisors IOS
192.168.1.111 192.168.1.67 IOS

IOS GNS3
4 TOP

68
By www.netemu.cn/bbs & bbs.net527.cn
R5 R7, 3660 3600

R5 IOS 192.168.1.67:d:\ c3660-jk9o3s-mz.124-15.T13.bin


R7 IOS 192.168.1.111:f:\ c3660-jk9o3s-mz.124-15.T13.bin

R5 R7 GNS3 list

start /all

69
By www.netemu.cn/bbs & bbs.net527.cn
192.168.1.67 192.168.1.111 Dynamips Server

192.168.1.111 dynamips server

70
By www.netemu.cn/bbs & bbs.net527.cn
192.168.1.67 dynamips server

71
By www.netemu.cn/bbs & bbs.net527.cn
5 GNS3 putty R5,R7 console

192.168.1.111 192.168.1.67 R7 R5

72
By www.netemu.cn/bbs & bbs.net527.cn
6
R5 R7 :

73
By www.netemu.cn/bbs & bbs.net527.cn
74
By www.netemu.cn/bbs & bbs.net527.cn
CPU Usage - BES and CPULimit
ASA IPS Juniper Olive idle-pc CPU
windows Linux

BES

http://mion.faireal.net/BES/
PIX CPU

BES

75
By www.netemu.cn/bbs & bbs.net527.cn
Target

peme.exe Limit this Yes

76
By www.netemu.cn/bbs & bbs.net527.cn
Control

CPU

77
By www.netemu.cn/bbs & bbs.net527.cn
CPULimit

Linux http://cpulimit.sourceforge.net

Debian/Ubuntu cpulimit

apt-get install cpulimit

Usage: cpulimit TARGET [OPTIONS...]


TARGET must be exactly one of these:
-p, --pid=N pid of the process
-e, --exe=FILE name of the executable program file
-P, --path=PATH absolute path name of the executable program file
OPTIONS
-l, --limit=N percentage of cpu allowed from 0 to 100 (mandatory)
-v, --verbose show control statistics
-z, --lazy exit if there is no suitable target process, or if it dies
-h, --help display this help and exit

cpulimit -e pemu -l 40 // pemu CPU 0~40

78
By www.netemu.cn/bbs & bbs.net527.cn
Create TAP/TUN interface

TAP for Windows

1 Tap driver for win32


http://d.namipan.com/d/TAP%20for%20win32%20.rar/74d692e2abd71eb5196a600195052c1c903399630fa
10000

2 tap

tapinstallWin32.exe install OemWin2k.inf tap0901 //

N tapn n>=0

tapinstallWin32.exe remove tap0901 //

3 GNS3 TAP
Cloud NIO TAP tap0

OK

79
By www.netemu.cn/bbs & bbs.net527.cn
TAP for Linux

Install on Debian/Ubuntu

1 TAP
apt-get -y install uml-utilities bridge-utils //uml-utilities tunctl, tun ( )
bridge_utils brctl tap ( )
modprobe tun // tun
tunctl -t tap0 // tap0 TAP
tunctl -t tap1
ifconfig tap0 192.168.2.1 netmask 255.255.255.0 up // tap0 IP
ifconfig tap1 192.168.3.1 netmask 255.255.255.0 up

tunctl -t tapN //N>=0 tapN


tunctl -d tapN //N>=0 tapN

2 GNS3 NIO TAP


Cloud NIO TAP tap0

80
By www.netemu.cn/bbs & bbs.net527.cn
Install on CentOS/Fedora

1 TAP
yum -y install tunctl bridge-utils
modprobe tun // tun
tunctl -t tap0 // tap0 TAP
ifconfig tap0 192.168.2.1 netmask 255.255.255.0 up // tap0 IP
ifconfig tap1 192.168.3.1 netmask 255.255.255.0 up

tunctl -t tapN //N>=0 tapN


tunctl -d tapN //N>=0 tapN

2 GNS3 NIO TAP


Cloud NIO TAP tap0

81
By www.netemu.cn/bbs & bbs.net527.cn
Emulate Juniper Olive in GNS3

Create JunOS disk image

1 FreeBSD 4.11 Juniper Olive 10.1R1.8


FreeBSD 4.11:
ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/ISO-IMAGES/4.11/4.11-RELEASE-i
386-miniinst.iso
Juniper Olive 10.1R1.8: http://keekles.org/~bryan/Cisco/jinstall-10.1R1.8-domestic-olive.tgz
UltraISO: http://www.greendown.cn/soft/10312.html

2 FreeBSD 4.11
GNS3 bat freebsd_install.bat,freebsd-start.bat,diskcreate.bat
diskcreate.bat
qemu-img create -f vmdk f:\Olive.vmdk 4G

freebsd_install.bat:
qemu -m 512 -hda "f:\Olive.vmdk" -boot d -localtime -cdrom "f:\FreeBSD 4.11.iso"

freebsd_start.bat
qemu -m 512 -hda f:\Olive.vmdk -boot c -cdrom f:\olive.iso -localtime -net nic,vlan=0,model=e1000 -serial
telnet:192.168.1.67:1007,server,nowait

diskcreate.bat
freebsd_install.bat FreeBSD

82
By www.netemu.cn/bbs & bbs.net527.cn
10

Express

83
By www.netemu.cn/bbs & bbs.net527.cn
A Use Entire Disk

Q Finish

84
By www.netemu.cn/bbs & bbs.net527.cn
Standard

C 1024M /
C 1024M Swap
C 20M /config
C
/var
PS freebsd 7.0,7.2 100m /tmp
C /var
/var Part ad0s1f

85
By www.netemu.cn/bbs & bbs.net527.cn
Q

Minimal TAB OK

86
By www.netemu.cn/bbs & bbs.net527.cn
CD/DVD

Yes

87
By www.netemu.cn/bbs & bbs.net527.cn
No

88
By www.netemu.cn/bbs & bbs.net527.cn
sysinstall TAB X Exit Install

Yes FreeBsd root


Qemu

89
By www.netemu.cn/bbs & bbs.net527.cn
3 Olive VMWare
qemu-img.exe create -b f:\Olive.vmdk -f vmdk f:\Olive1.vmdk //
freebsd_start.bat
qemu -m 512 -hda f:\Olive.vmdk -boot c -cdrom f:\olive.iso -localtime -net nic,vlan=0,model=e1000 -serial
telnet:192.168.1.67:1007,server,nowait

qemu -m 512 -hda f:\Olive1.vmdk -boot c -cdrom f:\olive.iso -localtime -net nic,vlan=0,model=e1000
-serial telnet:192.168.1.67:1007,server,nowait

4 Juniper Olive

FreeBSD jinstall-10.1R1.8-domestic-olive.tgz ftp sftp tftp


Qemu TAP TAP
refuse

a) jinstall-10.1R1.8-domestic-olive.tgz jinstall-10.1R1.8-domestic.tgz

b) UltraISO jinstall-10.1R1.8-domestic.tgz olive.iso


c) freebsd_start.bat FreeBSD root

90
By www.netemu.cn/bbs & bbs.net527.cn
PS rm -f /dev/wd0c ln -s /dev/ad0c /dev/wd0c 4.X 6.X,7.X

cdrom jinstall-10.1R1.8-domestic.tgz /var/tmp


pkg_add -f jinstall-10.1R1.8-domestic.tgz Olive

91
By www.netemu.cn/bbs & bbs.net527.cn
d console Olive com Qemu Olive
comconsole vidconsole 4

vi

92
By www.netemu.cn/bbs & bbs.net527.cn
boot/loader.conf console=”vidconsole”

console=”vidconsole”

bootstrap-install-10.1R1.9.tar

rm -rf boot

93
By www.netemu.cn/bbs & bbs.net527.cn
jboot-10.1R1.8.tgz loader.conf

94
By www.netemu.cn/bbs & bbs.net527.cn
jboot-10.1R1.8.tgz

jboot

5 Olive
freebsd_start.bat 3 4 jboot reboot
Olive Qemu
-- telnet 192.168.1.67 1007(192.168.1.67 1007 freebsd_start.bat serial )
Olive

95
By www.netemu.cn/bbs & bbs.net527.cn
96
By www.netemu.cn/bbs & bbs.net527.cn
Olive telnet qemu

telnet Olive Qemu

97
By www.netemu.cn/bbs & bbs.net527.cn
JunOS in GNS3
----> Qemu ------> JunOS

Juniper router

JunOS 6 JunOS

Qemu

98
By www.netemu.cn/bbs & bbs.net527.cn
root

6 UP ifconfig -a | more

flags=0x3/0x8000<PERSENT|RUNNING> RUNNING UP

99
By www.netemu.cn/bbs & bbs.net527.cn
cli show interfaces brief

www.netemu.cn/bbs bbs.net527.cn

2010 7 7

100
By www.netemu.cn/bbs & bbs.net527.cn

You might also like