【问题标题】:connecting a host to the internet through an OpenFlow software switch通过 OpenFlow 软件交换机将主机连接到互联网
【发布时间】:2014-04-08 20:56:07
【问题描述】:

我有两个 Ubuntu 虚拟机 X 和 Y。 x 在其上运行 Open vSwitch 和泛光灯,并且 Y vm 充当主机。 我有一个 Host-Only 适配器和一个连接到 X vm 的 NAT 适配器。而 Y vm 只有一个 Host-Only 适配器。

X 和 Y vm 的仅主机适配器位于同一子网中。

现在我想通过在 X vm 上运行的 OVS 将 Y vm 连接到互联网。 是否可以? 如果是,怎么做?

【问题讨论】:

    标签: networking network-programming openflow


    【解决方案1】:

    要仅通过 Open vSwitch 获得与主机的 Internet 连接,

    使用 DHCP

    1: add the interface connected to internet(say eth0) on the OVS machine to the OVS bridge.
    2: change the ip address of eth0 interface to 0 and get a dhcp ip to the bridge interface using dhclient
    3: add the interfaces that are connected to the hosts to the OVS bridge
    4: get dhcp ip's to the hosts by using dhclient on the host machines
    

    使用自定义 IP 地址

    1: add the interfaces connected to the hosts and the interface connected to the internet to the OVS bridge
    2: make the internet interface ip as 0 
    3: set the bridge ip address to the ip address that was previously assigned to the internet interface
    4: make sure you have the host ip addresses in the same network address range as the bridge IP address.
    

    【讨论】:

      【解决方案2】:

      测试 openflow 服务的最简单方法是使用 mininet 模拟器。这是一个关于如何使用它的教程。

      http://mininet.org/walkthrough/

      【讨论】:

      • 感谢您的建议!问题是关于如何使用运行 OVS 的 PC 作为交换机来创建 OpenFlow 网络。连接到 OVS PC 的主机只能通过 OVS 访问互联网,而不是通过其他接口。我在下面回答了!谢谢
      猜你喜欢
      • 2012-10-13
      • 1970-01-01
      • 2019-07-05
      • 2017-11-22
      • 1970-01-01
      • 1970-01-01
      • 2014-12-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多