EqLlyHJ5w6,694hQRgLWm

华为链路捆绑Hybrid-VLAN DHCP, 浮动路由三层交换

来源:济南磐龙笔记本交换机维修作者:济南磐龙维修网址:http://m.pldtwx.com

华为链路捆绑Hybrid-VLAN DHCP, 浮动路由三层交换


综合试验


实验构思图:

华为链路捆绑Hybrid-VLAN DHCP



















实验要求:

. VLAN10成员可以和vlan203040的成员通讯,其它vlan则不能互相通讯;

.
让所以PC都能访问外网AR2

.
PC4能够通过DHCP技术获得IP

. AR1LSW3之间做一个备份链路捆绑;

.
使用Hybrid-VLAN方法划分VLAN;

.
让所有PC访问外网时通过13.0网段走,而12.0做为备份链路。

实验步骤:

1.俺图上要求给PC123配置上相应的IP双击pc按图所示配置,最后点击应用在关闭窗口。华为链路捆绑Hybrid-VLAN DHCP2.LSW1LSW2按要求所示划分好vlan,并配置中继口和链路捆绑。<Huawei>system-view进入系统视图(配置模式)。[Huawei]vlan10加入lan10[Huawei-vlan10]vlan20[Huawei]interfacee0/0/1进接口[Huawei-Ethernet0/0/1]porthybrid pvid vlan 10e0/0/1接口放入到vlan 10[Huawei-Ethernet0/0/1]porthybrid
untagged
vlan 10
数据从接口出去时,则脱掉vlan标签(tagged
当数据从e0/0/1出去时,则封装vlan 10标签)displayvlan查看一下vlan配置华为链路捆绑Hybrid-VLAN DHCP

