配置思路
-PC配置IP
-交换机初始化
-设备取名字
-创建vlan
-交换机和pc机用access模式
-并且允许相应的vlan通过
-交换机之间进行捆绑起来
*创建链路聚合口
interface Eth-Trunk 1
*端口设置模式
mode lacp-static
*端口添加成员
trunkport GigabitEthernet 0/0/8
trunkport GigabitEthernet 0/0/9
trunkport GigabitEthernet 0/0/10
trunkport GigabitEthernet 0/0/11
*端口模式为trunk模式
port link-type trunk
*允许所有vlan通过
port trunk allow-pass vlan all
*修改最大的活跃链路数【最大为8条】
max active-linknumber 6
*修改优先级【默认为32768】系统视图
lacp priority 100
*开启强占机制【两台都需要开启】
lacp preempt enable
脚本
undo terminal monitor
system-view
sysname AR1
vlan batch 10 20
interface GigabitEthernet 0/0/1
port link-type access
port default vlan 10
quit
interface GigabitEthernet 0/0/2
port link-type access
port default vlan 20
quit
interface Eth-Trunk 1
mode lacp-static
trunkport GigabitEthernet 0/0/8
trunkport GigabitEthernet 0/0/9
trunkport GigabitEthernet 0/0/10
trunkport GigabitEthernet 0/0/11
port link-type trunk
port trunk allow-pass vlan all
max active-linknumber 6
lacp preempt enable
lacp priority 100
undo terminal monitor
system-view
sysname AR2
vlan batch 10 20
interface GigabitEthernet 0/0/1
port link-type access
port default vlan 10
quit
interface GigabitEthernet 0/0/2
port link-type access
port default vlan 20
quit
interface Eth-Trunk 1
mode lacp-static
trunkport GigabitEthernet 0/0/16
trunkport GigabitEthernet 0/0/17
trunkport GigabitEthernet 0/0/18
trunkport GigabitEthernet 0/0/19
port link-type trunk
port trunk allow-pass vlan all