GNS3 2.1.21詳細安裝教程

1、軟體下載地址

What is GNS3?

Build, Design and Test your network in a risk-free virtual environment and access the largest networking community to help. Whether you are studying for your first networking exam or building out a state-wide telecommunications network, GNS3 offers an easy way to design and build networks of any size without the need for hardware. And the best part is it's free!

https://github.com/GNS3/gns3-gui/releases

https://gns3.com/software

https://gns3.com/marketplace

windows版本:https://github.com/GNS3/gns3-gui/releases/download/v2.1.21/GNS3-2.1.21-all-in-one.exe       //本次需要

蘋果版:https://github.com/GNS3/gns3-gui/releases/download/v2.1.21/GNS3-2.1.21.dmg

gns3 vm:根據實際情況下載

https://github.com/GNS3/gns3-gui/releases/download/v2.1.21/GNS3.VM.VMware.Workstation.2.1.21.zip

https://github.com/GNS3/gns3-gui/releases/download/v2.1.21/GNS3.VM.VMware.ESXI.2.1.21.zip

https://github.com/GNS3/gns3-gui/releases/download/v2.1.21/GNS3.VM.VirtualBox.2.1.21.zip

源碼:

https://github.com/GNS3/gns3-gui/archive/v2.1.21.tar.gz

2、導入gns3 vm(分vmware esxi和vmware workstation pro版本)

vmware esxi版本:

部署中…

開機:

回車配置:

問題:沒有開啟kvm。

將虛擬機關機,開啟esxi的虛擬化透傳。

關機中。。。

再重新開機。。。

回車再重啟,kvm已經啟用。

配置固定ip地址(根據實際情況修改):

auto eth0

# Comment this line to disable DHCP #iface eth0 inet dhcp    //注釋這一行 # Uncomment this lines if you want to manually configure network # It's not recommended if you can avoid it. # iface eth0 inet static       //取消注釋         address 192.168.0.50         netmask 255.255.255.0         gateway 192.168.0.1         dns-nameservers 192.168.0.1       //改為114.114.114.114等dns

Ctrl+x

輸入y

回車

檢查:

                                                  esxi版本完。

——————————————————————

vmware workstation pro版本:

                        vmware workstation pro安裝完畢。

選擇一個目錄:

開啟vt-x:重要

修改ip:

# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5).

# Warning this file will be erased by each # GNS3 VM update; if you want to customize it # change the following var to 1 but DO NOT # remove the leading #. # # MANUAL=0

# Host only interface auto eth0

# Comment this line to disable DHCP #iface eth0 inet dhcp        //關閉dhcp # Uncomment this lines if you want to manually configure network # It's not recommended if you can avoid it. # iface eth0 inet static              //配置靜態ip地址         address 192.168.92.100         netmask 255.255.255.0         gateway 192.168.92.1         dns-nameservers 114.114.114.114

地址配置完畢會自動重啟!

連接gns3 vm:

重啟gns3 client。

上傳鏡像:

                                                            —–vmware workstation pro版本完

3、windows 安裝GNS3-2.1.21-all-in-one.exe

需要Update for Universal C Runtime in Windows:根據系統下載。

https://support.microsoft.com/en-us/help/2×××26/update-for-universal-c-runtime-in-windows#!en-us%2Fhelp%2F2×××26%2Fupdate-for-universal-c-runtime-in-windows

windows 7 x64下載:

https://download.microsoft.com/download/1/1/5/11565A9A-EA09-4F0A-A57E-520D5D138140/Windows6.1-KB2×××26-x64.msu

安裝wireshark,狂點下一步。。。

正式安裝gns3-ui:

安裝完畢。

—————————————————————

4、基本配置:Edit—>Preferences

關聯scrt:

關聯vnc:

項目路徑:

應該是禁止任何中文字元。

安裝scrt:狂點下一步。。。

破解方法:自行搜索。

gns3 client連接gns3 vm:

判斷連接成功:

環境準備完——————————–完

5、上傳路由器IOU的鏡像:

鏡像導入成功,但是沒有license,還不能用。

下一步,ssh登錄至gns3 vm,生成license:

root@gns3vm:~# python3 CiscoIOUKeygen.py ********************************************************************* Cisco IOU License Generator – Kal 2011, python port of 2006 C version Modified to work with python3 by c_d 2014 hostid=00000000, hostname=gns3vm, ioukey=25e

Add the following text to ~/.iourc: [license] gns3vm = 73635fd3b0a13ad0;                       //生成的license

You can disable the phone home feature with something like: echo '127.0.0.127 xml.cisco.com' >> /etc/hosts

將軟體粘貼至gns3客戶端軟體中:

拖出兩台路由器測試:

——————————————全文完。

附CiscoIOUKeygen.py源碼

#! /usr/bin/python print("*********************************************************************") print("Cisco IOU License Generator – Kal 2011, python port of 2006 C version") print("Modified to work with python3 by c_d 2014") import os import socket import hashlib import struct

# get the host id and host name to calculate the hostkey hostid=os.popen("hostid").read().strip() hostname = socket.gethostname() ioukey=int(hostid,16) for x in hostname: ioukey = ioukey + ord(x) print("hostid=" + hostid +", hostname="+ hostname + ", ioukey=" + hex(ioukey)[2:])

# create the license using md5sum iouPad1 = b'x4Bx58x21x81x56x7Bx0DxF3x21x43x9Bx7ExACx1DxE6x8A' iouPad2 = b'x80' + 39*b'' md5input=iouPad1 + iouPad2 + struct.pack('!i', ioukey) + iouPad1 iouLicense=hashlib.md5(md5input).hexdigest()[:16]

print("nAdd the following text to ~/.iourc:") print("[license]n" + hostname + " = " + iouLicense + ";n") print("You can disable the phone home feature with something like:") print(" echo '127.0.0.127 xml.cisco.com' >> /etc/hostsn")