使示例尽可能简单。我们有一个 OSPF 区域设置,这样如果一个链接出现故障或拥塞,流量将重新路由通过另一个。有没有办法让流量从 OSPF 区域的一端传递到它的目的地,而无需在中间的每个路由器上添加静态路由?
我已经尝试了以下但它似乎不起作用:
policy-statement into-ospf {
term connected {
from protocol direct;
then accept;
}
term static {
from protocol static;
then accept;
}
}
export [ DEFAULT_ROUTE into-ospf ];
reference-bandwidth 10g;
area 0.0.0.0 {
interface lo0.0;
interface ge-0/0/1.0 {
metric 20;
}
interface ge-0/0/2.0 {
metric 80;
}
}
同时,我只是在 OSPF 区域内的每个路由器上重新定义每条路由:
static {
route 0.0.0.0/0 next-hop x.x.0.53;
route x.x.0.80/28 next-hop [ x.x.0.62 x.x.0.58 ];
route x.x.0.72/29 next-hop [ x.x.0.62 x.x.0.58 ];
route x.x.0.64/29 next-hop [ x.x.0.62 x.x.0.58 ];
route x.x.0.160/30 next-hop [ x.x.0.62 x.x.0.58 ];
route x.x.0.164/30 next-hop [ x.x.0.62 x.x.0.58 ];
route x.x.1.128/28 next-hop [ x.x.0.62 x.x.0.58 ];
}