服务器上有一张网卡KVM虚拟机网桥,模拟出多套虚拟网桥
登陆交换机Mellanox Cumulus
第一步:创建桥 - 名称为bridge
sudo brctl addbr bridge
第二步:添加接口至master bridge
sudo brctl addif br0 swp17
启动master bridge接口
sudo ifconfig bridge up
第三部:添加接口至vlan
vconfig add <vlan-interface> <physical-interface>
cumulus@10G-1-1-1:mgmt:~$ sudo vconfig add swp19 97
Warning: vconfig is deprecated and might be removed in the future, please migrate to ip(route2) as soon as possible!
查看一下刚才新添加的vlan
cumulus@10G-1-1-1:mgmt:~$ sudo cat /proc/net/vlan/config
VLAN Dev name | VLAN ID
Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD
peerlink.4094 | 4094 | peerlink
swp17.97 | 97 | swp17
swp19.97 | 97 | swp19
swp18.98 | 98 | swp18
swp20.98 | 98 | swp20
查看桥中包含的vlan接口
cumulus@10G-1-1-1:mgmt:~$ brctl show
bridge name bridge id STP enabled interfaces
bridge 8000.043f72438c10 no bond29
bond31
bond33
bond35
bond37
bond39
bond41
bond43
bond45
bond7
bond9
peerlink
swp1
swp11
swp12
swp15
swp16
swp17 -------sE-I RDMA 25GB port-1
swp18 -------sE-I RDMA 25GB port-2
swp19 -------sE-II RDMA 25GB port-1
swp20 -------sE-II RDMA 25GB port-2
swp21 -------pB宿主机 Broadcom 10GB port-1
swp22 -------pB宿主机 Broadcom 10GB port-2
swp23 -------sB宿主机 Broadcom 10GB port-1
swp24 -------sB宿主机 Broadcom 10GB port-1
swp25 -------cL宿主机 Broadcom 10GB port-1
swp26 -------cL宿主机 Broadcom 10GB port-1
swp3
swp4
swp48
swp5
swp6
vlan 8000.000000000000 yes
Latest Interface & Vlan
最后要记得保存交换机配置
sudo cl-save-config