使用此hybridvlan的方法在分别在给LSW1e0/0/2LSW2的两个接口划分好vlan[Huawei-Ethernet0/0/1]quit返回返回上一级模式[Huawei]interfaceEth-Trunk 1创建Eth-Trunk 1[Huawei-Eth-Trunk1]intg0/0/1[Huawei-GigabitEthernet0/0/1]eth-trunk1[Huawei-Eth-Trunk1]intg0/0/2[Huawei-GigabitEthernet0/0/2]eth-trunk1LSW2的手动模式链路捆绑同LSW1.(建议LSW2最好建立eth-trunk
2
为下面做准备)diseth-trunk 1
查看一下eth-trunk 1(和2下的配置华为链路捆绑Hybrid-VLAN DHCPeth-trunk 1(和2)建立成中继口(华为默认中继口不允许所有vlan通过,许手动加载。)[Huawei]int Eth-Trunk 1
进入捆绑后的Eth-Trunk 1接口[Huawei-Eth-Trunk1]porthytaggedv 10 20 30 40
从中继口发出去的数据带上vlan标签华为链路捆绑Hybrid-VLAN DHCP

3.LSW3做两个手动链路捆绑和一个LACP链路捆绑,并建立中继口。手动模式链路捆绑:[Huawei]intEth-Trunk 1进入(创建)Eth-Trunk 1接口[Huawei-Eth-Trunk1]intg0/0/11

进入g0/0/1接口[Huawei-GigabitEthernet0/0/11]eth-trunk1g0/0/11接口加入到Eth-Trunk 1[Huawei-GigabitEthernet0/0/11]intg0/0/12进入g0/0/2接口[Huawei-GigabitEthernet0/0/12]eth-trunk1g0/0/12接口加入到Eth-Trunk 1华为链路捆绑Hybrid-VLAN DHCP[Huawei]intEth-Trunk 2

[Huawei-Eth-Trunk2]intg0/0/13

[Huawei-GigabitEthernet0/0/13]eth-trunk2

[Huawei-GigabitEthernet0/0/13]intg0/0/14



[Huawei-GigabitEthernet0/0/14]eth-trunk2
华为链路捆绑Hybrid-VLAN DHCPLACP模式链路捆绑:[Huawei]intEth-Trunk 3进入(创建)Eth-Trunk 3接口[Huawei-Eth-Trunk3]bpduenable

开启bpdu功能,(可以省略)[Huawei-Eth-Trunk3]modelacp-static配置它的工作模式为静态LACP模式[Huawei-Eth-Trunk3]maxactive-linknumber 2
设置最大活动链路数量为2[Huawei-Eth-Trunk3]intg0/0/1[Huawei-GigabitEthernet0/0/1]eth-trunk3[Huawei-GigabitEthernet0/0/1]intg0/0/2[Huawei-GigabitEthernet0/0/2]eth-trunk3[Huawei-GigabitEthernet0/0/2]intg0/0/3

[Huawei-GigabitEthernet0/0/3]eth-trunk3华为链路捆绑Hybrid-VLAN DHCP中继口:[Huawei-GigabitEthernet0/0/3]intEth-Trunk 1[Huawei-Eth-Trunk1]porthybrid
tagged
vlan 10 20 30 40

把此接口以带上标签建立中继口[Huawei-Eth-Trunk1]int Eth-Trunk 2[Huawei-Eth-Trunk2]porthybrid tagged vlan 10 20 30 40[Huawei-Eth-Trunk2]int Eth-Trunk 3[Huawei-Eth-Trunk3]porthybrid
untagged
vlan 10 20 30 40
把此接口以脱掉标签建立中继口华为链路捆绑Hybrid-VLAN DHCP4.
VLAN10
成员可以和vlan203040的成员通讯,其它vlan之间则不能互相通讯;LSW1:[Huawei]vlan30
[Huawei-vlan30]vlan40[Huawei-vlan40]inte0/0/1[Huawei-Ethernet0/0/1]porthybrid untagged vlan 10 20 30 40
e0/0/1接口能脱掉vlan10203040的标签[Huawei-Ethernet0/0/1]int e0/0/2[Huawei-Ethernet0/0/2]port hybrid untagged vlan 10 20

e0/0/2接口能脱掉vlan1020的标签

华为链路捆绑Hybrid-VLAN DHCP

LSW2:[Huawei]vlan10[Huawei-vlan30]vlan20

(
可以省略)[Huawei-vlan40]inte0/0/3[Huawei-Ethernet0/0/3]porthybrid untagged vlan 10 30




e0/0/3接口能脱掉vlan1030的标签[Huawei-Ethernet0/0/3]int e0/0/4[Huawei-Ethernet0/0/4]port hybrid untagged vlan 10 40

e0/0/4接口能脱掉vlan1040的标签华为链路捆绑Hybrid-VLAN DHCP验证:华为链路捆绑Hybrid-VLAN DHCP华为链路捆绑Hybrid-VLAN DHCP5.给路由器AR1配置IPLACP模式的链路捆绑,并且有一根备份线路和配置相应端口IP[Huawei]intEth-Trunk 3

Eth-Trunk3接口[Huawei-Eth-Trunk3]mode lacp-static

配置它的工作模式为静态LACP模式[Huawei-Eth-Trunk3]maxactive-linknumber 2
设置最大活动链路数量为2[Huawei-Eth-Trunk3]undoportswitchEth-Trunk3接口变成三层口,(默认是二层口)。[Huawei-Eth-Trunk3]intg1/0/0进如g1/0/0接口[Huawei-GigabitEthernet1/0/0]eth-trunk3

g1/0/0加入到Eth-Trunk 3接口里[Huawei-GigabitEthernet1/0/0]int g2/0/0

[Huawei-GigabitEthernet2/0/0]eth-trunk3

[Huawei-GigabitEthernet2/0/0]int g3/0/0

[Huawei-GigabitEthernet3/0/0]eth-trunk3

华为链路捆绑Hybrid-VLAN DHCP[Huawei-GigabitEthernet3/0/0]intet 3

Eth-Trunk3接口[Huawei-Eth-Trunk3]ipadd 192.168.1.1 24

配置IP[Huawei-Eth-Trunk3]intg0/0/0[Huawei-GigabitEthernet0/0/0]ipadd 202.106.13.1 30

配置IP[Huawei-GigabitEthernet0/0/0]unsh
激活接口[Huawei-GigabitEthernet0/0/0]intg0/0/1[Huawei-GigabitEthernet0/0/1]ipadd 202.106.12.1 30[Huawei-GigabitEthernet0/0/1]
undo shutdown
华为链路捆绑Hybrid-VLAN DHCP

6.PC4通过DHCP获得IP地址。

[Huawei]dhcpenable开启DHCP功能

[Huawei]int g1/0/0进接口

[Huawei-GigabitEthernet1/0/0]dhcp select interfaceg1/0/0接口上,分配本端口网段IP地址。

[Huawei-GigabitEthernet1/0/0]dhcpserver dns-list 8.8.8.8分配DNS8.8.8.8

[Huawei-GigabitEthernet1/0/0]dhcpselect global全局地址池分配IP地址(可以省略)

华为链路捆绑Hybrid-VLAN DHCP

7.AR2345按图所示配置上相应的IP

AR2[Huawei-GigabitEthernet0/0/1]ipadd 202.106.12.2 30

配置IP,且30位子网掩码[Huawei-GigabitEthernet0/0/0]ipadd 202.106.24.1 30最后使用undo shutdown命令开启对应的端口。华为链路捆绑Hybrid-VLAN DHCPAR3[Huawei-GigabitEthernet0/0/0]ipadd 202.106.13.2 30[Huawei-GigabitEthernet0/0/1]ipadd 202.106.34.1 30最后使用undo shutdown命令开启对应的端口。华为链路捆绑Hybrid-VLAN DHCP验证:华为链路捆绑Hybrid-VLAN DHCPAR4:[Huawei-GigabitEthernet0/0/0]ipadd 202.106.34.2 30[Huawei-GigabitEthernet0/0/1]ipadd 202.106.24.2 30[Huawei-GigabitEthernet0/0/2]ipadd 202.106.45.1 30最后使用undo shutdown命令开启对应的端口。华为链路捆绑Hybrid-VLAN DHCPAR5[Huawei-GigabitEthernet0/0/2]ipadd 202.106.45.2 30最后使用undo shutdown命令开启对应的端口。华为链路捆绑Hybrid-VLAN DHCP8.
让所有PC访问外网时通过13.0网段走,而12.0做为备份链路。AR1[Huawei]iproute-static 202.106.34.0 30 202.106.13.2添加AR134.0网段的路由表(默认优先级为60)[Huawei]iproute-static 202.106.45.0 30 202.106.13.2[Huawei]iproute-static 202.106.24.0 30 202.106.12.2 preference 100添加到24.0网段的路由表,并设置界别为100.(备份路由)[Huawei]iproute-static 202.106.45.0 30 202.106.12.2 pr 100华为链路捆绑Hybrid-VLAN DHCP因为有两个到达45.0网段的路由,所以正常情况下只会显示主路由,除非主路由down掉时才会显示备份路由。华为链路捆绑Hybrid-VLAN DHCPAR2:[Huawei]ip route-static 202.106.45.0 30202.106.24.2 pr 100华为链路捆绑Hybrid-VLAN DHCPAR3:[Huawei]iproute-static 202.106.45.0 30 202.106.34.2华为链路捆绑Hybrid-VLAN DHCPAR4:[Huawei]iproute-static 202.106.13.0 30 202.106.34.1[Huawei]iproute-static 202.106.12.0 30 202.106.24.1 preference 100华为链路捆绑Hybrid-VLAN DHCPAR5[Huawei]iproute-static 0.0.0.0 0.0.0.0 202.106.45.1
添加默认路由华为链路捆绑Hybrid-VLAN DHCP验证:华为链路捆绑Hybrid-VLAN DHCP中间ping不通时是因为我人为的把AR3g0/0/0down(命令:shutdown)注:undo trunkport g3/0/0
可以把Eth-Trunk里的不需要的接口给踢出来。

save

保存配置

display ip interface brief

查看所有接口状态信息

display this

查看当前接口所有配置

display ip routing-table
查看路由表

display eth-trunk 3

查看eth-trunk 3链路捆绑信息


EqLlyHJ5w6