Ask Your Question
0

how to use br-vlan veth pair ? what is the benefit of veth?

asked 2019-01-12 04:24:00 -0500

bel var gravatar image

updated 2019-01-12 04:26:40 -0500

Hello

I have installed openstack via ansible but i cannot find the benefit of veth pair which created in compute host interfaces' file as mentioned in official document : https://docs.openstack.org/openstack-ansible/rocky/user/prod/example.html (https://docs.openstack.org/openstack-...)

# For tenant vlan support, create a veth pair to be used when the neutron
# agent is not containerized on the compute hosts. 'eth12' is the value used on
# the host_bind_override parameter of the br-vlan network section of the
# openstack_user_config example file. The veth peer name must match the value
# specified on the host_bind_override parameter.
#
# When the neutron agent is containerized it will use the container_interface
# value of the br-vlan network, which is also the same 'eth12' value.
#
# Create veth pair, do not abort if already exists
#    pre-up ip link add br-vlan-veth type veth peer name eth12 || true
# Set both ends UP
#    pre-up ip link set br-vlan-veth up
#    pre-up ip link set eth12 up
# Delete veth pair on DOWN
#    post-down ip link del br-vlan-veth || true
#    bridge_ports bond1 br-vlan-veth

can anyone please explain more or give me some example cause in my first time i made my tests using that bridge "br-vlan" without creating the veth pair

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-01-19 19:38:07 -0500

codylab gravatar image

updated 2019-01-19 19:39:41 -0500

I had the same question and below is what I understand after chatting on IRC. Please correct me if I am wrong.

It just so happens that in the example it used br-vlan for both flat and vlan traffics. Since you would need to map flat and vlan to two different interfaces in the physical_interface_mappings, the workaround was to create a veth pair (br-vlan-veth <--> eth12) for the flat network in this case. It then plugged one end (br-vlan-veth) to br-vlan and the other (eth12) to the neutron agent.

I think the proper br-vlan configuration for the /etc/network/interfaces should look like this:

auto br-vlan
iface br-vlan inet manual
    bridge_stp off
    bridge_waitport 0
    bridge_fd 0
    pre-up ip link add br-vlan-veth type veth peer name eth12 || true
    pre-up ip link set br-vlan-veth up
    pre-up ip link set eth12 up
    post-down ip link del br-vlan-veth || true
    bridge_ports bond1 br-vlan-veth    #here br-vlan-veth is plugged into br-vlan

A side node: if you are into OSA, you should consider joining the project's IRC channel at #openstack-ansible on Freenode. Many cool folks are out there to help.

edit flag offensive delete link more

Comments

I am asking cause i try flat and vlan networks on different physnet with different physical interface without the veth pair and i haven't any problem. Also i try it with br-vlan without veth pair and there is no problem so is there any hint we can try to test this veth pair

bel var gravatar imagebel var ( 2019-01-21 04:40:43 -0500 )edit

If you have extra nics to separate flat and vlan, there is no need to create a veth pair as per the example. If you followed the example without creating a veth pair, you may have a successful deployment, but would run into errors when creating flat or vlan networks....

codylab gravatar imagecodylab ( 2019-01-21 20:16:23 -0500 )edit

.... In my case, I was unable to launch any instances because the neutron-linuxbridge-agent on network and compute nodes got terminated because it was unable to bind to "eth12" - which was non-existent on the hosts.

codylab gravatar imagecodylab ( 2019-01-21 20:19:22 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2019-01-12 04:24:00 -0500

Seen: 240 times

Last updated: Jan 19