在所有节点上配置,使能bond提升网络带宽,本章节以ceph1节点和Ubuntu操作系统为例进行配置说明。
1 | vi /etc/netplan/50-cloud-init.yaml
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | # This file is generated from information provided by the datasource. Changes # to it will not persist across an instance reboot. To disable cloud-init's # network configuration capabilities, write a file # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following: # network: {config: disabled} network: ethernets: enp125s0f0: addresses: - 192.168.2.166/24 # 管理IP地址 nameservers: addresses: [] search: [] routes: - to: default via: 192.168.2.0 # 网关 #-----------以下为bond新增内容---------------- enp3s0: dhcp4: false enp4s0: dhcp4: false enp5s0: dhcp4: false enp6s0: dhcp4: false bonds: bond0: # bond设备名称 addresses: [192.168.3.166/24] # bond后的ip地址 interfaces: - enp3s0 # 组bond的设备1,设备要与交换机组bond/trunk的端口匹配 - enp4s0 # 组bond的设备2,设备要与交换机组bond/trunk的端口匹配 parameters: mode: 802.3ad bond1: addresses: [192.168.4.166/24] interfaces: - enp5s0 - enp6s0 parameters: mode: 802.3ad version: 2 |
1 | netplan apply
|
若WARNING提示没有open vswitch,执行以下命令安装open vswitch即可。
apt install openvswitch-switch
1 2 | apt install net-tools ifconfig #or ip a |