示例:用于第 2 层 电路配置的 APS
图 1:第 2 层 电路拓扑图
的 APS

图 1 显示 PE 路由器上配置 APS,以保护第 2 层 电路中的 PE-CE 链路。此示例仅显示 PE 路由器配置,并假定您已预配置完整的第 2 层 电路拓扑。有关配置第 2 层 电路的详细信息,请参阅 Junos 第 2 层 电路功能指南。
在路由器 PE1 上,将 ATM2 IQ 接口 at-0/0/1
配置为 APS 保护电路,将 ATM2 IQ 接口 at-1/3/1
配置为工作电路。此外,将工作电路接口配置为第 2 层 电路的主接口,并将保护电路接口配置为第 2 层 电路的受保护接口。
路由器 PE1
[edit] chassis { fpc 0 { pic 0 { atm-l2circuit-mode { cell; # This dedicates FPC 0 PIC 0 to cell-relay mode. } } } fpc 1 { pic 3 { atm-l2circuit-mode { cell; # This dedicates FPC 1 PIC 3 to cell-relay mode. } } } } interfaces { at-0/0/1 { description "To CE1 at-0/1/2"; encapsulation atm-ccc-cell-relay; sonet-options { aps { protect-circuit TEST; # This interface is the APS protect circuit. } } atm-options { pic-type atm2; promiscuous-mode; } unit 0 { allow-any-vci; } } at-1/3/1 { description "To CE1 at-0/1/1"; encapsulation atm-ccc-cell-relay; sonet-options { aps { working-circuit TEST; # This interface is the APS working circuit. } } atm-options { pic-type atm2; promiscuous-mode; } unit 0 { allow-any-vci; } } } protocols { l2circuit { neighbor 10.255.17.4 { interface at-1/3/1.0 { # The Layer 2 circuit interface is the working circuit. protect-interface at-0/0/1.0; # The protect-interface is the protect circuit. virtual-circuit-id 100; } } } }
验证您的工作
要验证第 2 层 电路的 APS 是否正常运行,请使用以下命令:
show l2circuit connections
配置第 2 层 电路以及 APS 工作和保护电路后,您可以使用命令 show l2circuit connections
查看第 2 层 电路中哪个 APS 电路处于活动状态。显示的第一个本地接口始终是活动电路。如果第二个本地接口字段指示 Protect-Inactive
,则工作电路处于活动状态,如此输出示例所示。
user@PE0> show l2circuit connections Layer-2 Circuit Connections: Legend for connection status (St) EI -- encapsulation invalid NP -- interface h/w not present MM -- mtu mismatch Dn -- down EM -- encapsulation mismatch VC-Dn -- Virtual circuit Down CM -- control-word mismatch Up -- operational OL -- no outgoing label XX -- unknown NC -- intf encaps not CCC/TCC CB -- rcvd cell-bundle size bad Legend for interface status Up -- operational Dn -- down Neighbor: 10.255.17.4 Interface Type St Time last up # Up trans at-1/3/1.0(vc 100) rmt Up Sep 3 17:48:25 2003 1 Local interface: at-1/3/1.0, Status: Up, Encapsulation: ATM CELL (PORT Mode) Remote PE: 10.255.17.4, Negotiated control-word: Yes (Null) Incoming label: 100368, Outgoing label: 100112 Local interface: at-0/0/1.0, Status: Dn, Encapsulation: ATM CELL (PORT Mode), Protect-Inactive
相反,如果第一个本地接口标有 Protect-Active
指示灯,第二个本地接口指示 Primary-Inactive
,则保护电路处于活动状态,如下所示:
user@PE0> show l2circuit connections Layer-2 Circuit Connections: Legend for connection status (St) EI -- encapsulation invalid NP -- interface h/w not present MM -- mtu mismatch Dn -- down EM -- encapsulation mismatch VC-Dn -- Virtual circuit Down CM -- control-word mismatch Up -- operational OL -- no outgoing label XX -- unknown NC -- intf encaps not CCC/TCC CB -- rcvd cell-bundle size bad Legend for interface status Up -- operational Dn -- down Neighbor: 10.255.17.4 Interface Type St Time last up # Up trans at-1/3/1.0(vc 100) rmt Up Sep 3 17:51:06 2003 2 Local interface: at-0/0/1.0, Status: Up, Encapsulation: ATM CELL (PORT Mode), Protect-Active Remote PE: 10.255.17.4, Negotiated control-word: No Incoming label: 100368, Outgoing label: 100112 Local interface: at-1/3/1.0, Status: Dn, Encapsulation: ATM CELL (PORT Mode), Primary-Inactive