三层交换机和lacp链路聚合

在这里插入图片描述
实验要求实现全网互通
在这里插入图片描述
R1的配置

<Huawei>
<Huawei>
<Huawei>sys	
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sy	
[Huawei]sysname R1
[R1]inter	
[R1]interface g0/0/0
[R1-GigabitEthernet0/0/0]ip add	
[R1-GigabitEthernet0/0/0]ip address 192.168.80.1 24
[R1]interface g0/0/2
[R1-GigabitEthernet0/0/2]ip add	
[R1-GigabitEthernet0/0/2]ip address 192.168.90.1 24
R1-GigabitEthernet0/0/2]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add	
[R1-GigabitEthernet0/0/1]ip address 192.168.100.1 24
[R1]ip rou	
[R1]ip route-s	
[R1]ip route-static 192.168.70.0 24 192.168.90.2
[R1]ip route-static 192.168.70.0 24 192.168.100.2 pre 70
[R1] ip rou	
[R1]ip route
[R1]ip route-static 192.168.0.0 16 192.168.80.254


R2的配置

<Huawei>sys	
<Huawei>system-view sys	
<Huawei>system-vie	
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R2
[R2]inter	
[R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]ip add	
[R2-GigabitEthernet0/0/0]ip address 192.168.90.2 24
R2-GigabitEthernet0/0/0]int g0/0/1
[R2-GigabitEthernet0/0/1]ip	
[R2-GigabitEthernet0/0/1]ip a	
[R2-GigabitEthernet0/0/1]ip addres	
[R2-GigabitEthernet0/0/1]ip address 192.168.120.1 24
[R2]ip rou	
[R2]ip route-s	
[R2]ip route-static 192.168.0.0 16 192.168.90.1
[R2]ip route-static 192.168.70.0 24 192.168.120.2


R3 的配置

<Huawei>sys	
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys E3
[E3]sys R3
[R3]inter	
[R3]interface g0/0/1
[R3-GigabitEthernet0/0/1]ip add	
[R3-GigabitEthernet0/0/1]ip address 192.168.110.1 24
[R3-GigabitEthernet0/0/1]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add	
[R3-GigabitEthernet0/0/0]ip address 192.168.100.2 24
[R3]ip route-static 192.168.70.0 24 192.168.110.2
[R3]ip route-static 192.168.0.0 16 192.168.100.1


R4 的配置

<Huawei>sys	
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys	
[Huawei]sysname R4
[R4]inter	
[R4]interface g0/0/1
[R4-GigabitEthernet0/0/1]ip add	
[R4-GigabitEthernet0/0/1]ip address 192.168.110.2 24
[R4-GigabitEthernet0/0/1]int	
[R4-GigabitEthernet0/0/1]int g0/0/0
[R4-GigabitEthernet0/0/0]ip ad	
[R4-GigabitEthernet0/0/0]ip address 192.168.120.2 24
[R4-GigabitEthernet0/0/0]q
[R4]inter	
[R4]interface g0/0/2
[R4-GigabitEthernet0/0/2]ip add	
[R4-GigabitEthernet0/0/2]ip address 192.168.70.2 24
[R4]ip route-static 0.0.0.0 0 192.168.110.1
[R4]ip route-static 0.0.0.0 0 192.168.120.1


交换机SW1配置

<Huawei>sys	
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sy	
[Huawei]sysname SW1
[SW1]vlan ba	
[SW1]vlan batch 10 20 30 40 50 60 80
[SW1]interface e0/0/1
[SW1-Ethernet0/0/1]p l a
[SW1-Ethernet0/0/1]p d v 10
SW1-Ethernet0/0/1]
[SW1-Ethernet0/0/1]q
[SW1]int	
[SW1]interface e0/0/2
[SW1-Ethernet0/0/2]p l a
[SW1-Ethernet0/0/2]p d v 20
[SW1]inter	
[SW1]interface e0/0/6
[SW1-Ethernet0/0/6]p l t
[SW1-Ethernet0/0/6]p t a v a
[SW1]int Eth-Trunk 1
[SW1-Eth-Trunk1]tru	
[SW1-Eth-Trunk1]trunkport e0/0/4
[SW1-Eth-Trunk1]trunkport e0/0/3
[SW1-Eth-Trunk1]trunkport e0/0/5
[SW1]int Eth-t	
[SW1]int Eth-Trunk 1
[SW1-Eth-Trunk1]m l




SW2的配置

<Huawei>sys	
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys SW2
[SW2]
Apr  7 2021 14:27:44-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 4, the c
hange loop count is 0, and the maximum number of records is 4095.
[SW2]
[SW2]
[SW2]vlan b	
[SW2]vlan batch 30 40
[SW2]interface e0/0/1
[SW2-Ethernet0/0/1]p l a
[SW2-Ethernet0/0/1]p d v 30
[SW2-Ethernet0/0/1]q
[SW2]interface e0/0/2
[SW2-Ethernet0/0/2]p l a
[SW2-Ethernet0/0/2]p d v 40
[SW2]inter	
[SW2]interface e0/0/9
[SW2-Ethernet0/0/9]p l t
[SW2]int e	
[SW2]int Eth-t	
[SW2]int Eth-Trunk 1
[SW2-Eth-Trunk1]t	
[SW2-Eth-Trunk1]trunkport e0/0/5
[SW2-Eth-Trunk1]trunkport e0/0/3
[SW2-Eth-Trunk1]p l t
[SW2-Eth-Trunk1]p t a v a
[SW2]int Eth-Trunk 2
[SW2-Eth-Trunk2]tru	
[SW2-Eth-Trunk2]trunkport e0/0/7
[SW2-Eth-Trunk2]trunkport e0/0/4
[SW2-Eth-Trunk2]trunkport e0/0/8
[SW2-Eth-Trunk2]p l t
[SW2-Eth-Trunk2]p t a v a

