首页 > 系统相关 >centos7 做bond1

centos7 做bond1

时间:2023-03-28 18:35:02浏览次数:49  
标签:sysconfig bond1 ifcfg centos7 etc scripts network

使用network后,发现切换bond后有残留配置,于是切换到了NetworkManager

cat >/etc/sysconfig/network-scripts/ifcfg-bond0<< EOF_bond1
NAME=bond1
DEVICE=bond1
TYPE=Bond
ONBOOT=yes
BOOTPROTO=static
IPADDR=10.1.14.96
NETMASK=255.255.255.0  
GATEWAY=10.1.14.254
#NM_CONTROLLED=no
USERCTL=no
BONDING_OPTS="mode=0 miimon=100"
EOF_bond1

cat >/etc/sysconfig/network-scripts/ifcfg-eno1<< EOF_eno1
TYPE=Ethernet
BOOTPROTO=none
NAME=eno1
DEVICE=eno1
ONBOOT=yes
MASTER=bond1
SLAVE=yes
#NM_CONTROLLED=no
USERCTL=no
EOF_eno1


cat  >/etc/sysconfig/network-scripts/ifcfg-eno2 <<EOF_eno2
TYPE=Ethernet
BOOTPROTO=none
NAME=eno2
DEVICE=eno2
ONBOOT=yes
MASTER=bond1
SLAVE=yes
#NM_CONTROLLED=no
USERCTL=no
EOF_eno2

systemctl enable NetworkManager --now;
systemctl disable network --now; 
nmcli connection reload;nmcli networking off;nmcli networking on

cat /proc/net/bonding/bond1

 

标签:sysconfig,bond1,ifcfg,centos7,etc,scripts,network
From: https://www.cnblogs.com/santia-god/p/17266269.html

相关文章

  • Centos7 安装 mysql 8
    安装1.配置yum仓库#更新密钥rpm-importhttps:/repo.mysql.com/RPM-GPG-KEYmysql-202#安装Mysql8.x版本yum库rpm-Uvhhttps:/dev.mysql.com/get/mysql80-commu......
  • Centos7安装Python3.7
    说明:全部操作都在root用户下执行,python3.7安装在/root/python3目录下1.安装编译相关工具yum-ygroupinstall"Developmenttools"yum-yinstallzlib-develbzip2-dev......
  • centos7 yum -y install nodejs安装npm时报错,处理方法
     centos7yum-yinstallnodejs安装npm时报错,处理方法安装npm时报错,处理方法sudo:npm:commandnotfoundsudoyum-yinstallnodejsLoadedplugins:fastestmirr......
  • centos7升级openssh9.3p1
    centos7升级openssh9.3p1制作rpm包安装依赖包yuminstall-yrpm-buildgccgcc-c++glibcglibc-developenssl-developensslpcre-develzlibzlib-develmakewget......
  • centos7设置jar包开机自启动
    在linux运行jar包的命令是java -jar xxx.jar如果想要在后台运行的话就加&,终端退出后命令仍旧执行java-jarxxx.jar&这样退出当前远程登录界面这个jar包也......
  • centos7安装Docker(转)
    原文:https://cloud.tencent.com/developer/article/17014511、安装前必读在安装Docker之前,先说一下配置,我这里是Centos7Linux内核:官方建议3.10以上,3.8以上貌似也可......
  • linux (CentOS7.5_x86_64)下安装mysql8.0
    #下载mysql$wgethttp://mirrors.163.com/mysql/Downloads/MySQL-8.0/mysql-8.0.13-el7-x86_64.tar.gz#解压$mysqltar-zxvfmysql-8.0.4-rc-linux-glibc2.12-x86_6......
  • Centos7扩充root分区
    前言安装Centos7系统的时候,如果没有自定义分区,系统默认分配给root分区的空间只有50G,其它空间都分配给了我们创建的普通用户的home分区。我们可以使用df-h命令来查看各个......
  • centos7 yum 安装nodejs 16,搭建编译vue项目环境
    1、安装nodejscurl-fsSLhttps://rpm.nodesource.com/setup_16.x|sudobash-sudoyuminstallnodejsnode-v2、安装yarn#安装yarnnpminstall-gyarn#查......
  • centos7 安装maven3.9
    1、创建目录cd/homemkdirmavencd/maven2、下载包wgethttps://mirrors.cnnic.cn/apache/maven/maven-3/3.9.0/binaries/apache-maven-3.9.0-bin.tar.gz 3、......