Ubuntu配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| cat /etc/netplan/00-installer-config.yaml network: ethernets: ens3f1: {} ens3f0: {} renderer: networkd bonds: bond4: addresses: [10.10.2.1/16] gateway4: 10.10.1.254 nameservers: addresses: [114.114.114.114,202.96.128.86,8.8.8.8] interfaces: - ens3f1 - ens3f0 parameters: mode: 802.3ad mii-monitor-interval: lacp-rate: fast transmit-hash-policy: layer3+4
netplan apply
|
Centos配置
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 44 45 46 47 48 49 50 51 52
| 参考文档:https://support.huawei.com/enterprise/zh/knowledge/EKB1100053867
mkdir /opt/net_bak cd /etc/sysconfig/network-scripts cp ifcfg-* /opt/net_bak
nmcli connection add type bond ifname bond4 mode 4
nmcli connection add type bond-slave ifname ens1f0 master bond4 nmcli connection add type bond-slave ifname ens6f0 master bond4
nmcli connection add type bond ifname bond20 mode 4
nmcli connection add type bond-slave ifname ens1f1 master bond20 nmcli connection add type bond-slave ifname ens6f1 master bond20
ls ifcfg-bond-* ifcfg-bond-bond0 ifcfg-bond-slave-enp125s0f0 ifcfg-bond-slave-enp125s0f1
nmcli con show
vim ifcfg-bond-bond4 vim ifcfg-bond-bond20
BONDING_OPTS='mode=4 miimon=100 xmit_hash_policy=layer3+4'
nmcli con reload systemctl restart network.service
ip addr
cat /proc/net/bond/bond0 ethtool bond0
|
交换机配置
1 2 3 4 5 6 7 8 9
| interface Eth-Trunk10 mode lacp-static
interface GigabitEthernet0/0/1 eth-trunk 10
interface GigabitEthernet0/0/2 eth-trunk 10
|