On 02/28/2018 09:00 PM, Chris Boley wrote:
I've been tinkering with OVS on Ubuntu 16.04 with the libvirt hypervisor.

Tinkering ~> learning is always a good thing.

I've gotten the XML based networks defined in the hypervisor and I've gotten the host to understand it's interfacing with OVS.

:-)

So I'm hitting some sticking points that are starting to make me feel well.. "thick".

That's a weekly, if not daily, occurrence for me.

I built the bridge.

"sudo ovs-vsctl add-br vbridge0"

I set up an external bond port on the bridge.
ovs-vsctl add-bond vbridge0 vbond0 eth0 eth1 lacp=active other_config:lacp_time=fast trunks=2,3    *#*#I'm kind of confused about the trunks=2,3 part Do I really need that to pass the tagged frames to the Cisco Switch?

See Scott's reply.

That's brings up the bond "vbond0 tied to my vswitch0

Does it actually bring the vbond0 interface up?  Or just create it?

My config in my cisco switch is a standard 2 port etherchannel.
with the good ole:
switchport trunk encapsulation dot1q
switchport mode trunk
============================
Switch#sh mac ad
Switch#sh mac address-table | i Po1
    2    5254.0071.b1b6    DYNAMIC     Po1   << here's my VM
    1    0004.23d7.bd0c    DYNAMIC     Po1
    1    0004.23d7.bd0d    DYNAMIC     Po1

I have my libvirt network defined, when I do an "ovs-vsctl show" it looks like this:
cboley@VMHOST:~$ sudo ovs-vsctl show
126a4b57-4837-42a9-95d6-d818b35e95bd
    Bridge "vbridge0"
        Port "vbond0"
            trunks: [2, 3]
            Interface "eth1"
            Interface "eth2"
        Port "vbridge0"
            Interface "vbridge0"
                type: internal
        Port "vnet0"
            tag: 2
            Interface "vnet0"
    ovs_version: "2.5.2"

That all seems reasonable enough.

What I'm "thick" about is the fact that unless I run the following commands my bridge just won't work.
manually at the CLI of the VM host I must run.
ifconfig vbridge0 up

I'd expect that you would need to bring the vbridge0 interface up. Hence my question above.

modprobe 8021q    <<< I know why that's happening and it's an easy fix.. just stick it in the interfaces file.
vconfig add vbridge0 2
vconfig add vbridge0 3

Won't this create two additional VLAN sub-interfaces? vbridge0.2 and vbridge0.3

Are you actually using those interfaces? Or are you by chance defining them and not actually using them?

I sort of feel like bringing the vbridge0 interface up is the crux.

Also, doesn't OVS handle 802.1q VLAN tagging internally? Won't that work without the 802.1q module loaded in the kernel?

After I do that my VM's have conectivity.

ACK

So after all that said, I know my vbridge0 doesn't come up without help.. I'm not an expert, I'm just muttling through info.

Muddling and tinkering are good things.  Just learn the why along the way.

I've been using a lot of helpful info from blog.scottlowe.org BTW. His info really saved my tail with libvirt.

Yep, I've learned a LOT from Scott's blog, and I have good interactions with him on Twitter.

Should I assume it's to just create the bridge and the bond in the interfaces file manually like this instead?

I'm used to OVS creating network interfaces that the OS then works with. This includes bringing the interfaces up ("ifconfig $interface up" or "ip link set dev $interface up") and assigning IP addresses to them.

OVS has always remembered the existence of the interface and reproduced that upon reboot.

OR can I create the vbridge0 under and OVS command and make it come up automatically with OVS commands that I'm missing?

I'm not aware of a way to have OVS bring an interface up. I've always done that with the OS native tools. - Perhaps that's just my ignorance.

Though, given that the interface was up when OVS shuts down, and OVS remembers the state, I'm inclined to think that OVS can't actually set the interfaces up.

BTW.. I'm not reinvening anything and can't take credit for this idea. Some really smart person (not me ;D ) posted this:
https://zcentric.com/2014/07/07/openvswitch-kvm-libvirt-ubuntu-vlans-the-right-way/

$ReadingList++

Any guidance on how I can or should proceed would be greatly appreciated!
Thanks in advance...

I don't know if it will help or not, but that's my take on things.



--
Grant. . . .
unix || die

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to