bond0脚本

2022-07-25 13:25:33 浏览数 (1)

大家好,又见面了,我是你们的朋友全栈君。

#!/usr/bin/bash

this is bond0

##2021-3-28

cat > /etc/sysconfig/network-scripts/ifcfg-bond0 <<-EOF DEVICE=bond0 TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=no BOOTPROTO=none IPADDR=192.168.146.128 PREFIX=24 IPV6INIT=no USERCTL=no GATEWAY=192.168.146.2 EOF cat > /etc/sysconfig/network-scripts/ifcfg-eth0 <<-EOF DEVICE=eth0 TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=no BOOTPROTO=none IPV6INIT=no USERCTL=no MASTER=bond0 SLAVE=yes EOF cat > /etc/sysconfig/network-scripts/ifcfg-eth1 <<-EOF DEVICE=eth1 TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=no BOOTPROTO=none IPV6INIT=no USERCTL=no MASTER=bond0 SLAVE=yes EOF cat > /etc/modprobe.d/bond0.conf <<-EOF alias bond0 bonding options bonding mode=0 miimon=100 EOF systemctl restart network 查看网卡协商速率 ethtool 网卡名

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/127558.html原文链接:https://javaforall.cn

0 人点赞