[ovs-discuss] OVS VM instances Network Topology Connection

蘇于倫 yulunsus at gmail.com
Fri Feb 24 04:14:21 UTC 2017


Hi David,

Thanks for you advise!
I've tried to set LAN Segment 1 with 192.168.46.22/24 subnet and
LAN Segment 2 with 192.168.47.22/24 subnet. It turns out that VM2
is able to ping VM1 and VM3, and vice versa for VM1 and VM3 to ping
VM2. Thus, my current configuration is the following:

VM1 ---- br0 (eth0): IP: 192.168.*46*.11, MAC: eth0's MAC  --------  |

                            |  LAN Segment 1
             | ---  br0 (eth0): IP: 192.168.*46*.22, MAC: eth0's MAC ---- |
VM2 --- |
             | ---  br1 (eth1): IP: 192.168.*47*.22, MAC: eth1's MAC ---- |

                            | LAN Segment 2
VM3 ---- br0 (eth0): IP: 192.168.*47*.33, MAC: eth0's MAC  --------- |

Originally in VM2, I added 2 ports eth0, eth1 to the same bridge br0
with the MAC addr assigned to be that of eth0, and all IPs are under
 the same .46.XXX subnet. In this setting, VM1-VM2 ping works fine,
but VM2-VM3 can't ping each other. After setting the br0 MAC to be
the same as eth1. VM2-VM3 ping works fine with VM1-VM2 fails.

After this I divided 2 ports of VM2 to 2 bridges br0, br1 respectively,
and set br0 IP:192.168.*46*.22, MAC: eth0's MAC; br2: IP 192.168.*46*.23,
MAC: eth1's MAC. All other VM IP are under .46 subnet. However, the
problem remains with VM2-VM3 ping not working.

Eventually, I assign each LAN segment different subnet (.46 and .47 as
shown above), and everyting works fine now.

I am wondering if there's the possibility to set all VM under the same
subnet
with 2 LAN Segments for each link segment ?
And, also want to confirm if the multi-subnet scenario is reasonable? Since
there will be many subnets in larger topology (e.g. Fat-tree).

Any comment is appreciated, thanks!

Ethan

Felipe Arturo Polanco <felipeapolanco at gmail.com> 於 2017年2月24日 週五 上午5:35寫道:

> Hi yulunsus,
>
> That configuration appears to be a good one, try debugging LAN Segment 2
> out of OVS to see if you can ping correctly and then put eth1 back into the
> ovs bridge.
>
> Also try with tcpdump -i br0 icmp when you try to ping so you can see
> where the packets come and go, in this scenario also check eth1 interface
> to see if any packets are coming from VM3.
>
> On Thu, Feb 23, 2017 at 11:57 AM, 蘇于倫 <yulunsus at gmail.com> wrote:
>
> Hi everyone,
>
> I am currently trying to build OVS VM topology in VMWare Workstation.
> I start with simple topology:
>
> VM1(OVS)  ------ VM2(OVS)
>
> In the 2 VMs, I set OVS and interfaces with following steps:
>
>    - Create 1 interface eth0 (LAN Segment 1) in VM1
>    - Create 1 interface eth0 (LAN Segment 1) in VM2
>    - In each VM:
>       - ovs-vsctl add-br br0
>       - ovs-vsctl add-port br0 eth0
>       - ifconfig eth0 0
>       - ifconfig br0 up
>       - ifconfig br0 192.168.46.11 netmask 255.255.255.0
>       (for VM2 IP Addr: 192.168.46.22)
>
> => Able to ping each other.
> But when I expand the topology to the following:
>
> VM1(OVS)  ------ VM2(OVS) ------ VM3(OVS)
>
> VM1:
> br0: eth0 (LAN Segment 1); IP:192.168.46.11; MAC addr is the same as eth0
> VM2:
> br0: eth0 (LAN Segment 1)
>        eth1 (LAN Segment 2)
>        MAC addr is the same as eth0
>        IP:192.168.46.22
> VM3:
> br0: eth0 (LAN Segment 2)
>        IP:192.168.46.33
>        MAC addr is the same as eth0
>
> =>VM1-VM2 are able to ping each other, however VM3 can't ping VM2
>
> Is my configuration correct for my purpose?
> I am wondering if the MAC addrshould be set to other address to avoid
> alisaing?
> I'd like to know what is the better way to connect OVS VM topology.
> Thanks for the help in advance!
>
> Ethan
>
>
>
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20170224/4adb200d/attachment.html>


More information about the discuss mailing list