华为模拟器实现vrrp+mstp+链路聚合综合组网实验
实验结果:
①企业内部PC机实现网络互通
②LSW1和LSW2交换机实现流量负载均衡,
LSW1通过vlan 10 20 流量,LSW2通过vlan 30 40 流量
③外网客户端能够访问内网服务器
LSW3,LSW4,LSW5,LSW6 为接入交换机
LSW1、LSW2核心交换机
AR2出口路由器
实验配置如下:
接入交换机配置:
------------------- LSW3 ---------------------syssys LSW3vlan batch 10 20 5int e0/0/1port link-type accessport default vlan 10int e0/0/2port link-type accessport default vlan 20int e0/0/5port link-type trunkport trunk allow-pass vlan 10 20 5int e0/0/6port link-type trunkport trunk allow-pass vlan 10 20 5qint vlanif 5ip add 192.168.5.1 24qstp region-configurationregion-name huaweiinstance 10 vlan 10instance 20 vlan 20instance 30 vlan 30instance 40 vlan 40instance 5 vlan 50active region-configurationq
---------------- LSW2 --------------------- syssys LSW4vlan batch 30 5int e0/0/1port link-type accessport default vlan 30int e0/0/3port link-type trunkport trunk allow-pass vlan 30 5int e0/0/2port link-type trunkport trunk allow-pass vlan 30 5qint vlanif 5ip add 192.168.5.2 24qstp region-configurationregion-name huaweiinstance 10 vlan 10instance 20 vlan 20instance 30 vlan 30instance 40 vlan 40instance 5 vlan 50active region-configurationq
------------------- LSW5 --------------------syssys LSW5vlan batch 40 5int e0/0/1port link-type accessport default vlan 40int e0/0/3port link-type trunkport trunk allow-pass vlan 40 5int e0/0/2port link-type trunkport trunk allow-pass vlan 40 5qint vlanif 5ip add 192.168.5.3 24qstp region-configurationregion-name huaweiinstance 10 vlan 10instance 20 vlan 20instance 30 vlan 30instance 40 vlan 40instance 5 vlan 50active region-configurationq
-------------------- LSW6 --------------------syssys LSW6vlan batch 50 5port-group 1group-member e0/0/1 to e0/0/3port link-type accessport default vlan 50qint e0/0/4port link-type trunkport trunk allow-pass vlan 50 5int e0/0/5port link-type trunkport trunk allow-pass vlan 50 5qint vlanif 5ip add 192.168.5.4 24qstp region-configurationregion-name huaweiinstance 10 vlan 10instance 20 vlan 20instance 30 vlan 30instance 40 vlan 40instance 5 vlan 50active region-configurationq
核心交换机配置LSW1
syssys LSW1vlan batch 10 20 30 40 50 100 200 5int g0/0/1port link-type trunkport trunk allow-pass vlan 10 20 5int g0/0/2port link-type trunkport trunk allow-pass vlan 30 5int g0/0/3port link-type trunkport trunk allow-pass vlan 40 5int g0/0/4port link-type trunkport trunk allow-pass vlan 50 5qint Eth-trunk 1mode lacp-statictrunkport GigabitEthernet 0/0/6 0/0/7port link-type trunkport trunk allow-pass vlan 10 20 30 40 50 5 qstp region-configurationregion-name huaweiinstance 10 vlan 10instance 20 vlan 20instance 30 vlan 30instance 40 vlan 40instance 5 vlan 50 #active region-configurationqstp instance 10 root primarystp instance 20 root secondarystp instance 30 root primarystp instance 40 root secondarystp instance 5 root primary int vlanif 10ip add 192.168.10.250 24qint vlanif 20ip add 192.168.20.250 24qint vlanif 30 ip add 192.168.30.250 24qint vlanif 40ip add 192.168.40.250 24qint vlanif 50ip add 192.168.50.250 24qint vlanif 5ip add 192.168.5.5 24qint vlanif 10vrrp vrid 1 virtual-ip 192.168.10.254vrrp vrid 1 priority 120vrrp vrid 1 preempt-mode timer delay 20qint vlanif 20vrrp vrid 2 virtual-ip 192.168.20.254qint vlanif 30vrrp vrid 3 virtual-ip 192.168.30.254vrrp vrid 3 priority 120vrrp vrid 3 preempt-mode timer delay 20qint vlanif 40vrrp vrid 4 virtual-ip 192.168.40.254qint vlanif 50vrrp vrid 5 virtual-ip 192.168.50.254vrrp vrid 5 priority 120vrrp vrid 5 preempt-mode timer delay 20qdhcp enableip pool pool10gateway-list 192.168.10.254network 192.168.10.0 mask 24dns-list 114.114.114.114excluded-ip-address 192.168.10.127 192.168.10.253qint vlanif 10 dhcp select globalqip pool pool20gateway-list 192.168.20.254dns-list 114.114.114.114network 192.168.20.0 mask 24excluded-ip-address 192.168.20.127 192.168.20.253qint vlanif 20dhcp select globalqint vlanif 100ip add 172.16.1.1 24qint g0/0/5port link-type accessport default vlan 100qospf 1 routerid 2.2.2.2area 0net 192.168.10.0 0.0.0.255net 192.168.20.0 0.0.0.255net 192.168.30.0 0.0.0.255net 192.168.40.0 0.0.0.255net 172.16.1.1 0.0.0.0
核心交换机配置LSW2
syssys SWL2vlan batch 10 20 30 40 50 100 200 5int g0/0/1port link-type trunkport trunk allow-pass vlan 10 20 5int g0/0/2port link-type trunkport trunk allow-pass vlan 30 5int g0/0/3port link-type trunkport trunk allow-pass vlan 40 5int g0/0/4port link-type trunkport trunk allow-pass vlan 50 5qint Eth-trunk 1mode lacp-statictrunkport GigabitEthernet 0/0/6 0/0/7port link-type trunkport trunk allow-pass vlan 10 20 30 40 50 5qstp region-configurationregion-name huaweiinstance 10 vlan 10instance 20 vlan 20instance 30 vlan 30 instance 40 vlan 40instance 5 vlan 50 #active region-configurationqstp instance 10 root secondarystp instance 20 root primarystp instance 30 root secondarystp instance 40 root primarystp instance 5 root secondaryint vlanif 10ip add 192.168.10.251 24qint vlanif 20ip add 192.168.20.251 24qint vlanif 30 ip add 192.168.30.251 24qint vlanif 40ip add 192.168.40.251 24qint vlanif 50ip add 192.168.50.251 24qint vlanif 5ip add 192.168.5.251 24qint vlanif 10vrrp vrid 1 virtual-ip 192.168.10.254qint vlanif 20vrrp vrid 2 virtual-ip 192.168.20.254vrrp vrid 2 priority 120vrrp vrid 2 preempt-mode timer delay 20qint vlanif 30vrrp vrid 3 virtual-ip 192.168.30.254qint vlanif 40vrrp vrid 4 virtual-ip 192.168.40.254vrrp vrid 4 priority 120vrrp vrid 4 preempt-mode timer delay 120qint vlanif 50vrrp vrid 5 virtual-ip 192.168.50.254qdhcp enableip pool pool10gateway-list 192.168.10.254dns-list 114.114.114.114network 192.168.10.0 mask 24excluded-ip-address 192.168.10.1 192.168.10.126qint vlanif 10dhcp select globalqip pool pool20gateway-list 192.168.20.254dns-list 114.114.114.114network 192.168.20.0 mask 24excluded-ip-address 192.168.20.1 192.168.20.126qint vlanif 20dhcp select globalqint vlanif 200ip add 172.16.2.1 24qint g0/0/5port link-type accessport default vlan 200qospf 1 router-id 3.3.3.3area 0net 192.168.10.0 0.0.0.255net 192.168.20.0 0.0.0.255net 192.168.30.0 0.0.0.255net 192.168.40.0 0.0.0.255net 172.16.2.1 0.0.0.0
出口路由器AR2
syssys R2int g0/0/0ip add 172.16.1.2 24int g0/0/1ip add 172.16.2.2 24int g0/0/2ip add 1.1.1.1 24ip route-static 0.0.0.0 0 1.1.1.2ospf 1 route-id 1.1.1.1default-route-advertise alwaysarea 0net 172.16.1.2 0.0.0.0net 172.16.2.2 0.0.0.0qqacl 2000rule permit source anyqint g0/0/2nat outbound 2000nat server protocol tcp global current-interface 80 inside 192.168.50.1 80q
公网路由器AR3
sys sys R3int g0/0/1ip add 1.1.1.2 24int loopback 1ip add 2.2.2.2 24qint g0/0/0ip add 3.3.3.254 24q
实验结果验证:
①内网互通
②LSW1和LSW2交换机实现流量负载均衡
LSW1通过vlan 10 20 流量,LSW2通过vlan 30 40 流量
当LSW2交换机down时,vlan 40流量走向
③外网客户端能够访问内网服务器
2022年11月9日笔记
版权声明:内容来源于互联网和用户投稿 如有侵权请联系删除