美文网首页
链路聚合

链路聚合

作者: aneirin | 来源:发表于2019-01-28 10:15 被阅读0次

    链路聚合是一种提高服务器带宽直接有效的方法。本文的实验环境:交换机型号Dell S4048 ON万兆交换机,服务器操作系统为Debian jessie。

    交换机配置

    interface TenGigabitEthernet 1/6
     no ip address
     switchport
     no shutdown
    !
    interface Vlan 16
     no ip address
     untagged TenGigabitEthernet 1/6
     no shutdown
    

    就是将万兆口1/6加入vlan 16,其余三个口一样配置,再没有其他配置。
    服务器配置
    安装软件

    sudo apt-get install ifenslave
    

    修改配置文件/etc/modules,末尾加入

    bonding
    

    修改配置文件/etc/network/interfaces

    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    source /etc/network/interfaces.d/*
    
    auto lo
    iface lo inet loopback
    
    auto eth0
    iface eth0 inet manual
    bond-master bond0
    
    auto eth1
    iface eth1 inet manual
    bond-master bond0
    
    auto eth2
    iface eth2 inet manual
    bond-master bond0
    
    auto eth3
    iface eth3 inet manual
    bond-master bond0
    
    auto bond0
    iface bond0 inet static
        address 192.168.1.2
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1
        dns-nameservers 192.168.1.34
        dns-search example.com
        bond-mode 802.3ad
        bond-miimon 100
    

    从文件/proc/net/bonding/bond0可以查看bond0的状态
    参考文档:
    https://help.ubuntu.com/community/UbuntuBonding
    https://www.centos.org/docs/5/html/5.1/Deployment_Guide/s3-modules-bonding-directives.html

    相关文章

      网友评论

          本文标题:链路聚合

          本文链接:https://www.haomeiwen.com/subject/wmnojqtx.html