GNS3 2.1.21详细安装教程

发布时间:2019-09-23 17:03:07编辑:auto阅读(2664)

    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版本:

    image

    image

    image

    image

    image

    image

    image

    image

    部署中…

    image

    开机:

    image

    image

    回车配置:

    image

    问题:没有开启kvm。

    将虚拟机关机,开启esxi的虚拟化透传。

    关机中。。。

    image

    image

    image

    再重新开机。。。

    image

    回车再重启,kvm已经启用。

    image

     

    配置固定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

    image

    输入y

    image

    回车

    image

    检查:

    image

                                                      esxi版本完。

     

    ------------------------------------------------------------------

    vmware workstation pro版本:

     

    image

    image

    image

    image

    image

    image

                            vmware workstation pro安装完毕。

    image

    选择一个目录:

    image

    image

    image

    开启vt-x:重要

    image

    image

    修改ip:

    image

    # 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

     

    地址配置完毕会自动重启!

    image

    image

     

    连接gns3 vm:

    image

    重启gns3 client。

    image

    上传镜像:

    image

    image

     

    image

     

    image

    image

                                                                -----vmware workstation pro版本完

     

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

    image

    需要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,狂点下一步。。。

    image

    image

    image

    正式安装gns3-ui:

    image

    image

    image

    image

    image

    image

    安装完毕。

    ---------------------------------------------------------------

     

    4、基本配置:Edit—>Preferences

    关联scrt:

    image

    关联vnc:

    image

    项目路径:

    image

    应该是禁止任何中文字符。

     

    安装scrt:狂点下一步。。。

    image

    image

    破解方法:自行搜索。

     

    gns3 client连接gns3 vm:

    image

    image

    判断连接成功:

    image

    环境准备完--------------------------------完

     

    5、上传路由器IOU的镜像:

    image

    image

     

    image

    image

    image

    image

    image

    镜像导入成功,但是没有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客户端软件中:

    image

    拖出两台路由器测试:

    image

    image

    image

    ------------------------------------------全文完。

     

    附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'\x4B\x58\x21\x81\x56\x7B\x0D\xF3\x21\x43\x9B\x7E\xAC\x1D\xE6\x8A'
    iouPad2 = b'\x80' + 39*b'\0'
    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/hosts\n")

关键字