<div dir="ltr"><div>Hi Lee</div><div><br></div>If you are to virtualize the network stack properly you need to do it all the way down to layer2. How do you connect multiple layer 2 devices together? Well a bridge, a switch being many bridges all in the one box. Hubs are not relevant here as there is no physical medium. As the llya said it totally possible to have a 1:1 relationship between the vms and host, ie a dedicated bridge per vm, with its own ip network on (/30 for ipv4, or /64 for ipv6). The host machine then does all the routing and/or natting for the guests</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On 3 June 2014 04:06, Ilya Ponetayev <span dir="ltr"><<a href="mailto:instenet@gmail.com" target="_blank">instenet@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You may create as many bridges as you want to have virtual interfaces, each bridge consisting only of connection to single VM, and handle traffic between bridges and between physical interfaces of host through iptables/iproute.<br>

<br>
IHMO bridging is the most proper and popular technique because it provides the most flexible configuration. Your VM sees NIC as Ethernet card (so with all L2 features), so either you can terminate this L2 pipe with bridge in host, and perform L3/higher level handling, or you can use for example DHCP server on host binded to your bridge, or VLAN-handling config.<div>
<div class="h5"><br>
<br>
On 03.06.2014 06:25, lee wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
all the descriptions of networking setups with VMs I`m seeing involve<br>
bridges.  The only use I see for bridges is when I actually want to be<br>
able to send network traffic to multiple arbitrary interfaces connected<br>
to the bridge.  I do neither need, nor want bridges when I want to keep<br>
the VMs separated, like when separating a VM in a DMZ from a VM in the<br>
LAN.<br>
<br>
The bridge acts like a hub.  Looking at [1] makes it seem that this is<br>
undesirable --- otherwise there wouldn`t be need for a software switch<br>
to prevent network traffic on a bridge from going to all of the<br>
connected interfaces.<br>
<br>
When there`s a bridge with multiple VMs connected to it, is a software<br>
switch desirable to prevent network traffic on the bridge from going to<br>
interfaces it doesn`t need to go to?  If so, isn`t it better not to use<br>
a bridge to begin with?<br>
<br>
Can`t we simply have virtual interfaces on the physical host which are<br>
the "other end" of the interfaces showing up in the VMs, without<br>
bridges?<br>
<br>
[2] seems to suggest to leave all bridges "dangling", i. e. it says<br>
you`re not supposed to connect an interface to the bridge.  What`s the<br>
point of a bridge when only a single interface is connected to it?<br>
<br>
<br>
[1]:<br>
<a href="http://openvswitch.org/support/config-cookbooks/vlan-configuration-cookbook/" target="_blank">http://openvswitch.org/<u></u>support/config-cookbooks/vlan-<u></u>configuration-cookbook/</a><br>
<br>
[2]: <a href="http://wiki.libvirt.org/page/Networking" target="_blank">http://wiki.libvirt.org/page/<u></u>Networking</a><br>
<br>
<br>
</blockquote>
<br>
<br>
-- <br>
<br></div></div>
Sincerely yours, Ilya Ponetayev <<a href="mailto:instenet@gmail.com" target="_blank">instenet@gmail.com</a>><br>
<br>
<br>_______________________________________________<br>
CentOS-virt mailing list<br>
<a href="mailto:CentOS-virt@centos.org">CentOS-virt@centos.org</a><br>
<a href="http://lists.centos.org/mailman/listinfo/centos-virt" target="_blank">http://lists.centos.org/mailman/listinfo/centos-virt</a><br>
<br></blockquote></div><br></div>