天天看点

linux网络第一季运维001

  1. 实验目的双网卡绑定,解决负载均衡和主备自动切换。
  2. Linux操作系统6.5,bond0,eth1,eth2.
  3. bond0 10.10.9.126  eth1无 eth2无。
  4. 配置如下:
  5.  cd /etc/sysconfig/network-scripts/   /进入网络配置文件中
  6.  cp ifcfg-eth0 ifcfg-bond0             /复制ifcfg-eth0  改名为ifcfg-bond0 原来的ifcfg-eth0继续存在
  7. 配置ifcfg-bond0

    DEVICE=bond0    

    BOOTPROTO=none

    ONBOOT=yes

    IPADDR=10.10.9.126

    DNS=202.106.196.115

    NETMASK=255.255.255.0

    GATEWAY=10.10.9.3

    TYPE=Ethernet

  8. 配置ifcfg-eth1

     TYPE=Ethernet

    DEVICE=eth1

    BOOTPROTO=static

  9. 配置ifcfg-eth2

     DEVICE=eth2

  10. 配置vi /etc/rc.d/rc.local

    ifenslave bond0 eth2 eth1

    route add -net 10.10.0.0. netmask 255.255.255.0 bond0

  11. 配置etc/moprobe.conf

    alias eth2 e1000

    alias eth1 e1000

    alias bond0 bonding

    option bond0 miimon=100 mode=0   /mode 参数有0,1,2,3 

    0=负载均衡方式,两块网卡都工作

上一篇: History of Ajax
下一篇: 初学sql

继续阅读