# LSW1和LSW2都是相同的配置方法[Huawei]interface Eth-Trunk 1# 创建链路聚合组[Huawei-Eth-Trunk1]q
[Huawei]interface g 0/0/1
[Huawei-GigabitEthernet0/0/1]eth-trunk 1# 将接口1加入聚合组Info: This operation may take a few seconds. Please waitfor a moment...done.
[Huawei-GigabitEthernet0/0/1]Mar 192024 16:19:52-08:00 Huawei %%01IFNET/4/IF_STATE(l)[0]:Interface Eth-Trunk
1 has turned into UP state.
[Huawei-GigabitEthernet0/0/1]q
[Huawei]int g 0/0/2
[Huawei-GigabitEthernet0/0/2]eth-trunk 1# 将接口2加入聚合组# 创建个vlan[Huawei]vlan 10[Huawei-vlan10]q
[Huawei]interface Vlanif 10[Huawei-Vlanif10]ip add 1.1.1.2 24[Huawei-Vlanif10]q
[Huawei]int Eth-Trunk 1
[Huawei-Eth-Trunk1]port link-type access # 将Eth-Trunk 1接口设置为access[Huawei-Eth-Trunk1]port default vlan 10
在 LSW 1 上 ping 1.1.1.2 可以通
手工配置的问题:
1)成员接口一定不能配错
2)交换机无法得知对端交换机的端口是否运行正常
LACP 静态链路聚合
配置系统优先级是为了区别本端设备与对端设备优先级的高低,系统优先级高的将被选作链路聚合组的主动端,按照主动端设备的接口来选择活动接口。配置接口优先级是为了区别同一设备不同接口的优先级,接口优先级高的将被选作活动接口。如果 Eth-Trunk 两端设备都没有配置系统优先级,两端系统优先级都是缺省值 32768,此时需要按照系统 MAC 来选择主动端,系统 MAC 小的优先。当手工加入链路组的接口数超过了该阈值的限制,就需要选择哪些接口为活动接口,而设置接口 LACP 优先级即可保证在静态模式下高优先级的接口成为活动接口。
# LSW1的配置[Huawei]int Eth-Trunk 1[Huawei-Eth-Trunk1]mode lacp # 配置Eth-Trunk的工作模式。缺省情况下,Eth-Trunk的工作模式为手工模式。[Huawei-Eth-Trunk1]trunkport GigabitEthernet 0/0/1 to 0/0/3 # 在Eth-Trunk接口视图下向聚合组中加入成员接口Info: This operation may take a few seconds. Please waitfor a moment...done.
[Huawei-Eth-Trunk1]Mar 192024 19:12:29-08:00 Huawei %%01IFNET/4/IF_STATE(l)[0]:Interface Vlanif1 h
as turned into DOWN state.
Mar 192024 19:12:29-08:00 Huawei %%01IFNET/4/IF_STATE(l)[1]:Interface Vlanif1 h
as turned into UP state.
Mar 192024 19:12:29-08:00 Huawei %%01IFNET/4/IF_STATE(l)[2]:Interface Eth-Trunk
1 has turned into UP state.
[Huawei-Eth-Trunk1]max active-linknumber 2# 配置链路聚合组活动接口数目的上限阈值为2。另一条做备用[Huawei-Eth-Trunk1]port link-type trunk
[Huawei-Eth-Trunk1]port trunk allow-pass vlan all
[Huawei-Eth-Trunk1]q
[Huawei]lacp priority 30000# LACP优先级值。取值越小LACP优先级越高。[Huawei]vlan 10[Huawei-vlan10]q
[Huawei]int g 0/0/11
[Huawei-GigabitEthernet0/0/11]port link-type access
[Huawei-GigabitEthernet0/0/11]port default vlan 10
# LSW2的配置[Huawei]int Eth-Trunk 1[Huawei-Eth-Trunk1]mode lacp
[Huawei-Eth-Trunk1]trunkport GigabitEthernet 0/0/1 to 0/0/3
Info: This operation may take a few seconds. Please waitfor a moment...done.
[Huawei-Eth-Trunk1]Mar 192024 19:12:29-08:00 Huawei %%01IFNET/4/IF_STATE(l)[0]:Interface Vlanif1 h
as turned into DOWN state.
Mar 192024 19:12:29-08:00 Huawei %%01IFNET/4/IF_STATE(l)[1]:Interface Vlanif1 h
as turned into UP state.
Mar 192024 19:12:29-08:00 Huawei %%01IFNET/4/IF_STATE(l)[2]:Interface Eth-Trunk
1 has turned into UP state.
[Huawei-Eth-Trunk1]max active-linknumber 2[Huawei-Eth-Trunk1]port link-type trunk
[Huawei-Eth-Trunk1]port trunk allow-pass vlan all
[Huawei-Eth-Trunk1]q
[Huawei]vlan 10[Huawei-vlan10]q
[Huawei]int GigabitEthernet 0/0/11
[Huawei-GigabitEthernet0/0/11]port link-type access
[Huawei-GigabitEthernet0/0/11]port default vlan 10
ensp 放置一台 AR1220 路由器和 cloud。配置 cloud,使用 vmware net 8 网卡,其它网卡也一样。
首先配置路由器 ip 地址:192.168.204.100。地址要和网卡属于同一网段
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int
[Huawei]interface g
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip ad
[Huawei-GigabitEthernet0/0/0]ip address 192.168.204.100 255.255.255.0
Oct 132024 08:48:26-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[Huawei-GigabitEthernet0/0/0]q
[Huawei]q
<Huawei>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait........
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
<Huawei>ping 192.168.240.1
用宿主机 ping 路由器应该也是能通的,就没问题。
其次设置路由器 telnet 远程登录
1、路由器开启 Telnet 服务(系统视图)
1
2
3
[Huawei]display telnet server status # 查看telnet服务状态,是否开启[Huawei]telnet server enable# 启动telnet服务[Huawei]undo telnet server enable# 关闭telnet服务