配置ubuntu 18 bonding 多网卡负载均衡

配置ubuntu 18 bonding

最近买了一台dell R510 二手服务器。发现后面有两个网口,只插一个有点浪费于是乎各种百度,Google。
终于让我找到了一个名词 “多网卡负载均衡”

Linux双网卡绑定实现就是使用两块网卡虚拟成为一块网卡,通俗点讲就是两块网卡具有相同的IP地址而并行链接聚合成一个逻辑链路工作。

操作步骤:

  1. 查看有没有bonding kernel module
    modinfo bonding | head -n 3

  2. 内核加载bonding module
    modprobe bonding

  3. 开机启动时加载bonding module
    echo bonding > /etc/modules

  4. 配置/etc/network/interfaces

    vi /etc/network/interfaces
    
    
    # 增加配置
    
    auto eno1
    iface eno1 inet manual
    bond-master bond0
    bond-primary eno1
    bond-mode 6
    
    auto eno2
    iface eno2 inet manual
    bond-master bond0
    bond-primary eno2
    bond-mode 6
    
    auto bond0
    iface bond0 inet static
    address 192.168.1.253
    netmask 255.255.255.0
    gateway 192.168.1.1
    
    #broadcast 192.168.1.255
    
    
    slaves eno1 eno2
    bond-mode 6
    bond-miimon 100
    bond-downdelay 200
    bond-updelay 200
  5. 增加 /etc/modprobe.d/aliases.conf 配置文件

    alias bond0 bonding
    options bonding mode=6 arp_interval=2000 arp_ip_target=192.168.1.1
  6. 重启网卡

    /etc/init.d/networking restart

引用
1. https://www.kernel.org/doc/Documentation/networking/bonding.txt

  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值