示例:配置不间断活动路由
以下示例为 BGP、IS-IS 和 OSPF 启用平滑路由引擎切换、不间断主动路由和不间断主动路由追踪选项。
[edit]
system commit {
synchronize;
}
chassis {
redundancy {
graceful-switchover; # This enables graceful Routing Engine switchover on
# the routing platform.
}
}
interfaces {
so-0/0/0 {
unit 0 {
family inet {
address 10.0.1.1/30;
}
family iso;
}
}
so-0/0/1 {
unit 0 {
family inet {
address 10.1.1.1/30;
}
family iso;
}
}
so-0/0/2 {
unit 0 {
family inet {
address 10.2.1.1/30;
}
family iso;
}
}
so-0/0/3 {
unit 0 {
family inet {
address 10.3.1.1/30;
}
family iso;
}
}
lo0 {
unit 0 {
family inet {
address 192.168.2.1/32;
}
family iso {
address 49.0004.1921.6800.2001.00;
}
}
}
}
routing-options {
nonstop-routing; # This enables nonstop active routing on the routing platform.
router-id 192.168.2.1;
autonomous-system 65432;
}
protocols {
bgp {
traceoptions {
flag nsr-synchronization detail; # This logs nonstop active routing
# events for BGP.
}
advertise-from-main-vpn-tables;
local-address 192.168.2.1;
group external-group {
type external;
export BGP_export;
neighbor 192.168.1.1 {
family inet {
unicast;
}
peer-as 65103;
}
}
group internal-group {
type internal;
neighbor 192.168.10.1;
neighbor 192.168.11.1;
neighbor 192.168.12.1;
}
}
isis {
traceoptions {
flag nsr-synchronization detail; # This logs nonstop active routing events
# for IS-IS.
}
interface all;
interface fxp0.0 {
disable;
}
interface lo0.0 {
passive;
}
}
ospf {
traceoptions {
flag nsr-synchronization detail; # This logs nonstop active routing events
# for OSPF.
}
area 0.0.0.0 {
interface all;
interface fxp0.0 {
disable;
}
interface lo0.0 {
passive;
}
}
}
}
policy-options {
policy-statement BGP_export {
term direct {
from {
protocol direct;
}
then accept;
}
term final {
then reject;
}
}
}