Open vSwitch Integration with P-Virtualization

Somehow it was necessary to integrate Open vSwitch (OVS) with R-virtualization plus R-storage (RP), it can be useful and not only with RP.



The current version of the RP at the time of the article was 7.0.13-31 , the core in this version is 3.10.0-1062.12.1.rv7.131.10.1, which corresponds to the RedHat version 7.7, and the OVS version that comes with the RP repository was 2.0. 0. The list of functionality on OVS 2.0.0 can be found here . The keys for the RP can be found here .





The goal was to try to configure VXLAN and a virtual switch as an alternative to the native kvm-qemu and libvirt bridges. If you use the bare OpenSource kvm-qemu, then everything is fine with OVS, but I wanted to try it with RP, where not just bare kvm-qemu + libvirt, but a lot of patches to this bundle is vstorage .



Iron



. , SSD, SSD HDD. 10 , 20 5 OVS - OVS. Synergy c 3 , JBOD .





:



  1. , IP IP -, IP -. 3, (/) HDD, -, SSD . IP .
  2. IP -, , , ( ssh, , web cp) (ssh, ).
  3. , , , SSD HDD ( ).
  4. , IP -, . - - , IP , .
  5. IP ssh cli , IP - - .
  6. - 2-3 .
  7. 2 3 .. 3 , 2, .
  8. IP - . , , “ ” ( ) - .
  9. vstorage-ui va-nm , .
  10. ssh HA , IP , #shaman stat.
  11. , CentOS 7.


5:



#/usr/libexec/vstorage-ui-agent/bin/register-storage-node.sh -m 10.43.10.14 -t ec234873


HA 10:



#hastart -c   -n 192.168.10.0/24 


HA, :



[root@n3 ~]# shaman stat
Cluster 'rptest'
Nodes: 3
Resources: 7

    NODE_IP           STATUS     ROLES                RESOURCES
    192.168.10.10     Active     VM:QEMU,CT:VZ7       0 CT, 0 VM
    192.168.10.11     Active   VM:QEMU,CT:VZ7       0 CT, 0 VM
*M 192.168.10.12     Active     VM:QEMU,CT:VZ7       2 CT, 0 VM


OVS



OVS :



#yum install openvswitch 




#ovs-vsctl show 


:



[root@node1 ~]# ovs-vsctl show
180c5636-2d3d-4e08-9c95-fe5e47f1e5fa
ovs_version: "2.0.0"
[root@node1 ~]#


, .



# ovs-vsctl add-br ovsbr0 


, .

.



#ovs-vsctl add-br brlv140 ovsbr0 140 


- , .

, xml :



<network>
 <name>ovsvl</name>
 <forward mode='bridge'/>
 <bridge name='brlv140'/>
 <vlan>
  <tag id='140'/>
</vlan>
<virtualport type='openvswitch'/>
</network>


ui - OVS, cli. ui, cli ovsvl ovsvl2 Bridged. , cli ui OVS Bridged.



:



#virsh net-list --all 


:



#virsh net-define ovsvl.xml 


/



#virsh net-start ovsvl




#virsh net-autostart ovsvl




#virsh edit  


, ():



<interface type='bridge'>
      <mac address='00:1c:42:c6:80:06'/>


  <vlan>
    <tag id='140'/>
  </vlan>
  <virtualport type='openvswitch'>
    <parameters interfaceid='5a70be5b-5576-4734-9f61-61cdfc4a884a'/>
  </virtualport>
  <target dev='vme001c42c68006'/>
  <model type='virtio'/>
  <boot order='2'/>
  <alias name='net0'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>




vi



:



#prlctl stop  


#prlctl start  


:



#virsh dumpxml  | grep  


VXLAN overlay:



#ovs-vsctl add-port ovsbr0 vxlan0 -- set Interface vxlan0 type=vxlan options:remote_ip=10.43.11.12 


IP . , , VPN, , , . , , MTU 1500 , vxlan , , 2000.



:



#ip link set mtu 2000 dev ens3f0


mtu2000, .



10.43.11.12 vxlan



