链路聚合Eth-Trunk配置实验

链路聚合Eth-Trunk配置实验

	配置要求--------所有主机能互通 【XX可行换】
	配置思路:
	SW1做主三层,汇聚层,用于连接边界设备
	SW1配置eth-trunk 1,eth-trunk 2,绑定21,22,23,24端口
	SW1的vlanif ip做PC的网关
	SW2-3的接口1与接口2分别对应vlan10与vlan20. 
	Vlan 10分配IP:192.XX.10.1/24
	Vlan 20分配lP:192.XX.20.1/24
网络拓扑图:

在这里插入图片描述

代码实现:
LWS1:
<Huawei>und ter mo
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys 	
[Huawei]sysname LSW1
[LSW1]vlan bat	
[LSW1]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.

[LSW1]int Eth-Trunk 1
[LSW1-Eth-Trunk1]trunkport GigabitEthernet 0/0/23 to 0/0/24
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW1-Eth-Trunk1]port link-type trunk
[LSW1-Eth-Trunk1]port trunk allow-pass vlan 10 20
[LSW1-Eth-Trunk1]undo port trunk pvid vlan	
[LSW1-Eth-Trunk1]load-balance src-dst-mac 
[LSW1-Eth-Trunk1]q

[LSW1]int Eth-Trunk 2
[LSW1-Eth-Trunk2]trunkport GigabitEthernet 0/0/21 to 0/0/22
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW1-Eth-Trunk2]port link-type trunk
[LSW1-Eth-Trunk2]port trunk allow-pass vlan 10 20
[LSW1-Eth-Trunk2]undo port trunk pvid vlan
[LSW1-Eth-Trunk2]load-balance src-dst-mac
[LSW1-Eth-Trunk2]q

[LSW1]int vlanif 10
[LSW1-Vlanif10]ip address 192.14.10.1 24
[LSW1-Vlanif10]int vlanif 20
[LSW1-Vlanif20]ip address 192.14.20.1 24
[LSW1-Vlanif20]q
[LSW1]q
<LSW1>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Now saving the current configuration to the slot 0.
Save the configuration successfully.

LWS2:
<Huawei>
<Huawei>undo terminal monitor
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys LSW2
[LSW2]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW2]int Eth-Trunk 1
[LSW2-Eth-Trunk1]trunkport GigabitEthernet 0/0/23 to 0/0/24
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW2-Eth-Trunk1]port link-type trunk
[LSW2-Eth-Trunk1]port trunk allow-pass vlan 10 20
[LSW2-Eth-Trunk1]undo port trunk pvid vlan
[LSW2-Eth-Trunk1]load-balance src-dst-mac 
[LSW2-Eth-Trunk1]q

[LSW2]int g0/0/1
[LSW2-GigabitEthernet0/0/1]port link-type access
[LSW2-GigabitEthernet0/0/1]port def vlan 10
[LSW2-GigabitEthernet0/0/1]q
[LSW2]int g0/0/2
[LSW2-GigabitEthernet0/0/2]port link-type access
[LSW2-GigabitEthernet0/0/2]port def vlan 20
[LSW2-GigabitEthernet0/0/2]q
[LSW2]q
<LSW2>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Now saving the current configuration to the slot 0.
Save the configuration successfully.
<LSW2> User interface con0 is available

LWS3:
The device is running!

<Huawei>undo terminal monitor
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys LSW3
[LSW3]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW3]int Eth-Trunk 2
[LSW3-Eth-Trunk2]trunkport GigabitEthernet 0/0/21 to 0/0/22
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW3-Eth-Trunk2]port link-type trunk
[LSW3-Eth-Trunk2]port trunk allow-pass vlan 10 20
[LSW3-Eth-Trunk2]undo port trunk pvid vlan
[LSW3-Eth-Trunk2]load-balance src-dst-mac 
[LSW3-Eth-Trunk2]q
[LSW3]int g0/0/1
[LSW3-GigabitEthernet0/0/1]port link-type access
[LSW3-GigabitEthernet0/0/1]port def vlan 10
[LSW3-GigabitEthernet0/0/1]q
[LSW3]int g0/0/2
[LSW3-GigabitEthernet0/0/2]port link-type access
[LSW3-GigabitEthernet0/0/2]port def vlan 20
[LSW3-GigabitEthernet0/0/2]q
[LSW3]q
<LSW3>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Now saving the current configuration to the slot 0.
Save the configuration successfully.
<LSW3>
                        敲完收工!!!( ̄▽ ̄)" !!!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值