[CentOS-virt] proper bridging technoque

Thu Nov 21 22:45:24 UTC 2013
Digimer <lists at alteeve.ca>

On 21/11/13 17:42, aurfalien wrote:
> 
> On Nov 21, 2013, at 2:36 PM, Digimer wrote:
> 
>> On 21/11/13 17:32, aurfalien wrote:
>>>
>>> On Nov 21, 2013, at 2:24 PM, Digimer wrote:
>>>
>>>> I'm not sure what you are asking.
>>>>
>>>> You should not see the vnetX devices from the VM (or even the VM's
>>>> definition file). They're created as needed to link the VM's interface
>>>> to the bridge. Think of them as simple network cables.
>>>>
>>>> Some of the formatting isn't showing well on my mail client (text only),
>>>> so I am having a little trouble parsing some of the data...
>>>>
>>>> If the VMs are using br6, then you see that it's already at 9000, so you
>>>> should be able to use 9000 from inside the VM as well. Trick is, the
>>>> vnetX devices are connected to the br0 bridge instead, which is set to
>>>> 1500 because eth0 is still 1500. So at this point, the VMs are
>>>> traversing br0, not br6.
>>>>
>>>> As for 'virbr0', that is libvirtd's default NAT'ed bridge. I don't
>>>> recommend using those. I usually destroy them, personally.
>>>>
>>>> So to fix your problem, you need to tell the VMs to use br6. If you want
>>>> to use jumbo frames on br0, you need to increase the MTU of eth0.
>>>> Remember that the bridge will use the MTU of the lowest connected device.
>>>
>>> So far my current VMs that work, I see there network as;
>>>
>>> Host device vnet 0 (Bridge 'br0')
>>>
>>> I do not see a;
>>>
>>> Host device vnet# (Bridge 'br6')
>>>
>>> My ints of interest are set to jumbo so thats not a prob.  I think the prob is that I am missing the vnet bridge device for eth6.
>>>
>>> So I'm curious why its not there and how do I create it?
>>>
>>> - aurf
>>
>> I can't speak to the tools you are using, but I can say that this is
>> where the bridge is defined in the VM's XML definition file:
>>
>> ====
>> [root at an-c05n01 ~]# cat /shared/definitions/vm01-win2008.xml |grep vbr
>> -B 2 -A 5
>>    <interface type='bridge'>
>>      <mac address='52:54:00:8e:67:32'/>
>>      <source bridge='vbr2'/>
>>      <target dev='vnet0'/>
>>      <model type='virtio'/>
>>      <alias name='net0'/>
>>      <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
>> function='0x0'/>
>>    </interface>
>> ====
>>
>> Try changing: <source bridge='br0'/> -> <source bridge='br6'/> and
>> restart the VM.
> 
> It already has the source bridge as br6.
> 
> But I think I need to have a;
> 
> vnet6 to br6 relationship defined somewhere.
> 
> Right now I only see;
> 
> Host device eth6 to br6 but I need vnet6 to br6 or something like that.
> 
> Currently, while my guest VM sees its int via ifconfig, it cannot get an packets to/from.
> 
> This is why I feel the need for a vnet to br6.
> 
> 
> - aurf

The 'vnetX' number doesn't relate to the interface, bridge or anything
else. The vnetX number is a simple sequence that increments each time a
VM is started. So don't think that you need 'vnet6'... it can be anything.

The 'brctl show' output from earlier showed that both vnet0 and vnet1
were connected to br0. You can try using the bridge utils to remove them
from br0 and connect them to br6 as a test.

-- 
Digimer
Papers and Projects: https://alteeve.ca/w/
What if the cure for cancer is trapped in the mind of a person without
access to education?