双机热备的设置
在网络规划设计与实现中,双机是不可避免的,但是好多时候人们只是把一个核心交换机A设置为主,另一台设置为备,这样虽然说设计没有问题,但是这样一来,好象只有主交换机在工作,流量都从主交换机上通过,而备用的没有工作,除非主交换机出现故障,备用交换面才工作。这样起不到负载均衡的作用,达不到理想的效果。所以为了达到负载均衡的效果,建议修改优先级别。网络拓扑如下所示:
<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
要求:PC1的主是A,备用是B。
PC2的主是B,备用是A。
步骤如下:
interface FastEthernet0/2
description PC1
encapsulation dot1Q 2
ip vrf forwarding PC1
ip address 192.168.1.2 255.255.255.248
no ip redirects
ip flow ingress
standby 2 ip 192.168.1.1
standby 2 priority 130
standby 2 preempt
standby 2 track FastEthernet0/0 20
!
interface FastEthernet0/3
description PC2
encapsulation dot1Q 3
ip vrf forwarding PC2
ip address 192.168.2.2 255.255.255.248
no ip redirects
ip flow ingress
standby 3 ip 192.168.2.1
standby 3 priority 120
standby 3 preempt
standby 3 track FastEthernet0/0 20
interface FastEthernet0/2
description PC1
encapsulation dot1Q 2
ip vrf forwarding PC1
ip address 192.168.1.3 255.255.255.248
no ip redirects
ip flow ingress
standby 2 ip 192.168.1.1
standby 2 priority 120
standby 2 preempt
standby 2 track FastEthernet0/0 20
!
interface FastEthernet0/3
description PC2
encapsulation dot1Q 3
ip vrf forwarding PC2
ip address 192.168.2.3 255.255.255.248
no ip redirects
ip flow ingress
standby 3 ip 192.168.2.1
standby 3 priority 130
standby 3 preempt
standby 3 track FastEthernet0/0 20
以上是简单的配置,可以根据实际情况进行修改即可。
转载于:https://blog.51cto.com/kmgms/337167