• SLES Suse Linux 11SP4 双网卡绑定bonding实施


    1. 创建bond0文件:

    #vim /etc/sysconfig/network/ifcfg-bond0
    BOOTPROTO='static'
    BROADCAST=''
    IPADDR='192.168.74.141/24'
    NETMASK='255.255.255.0'
    NETWORK=''
    STARTMODE='auto'
    BONDING_MASTER='yes'
    BONDING_SLAVE0='eth0'
    BONDING_SLAVE1='eth1'
    BONDING_MODULE_OPTS='mode=1 miimon=100 fail_over_mac=1'
    ETHTOOL_OPTIONS=''
    MTU=''
    NAME=''
    REMOTE_IPADDR=''
    USERCONTROL='no'

    解析说明:
    mode 0表示为负载均衡模式,两块网卡都工作(需要交换机端口聚合,在SLES 12SP3上用此模式测试未通过)
    mode 1表示冗余模式,一块是工作,一块冗余
    miimon表示系统检查间隔时间,单位是ms,
    fail_over_mac=1 在Vmware里测试时使用,否则Ping会断开

    例如:每100ms检查一次,当发现一条线路不通,就转入另一条

    2. 修改网卡配置:

    #vim /etc/sysconfig/network/ifcfg-eth0
    BOOTPROTO='none'             #配置bond时必需将static,dhcp改为none
    BROADCAST=''
    ETHTOOL_OPTIONS=''
    IPADDR=''                    #配置bond时必需将IP置空
    MTU=''
    NAME='82545EM Gigabit Ethernet Controller (Copper)'
    NETWORK=''
    REMOTE_IPADDR=''
    STARTMODE='off'              #配置bond时必需将auto改为off
    USERCONTROL='no'
     
    #vim /etc/sysconfig/network/ifcfg-eth1
    BOOTPROTO='none'             #配置bond时必需将static,dhcp改为none
    BROADCAST=''
    ETHTOOL_OPTIONS=''
    IPADDR=''                    #配置bond时必需将IP置空
    MTU=''
    NAME='82545EM Gigabit Ethernet Controller (Copper)'
    NETWORK=''
    REMOTE_IPADDR=''
    STARTMODE='off'              #配置bond时必需将auto改为off
    USERCONTROL='no'

    3. 重启网络服务,或是重启主机操作系统

    #service network restart
    #shutdown -r 0

    4. 查看状态及测试

    #ifconfig                    #可以看到bond0已经起来了
    #cat /proc/net/bonding/bond0
    Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
    
    Bonding Mode: fault-tolerance (active-backup) (fail_over_mac active)
    Primary Slave: None
    Currently Active Slave: eth0
    MII Status: up
    MII Polling Interval (ms): 100
    Up Delay (ms): 0
    Down Delay (ms): 0
    
    Slave Interface: eth0
    MII Status: up
    Speed: 1000 Mbps
    Duplex: full
    Link Failure Count: 3
    Permanent HW addr: 00:0c:29:5f:57:a4
    Slave queue ID: 0
    
    Slave Interface: eth1
    MII Status: up
    Speed: 1000 Mbps
    Duplex: full
    Link Failure Count: 3
    Permanent HW addr: 00:0c:29:5f:57:ae
    Slave queue ID: 0
    #ifconfig eth0 down
    #ifconfig eth0 up
    #ifconfig eth1 down
    #ifconfig eth1 up
  • 相关阅读:
    MongoDB的索引(六)
    DMZ原理与应用
    MongoDB的增、删、改、查操作(五)
    一分钟了解mongodb(转)
    mongodb-java-driver基本用法
    Mongodb相对于关系型数据库的优缺点(转)
    什么场景应该用 MongoDB(转)
    MongoDB使用场景和局限 (转)
    matlab7与win7不兼容
    sublime的使用
  • 原文地址:https://www.cnblogs.com/zlg88/p/7660642.html
Copyright © 2020-2023  润新知