vrrp 负载均衡

一, 实验目的:

验证vrrp 负载均衡

二, 实验拓扑

三,实验终端配置

3.1 pc机IP  地址配置

 

 

 3.2  交换机配置

3.2.1 中心交换机 sw3

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW3
[SW3]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done

[SW3]int gig0/0/1
[SW3-GigabitEthernet0/0/1]port link-type access
[SW3-GigabitEthernet0/0/1]port default vlan 10
[SW3-GigabitEthernet0/0/1]q
[SW3]int gig0/0/2
[SW3-GigabitEthernet0/0/2]port link-type access
[SW3-GigabitEthernet0/0/2]port default vlan 20
[SW3-GigabitEthernet0/0/2]q

[SW3]int gig0/0/13
[SW3-GigabitEthernet0/0/13]port link-type trunk
[SW3-GigabitEthernet0/0/13]port trunk allow-pass vlan all
[SW3-GigabitEthernet0/0/13]q
[SW3]int gig0/0/23
[SW3-GigabitEthernet0/0/23]port link-type trunk
[SW3-GigabitEthernet0/0/23]port trunk allow-pass vlan all
[SW3-GigabitEthernet0/0/23]q

3.2.2 交换机 sw1 配置

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW1
[SW1]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[
[SW1]int gig0/0/13
[SW1-GigabitEthernet0/0/13]port link-type trunk
[SW1-GigabitEthernet0/0/13]port trunk allow-pass vlan all
[SW1-GigabitEthernet0/0/13]q


[SW1]interface Vlanif 10
[SW1-Vlanif10]ip address 192.168.10.251 24
[SW1-Vlanif10]q


[SW1-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.250
[SW1-Vlanif10]vrrp vrid 10 priority 200
[SW1-Vlanif10]q

[SW1]int vlan 20
[SW1-Vlanif20]ip address 192.168.20.252
[SW1-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.250
[SW1-Vlanif20]q

[SW1]dis vrrp brief
VRID State Interface Type Virtual IP
----------------------------------------------------------------
10 Master Vlanif10 Normal 192.168.10.250
20 Backup Vlanif20 Normal 192.168.20.250
----------------------------------------------------------------
Total:2 Master:1 Backup:1 Non-active:0

3.2.3 交换机 sw2 配置

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW2
[SW2]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.

[SW2]int gig0/0/22
[SW2-GigabitEthernet0/0/22]port link-type trunk
[SW2-GigabitEthernet0/0/22]port trunk allow-pass vlan all
[SW2-GigabitEthernet0/0/22]q

[SW2]int Vlanif 10
[SW2-Vlanif10]ip address 192.168.10.252 24

<SW2>ping 192.168.10.251
PING 192.168.10.251: 56 data bytes, press CTRL_C to break
Reply from 192.168.10.251: bytes=56 Sequence=1 ttl=255 time=140 ms
Reply from 192.168.10.251: bytes=56 Sequence=2 ttl=255 time=60 ms
Reply from 192.168.10.251: bytes=56 Sequence=3 ttl=255 time=40 ms
Reply from 192.168.10.251: bytes=56 Sequence=4 ttl=255 time=40 ms
Reply from 192.168.10.251: bytes=56 Sequence=5 ttl=255 time=40 ms
--- 192.168.10.251 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 40/64/140 ms

[SW2]int vlan 10
[SW2-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.250
[SW2-Vlanif10]q


[SW2]int vlan 20
[SW2-Vlanif20]ip address 192.168.20.251 24

[SW2-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.250
[SW2-Vlanif20]vrrp vrid 20 priority 200
[SW2-Vlanif20]q

[SW2]dis vrrp brief
VRID State Interface Type Virtual IP
----------------------------------------------------------------
10 Backup Vlanif10 Normal 192.168.10.250
20 Master Vlanif20 Normal 192.168.20.250
----------------------------------------------------------------
Total:2 Master:1 Backup:1 Non-active:0
[SW2]ping 192.168.20.252
PING 192.168.20.252: 56 data bytes, press CTRL_C to break
Reply from 192.168.20.252: bytes=56 Sequence=1 ttl=255 time=110 ms
Reply from 192.168.20.252: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 192.168.20.252: bytes=56 Sequence=3 ttl=255 time=60 ms
Reply from 192.168.20.252: bytes=56 Sequence=4 ttl=255 time=40 ms
Reply from 192.168.20.252: bytes=56 Sequence=5 ttl=255 time=40 ms
--- 192.168.20.252 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/56/110 ms

 

posted on 2022-08-04 17:22  飚车之神  阅读(120)  评论(0编辑  收藏  举报

导航