优化方案——
单纯对于您的问题,我觉得配置还是有点问题:
1. 10.0.5.0/24已经通过重分发进入ISIS,没有必要在Summary的Policy下面accept:
lab@r1# show policy-options
policy-statement direct {
term 1 {
from {
protocol direct;
route-filter 10.0.5.0/24 exact;
}
then {
metric 101;
accept;
}
}
}
//以上策略为将直连网段,并且精确匹配10.0.5.0/24的路由导入,同时设置metric值为101
lab@r1# show protocols isis
export direct;
//将direct这个策略从路由表export到isis里面以后10.0.5.0/24这条路由应该已经成为Area 49.0002的一条外部路由。
2. 除了10.0.5.0/24这条外部路由以外,Area 49.0002的其它内部路由为 ——
10.0.4.4/30 (r1-r2)
10.0.4.12/30 (r1-r3)
10.0.4.0/30 (r2-r3)
10.0.4.8/30 (r2-r4)
10.0.6.1/32 (r1 loopback)
10.0.6.2/32 (r2 loopback)
以上路由17-24位二进制为:
00000100 (4)
00000101 (5)
00000111 (6)
3. 由于从Area 49.0003汇总过来的路由为:
lab@r6# run show route 10.0.2/23
inet.0: 14 destinations, 14 routes (14 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both
10.0.2.0/23 *[IS-IS/160] 00:02:56, metric 15, tag 1
> to 10.0.8.6 via fe-0/1/0.0
4. 因此我们在R3/R4上将第二点提及的路由汇总为10.0.4/22;案例中:在没有存在额外10.0.4.x以外的路由的情况下,并不会产生路由环路。更理想的策略配置应该为:
lab@r4# show routing-options
aggregate {
route 10.0.4.0/22; //含10.0.5/24; 10.0.4/24; 10.0.6/24
}
lab@r4# show policy-options
policy-statement summ {
term 1 {
from {
protocol aggregate;
route-filter 10.0.4.0/22 exact; //明确匹配22位路由
}
to level 2;
then accept;
}
term 2 {
from {
route-filter 10.0.4.0/22 longer; //比22为路由更长的路由将被丢弃
}
to level 2;
then reject;
}
}
lab@r4# show protocols isis export
export summ;