SW3的配置

<Huawei>sys	
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys	
[Huawei]sysname SW3
[SW3]vlan batch 10 20 30 40 50 60
[SW3]interface e0/0/5
[SW3-Ethernet0/0/5]p l a
[SW3-Ethernet0/0/5]p d v 50
[SW3-Ethernet0/0/5]q
[SW3]interface e0/0/6
[SW3-Ethernet0/0/6]p l a
[SW3-Ethernet0/0/6]p d v 60
[SW3]interface e0/0/1
[SW3-Ethernet0/0/1]p l t
[SW3-Ethernet0/0/1]p t a v a
[SW3]int Eth-Trunk 2
[SW3-Eth-Trunk2]trunkport e0/0/4
[SW3-Eth-Trunk2]trunkport e0/0/2
[SW3-Eth-Trunk2]p l t
[SW3-Eth-Trunk2]p t a v a





SW4的配置

<Huawei>sys	
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys SW4
[SW4]
Apr  7 2021 14:53:48-08:00 SW4 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 4, the c
hange loop count is 0, and the maximum number of records is 4095.
[SW4]
[SW4]
[SW4]int	
[SW4]interface g0/0/1
[SW4-GigabitEthernet0/0/1]p l t
[SW4-GigabitEthernet0/0/1]p t a v a
[SW4]vlan 10 20 30 40 50 60 80
[SW4-Vlanif10]
Apr  7 2021 15:21:09-08:00 SW4 %%01IFNET/4/IF_STATE(l)[3]:Interface Vlanif10 has
 turned into UP state.
[SW4-Vlanif10]ip add	
[SW4-Vlanif10]ip address 192.168.10.254 24
[SW4]int Vlanif 20
[SW4-Vlanif20]
Apr  7 2021 15:21:32-08:00 SW4 %%01IFNET/4/IF_STATE(l)[5]:Interface Vlanif20 has
 turned into UP state.
[SW4-Vlanif20]ip ad	
[SW4-Vlanif20]ip address 192.168.20.254 24
[SW4]int Vlanif 30
[SW4-Vlanif30]ip address 192.168.30.254 24
[SW4]int Vlanif 40
[SW4-Vlanif40]ip address 192.168.40.254 24
[SW4]int Vlanif 50
[SW4-Vlanif50]ip address 192.168.50.254 24
[SW4]int Vlanif 60
[SW4-Vlanif60]ip address 192.168.60.254 24
[SW4]int g0/0/4
[SW4-GigabitEthernet0/0/4]p l a
[SW4-GigabitEthernet0/0/4]p d v 80
[SW4]int Vlanif 80
[SW4-Vlanif80]ip address 192.168.80.254 24
[SW4]interface g0/0/2
[SW4-GigabitEthernet0/0/2]p l t
[SW4-GigabitEthernet0/0/2]p t a v a
[SW4]interface g0/0/3
[SW4-GigabitEthernet0/0/3]p l t
[SW4-GigabitEthernet0/0/3]p t a v a
[SW4]ip route-static 0.0.0.0 0 192.168.80.254
ip route-static 0.0.0.0 0 192.168.80.1



在这里插入图片描述

在这里插入图片描述

对于三层交换机链路聚合(Link Aggregation),你可以按照以下步骤进行配置: 1. 配置物理接口:首先,确保你的三层交换机上有足够的可用物理接口。假设你有两个物理接口,分别为 GigabitEthernet1/0/1 和 GigabitEthernet1/0/2。 2. 创建链路聚合组:使用命令创建一个链路聚合组,例如聚合组号为 1: ``` Switch(config)# interface Port-channel 1 ``` 3. 将物理接口添加到链路聚合组:将之前的两个物理接口添加到链路聚合组中。 ``` Switch(config-if)# channel-group 1 mode desirable ``` 其中,`1` 是之前创建的聚合组号,`desirable` 是链路汇聚协议的模式。你可以根据需求选择其他模式,例如 `active` 或 `auto`。 4. 配置链路聚合协议:选择一个链路聚合协议用于控制链路聚合组中的链路。 ``` Switch(config)# lacp system-priority 32768 ``` 这里使用了 LACP(Link Aggregation Control Protocol)作为链路聚合协议,并设置了系统优先级为 32768。你可以根据需要进行调整。 5. 验证配置:通过以下命令验证链路聚合组的配置是否成功: ``` Switch# show etherchannel summary ``` 在显示的结果中,你应该看到创建的链路聚合组以及与之关联的物理接口。 请注意,具体的配置步骤可能因交换机型号和软件版本而有所差异,请根据你所使用的设备文档进行适当的调整。此外,在配置之前,请确保了解链路聚合组对于你的网络环境是否适用,并遵循最佳实践。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值