服务器上有一张网卡KVM虚拟机网桥,模拟出多套虚拟网桥
登陆交换机Mellanox Cumulus
第一步:创建桥 - 名称为bridge
sudo brctl addbr bridge第二步:添加接口至master bridge
sudo brctl addif br0 swp17启动master bridge接口
sudo ifconfig bridge up第三部:添加vlan和接口
net add vlan 97,98net show bridge vlannet add interface swp17-20net add interface swp17 bridge access 97net add interface swp19 bridge access 97net add interface swp18 bridge access 98net add interface swp20 bridge access 98net add interface swp21-24net add interface swp21 bridge access 97net add interface swp23 bridge access 97net add interface swp25 bridge access 97net add interface swp22 bridge access 98net add interface swp24 bridge access 98net add interface swp26 bridge access 98net pendingnet commit查看桥中包含的vlan接口
cumulus@10G-1-1-1:mgmt:~$ brctl show
bridge name bridge id       STP enabled interfaces
bridge      8000.043f72438c10   no      bond29bond31bond33bond35bond37bond39bond41bond43bond45bond7bond9peerlinkswp1swp11swp12swp15swp16swp17        -------sE-I  RDMA 25GB port-1swp18        -------sE-I  RDMA 25GB port-2swp19        -------sE-II RDMA 25GB port-1swp20        -------sE-II RDMA 25GB port-2swp21        -------pB宿主机 Broadcom 10GB port-1swp22        -------pB宿主机 Broadcom 10GB port-2swp23        -------sB宿主机 Broadcom 10GB port-1swp24        -------sB宿主机 Broadcom 10GB port-1swp25        -------cL宿主机 Broadcom 10GB port-1swp26        -------cL宿主机 Broadcom 10GB port-1swp3swp4swp48swp5swp6
vlan        8000.000000000000   yes    Latest Interface & Vlan查看网络
cumulus@10G-1-1-1:mgmt:~$ net show bridge vlanInterface  VLAN   Flags
---------  -----  ---------------------
swp1       100    PVID, Egress Untagged
swp3       100    PVID, Egress Untagged
swp4       100    PVID, Egress Untagged
swp5       100    PVID, Egress Untagged
swp6       100    PVID, Egress Untagged
swp11      100    PVID, Egress Untagged
swp12      100    PVID, Egress Untagged
swp15      100    PVID, Egress Untagged
swp16      100    PVID, Egress Untagged
swp17      97     PVID, Egress Untagged -- eE-I 
swp18      98     PVID, Egress Untagged -- eE-I 
swp19      97     PVID, Egress Untagged -- 空 rdma引起OS卡顿已拔掉
swp20      98     PVID, Egress Untagged -- 空 rdma引起OS卡顿已拔掉
swp21      97     PVID, Egress Untagged
swp22      98     PVID, Egress Untagged
swp23      97     PVID, Egress Untagged
swp24      98     PVID, Egress Untagged
swp25      97     PVID, Egress Untagged
swp26      98     PVID, Egress Untagged
swp48      132    PVID, Egress Untagged
peerlink   1      PVID, Egress Untagged97-98  []100132