1.VRRP配置基础
1)R1配置
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.10.252 24
[R1-GigabitEthernet0/0/0]vrrp vrid 1 virtual-ip 192.168.10.254
[R1-GigabitEthernet0/0/0]vrrp vrid 1 priority 200
[R1-GigabitEthernet0/0/0]vrrp vrid 1 preempt-mode timer delay 60
2)R2配置(优先级缺省100)
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ip address 192.168.10.253 24
[R2-GigabitEthernet0/0/0]vrrp vrid 1 virtual-ip 192.168.10.254
3)查看VRRP信息
[R1]display vrrp
GigabitEthernet0/0/0 | Virtual Router 1
State : Master
Virtual IP : 192.168.10.254
Master IP : 192.168.10.252
PriorityRun : 200
PriorityConfig : 200
MasterPriority : 200
Preempt : YES Delay Time : 60 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2023-01-26 12:17:31 UTC-08:00
Last change time : 2023-01-26 12:17:34 UTC-08:00
[R2]display vrrp brief
Total:1 Master:0 Backup:1 Non-active:0
VRID State Interface Type Virtual IP
1 Backup GE0/0/0 Normal 192.168.10.254
2.监视上行线路
1)R1配置(上行线路发生故障时优先级减去110变成90,少于R2优先级,R1成为Backup,R2转换成Master)
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.10.252 24
[R1-GigabitEthernet0/0/0]vrrp vrid 1 virtual-ip 192.168.10.254
[R1-GigabitEthernet0/0/0]vrrp vrid 1 priority 200
[R1-GigabitEthernet0/0/0]vrrp vrid 1 track interface GigabitEthernet 0/0/1 reduced 110
2)R2配置(优先级缺省100)
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ip address 192.168.10.253 24
[R2-GigabitEthernet0/0/0]vrrp vrid 1 virtual-ip 192.168.10.254
3)R1的G0/0/1口关闭查看VRRP信息
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]shutdown
[R1]display vrrp
GigabitEthernet0/0/0 | Virtual Router 1
State : Backup
Virtual IP : 192.168.10.254
Master IP : 192.168.10.253
PriorityRun : 90
PriorityConfig : 200
MasterPriority : 100
Preempt : YES Delay Time : 60 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Track IF : GigabitEthernet0/0/1 Priority reduced : 110
IF state : DOWN
Create time : 2023-01-26 12:17:31 UTC-08:00
Last change time : 2023-01-26 12:34:01 UTC-08:00
3.路由器子接口部署VRRP
1)SW1配置
[SW1]interface GigabitEthernet 0/0/1
[SW1-GigabitEthernet0/0/1]port link-type access
[SW1-GigabitEthernet0/0/1]port default vlan 10
[SW1]interface GigabitEthernet 0/0/2
[SW1-GigabitEthernet0/0/2]port link-type access
[SW1-GigabitEthernet0/0/2]port default vlan 20
[SW1]interface GigabitEthernet 0/0/23
[SW1-GigabitEthernet0/0/23]port link-type trunk
[SW1-GigabitEthernet0/0/23]port trunk allow-pass vlan all
[SW1]interface GigabitEthernet 0/0/24
[SW1-GigabitEthernet0/0/24]port link-type trunk
[SW1-GigabitEthernet0/0/24]port trunk allow-pass vlan all
2)R1配置
[R1]interface GigabitEthernet 0/0/0.10
[R1-GigabitEthernet0/0/0.10]dot1q termination vid 10
[R1-GigabitEthernet0/0/0.10]ip address 192.168.10.252 24
[R1-GigabitEthernet0/0/0.10]vrrp vrid 10 virtual-ip 192.168.10.254
[R1-GigabitEthernet0/0/0.10]vrrp vrid 10 priority 200
[R1]interface GigabitEthernet 0/0/0.20
[R1-GigabitEthernet0/0/0.20]dot1q termination vid 20
[R1-GigabitEthernet0/0/0.20]ip address 192.168.20.252 24
[R1-GigabitEthernet0/0/0.20]vrrp vrid 20 virtual-ip 192.168.20.254
3)R2配置
[R2]interface GigabitEthernet 0/0/0.10
[R2-GigabitEthernet0/0/0.10]ip address 192.168.10.253 24
[R2-GigabitEthernet0/0/0.10]vrrp vrid 10 virtual-ip 192.168.10.254
[R2]interface GigabitEthernet 0/0/0.20
[R2-GigabitEthernet0/0/0.20]ip address 192.168.20.253 24
[R2-GigabitEthernet0/0/0.20]vrrp vrid 20 virtual-ip 192.168.20.254
[R2-GigabitEthernet0/0/0.20]vrrp vrid 20 priority 200
4)查看VRRP信息配置
[R1]display vrrp
GigabitEthernet0/0/0.10 | Virtual Router 10
State : Master
Virtual IP : 192.168.10.254
Master IP : 192.168.10.252
PriorityRun : 200
PriorityConfig : 200
MasterPriority : 200
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-010a
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2023-01-26 13:33:43 UTC-08:00
Last change time : 2023-01-26 13:33:47 UTC-08:00
GigabitEthernet0/0/0.20 | Virtual Router 20
State : Backup
Virtual IP : 192.168.20.254
Master IP : 192.168.20.253
PriorityRun : 100
PriorityConfig : 100
MasterPriority : 200
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0114
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2023-01-26 13:35:37 UTC-08:00
Last change time : 2023-01-26 13:45:23 UTC-08:00
[R2]display vrrp brief
Total:2 Master:1 Backup:1 Non-active:0
VRID State Interface Type Virtual IP
10 Backup GE0/0/0.10 Normal 192.168.10.254
20 Master GE0/0/0.20 Normal 192.168.20.254
4.三层交换机部署VRRP
1)SW1配置
[SW1]vlan batch 100 200
[SW1]interface GigabitEthernet 0/0/23
[SW1-GigabitEthernet0/0/23]port link-type trunk
[SW1-GigabitEthernet0/0/23]port trunk allow-pass vlan 100 200
[SW1]interface Vlanif 100
[SW1-Vlanif100]ip address 192.168.100.252 24
[SW1-Vlanif100]vrrp vrid 100 virtual-ip 192.168.100.254
[SW1-Vlanif100]vrrp vrid 100 priority 200
[SW1]interface Vlanif 200
[SW1-Vlanif200]ip address 192.168.200.252 24
[SW1-Vlanif200]vrrp vrid 200 virtual-ip 192.168.200.254
2)SW2配置
[SW2]vlan batch 100 200
[SW2]interface GigabitEthernet 0/0/24
[SW2-GigabitEthernet0/0/24]port link-type trunk
[SW2-GigabitEthernet0/0/24]port trunk allow-pass v
[SW2-GigabitEthernet0/0/24]port trunk allow-pass vlan 100 200
[SW2]interface Vlanif 100
[SW2-Vlanif100]ip address 192.168.100.253 24
[SW2-Vlanif100]vrrp vrid 100 virtual-ip 192.168.100.254
[SW2-Vlanif100]quit
[SW2]interface Vlanif 200
[SW2-Vlanif200]ip address 192.168.200.253 24
[SW2-Vlanif200]vrrp vrid 200 virtual-ip 192.168.200.254
[SW2-Vlanif200]vrrp vrid 200 priority 200
3)SW3配置
[SW3]interface GigabitEthernet 0/0/1
[SW3-GigabitEthernet0/0/1]port link-type access
[SW3-GigabitEthernet0/0/1]port default vlan 100
[SW3-GigabitEthernet0/0/1]quit
[SW3]interface GigabitEthernet 0/0/2
[SW3-GigabitEthernet0/0/2]port link-type access
[SW3-GigabitEthernet0/0/2]port default vlan 200
[SW3]interface GigabitEthernet 0/0/23
[SW3-GigabitEthernet0/0/23]port link-type trunk
[SW3-GigabitEthernet0/0/23]port trunk allow-pass vlan 100 200
[SW3]interface GigabitEthernet 0/0/24
[SW3-GigabitEthernet0/0/24]port link-type trunk
[SW3-GigabitEthernet0/0/24]port trunk allow-pass vlan 100 200
4)查看VRRP信息
[SW1]display vrrp
Vlanif100 | Virtual Router 100
State : Master
Virtual IP : 192.168.100.254
Master IP : 192.168.100.252
PriorityRun : 200
PriorityConfig : 200
MasterPriority : 200
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0164
Check TTL : YES
Config type : normal-vrrp
Create time : 2023-01-26 14:04:26 UTC-08:00
Last change time : 2023-01-26 14:04:30 UTC-08:00
Vlanif200 | Virtual Router 200
State : Backup
Virtual IP : 192.168.200.254
Master IP : 192.168.200.253
PriorityRun : 100
PriorityConfig : 100
MasterPriority : 200
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-01c8
Check TTL : YES
Config type : normal-vrrp
Create time : 2023-01-26 14:05:40 UTC-08:00
Last change time : 2023-01-26 14:11:26 UTC-08:00
[SW2]display vrrp brief
VRID State Interface Type Virtual IP
100 Backup Vlanif100 Normal 192.168.100.254
200 Master Vlanif200 Normal 192.168.200.254
Total:2 Master:1 Backup:1 Non-active:0
5.VRRP+MSTP配置
1)SW1配置
[SW1]vlan batch 101 to 250
[SW1]interface Eth-Trunk 1
[SW1-Eth-Trunk1]trunkport GigabitEthernet 0/0/21
[SW1-Eth-Trunk1]trunkport GigabitEthernet 0/0/22
[SW1-Eth-Trunk1]port link-type trunk
[SW1-Eth-Trunk1]port trunk allow-pass vlan 101 to 250
[SW1]interface GigabitEthernet 0/0/23
[SW1-GigabitEthernet0/0/23]port link-type trunk
[SW1-GigabitEthernet0/0/23]port trunk allow-pass vlan 101 to 250
[SW1]stp mode mstp
[SW1-mst-region]region-name dsrw.com
[SW1-mst-region]instance 10 vlan 101 to 200
[SW1-mst-region]instance 20 vlan 201 to 250
[SW1-mst-region]active region-configuration
[SW1-mst-region]quit
[SW1]stp instance 10 root primary
[SW1]stp instance 20 root secondary
[SW1]stp enable
[SW1]interface Vlanif 101
[SW1-Vlanif101]ip address 192.168.101.252 24
[SW1-Vlanif101]vrrp vrid 101 virtual-ip 192.168.101.254
[SW1-Vlanif101]vrrp vrid 101 priority 200
......VLAN102-VLAN199配置略
[SW1]interface Vlanif 200
[SW1-Vlanif200]ip address 192.168.200.252 24
[SW1-Vlanif200]vrrp vrid 200 virtual-ip 192.168.200.254
[SW1-Vlanif200]vrrp vrid 200 priority 200
[SW1]interface Vlanif 201
[SW1-Vlanif201]ip address 192.168.201.252 24
[SW1-Vlanif201]vrrp vrid 201 virtual-ip 192.168.201.254
......VLAN202-VLAN249配置略
[SW1]interface Vlanif 250
[SW1-Vlanif250]ip address 192.168.250.252 24
[SW1-Vlanif250]vrrp vrid 250 virtual-ip 192.168.250.254
2)SW2配置
[SW2]vlan batch 101 to 250
[SW2]interface Eth-Trunk 1
[SW2-Eth-Trunk1]trunkport GigabitEthernet 0/0/21
[SW2-Eth-Trunk1]trunkport GigabitEthernet 0/0/22
[SW2-Eth-Trunk1]port link-type trunk
[SW2-Eth-Trunk1]port trunk allow-pass vlan 101 to 250
[SW2]interface GigabitEthernet 0/0/24
[SW2-GigabitEthernet0/0/24]port link-type trunk
[SW2-GigabitEthernet0/0/24]port trunk allow-pass vlan 101 to 250
[SW2]stp mode mstp
[SW2]stp region-configuration
[SW2-mst-region]region-name dsrw.com
[SW2-mst-region]instance 10 vlan 101 to 200
[SW2-mst-region]instance 20 vlan 201 to 250
[SW2-mst-region]active region-configuration
[SW2-mst-region]quit
[SW2]stp instance 20 root primary
[SW2]stp instance 10 root secondary
[SW2]stp enable
[SW2]interface Vlanif 101
[SW2-Vlanif101]ip address 192.168.101.253 24
[SW2-Vlanif101]vrrp vrid 101 virtual-ip 192.168.101.254
......VLAN102-VLAN199配置略
[SW2]interface Vlanif 200
[SW2-Vlanif200]ip address 192.168.200.253 24
[SW2-Vlanif200]vrrp vrid 200 virtual-ip 192.168.200.254
[SW2]interface Vlanif 201
[SW2-Vlanif201]ip address 192.168.201.253 24
[SW2-Vlanif201]vrrp vrid 201 virtual-ip 192.168.201.254
[SW2-Vlanif201]vrrp vrid 201 priority 200
......VLAN202-VLAN249配置略
[SW2]interface Vlanif 250
[SW2-Vlanif250]ip address 192.168.250.253 24
[SW2-Vlanif250]vrrp vrid 250 virtual-ip 192.168.250.254
[SW2-Vlanif250]vrrp vrid 250 priority 200
3)SW3配置
[SW3]vlan batch 101 to 250
[SW3]interface GigabitEthernet 0/0/1
[SW3-GigabitEthernet0/0/1]port link-type access
[SW3-GigabitEthernet0/0/1]port default vlan 101
[SW3]interface GigabitEthernet 0/0/2
[SW3-GigabitEthernet0/0/2]port link-type access
[SW3-GigabitEthernet0/0/2]port default vlan 250
[SW3]interface GigabitEthernet 0/0/23
[SW3-GigabitEthernet0/0/23]port link-type trunk
[SW3-GigabitEthernet0/0/23]port trunk allow-pass vlan 101 to 250
[SW3]interface GigabitEthernet 0/0/24
[SW3-GigabitEthernet0/0/24]port link-type trunk
[SW3-GigabitEthernet0/0/24]port trunk allow-pass vlan 101 to 250
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
请登录后查看评论内容