?
步骤1:开启EiPOIB
编辑默认"no"为"yes"
/etc/infiniband/openib.conf
E_IPOIB_LOAD=yes
步骤2:重启hca卡驱动。
/etc/init.d/openibd restart
重启后会生成以太网卡,可用ethtool exxx确认网卡速率。
如果服务重启失败,就重启os咯。
?
?
步骤3:查看eipoib以太网口和ib网口对应关系
[[email protected] src]# cat /sys/class/net/eth_ipoib_interfaces
ens865 over IB port: ib0
ens865d1 over IB port: ib1
ens801 over IB port: ib2
ens801d1 over IB port: ib3
[[email protected] src]#
?
步骤4:查看eipoib以太网卡mac地址
[[email protected] eth]# cat /sys/class/net/ens865/eth/vifs
SLAVE=ib0.1 MAC=00:02:c9:44:8a:81 VLAN=N/A
SLAVE=ib0.2 MAC=00:02:c9:36:3f:71 VLAN=N/A
[[email protected] eth]# cat /sys/class/net/ens865d1/eth/vifs
SLAVE=ib1.1 MAC=00:02:c9:44:8a:82 VLAN=N/A
[[email protected] eth]# cat /sys/class/net/ens801/eth/vifs
SLAVE=ib2.1 MAC=00:02:c9:36:3f:71 VLAN=N/A
SLAVE=ib2.2 MAC=00:02:c9:44:8a:81 VLAN=N/A
[[email protected] eth]# cat /sys/class/net/ens801d1/eth/vifs
SLAVE=ib3.1 MAC=00:02:c9:36:3f:72 VLAN=N/A
[[email protected] eth]#
步骤5: 用eipoib以太网卡做虚拟化桥接用
[[email protected] network-scripts]# cat ifcfg-ens801
DEVICE=ens801
ONBOOT=yes
BOOTPROTO=none
BRIDGE=br0
MACADDR=00:02:c9:36:3f:71
?
[[email protected] network-scripts]# cat ifcfg-ens865
DEVICE=ens865
ONBOOT=yes
BOOTPROTO=none
BRIDGE=br0
MACADDR=00:02:c9:44:8a:81
?
[[email protected] network-scripts]# cat ifcfg-br0
DEVICE=br0
TYPE=Bridge
ONBOOT=yes
BOOTPROTO=none
IPADDR=192.168.100.20
NETMASK=255.255.255.0
[[email protected] network-scripts]#
?
?
[[email protected] eth]# brctl show
bridge name????bridge id????????STP enabled????interfaces
br0????????8000.0002c9363f71????no????????ens801
????????????????????????????ens865
?
?
?
12: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65520 qdisc noqueue state UP
link/ether 00:02:c9:36:3f:71 brd ff:ff:ff:ff:ff:ff
inet 192.168.100.20/24 brd 192.168.100.255 scope global br0
valid_lft forever preferred_lft forever
inet6 fe80::202:c9ff:fe36:3f71/64 scope link
valid_lft forever preferred_lft forever