首页 > 其他分享 >bond0配置

bond0配置

时间:2022-12-05 23:36:01浏览次数:50  
标签:slave nmcli 配置 sysconfig bond0 con bond

手动配置bond0

#bond0 配置
cat > /etc/sysconfig/network-scripts/ifcfg-bond0 <<EOF
NAME=bond0
TYPE=bond
DEVICE=bond0
BOOTPROTO=none
IPADDR=10.0.0.100
PREFIX=8
BONDING_OPTS="mode=1 miimon=100 fail_over_mac=1"
EOF

#eth0的bond0配置
cat > /etc/sysconfig/network-scripts/ifcfg-eth0 <<EOF
NAME=eth0
DEVICE=eth0
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
onboot=yes
EOF

#eth1的bond0配置
cat > /etc/sysconfig/network-scripts/ifcfg-eth1 <<EOF
NAME=eth1
DEVICE=eth1
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
onboot=yes
EOF

#查看bond0状态
/prov/net/bonding/bond0

#删除bond0
ifconfig bond0 down

 

nmcli实现bond0

#添加bond接口
nmcli con add type bond con-name mybond0 ifname bond0 mode active-backup ipv4.method manual ipv4.addresses 10.0.0.100/24

#添加从属接口
nmcli con add type bond-slave ifname eth0 master bond0
nmcli con add type bond-slave ifname eth1 master bond0

#要启动绑定,必须首先启动从属接口
nmcli con up bond-slave-eth0
nmcli con up bond-slave-eth1

#启动绑定
nmcli con up mybond0

 

标签:slave,nmcli,配置,sysconfig,bond0,con,bond
From: https://www.cnblogs.com/glinux/p/16953887.html

相关文章

  • hexo博客配置教程
    咱自己的博客配置教程喵~成品展示:沨鸾的小窝前期准备:本博客在linux环境下搭建,部分内容于windows下稍有不同。你需要:git,ssh,nodejs,npm,github-cli。你可能还需要:一个脑子......
  • termux配置文件分享
    termux版本:这里猫猫比较喜欢termux-monet,带有monet取色支持和背景自定义。链接:HardcodedCat/termux-monet欢迎信息:原版:Generator/termux-motd修改版:Moe-hacker/termux......
  • VMware WorkStation NAT模式配置
    vmwareworkstation17下载地址 ​​https://download3.vmware.com/software/WKST-1700-WIN/VMware-workstation-full-17.0.0-20800274.exe​1.检查Linux虚拟机的网络连接......
  • Cmder简单配置
    右键加入:Cmder.exe/REGISTERALL解决中文乱码:找到Startup选项下的Environment,追加这些命令setPATH=%ConEmuBaseDir%\Scripts;%PATH%setLANG=zh_CN.UTF-8setLC_ALL=......
  • axios基本配置
    点击查看代码<!--axios基础用法--><script>/***axios:一款基于promise设计模式封装的ajax库(JQ中的ajax就是最普通的ajax库,没有基于promise管......
  • git 配置多个账号(你的&公司)
    配置步骤如下: 第一步:生成ssh密钥时,多对密钥,要取不同的名字,用来区分(例如我比较喜欢用平台命名,命名为github和gitlab)第二步:远程git配置ssh公钥,各自配置各自平台。......
  • 【三维重建】Ubuntu20.04进行RealSenseD435环境配置及初步使用
    一、环境配置github上面的教程:https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md比较完整的配置博客:https://blog.csdn.net/wang......
  • burpsuite和浏览器配置正确抓不到火狐的数据包的解决办法
    按照下图步骤在burpsuite中导出CA证书点击DER格式的证书,然后点击下一步点击选择文件在弹出的框中设置文件名与文件目录点击保存后来到下图,点击下一步证书导出完成,在你设置的......
  • 源代码配置安装Apache
    源代码配置安装Apache......
  • CentOS、Ubuntu配置网卡IP
    自定义网卡名称CentOS6及以前网络接口使用连续号码命名,如eth0、eth1、eth2等。当增加或删除网卡时,名称可能发送变化CentOS7及以上版本使用基于硬件设备拓扑和设备类型命......