你的问题来自于JNCIA-M教材168页的例子。关于你的问题,请把教材往上翻两页到166页末尾, Using Multiple Route Filters In the “from and to” section earlier in this chapter, we saw that the application of multiple match conditions in a term results in a logical AND operation. When multiple route filters are used in a single term, this process is changed somewhat. In this situation, the multiple route filters are evaluated much like a logical OR in that only one of the route filters will actually be the match criteria used. This one route filter is found by performing a longest-match lookup on the configured prefix/prefix-length within each route filter. Only after this longest- match lookup is completed will the match type be considered to see if a candidate route actu- ally matches the policy term.
|
解释如下:
在一般情况下,同一term中的多个匹配条件(match conditions )之间是
逻辑与关系,但在同一term中使用多个路由过滤器( route filters)作为匹配条件的时候,情况有所改变,更像是一种逻辑或关系,但不完全是逻辑或。在这种情况下,多个路由过滤器都会被检查但只有一个会被当作匹配标准使用。
哪一个路由过滤器会被当作匹配标准呢?This one route filter is found by performing a longest-match lookup
on the configured prefix/prefix-length within each route filter,说得很清楚,对term里所列出的所有路由过滤器进行longest-match lookup最长匹配查找,最长匹配的那一条就是用于进行匹配与否判断的,只有最长匹配结束,选择出了最长匹配的过滤器,才通过该过滤器的匹配类型match-type来判断候选路由是否匹配,如果匹配则执行本term的action,如果不符合,则直接进入下一term(如果有)或者下一policy,而不是逐步缩短掩码检查本term的其他过滤器。