必须以某种方式将Open vSwitch(OVS)与R虚拟化加R存储(RP)集成在一起,这不仅有用,而且还有用。
在撰写本文时,RP的当前版本为7.0.13-31,此版本中的核心为3.10.0-1062.12.1.rv7.131.10.1,与RedHat版本7.7相对应,RP存储库随附的OVS版本为2.0。 0。可以在此处找到OVS 2.0.0的功能列表。RP的密钥可以在这里找到。
目标是尝试配置VXLAN和虚拟交换机,以替代本机kvm-qemu和libvirt桥。如果您使用裸露的OpenSource kvm-qemu,那么使用OVS一切都很好,但是我想在RP上尝试,其中不仅是裸露的kvm-qemu + libvirt,而且这个捆绑包的许多补丁都是vstorage。
铁
. , SSD, SSD HDD. 10 , 20 5 OVS - OVS. Synergy c 3 , JBOD .
:
- , IP IP -, IP -. 3, (/) HDD, -, SSD . IP .
- IP -, , , ( ssh, , web cp) (ssh, ).
- , , , SSD HDD ( ).
- , IP -, . - - , IP , .
- IP ssh cli , IP - - .
- - 2-3 .
- 2 3 .. 3 , 2, .
- IP - . , , “ ” ( ) - .
- vstorage-ui va-nm , .
- ssh HA , IP , #shaman stat.
- , 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
#ovs-vsctl show . vme , OVS.
#ovs-vsctl show
virsh net-list 4 , Bridged Host-Only - , ovsvl ovsvl2 , . Ovsvl tag 140 OVS, ovsvl2 portgroup tag 120. Portgroup - VLAN . #virsh net-dumpxml ovsvl ovsvl2 .
, :
#virsh dumpxml
OVS networkmanager(NM), , NM , , NM , .
OVS NM, OVS . , NM .
OVS, OVS , , - .
ping OVS OVS, . 4 vCPU, 8GB RAM, 64GB disk.
, , OVS.
ssh vxlan . tcpdump . MTU , ping, ssh .
- - OVS.
-, . , OVS. OVS -.
OVS.
OVS . OVS portgroup .
, :
, 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).
- ( - ), 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 , , , ))) .
:
- https://www.sidorenko.io/post/2018/11/openstack-networking-open-vswitch-and-vxlan-introduction/
- https://blog.remibergsma.com/2015/03/26/connecting-two-open-vswitches-to-create-a-l2-connection/
- http://mx54.ru/nastrojka-setevyx-interfejsov-v-kvm-dlya-virtualnyx-mashin/
- https://kamaok.org.ua/?p=2677
- https://kashyapc.fedorapeople.org/virt/add-network-card-in-guest.txt
- https://costiser.ro/2016/07/07/overlay-tunneling-with-openvswitch-gre-vxlan-geneve-greoipsec/#.XuZ960UzaM_