文章详情

短信预约-IT技能 免费直播动态提醒

请输入下面的图形验证码

提交验证

短信预约提醒成功

GNS3 2.1.21详细安装教程

2023-01-31 07:45

关注

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")

阅读原文内容投诉

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

软考中级精品资料免费领

  • 历年真题答案解析
  • 备考技巧名师总结
  • 高频考点精准押题
  • 2024年上半年信息系统项目管理师第二批次真题及答案解析(完整版)

    难度     807人已做
    查看
  • 【考后总结】2024年5月26日信息系统项目管理师第2批次考情分析

    难度     351人已做
    查看
  • 【考后总结】2024年5月25日信息系统项目管理师第1批次考情分析

    难度     314人已做
    查看
  • 2024年上半年软考高项第一、二批次真题考点汇总(完整版)

    难度     433人已做
    查看
  • 2024年上半年系统架构设计师考试综合知识真题

    难度     221人已做
    查看

相关文章

发现更多好内容

猜你喜欢

AI推送时光机
位置:首页-资讯-后端开发
咦!没有更多了?去看看其它编程学习网 内容吧
首页课程
资料下载
问答资讯