bond做法

[root@BMS036 ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE="bond0"
ONBOOT="yes"
IPADDR="192.168.50.155"
NETMASK="255.255.255.0"
BROADCAST="192.168.50.255"
GATEWAY="192.168.50.1"
BOOTPROTO="none"
USERCTL="no"
[root@BMS036 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO="none"
DEVICE="eth0"
#HWADDR="78:2B:CB:48:CB:D7"
ONBOOT="yes"
MASTER="bond0"
USERCTL="no"
SLAVE="yes"

[root@BMS036 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
BOOTPROTO="none"
DEVICE="eth1"
#HWADDR="78:2B:CB:48:CB:D9"
ONBOOT="yes"
MASTER="bond0"
USERCTL="no"
SLAVE="yes"

 

 

 

 

 

[root@supermaster ifcfg]# rm -rf /etc/init.d/NetworkManager ^C
[root@supermaster ifcfg]# ls
ifcfg-bond0  ifcfg-bond1  ifcfg-em1  ifcfg-em2  ifcfg-em3  ifcfg-em4  ifcfg-lo
[root@supermaster ifcfg]# cd ..
[root@supermaster bondconf_example]# ls
bond0.conf  bond1.conf  ifcfg
[root@supermaster bondconf_example]# cp bond* /etc/modprobe.d/^C

[root@supermaster bondconf_example]# ls
bond0.conf  bond1.conf  ifcfg
[root@supermaster bondconf_example]# cat bond0.conf
alias bond0 bonding
options bond0 miimon=100 mode=1
[root@supermaster bondconf_example]# cat bond1.conf
alias bond1 bonding
options bond1 miimon=100 mode=1

 

[root@supermaster bondconf_example]# ls
bond0.conf  bond1.conf  ifcfg
[root@supermaster bondconf_example]# cd ifcfg/
[root@supermaster ifcfg]# lks
-bash: lks: command not found
[root@supermaster ifcfg]# ls
ifcfg-bond0  ifcfg-bond1  ifcfg-em1  ifcfg-em2  ifcfg-em3  ifcfg-em4  ifcfg-lo
[root@supermaster ifcfg]# cat ifcfg-bond0
DEVICE="bond0"
ONBOOT="yes"
#IPADDR="192.168.51.112"
PREFIX=24
#GATEWAY="192.168.51.1"
BOOTPROTO="none"
USERCTL="no"
[root@supermaster ifcfg]# cat ifcfg-bond1
DEVICE="bond1"
ONBOOT="yes"
#IPADDR="192.168.51.112"
PREFIX=24
#GATEWAY="192.168.51.1"
BOOTPROTO="none"
USERCTL="no"

[root@supermaster ifcfg]# cat ifcfg-em1
BOOTPROTO=none
DEVICE=em1
ONBOOT=yes
MASTER="bond0"
USERCTL=no
SLAVE=yes
TYPE=Ethernet
IPV6INIT=no
[root@supermaster ifcfg]# cat ifcfg-em2
BOOTPROTO=none
DEVICE=em2
ONBOOT=yes
MASTER="bond0"
USERCTL=no
SLAVE=yes
TYPE=Ethernet
IPV6INIT=no
[root@supermaster ifcfg]# cat ifcfg-em3
BOOTPROTO=none
DEVICE=em3
ONBOOT=yes
MASTER="bond1"
USERCTL=no
SLAVE=yes
TYPE=Ethernet
IPV6INIT=no
[root@supermaster ifcfg]# cat ifcfg-em4
BOOTPROTO=none
DEVICE=em4
ONBOOT=yes
MASTER="bond1"
USERCTL=no
SLAVE=yes
TYPE=Ethernet
IPV6INIT=no

[root@supermaster ifcfg]# cat ifcfg-lo
DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback

转载于:https://www.cnblogs.com/lubing666666/p/4403058.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值