服务器上有一张网卡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,98 net show bridge vlan net add interface swp17-20 net add interface swp17 bridge access 97 net add interface swp19 bridge access 97 net add interface swp18 bridge access 98 net add interface swp20 bridge access 98 net add interface swp21-24 net add interface swp21 bridge access 97 net add interface swp23 bridge access 97 net add interface swp25 bridge access 97 net add interface swp22 bridge access 98 net add interface swp24 bridge access 98 net add interface swp26 bridge access 98 net pending net commit
查看桥中包含的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
查看网络
cumulus@10G-1-1-1:mgmt:~$ net show bridge vlan Interface 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 Untagged 97-98 [] 100 132