S7700 在ospf中宣告VRRP网段的地址后,自己和邻居路由器会学到一条指向MASTER的主机路由

发布时间:  2015-09-24 浏览次数:  706 下载次数:  0
问题描述

 

 

1.版本:S77 V200R003C00SPC500

2.描述如上图所示:S77-1 ,S77-2 与Router,接入交换机组网。S77-1,S77-2,向下对接入交换机做VRRP,S77向上和Router运行OSPF协议,S77和router互联网段在OSPF area 0,vrrp 网段宣告到OSPF AREA 30;结果Router上产生一条vrrp 虚拟地址的32位掩码的主机路由,这条路由在Router上其实没什么用,客户不希望有这条路由,不知道怎么产生的。如下:

<router>dis ospf rou
Routing for network
Destination        Cost          Type      NextHop          AdvRouter       Area
10.189.129.244/30  1             Stub      0.0.0.0          10.192.254.49   0.0.0.0
10.189.129.248/30  1             Stub      0.0.0.0          10.192.254.49   0.0.0.0
30.180.20.254/32   2        Inter   10.189.129.246  10.180.254.252  0.0.0.0

S77-1配置:

#
interface Vlanif320
ip address 30.180.20.252 255.255.255.0
vrrp vrid 4 virtual-ip 30.180.20.254
vrrp vrid 4 priority 120
vrrp vrid 4 track interface GigabitEthernet3/0/0 reduced 30

#
interface Vlanif1001
ip address 10.189.129.246 255.255.255.252
ospf network-type p2p

#
interface Vlanif2000
ip address 10.180.254.252 255.255.255.0
vrrp vrid 4 virtual-ip 10.180.254.254
vrrp vrid 4 priority 120
vrrp vrid 4 track interface GigabitEthernet3/0/0 reduced 30
ospf cost 10
#
area 0.0.0.0
  network 10.180.254.0 0.0.0.255
  network 10.189.129.244 0.0.0.3
area 0.0.0.30   
network 30.180.20.0 0.0.0.255

<S77-2配置:

#
interface Vlanif320
ip address 30.180.20.253 255.255.255.0
vrrp vrid 4 virtual-ip 30.180.20.254
ospf cost 10
#
interface Vlanif1001
ip address 10.189.129.250 255.255.255.252
ospf network-type p2p
#
interface Vlanif2000
ip address 10.180.254.253 255.255.255.0
vrrp vrid 4 virtual-ip 10.180.254.254 
 
ospf 1 router-id 10.180.254.253
area 0.0.0.0
  network 10.180.254.0 0.0.0.255
  network 10.189.129.248 0.0.0.3
area 0.0.0.30
  network 30.180.20.0 0.0.0.255

Router:

#
interface GigabitEthernet0/20
port link-mode route
ip address 10.189.129.245 255.255.255.252
ospf network-type p2p
#
interface GigabitEthernet0/22
port link-mode route
ip address 10.189.129.249 255.255.255.252
ospf network-type p2p

ospf 1 router-id 10.192.254.49
area 0.0.0.0
  network 10.189.129.244 0.0.0.3
  network 10.189.129.248 0.0.0.3 
 #

<3011 A>     dis ospf peer

         OSPF Process 1 with Router ID 10.192.254.49
               Neighbor Brief Information

Area: 0.0.0.0       
Router ID       Address         Pri Dead-Time  State             Interface
10.180.254.252  10.189.129.246  1   33         Full/ -           GE0/20
10.180.254.253  10.189.129.250  1   39         Full/ -           GE0/22

<router>ospf 1 router-id 10.192.254.49
<router>dis ospf rou

         OSPF Process 1 with Router ID 10.192.254.49
                  Routing Table

Routing for network
Destination        Cost          Type      NextHop          AdvRouter       Area
10.189.129.244/30  1             Stub      0.0.0.0          10.192.254.49   0.0.0.0
10.189.129.248/30  1             Stub      0.0.0.0          10.192.254.49   0.0.0.0
30.180.20.254/32   2        Inter   10.189.129.246  10.180.254.252  0.0.0.0

解决方案

1.查看配置,没有发现问题。

2.查看路由器上是否做了路由引入,也没有做相关的操作。

3.查看Router的路由表发现此条路由的下一跳是S77-1与Router互联地址,怀疑是VRRP导致。

4.查看产品文档发现对于VRRP,设备上默认情况下是要发布32位的VRRP明细路由,如果不需要这条路由可以使用 vrrp virtual-ip route-advertise disable取消。

5.接口下配置vrrp virtual-ip route-advertise disable问题解决,如下

interface Vlanif320
ip address 30.180.20.252 255.255.255.0
vrrp vrid 4 virtual-ip 30.180.20.254
vrrp vrid 4 priority 120
vrrp vrid 4 track interface GigabitEthernet3/0/0 reduced 30
vrrp virtual-ip route-advertise disable

总结:对于VRRP,S77交换机默认会对虚地址在设备上发布32位的VRRP主机路由,如果不需要这条路由可以使用 vrrp virtual-ip route-advertise disable取消。

END