链路聚合

2019-01-28  本文已影响0人  aneirin

链路聚合是一种提高服务器带宽直接有效的方法。本文的实验环境:交换机型号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

上一篇下一篇

猜你喜欢

热点阅读