通过OpenFlow软件交换机将主机连接到Internet

问题描述 投票:2回答:2

我有两个Ubuntu虚拟机X和Y。x上运行有Open vSwitch和Floodlight,Y vm充当主机。我有一个仅主机适配器和一个NAT适配器连接到X vm。并且Y vm仅具有仅主机适配器。

X和Y虚拟机的仅主机适配器在同一子网中。

现在,我想通过X vm上运行的OVS将Y vm连接到Internet。可能吗?如果是,如何?

networking network-programming openflow
2个回答
2
投票

仅通过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.

0
投票

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

http://mininet.org/walkthrough/

© www.soinside.com 2019 - 2024. All rights reserved.