L01.linux技术-bond-----交换机对应配置

通常情况下,虚拟机的聚合模式 bond 4对应交换机的动态聚合(LACP),虚拟机的bond 0 对应交换机的静态聚合,虚拟机如果是主备模式,那么交换机不需要做聚合,只需要划分接口vlan即可。

1. linux mode4 对应交换机之接口配置

思科锐捷交换机配置动态链路聚合

# 创建链路聚合接口
interface Bridge-Aggregation 1
link-aggregation mode dynamic
quit

#交换机物理接口应用
interface range GigabitEthernet 1/0/46 to GigabitEthernet 1/0/48
port link-aggregation group 1
lacp period short
quit

#交换机vlan模式根据实际情况进行更改
interface Bridge-Aggregation 1
port link-type trunk
port trunk permit vlan 10 20

华为交换机lacp配置

<Huawei>system-view         //进入系统视图
[Huawei]sysname LSW1        //修改设备名
[LSW1]interface Eth-Trunk 12         //进入链路聚合组
[LSW1-Eth-Trunk12]mode lacp-static    //聚合组模式修改为静态LACP
[LSW1-Eth-Trunk12]trunkport GigabitEthernet 0/0/1 to 0/0/3    //将物理接口划分进聚合组
[LSW1-Eth-Trunk12]max active-linknumber 2     //协商最大活跃接口数 为2     
[LSW1-Eth-Trunk12]lacp preempt enable        //开启lacp抢占      如果要设置就在链路两端的设备全都配置
[LSW1-Eth-Trunk12]lacp preempt delay 10      //抢占延时为 10     如果要设置就在链路两端的设备全都配置
[LSW1-Eth-Trunk12]load-balance src-dst-ip    //修改LACP的负载方式,华为缺省也是这个,意思是根据源IP和目的IP去实现
[LSW1-Eth-Trunk12]q                       //退回到上一级视图   
[LSW1]lacp priority 0                     //修改LACP的优先级,使这个设备成为主动端
[LSW1]interface GigabitEthernet 0/0/2            //进入物理接口	
[LSW1-GigabitEthernet0/0/2]lacp priority 0     //在接口下修改LACP的优先级,让其成为工作接口 (在主动端修改才有效)

posted @ 2022-11-12 22:53  Mr-呵呵哒  阅读(748)  评论(0编辑  收藏  举报