https://blog.csdn.net/u012881151/article/details/54910847
1.環境
CentOS Linux release 7.2.1511 (Core)
linux core 3.10.0-327.el7.x86_64
2.問題描述
配置網卡綁定時,bond 網卡配置文件已經配置完畢
同時,/etc/modprobe.conf 下,也已完成配置。
使用 modprobe bonding 能夠加載相應模塊
重啟網絡服務后,bond0 能夠正確運行。
那么問題來了
重啟后,模塊就沒了,只能手動再進行加載
3.配置文件(隨便復制了個)
/etc/sysconfig/network-scripts
# vi ifcfg-bond0
DEVICE=bond0
IPADDR=192.168.122.12
NETMASK=255.255.255.0
GATEWAY=192.168.122.1
NM_CONTROLLED=no
BOOTPROTO=none
ONBOOT=yes
# vi ifcfg-eth0
DEVICE=eth0
USERCTL=no
ONBOOT=yes
NM_CONTROLLED=no
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
# vi ifcfg-eth1
DEVICE=eth1
USERCTL=no
ONBOOT=yes
NM_CONTROLLED=no
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
# vi /etc/modprobe.d/bonding.conf
alias bond0 bonding
options bond0 mode=active-backup miimon=100 downdelay=200 updelay=200
# modprobe bonding
# service network restart
4.解決方案
貌似 CentOS 6.x 以后的版本已經不使用 /etc/modprobe.conf 這個配置文件了
所以 只需要把 *.conf 文件 放到 /etc/modprobe.d 目錄下就行了
囧。。。。。。
5.參考文檔
http://www.tokiwinter.com/configuring-interface-bonding-on-centosrheloel-6-x/
————————————————
版權聲明:本文為CSDN博主「河楊」的原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/u012881151/article/details/54910847