OpenFlow_tutorial_2_Install_Required_Software

一、Required Software

我操作系统用的 ubuntu 18.04。vm image的OS是ubuntu14.04,这两个系统的GUI应该已经不兼容了,如果使用ubuntu18.04的主机去连接ubuntu14.04的主机并运行具有GUI的软件(如wireshark),这个软件没有办法在ubuntu18.04下使用,所以最好使用14.04或者16.04(没试过)。最初发现vm中的wireshark不能正常使用,不知道是什么原因,折腾了很久,最后在vmmare中装上ubuntu14.04,wireshark就能正常使用了。

完成实验需要虚拟机、SSH远程连接工具、X server和VM镜像。具体见下表:

VM image:

Virtual Machine Image (OVF format, 64-bit, Mininet 2.2.0) (Recommended for most modern hardware and OSes)

Virtual Machine Image (OVF format, 32-bit, Mininet 2.2.0) (Recommended for ancient hardware and Windows)

根据要求安装相应工具。

二、通过Vm image启动虚拟机

virtualbox和vmmare都试过,使用vmmare需要用virtualbox将原本.ovf镜像转为.ova虚拟机文件(windows、linux):使用Export Appliance(导出虚拟电脑)并确保勾选“Write Manifest file”选项,再用vmmare导入.ova文件。

导入的虚拟机是一个没有GUI的ubuntu14.04,username和password都是"mininet"。

虚拟机需要两个adapter:

  adapter1:Nat网络,用于访问Internet;

  adapter2:Host-Only网络,用于虚拟机与主机间通信。

如果使用virtualbox,需要简单配置一下。

主机需要SSH虚拟机时,应使用host-only interface的ip地址。在SSH之前或访问Internet之间需配置IP地址,使用DHCP协议,如命令:dhclient eth0。

在虚拟机上登陆用户后,运行ifconfig -a,运行结果如下图:

eth0是nat interface;eth1是host-only interface,此时eth1还没有IP地址,所以运行命令sudo dhclient eth1为eth1分配IP地址。分配后如图:

 

三、主机SSH连接虚拟机

通过上图得知host-only interface的IP地址为192.168.84.128。

运行命令ssh -X mininet@192.168.84.128

原文地址:https://www.cnblogs.com/jasonlixuetao/p/9497307.html