HSRP 发布两个设备活动统计信息

网络工程 思科 转变 路由器 热休克蛋白 fhrp
2022-02-25 13:09:57

这是图表。 在此处输入图像描述

IP地址:

互联网服务提供商:

[VIP]- 10.107.25.5
[R1] - 10.107.25.6
[R2] - 10.107.25.7

我:

[VIP] - 10.107.25.10
[SW1] - 10.107.25.11
[SW2] - 10.107.25.12

端口配置:

SW1


    interface GigabitEthernet1/0/1
    description #Primary Link WTBB 1#
    no switchport
    ip address 10.107.25.11 255.255.255.248
    standby 30 ip 10.107.25.10
    standby 30 priority 110
    standby 30 preempt

SW2


    interface GigabitEthernet1/0/1
    description # Secondary Link WTBB 2#
    no switchport
    ip address 10.107.25.12 255.255.255.248
    standby 30 ip 10.107.25.10
    no standby 30 preempt

备注:有趣的事情我无法从 ping10.107.25.1110.107.25.12我不确定 ISP 的另一端是什么,根据文档 .11 应该 ping 0.12,这样他们就可以使用L2层互相问好,对吗?

这就是我所做的,但我认为配置 HSRP 的方法是错误的

[SW1]

interface vlan3
ip address 10.107.25.11 255.255.255.248
standby 30 ip 10.107.25.10
standby 30 priority 110
standby 30 preempt 

interface GigabitEthernet1/0/1
switchport access allow vlan 3

[SW2]

interface vlan3
ip address 10.107.25.12 255.255.255.248
standby 30 ip 10.107.25.10
standby 30 priority 110
standby 30 preempt 

interface GigabitEthernet1/0/1
switchport access allow vlan 3

在中继接口上我允许Vlan3

现在我可以使用 vlan3 (L2) 网络从 .11 ping 到 .12 ip 地址。并且 HSRP 很高兴(活动/备用)。

但是,如果我拔下G1/0/1试图模仿电缆的端口上的电缆被切断,我的 VIP 将进行故障转移。但问题是 .11 和 .12 在vlan3接口上,UP无论您是否切断电缆,它们都是如此。

在上述情况下,我该如何解决这个问题?

1个回答

编辑以反映问题中的新信息:

根据您最终给出全貌的多次编辑(我希望),您可以尝试这样的事情,但在替代配置中使用交换机堆叠功能将为您提供更好的解决方案。

您与 ISP 的连接需要与 ISP 在同一子网上。

SW1:

track 3 interface GigabitEthernet1/0/1 line-protocol
!
interface GigabitEthernet1/0/1
 description #Primary Link WTBB 1#
 switchport
 switchport access vlan 3
 switchport mode access
 no shutdown
!
interface GigabitEthernet1/0/2
 description #Link to switch 2#
 switchport
 switchport access vlan 3
 switchport mode access
 no shutdown
!
interface Vlan3
 ip address 10.107.25.11 255.255.255.240
 standby 30 ip 10.107.25.10
 standby 30 priority 105
 standby 30 preempt
 standby 30 track 3 decrement 10
 no shutdown
!

SW2:

track 3 interface GigabitEthernet1/0/1 line-protocol
!
interface GigabitEthernet1/0/1
 description #Primary Link WTBB 2#
 switchport
 switchport access vlan 3
 switchport mode access
 no shutdown
!
interface GigabitEthernet1/0/2
 description #Link to switch 1#
 switchport
 switchport access vlan 3
 switchport mode access
 no shutdown
!
interface Vlan3
 ip address 10.107.25.12 255.255.255.240
 standby 30 ip 10.107.25.10
 standby 30 priority 100
 standby 30 preempt
 standby 30 track 3 decrement 10
 no shutdown
!

这允许 ISP HSRP 工作,因为 ISP 路由器需要能够在同一 VLAN 上相互通信,以便 ISP HSRP 工作。

备用(堆叠)配置:

SW1/2 堆栈:

interface GigabitEthernet1/0/1
 description #Primary Link WTBB 1#
 switchport
 switchport access vlan 3
 switchport mode access
 no shutdown
!
interface GigabitEthernet2/0/1
 description #Primary Link WTBB 2#
 switchport
 switchport access vlan 3
 switchport mode access
 no shutdown
!
interface Vlan3
 ip address 10.107.25.10 255.255.255.240
 no shutdown
!

此配置为您提供了两个独立交换机的所有好处,但解决了您拥有两个具有不同 IP 地址的独立交换机的问题。堆栈配置为单个交换机并作为单个设备进行管理。除了数据共享,3850s 还可以进行电源共享,如果其中一个掉电,另一个可以保持两个交换机运行。您还将节省宝贵的公共 IP 地址。