#ovs-vsctl add-port ovsbr0 vxlan0 -- set Interface vxlan0 type=vxlan options:remote_ip=10.43.11.10


mtu.



, ssh, , . :



#tcpdump –i ens3f0 | grep 4789
```      vxlan  c  vlan 
```bash
#tcpdump -ee -vvv -i ens3f0 | grep vlan


portgroup.



xml :



 <network>
<name>ovsvl2</name>
<forward mode='bridge'/>
<bridge name='ovsbr0'/>
<virtualport type='openvswitch'/>
<portgroup name='vlan-120'>
    <vlan>
      <tag id='120'/>
    </vlan>
  </portgroup>
</network>


, .



, :



<interface type='bridge'>
      <mac address='00:1c:42:c8:f1:cd'/>


  <vlan>
    <tag id='120'/>
  </vlan>
  <virtualport type='openvswitch'>
    <parameters interfaceid='ef717aa4-23b3-4fbe-82bb-193033f933b1'/>
  </virtualport>
  <target dev='vme001c42c8f1cd'/>
  <model type='virtio'/>
  <boot order='3'/>
  <alias name='net1'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</interface>




, , .



:



#ovs-vsctl set port ens3f4 trunks=120,130
#ovs-vsctl add-port ovsbr0 ens3f4  


120 :



#ovs-vsctl add-port ovsbr0 vlan120 tag=120 -- set interface vlan120 type=internal


, :



#ovs-vsctl add-port ovsbr0 vlan120 tag=120 -- set interface vlan120 type=internal


.



OVS



image

#ovs-vsctl show . vme , OVS.



image

#ovs-vsctl show



image



virsh net-list 4 , Bridged Host-Only - , ovsvl ovsvl2 , . Ovsvl tag 140 OVS, ovsvl2 portgroup tag 120. Portgroup - VLAN . #virsh net-dumpxml ovsvl ovsvl2 .



image



, :



 #virsh dumpxml 




OVS networkmanager(NM), , NM , , NM , .



OVS NM, OVS . , NM .



OVS, OVS , , - .



image



ping OVS OVS, . 4 vCPU, 8GB RAM, 64GB disk.



, , OVS.



ssh vxlan . tcpdump . MTU , ping, ssh .





- - OVS.



image



-, . , OVS. OVS -.



OVS.



image



OVS . OVS portgroup .



, :



image



, vxlan. , .



. vlan120 , OVS QoS . OVS, .



OVS HA(shaman) vxlan OVS, drs,round-robin shaman -.



bonding LACP(802.3ad) c layer2+3 layer3+4, OVS.



br0 , ovsbr0 IP , br0, ovsbr0 br0. IP br0 , br0, . cli br0 vxlan option, br1 c IP eth2 eth3 , mac- , .



, ( OVS).



image



- ( - ), mac ( ovs-appctl fdb/show ovsbr0). . Portgoup vlan120 .



, - VLAN , mac . 120, mac 120.



VXLAN , static (Unicast). — vxlan. , VNI(vlan vxlan) vxlan, VNI. vxlan IP — vxlan. , vxlan- , . IP , VxLAN vxlan vxlan, . , vxlan , VNI VNI. , , mac source mac, VxLAN vxlan mac , ethernet vxlan, . — VxLAN .



— , BUM vxlan , vxlan vxlan- () . - . , OVS , .



vxlan.



Static (Unicast) VxLAN — , . .

flood&Learn OVS.





OVS , , , ))) .



:



  1. https://www.sidorenko.io/post/2018/11/openstack-networking-open-vswitch-and-vxlan-introduction/
  2. https://blog.remibergsma.com/2015/03/26/connecting-two-open-vswitches-to-create-a-l2-connection/
  3. http://mx54.ru/nastrojka-setevyx-interfejsov-v-kvm-dlya-virtualnyx-mashin/
  4. https://kamaok.org.ua/?p=2677
  5. https://kashyapc.fedorapeople.org/virt/add-network-card-in-guest.txt
  6. https://costiser.ro/2016/07/07/overlay-tunneling-with-openvswitch-gre-vxlan-geneve-greoipsec/#.XuZ960UzaM_



All Articles