我有一个名为rtbh
配置为 BGP 对等方的入口策略的路由策略:
root@PE3> show configuration policy-options policy-statement rtbh term ipv4 | display inheritance no-comments
from {
family inet;
community BLACKHOLE;
route-filter 0.0.0.0/0 prefix-length-range /32-/32;
}
then {
local-preference 170;
origin igp;
next-hop 192.0.2.1;
accept;
}
root@PE3>
如上所示,如果它具有附加的特定 BGP 社区,则匹配 /32 前缀,然后将下一跳重写为192.0.2.1
并接受该前缀。192.0.2.1
存在的路径:
root@PE3> show route 192.0.2.1 detail
inet.0: 17 destinations, 18 routes (16 active, 0 holddown, 1 hidden)
192.0.2.1/32 (1 entry, 1 announced)
*Static Preference: 5
Next hop type: Discard, Next hop index: 0
Address: 0xa1de64c
Next-hop reference count: 2
State: <Active NoReadvrt Int Ext>
Local AS: 65005
Age: 1
Validation State: unverified
Task: RT
Announcement bits (2): 0-KRT 4-Resolve tree 1
AS path: I
root@PE3>
root@PE3> ...configuration routing-options rib inet.0 | display inheritance no-comments
static {
route 192.0.2.1/32 {
discard;
install;
no-readvertise;
}
}
martians {
192.0.2.1/32 exact allow;
}
root@PE3>
但是,当我收到rtbh
策略的匹配前缀时,它会保持隐藏状态:
root@PE3> show route receive-protocol bgp 10.94.0.1 extensive hidden
inet.0: 17 destinations, 18 routes (16 active, 0 holddown, 1 hidden)
203.0.113.1/32 (1 entry, 0 announced)
Accepted
Nexthop: 10.94.0.1
AS path: 65004 I
Communities: 65005:666
inet6.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
root@PE3>
当我删除策略中的next-hop 192.0.2.1
语句时,该语句rtbh
将203.0.113.1/32
变为活动状态。是什么导致了这种行为?