[linux網絡] 雙網卡bonding實現冗餘/負載均衡

1 編輯/etc/modprobe.conf
  在/etc/modprobe.conf里加入如下兩行:

  alias bond0 bonding

  options bond0 mode=1 miimon=100 use_carrier=0

2 創建bond0虛擬設備
  vim /etc/sysconfig/network-scripts/ifcfg-bond0
 
  DEVICE=bond0

  BOOTPROTO=none

  ONBOOT=yes

  NETMASK=255.255.255.0

  IPADDR=192.168.68.150

  GATEWAY=192.168.68.254

3 配置 eth0 eth1

  vim /etc/sysconfig/network-scripts/ifcfg-eth0
 
  DEVICE=eth0
  BOOTPROTO=none
  ONBOOT=yes
  MASTER=bond0
  SLAVE=yes

  vim /etc/sysconfig/network-scripts/ifcfg-eth1
 
  DEVICE=eth1
  BOOTPROTO=none
  ONBOOT=yes
  MASTER=bond0
  SLAVE=yes

4 重啓系統


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章