赞
踩
VRRP的优点:
STP的优点:
接下来我们的要实现的是
1.所有交换机要使用trunk技术,仅允许vlan10 vlan20的流量通过。
2.部署mstp 域名为huawei,版本号为1 要求 LSW1作为vlan10 的主根vlan20 的备根,LSW2作为vlan20的主根vlan10 的备根。
3.配置vrrp,实现冗余备份
4.实现eth-trunk技术,提供带宽。
步骤一、LSW3配置
<Huawei>undo t m
<Huawei>sys
[Huawei]vlan batch 10 20
[Huawei]int e0/0/3
[Huawei-Ethernet0/0/3]p l a
[Huawei-Ethernet0/0/3]p d v 10
[Huawei-Ethernet0/0/3]int e0/0/4
[Huawei-Ethernet0/0/4]p l a
[Huawei-Ethernet0/0/4]p d v 20
[Huawei-Ethernet0/0/4]int e0/0/1
[Huawei-Ethernet0/0/1]p l t
[Huawei-Ethernet0/0/1]p t a v 10 20
[Huawei-Ethernet0/0/1]int e0/0/2
[Huawei-Ethernet0/0/2]p l t
[Huawei-Ethernet0/0/2]p t a v 10 20
[Huawei-Ethernet0/0/2]q
[Huawei]stp mode mstp (将stp模式变为mstp模式)
[Huawei]stp region-configuration (mstp模式下区域配置)
[Huawei-mst-region]region-name huawei (区域名字为华为)
[Huawei-mst-region]revision-level 1 (定义版本号为1)
[Huawei-mst-region]instance 1 vlan 10 (将vlan10添加到实例1当中去)
[Huawei-mst-region]instance 2 vlan 20 (将vlan20添加到实例2当中去)
[Huawei-mst-region]active region-configuration (激活配置,这个命令必须敲,不然不生效)
步骤二、LSW1配置
<Huawei>undo t m
<Huawei>sys
[Huawei]vlan batch 10 20
[Huawei]int g0/0/2
[Huawei-GigabitEthernet0/0/2]p l t
[Huawei-GigabitEthernet0/0/2]p t a v 10 20
[Huawei-GigabitEthernet0/0/2]q
[Huawei]int vlan 10
[Huawei-Vlanif10]ip add 192.168.10.252 24
[Huawei-Vlanif10]q
[Huawei]int vlan 20
[Huawei-Vlanif20]ip add 192.168.20.252 24
[Huawei-Vlanif20]q
[Huawei]int Eth-Trunk 1
[Huawei-Eth-Trunk1]p l t
[Huawei-Eth-Trunk1]p t a v 10 20
[Huawei-Eth-Trunk1]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]eth-trunk 1
[Huawei-GigabitEthernet0/0/1]int g0/0/3
[Huawei-GigabitEthernet0/0/3]eth-trunk 1
[Huawei]int vlan 10 ^
[Huawei-Vlanif10]vrrp vrid 1 virtual-ip 192.168.10.254 (在vrrp模式下配置网关)
[Huawei-Vlanif10]vrrp vrid 1 priority 120 (设置优先级120,越大越好)
[Huawei-Vlanif10]q
[Huawei]int vlan 20
[Huawei-Vlanif20]vrrp vrid 1 virtual-ip 192.168.20.254
[Huawei-Vlanif20]q
[Huawei]stp mode mstp
[Huawei]stp region-configuration
[Huawei-mst-region]region-name huawei
[Huawei-mst-region]revision-level 1
[Huawei-mst-region]instance 1 vlan 10
[Huawei-mst-region]instance 2 vlan 20
[Huawei-mst-region]active region-configuration
[Huawei-mst-region]q
[Huawei]stp instance 1 root primary (mstp中实例1为vlan10的主根)
[Huawei]stp instance 2 root secondary (vlan20 为备根)
步骤三、LSW2配置
<Huawei>undo t m
<Huawei>sys
[Huawei]int g0/0/2
[Huawei-GigabitEthernet0/0/2]p l t
[Huawei-GigabitEthernet0/0/2]p t a v 10 20
[Huawei-GigabitEthernet0/0/2]q
[Huawei]vlan batch 10 20
[Huawei]int vlan 10
[Huawei-Vlanif10]ip add 192.168.10.253 24
[Huawei-Vlanif10]q
[Huawei]int vlan 20
[Huawei-Vlanif20]ip add 192.168.20.253 24
[Huawei-Vlanif20]q
[Huawei]int Eth-Trunk 1
[Huawei-Eth-Trunk1]p l t
[Huawei-Eth-Trunk1]p t a v 10 20
[Huawei-Eth-Trunk1]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]eth-trunk 1
[Huawei-GigabitEthernet0/0/1]int g0/0/3
[Huawei-GigabitEthernet0/0/3]eth-trunk 1
[Huawei-Vlanif10]q
[Huawei]int vlan 10
[Huawei-Vlanif10]vrrp vrid 1 virtual-ip 192.168.10.254
[Huawei-Vlanif10]vrrp vrid 1 priority 60
[Huawei-Vlanif10]q
[Huawei]int vlan 20
[Huawei-Vlanif20]vrrp vrid 1 virtual-ip 192.168.20.254
[Huawei-Vlanif20]q
[Huawei]stp mode mstp
[Huawei]stp region-configuration
[Huawei-mst-region]region-name huawei
[Huawei-mst-region]revision-level 1
[Huawei-mst-region]instance 1 vlan 10
[Huawei-mst-region]instance 2 vlan 20
[Huawei-mst-region]act
[Huawei-mst-region]active re
[Huawei-mst-region]active region-configuration
[Huawei-mst-region]q
[Huawei]stp instance 1 root secondary
[Huawei]stp instance 2 root primary
步骤四、两pc端ping一下
可以看见ping通了,在LSW3查看stp设置,在2口上面有alte这个命令就说明stp生效了,这个口是阻塞端口。
五、思路总结
1.配置pc端的IP地址
2.在配置各个交换机之间trunk口跟access口,以及允许各个vlan通过。
3.设置eth-trunk模式在上面两台交换机之间。这个口上面也要设置trunk模式。
4.创建vlan,配置网关跟子网掩码。然后设置vrrp虚拟网关后八位为254,
5.启用生成树stp协议转为mstp协议。然后进行相关配置,设置主根跟备根添加到需要的vlan当中去。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。