示例:OSPF 灵活算法
概述
此示例说明如何在 OSPFv2 网络中配置灵活的算法。这种灵活的算法允许没有控制器的网络使用分段路由配置流量工程,而无需实际实施网络控制器。
您可以通过定义灵活的算法来优化网络薄片,这些算法可根据您的要求使用不同的参数和链路约束来计算路径。由计算类型、度量类型和一组约束组成的集合称为灵活算法定义 (FAD)。您可以定义 FAD 并在 OSPFv2 网络中进行播发。设备也可以配置为参与某种灵活的算法,前提是它支持该特定 FAD 的约束。
拓扑结构
图1显示了灵活的算法拓扑,其中有6个器件R0、R1、R2、R3、R4和R5。在这些器件中的每一个上定义了两个灵活的算法128和129。设备上配置了红色、蓝色和绿色管理员组。在每个设备上定义了具有不同参数(如度量类型、计算类型和链路约束)的 FAD。
要求
此示例使用以下硬件和软件组件:
- 六台 MX 系列路由器。
- 在所有设备上运行 Junos OS 21.1R1 或更高版本。
配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,移除所有换行符,更改任何必要的详细信息以匹配您的网络配置,然后将命令复制粘贴到 [edit] 层级的 CLI 中。
设备 R0
set chassis network-services enhanced-ip set interfaces ge-0/0/0 description R0_to_R1_1 set interfaces ge-0/0/0 unit 0 family inet address 10.10.1.1/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 description R0_to_R1_2 set interfaces ge-0/0/1 unit 0 family inet address 10.10.1.5/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description R0_to_R3_1 set interfaces ge-0/0/2 unit 0 family inet address 10.10.3.1/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description R0_to_R3_2 set interfaces ge-0/0/3 unit 0 family inet address 10.10.3.5/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.255.10/32 set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement ex-bgp term 1 from route-filter 10.1.1.0/24 exact set policy-options policy-statement ex-bgp term 1 then community add blue set policy-options policy-statement ex-bgp term 1 then accept set policy-options policy-statement ex-bgp term 0 from route-filter 10.1.0.0/24 exact set policy-options policy-statement ex-bgp term 0 then community add red set policy-options policy-statement ex-bgp term 0 then accept set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement prefix-sid term 1001 from route-filter 192.168.255.10/32 exact set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 index 1280 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 index 1290 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 130 index 1300 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 130 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 131 index 1310 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 131 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 132 index 1320 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 132 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 133 index 1330 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 133 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 134 index 1340 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 134 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 135 index 1350 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 135 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment index 1000 set policy-options policy-statement prefix-sid term 1001 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1001 then accept set policy-options community blue members color:1:129 set policy-options community red members color:0:128 set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls admin-groups GREEN 2 set protocols mpls label-range static-label-range 1000 8000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols mpls interface ge-0/0/0.0 admin-group RED set protocols mpls interface ge-0/0/1.0 admin-group GREEN set protocols mpls interface ge-0/0/2.0 admin-group RED set protocols mpls interface ge-0/0/3.0 admin-group GREEN set protocols ospf backup-spf-options use-post-convergence-lfa maximum-labels 5 set protocols ospf backup-spf-options use-source-packet-routing set protocols ospf traffic-engineering advertisement always set protocols ospf source-packet-routing prefix-segment prefix-sid set protocols ospf source-packet-routing srgb start-label 80000 set protocols ospf source-packet-routing srgb index-range 5000 set protocols ospf source-packet-routing flex-algorithm 128 set protocols ospf source-packet-routing flex-algorithm 129 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa node-protection set routing-options flex-algorithm 128 definition metric-type igp-metric set routing-options flex-algorithm 128 definition spf set routing-options flex-algorithm 128 definition admin-group include-any RED set routing-options flex-algorithm 129 definition metric-type te-metric set routing-options flex-algorithm 129 definition spf set routing-options flex-algorithm 129 definition admin-group include-all BLUE set routing-options router-id 192.168.255.10 set routing-options autonomous-system 65000 set routing-options static route 10.1.1.0/24 receive set routing-options static route 10.1.0.0/24 receive set routing-options forwarding-table export pplb set routing-options flex-algorithm 128 use-transport-class set routing-options transport-class auto-create
设备 R1
set chassis network-services enhanced-ip set interfaces ge-0/0/0 description R1_to_R0_1 set interfaces ge-0/0/0 unit 0 family inet address 10.10.1.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 description R1_to_R0_2 set interfaces ge-0/0/1 unit 0 family inet address 10.10.1.6/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description R1_to_R2_1 set interfaces ge-0/0/2 unit 0 family inet address 10.10.12.1/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description R1_to_R2_2 set interfaces ge-0/0/3 unit 0 family inet address 10.10.12.5/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces ge-0/0/4 description R1_to_R3 set interfaces ge-0/0/4 unit 0 family inet address 10.10.13.1/30 set interfaces ge-0/0/4 unit 0 family mpls set interfaces ge-0/0/5 description R1_to_R4 set interfaces ge-0/0/5 unit 0 family inet address 10.10.14.1/30 set interfaces ge-0/0/5 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.255.11/32 set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement prefix-sid term 1001 from route-filter 192.168.255.11/32 exact set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 index 1281 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 index 1291 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment index 1001 set policy-options policy-statement prefix-sid term 1001 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1001 then accept set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls admin-groups GREEN 2 set protocols mpls label-range static-label-range 1000 8000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols mpls interface ge-0/0/0.0 admin-group RED set protocols mpls interface ge-0/0/1.0 admin-group GREEN set protocols mpls interface ge-0/0/2.0 admin-group RED set protocols mpls interface ge-0/0/3.0 admin-group GREEN set protocols mpls interface ge-0/0/4.0 admin-group BLUE set protocols mpls interface ge-0/0/5.0 admin-group GREEN set protocols ospf backup-spf-options use-post-convergence-lfa maximum-labels 5 set protocols ospf backup-spf-options use-source-packet-routing set protocols ospf traffic-engineering advertisement always set protocols ospf source-packet-routing prefix-segment prefix-sid set protocols ospf source-packet-routing srgb start-label 80000 set protocols ospf source-packet-routing srgb index-range 5000 set protocols ospf source-packet-routing flex-algorithm 128 set protocols ospf source-packet-routing flex-algorithm 129 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/4.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/5.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa node-protection set routing-options router-id 192.168.255.11 set routing-options autonomous-system 65000 set routing-options forwarding-table export pplb
设备 R2
set chassis network-services enhanced-ip set interfaces ge-0/0/0 description R2_to_R1_1 set interfaces ge-0/0/0 unit 0 family inet address 10.10.12.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 description R2_to_R1_2 set interfaces ge-0/0/1 unit 0 family inet address 10.10.12.6/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description R2_to_R3 set interfaces ge-0/0/2 unit 0 family inet address 10.10.23.1/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description R2_to_R4 set interfaces ge-0/0/3 unit 0 family inet address 10.10.24.1/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces ge-0/0/4 description R2_to_R5_1 set interfaces ge-0/0/4 unit 0 family inet address 10.10.25.1/30 set interfaces ge-0/0/4 unit 0 family mpls set interfaces ge-0/0/5 description R2_to_R5_2 set interfaces ge-0/0/5 unit 0 family inet address 10.10.25.5/30 set interfaces ge-0/0/5 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.255.12/32 set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement prefix-sid term 1001 from route-filter 192.168.255.12/32 exact set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 index 1282 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 index 1292 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment index 1002 set policy-options policy-statement prefix-sid term 1001 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1001 then accept set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls admin-groups GREEN 2 set protocols mpls label-range static-label-range 1000 8000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols mpls interface ge-0/0/0.0 admin-group RED set protocols mpls interface ge-0/0/1.0 admin-group GREEN set protocols mpls interface ge-0/0/2.0 admin-group RED set protocols mpls interface ge-0/0/3.0 admin-group BLUE set protocols mpls interface ge-0/0/4.0 admin-group RED set protocols mpls interface ge-0/0/5.0 admin-group GREEN set protocols mpls interface ge-0/0/5.0 admin-group BLUE set protocols ospf backup-spf-options use-post-convergence-lfa maximum-labels 5 set protocols ospf backup-spf-options use-source-packet-routing set protocols ospf traffic-engineering advertisement always set protocols ospf source-packet-routing prefix-segment prefix-sid set protocols ospf source-packet-routing srgb start-label 80000 set protocols ospf source-packet-routing srgb index-range 5000 set protocols ospf source-packet-routing flex-algorithm 128 set protocols ospf source-packet-routing flex-algorithm 129 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/4.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/5.0 post-convergence-lfa node-protection set routing-options router-id 192.168.255.12 set routing-options autonomous-system 65000 set routing-options forwarding-table export pplb
设备 R3
set chassis network-services enhanced-ip set interfaces ge-0/0/0 description R3_to_R0_1 set interfaces ge-0/0/0 unit 0 family inet address 10.10.3.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 description R3_to_R0_2 set interfaces ge-0/0/1 unit 0 family inet address 10.10.3.6/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description R3_to_R1 set interfaces ge-0/0/2 unit 0 family inet address 10.10.13.2/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description R3_to_R2 set interfaces ge-0/0/3 unit 0 family inet address 10.10.23.2/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces ge-0/0/4 description R3_to_R4_1 set interfaces ge-0/0/4 unit 0 family inet address 10.10.34.1/30 set interfaces ge-0/0/4 unit 0 family mpls set interfaces ge-0/0/5 description R3_to_R4_2 set interfaces ge-0/0/5 unit 0 family inet address 10.10.34.5/30 set interfaces ge-0/0/5 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.255.13/32 set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement prefix-sid term 1001 from route-filter 192.168.255.13/32 exact set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 index 1284 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 index 1294 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment index 1003 set policy-options policy-statement prefix-sid term 1001 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1001 then accept set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls admin-groups GREEN 2 set protocols mpls label-range static-label-range 1000 8000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols mpls interface ge-0/0/0.0 admin-group RED set protocols mpls interface ge-0/0/1.0 admin-group GREEN set protocols mpls interface ge-0/0/2.0 admin-group BLUE set protocols mpls interface ge-0/0/3.0 admin-group RED set protocols mpls interface ge-0/0/4.0 admin-group RED set protocols mpls interface ge-0/0/5.0 admin-group BLUE set protocols ospf backup-spf-options use-post-convergence-lfa maximum-labels 5 set protocols ospf backup-spf-options use-source-packet-routing set protocols ospf traffic-engineering advertisement always set protocols ospf source-packet-routing prefix-segment prefix-sid set protocols ospf source-packet-routing srgb start-label 80000 set protocols ospf source-packet-routing srgb index-range 5000 set protocols ospf source-packet-routing flex-algorithm 128 set protocols ospf source-packet-routing flex-algorithm 129 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/4.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/5.0 post-convergence-lfa node-protection set routing-options router-id 192.168.255.13 set routing-options autonomous-system 65000 set routing-options forwarding-table export pplb
设备 R4
set chassis network-services enhanced-ip set interfaces ge-0/0/0 description R4_to_R1 set interfaces ge-0/0/0 unit 0 family inet address 10.10.14.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 description R4_to_R2 set interfaces ge-0/0/1 unit 0 family inet address 10.10.24.2/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description R4_to_R3_1 set interfaces ge-0/0/2 unit 0 family inet address 10.10.34.2/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description R4_to_R3_2 set interfaces ge-0/0/3 unit 0 family inet address 10.10.34.6/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces ge-0/0/4 description R4_to_R5_1 set interfaces ge-0/0/4 unit 0 family inet address 10.10.45.1/30 set interfaces ge-0/0/4 unit 0 family mpls set interfaces ge-0/0/5 description R4_to_R5_2 set interfaces ge-0/0/5 unit 0 family inet address 10.10.45.5/30 set interfaces ge-0/0/5 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.255.14/32 set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement prefix-sid term 1001 from route-filter 192.168.255.14/32 exact set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 index 1284 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 index 1294 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment index 1004 set policy-options policy-statement prefix-sid term 1001 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1001 then accept set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls admin-groups GREEN 2 set protocols mpls label-range static-label-range 1000 8000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols mpls interface ge-0/0/2.0 admin-group RED set protocols mpls interface ge-0/0/3.0 admin-group BLUE set protocols mpls interface ge-0/0/0.0 admin-group GREEN set protocols mpls interface ge-0/0/1.0 admin-group BLUE set protocols mpls interface ge-0/0/4.0 admin-group GREEN set protocols mpls interface ge-0/0/5.0 admin-group RED set protocols ospf backup-spf-options use-post-convergence-lfa maximum-labels 5 set protocols ospf backup-spf-options use-source-packet-routing set protocols ospf traffic-engineering advertisement always set protocols ospf source-packet-routing prefix-segment prefix-sid set protocols ospf source-packet-routing srgb start-label 80000 set protocols ospf source-packet-routing srgb index-range 5000 set protocols ospf source-packet-routing flex-algorithm 128 set protocols ospf source-packet-routing flex-algorithm 129 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/4.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/5.0 post-convergence-lfa node-protection set routing-options router-id 192.168.255.14 set routing-options autonomous-system 65000 set routing-options forwarding-table export pplb
设备 R5
set chassis network-services enhanced-ip set interfaces ge-0/0/0 description R5_to_R2_1 set interfaces ge-0/0/0 unit 0 family inet address 10.10.25.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 description R5_to_R2_2 set interfaces ge-0/0/1 unit 0 family inet address 10.10.25.6/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description R5_to_R4_1 set interfaces ge-0/0/2 unit 0 family inet address 10.10.45.2/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description R5_to_R4_2 set interfaces ge-0/0/3 unit 0 family inet address 10.10.45.6/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.255.15/32 set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement prefix-sid term 1001 from route-filter 192.168.255.15/32 exact set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 index 1285 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 index 1295 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment index 1005 set policy-options policy-statement prefix-sid term 1001 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1001 then accept set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls admin-groups GREEN 2 set protocols mpls label-range static-label-range 1000 8000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols mpls interface ge-0/0/0.0 admin-group RED set protocols mpls interface ge-0/0/1.0 admin-group GREEN set protocols mpls interface ge-0/0/1.0 admin-group BLUE set protocols mpls interface ge-0/0/2.0 admin-group GREEN set protocols mpls interface ge-0/0/3.0 admin-group RED set protocols ospf backup-spf-options use-post-convergence-lfa maximum-labels 5 set protocols ospf backup-spf-options use-source-packet-routing set protocols ospf traffic-engineering advertisement always set protocols ospf source-packet-routing prefix-segment prefix-sid set protocols ospf source-packet-routing srgb start-label 80000 set protocols ospf source-packet-routing srgb index-range 5000 set protocols ospf source-packet-routing flex-algorithm 128 set protocols ospf source-packet-routing flex-algorithm 129 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa node-protection set routing-options router-id 192.168.255.15 set routing-options autonomous-system 65000 set routing-options static route 10.1.15.0/24 reject set routing-options forwarding-table export pplb
配置设备 R0
要为 OSPFv2 配置灵活的算法,请在设备 R0 上执行以下步骤:
-
配置设备接口以启用 IP 传输。
[edit] user@R0set interfaces ge-0/0/0 description R0_to_R1_1 user@R0set interfaces ge-0/0/0 unit 0 family inet address 10.10.1.1/30 user@R0set interfaces ge-0/0/0 unit 0 family mpls user@R0set interfaces ge-0/0/1 description R0_to_R1_2 user@R0set interfaces ge-0/0/1 unit 0 family inet address 10.10.1.5/30 user@R0set interfaces ge-0/0/1 unit 0 family mpls user@R0set interfaces ge-0/0/2 description R0_to_R3_1 user@R0set interfaces ge-0/0/2 unit 0 family inet address 10.10.3.1/30 user@R0set interfaces ge-0/0/2 unit 0 family mpls user@R0set interfaces ge-0/0/3 description R0_to_R3_2 user@R0set interfaces ge-0/0/3 unit 0 family inet address 10.10.3.5/30 user@R0set interfaces ge-0/0/3 unit 0 family mpls
-
配置用作 OSPF 会话的路由器 ID 的环路接口 (lo0) 地址。
[edit] user@R0set interfaces lo0 unit 0 family inet address 192.168.255.10/32
-
配置路由器 ID 和自治系统 (AS) 编号,以便在属于同一 AS 的一组路由设备内传播路由信息 AS。
[edit] user@R0set routing-options router-id 192.168.255.10 user@R0set routing-options autonomous-system 65000
-
定义用于对数据包进行负载均衡的策略,并应用每个数据包的策略来实现流量的负载平衡。
[edit] user@R0set policy-options policy-statement pplb then load-balance per-packet user@R0set routing-options forwarding-table export pplb
-
为使设备 R0 能够到达 192.168.255.10/32 网络的路由策略术语配置路由过滤器。
[edit] user@R0set policy-options policy-statement prefix-sid term 1001 from route-filter 192.168.255.10/32 exact
- 在所有接口(管理接口除外)上配置 MPLS。
[edit] user@R0set protocols mpls interface all user@R0set protocols mpls interface fxp0.0 disable
-
配置 MPLS 标签范围,以便为链路分配静态标签。
[edit] user@R0set protocols mpls label-range static-label-range 1000 8000
-
配置 TI-LFA 以启用针对链路和节点故障的保护。如果主路径出现故障或变得不可用,使用 TI-LFA 的 SR 会立即将流量路由到备用路径或备用路径,从而更快地恢复网络连接。
[edit] user@R0set protocols ospf backup-spf-options use-source-packet-routing
-
为分段路由路由路径配置最大标签数,以保护备份的最短路径优先属性。
[edit] user@R0set protocols ospf backup-spf-options use-post-convergence-lfa maximum-labels 5
-
在 SPRING 中为 OSPF 协议配置分段路由全局块 (SRGB) 的前缀分段属性、起始标签和索引范围。
[edit] user@R0set protocols ospf source-packet-routing prefix-segment prefix-sid user@R0set protocols ospf source-packet-routing srgb start-label 80000 user@R0set protocols ospf source-packet-routing srgb index-range 5000
-
在遵循融合后路径的 OSPF 接口上启用节点链路保护。
[edit] user@R0set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 post-convergence-lfa node-protection user@R0set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa node-protection user@R0set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa node-protection user@R0set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa node-protection
-
将环路接口配置为无源接口,以确保协议不会在环路接口上运行,并确保环路接口在整个网络中正确播发。
[edit] user@R0set protocols ospf area 0.0.0.0 interface lo0.0 passive
-
在设备 R0 上定义灵活的算法。为从 128 到 255 的每个 FAD 分配一个名称。
[edit] user@R0set routing-options flex-algorithm 128 user@R0set routing-options flex-algorithm 129
指定定义的参数。OSPFv2 根据 FAD 的这些指定参数计算路径。
-
指定 OSPFv2 协议计算路径所依据的计算类型。
[edit] user@R0set routing-options flex-algorithm 128 definition spf user@R0set routing-options flex-algorithm 128 definition spf
-
指定 OSPFv2 计算路径所依据的指标类型。
[edit] user@R0set routing-options flex-algorithm 128 definition metric-type igp-metric user@R0set routing-options flex-algorithm 129 definition metric-type te-metric
-
如果已启用 RSVP 流量工程,则可以为多个协议配置管理员组来为单个链路着色。
[edit] user@R0set protocols mpls admin-groups RED 0 user@R0set protocols mpls admin-groups BLUE 1 user@R0set protocols mpls admin-groups GREEN 2
-
将配置的管理组策略分配给设备 R0 接口。
[edit] user@R0set protocols mpls interface ge-0/0/0.0 admin-group RED user@R0set protocols mpls interface ge-0/0/1.0 admin-group GREEN user@R0set protocols mpls interface ge-0/0/2.0 admin-group RED user@R0set protocols mpls interface ge-0/0/3.0 admin-group GREEN
-
根据您的要求定义管理员组。
[edit] user@R0set routing-options flex-algorithm 128 definition admin-group include-any RED user@R0set routing-options flex-algorithm 129 definition admin-group include-all GREEN user@R0set routing-options flex-algorithm 129 definition admin-group include-all BLUE
注意:要使具有链路约束的 FAD 正常工作,所有相关链路都应在 OSPFv2 中通告 admin-color。您必须在接口上启用 RSVP,或者如果尚未为流量工程配置 RSVP,请确保始终在层次结构级别配置
[edit protocols ospf]set traffic-engineering advertise。[edit] user@R0set protocols ospf traffic-engineering advertisement always
-
- 在设备 R0 上配置灵活的算法参与。同一设备可以通告 FAD,也可参与灵活的算法。
[edit] user@R0set protocols ospf source-packet-routing flex-algorithm 128 user@R0set protocols ospf source-packet-routing flex-algorithm 129
-
通过策略配置播发前缀分段。
[edit] user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 index 1280 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 index 1290 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 130 index 1300 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 130 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 131 index 1310 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 131 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 132 index 1320 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 132 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 133 index 1330 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 133 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 134 index 1340 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 134 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 135 index 1350 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 135 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment index 1000 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then accept
结果
检查配置结果:
在配置模式下,输入 、 show interfaces、 show routing-optionsshow protocols和 show policy-options 命令以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明以更正配置。
interfaces {
ge-0/0/0 {
description R0_to_R1_1;
unit 0 {
family inet {
address 10.10.1.1/30;
}
family mpls;
}
}
ge-0/0/1 {
description R0_to_R1_2
unit 0 {
family inet {
address 10.10.1.5/30;
}
family mpls;
}
}
ge-0/0/2 {
description R0_to_R3_1
unit 0 {
family inet {
address 10.10.3.1/30;
}
family mpls;
}
}
ge-0/0/3 {
description R0_to_R3_2
unit 0 {
family inet {
address 10.10.3.5/30;
}
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 192.168.255.10/32;
}
}
}
}
policy-options {
policy-statement pplb {
then {
load-balance per-packet;
}
}
policy-statement prefix-sid {
term 1001 {
from {
route-filter 192.168.255.10/32 exact;
}
then {
prefix-segment {
algorithm 128 index 1280 node-segment;
algorithm 129 index 1290 node-segment;
algorithm 130 index 1300 node-segment;
algorithm 131 index 1310 node-segment;
algorithm 132 index 1320 node-segment;
algorithm 133 index 1330 node-segment;
algorithm 134 index 1340 node-segment;
algorithm 135 index 1350 node-segment;
index 1000;
node-segment;
}
accept;
}
}
}
}
protocols {
mpls {
admin-groups {
RED 0;
BLUE 1;
GREEN 2;
}
label-range {
static-label-range 1000 8000;
}
interface all;
interface fxp0.0 {
disable;
}
interface ge-0/0/0.0 {
admin-group RED;
}
interface ge-0/0/1.0 {
admin-group GREEN;
}
interface ge-0/0/2.0 {
admin-group RED;
}
interface ge-0/0/3.0 {
admin-group GREEN;
}
}
ospf {
backup-spf-options {
use-post-convergence-lfa maximum-labels 5;
use-source-packet-routing;
}
traffic-engineering {
advertisement always;
}
source-packet-routing {
prefix-segment prefix-sid;
srgb start-label 80000 index-range 5000;
flex-algorithm [ 128 129 ];
}
area 0.0.0.0 {
interface lo0.0 {
passive;
}
interface ge-0/0/0.0 {
post-convergence-lfa {
node-protection;
}
}
interface ge-0/0/1.0 {
post-convergence-lfa {
node-protection;
}
}
interface ge-0/0/2.0 {
post-convergence-lfa {
node-protection;
}
}
interface ge-0/0/3.0 {
post-convergence-lfa {
node-protection;
}
}
}
}
}
routing-options {
flex-algorithm 128 {
definition {
metric-type igp-metric;
spf;
admin-group include-any RED;
}
}
flex-algorithm 129 {
definition {
metric-type te-metric;
spf;
admin-group include-all [ GREEN BLUE ];
}
}
router-id 192.168.255.10;
autonomous-system 65000;
forwarding-table {
export pplb;
}
}
验证
要确认配置工作正常,请执行以下任务:
验证 OSPF 数据库
目的
验证灵活算法信令是否显示在 OSPF 数据库中。
行动
在操作模式下,运行命令 show ospf database opaque-area extensive 。
在 R0 上
user@R0>show ospf database opaque-area extensive
OpaqArea 4.0.0.0 192.168.255.10 0x800000ad 503 0x22 0xb85d 76
Opaque LSA
SR-Algorithm (8), length 3:
Algo (1), length 1:
0
Algo (2), length 1:
128
Algo (3), length 1:
129
SID/Label Range (9), length 12:
Range Size (1), length 3:
5000
SID/Label (1), length 3:
Label (1), length 3:
80000
Flex-Algorithm Definition (16), length 12:
Flex-Algo (1), length 1:
128
Metric-Type (2), length 1:
0
Calc-Type (3), length 1:
0
Priority (4), length 1:
0
FAD AG Include Any (2), length 4:
Include Any AG (1), length 4:
0x1
Flex-Algorithm Definition (16), length 12:
Flex-Algo (1), length 1:
129
Metric-Type (2), length 1:
2
Calc-Type (3), length 1:
0
Priority (4), length 1:
0
FAD AG Include All (3), length 4:
Include All AG (1), length 4:
0x6
Aging timer 00:51:37
Installed 00:08:20 ago, expires in 00:51:37, sent 00:08:18 ago
Last changed 5d 13:35:52 ago, Change count:
意义
R0 上的此输出说明:
此设备会播发三种分段路由算法(包括两种灵活的算法)。
此设备将播发两个 FAD。
验证灵活算法详细信息
目的
验证是否显示了灵活算法详细信息。
行动
在操作模式下,运行命令 show ospf spring flex-algorithm <flex-algorithm-id> 。
在 R0 上
user@R0>show ospf spring flex-algorithm 128
Flex Algo: 128, Area: 0.0.0.0
Color: 128, Participating, FAD supported
Winner: 192.168.255.10, Metric: 0, Calc: 0, Prio: 0, inc-any: 0x1, FAD supported
Include-Any: 0x1 RED
SPF Version: 296
Participation toggles: 1
Topo refresh count: 0
Full SPFs: 296, Partial SPFs: 0
意义
将显示在 R0 上配置的灵活算法详细信息。
验证灵活算法特定的 OSPF 内部路由
目的
验证是否显示特定于灵活算法的 OSPF 内部路由。
行动
在操作模式下,运行命令 show ospf route flex-algorithm <flex-algorithm-id> 。
在 R0 上
user@R0>show ospf route flex-algorithm 128
Prefix Path Route NH Metric NextHop Nexthop
Type Type Type Interface Address/LSP
192.168.255.11 Intra Router IP 1 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
192.168.255.12 Intra Router IP 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
192.168.255.13 Intra Router IP 1 ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
192.168.255.14 Intra Router IP 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
192.168.255.15 Intra Router IP 3 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
10.10.1.0/30 Intra Network IP 1 ge-0/0/0.0
10.10.1.4/30 Intra Network IP 1 ge-0/0/1.0
10.10.3.0/30 Intra Network IP 1 ge-0/0/2.0
10.10.3.4/30 Intra Network IP 1 ge-0/0/3.0
10.10.12.0/30 Intra Network IP 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
10.10.12.4/30 Intra Network IP 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
10.10.13.0/30 Intra Network IP 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
10.10.14.0/30 Intra Network IP 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
10.10.23.0/30 Intra Network IP 2 ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
10.10.24.0/30 Intra Network IP 3 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
10.10.25.0/30 Intra Network IP 3 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
10.10.25.4/30 Intra Network IP 3 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
10.10.34.0/30 Intra Network IP 2 ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
10.10.34.4/30 Intra Network IP 2 ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
10.10.45.0/30 Intra Network IP 3 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
10.10.45.4/30 Intra Network IP 3 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
128.49.106.245/32 Intra Network IP 1 ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
128.49.107.40/32 Intra Network IP 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
192.168.255.10/32 Intra Network IP 0 lo0.0
192.168.255.10/32 Intra Network Spring 0 lo0.0
192.168.255.11/32 Intra Network IP 1 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
192.168.255.11/32 Intra Network Spring 1 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
192.168.255.12/32 Intra Network IP 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
192.168.255.12/32 Intra Network Spring 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
192.168.255.13/32 Intra Network IP 1 ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
192.168.255.13/32 Intra Network Spring 1 ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
192.168.255.14/32 Intra Network IP 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
192.168.255.14/32 Intra Network Spring 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
192.168.255.15/32 Intra Network IP 3 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
192.168.255.15/32 Intra Network Spring 3 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
16 Intra Network Mpls 0 ge-0/0/0.0 10.10.1.2
Bkup MPLS ge-0/0/1.0 10.10.1.6
16 (S=0) Intra Network Mpls 0 ge-0/0/0.0 10.10.1.2
Bkup MPLS ge-0/0/1.0 10.10.1.6
17 Intra Network Mpls 0 ge-0/0/1.0 10.10.1.6
Bkup MPLS ge-0/0/0.0 10.10.1.2
17 (S=0) Intra Network Mpls 0 ge-0/0/1.0 10.10.1.6
Bkup MPLS ge-0/0/0.0 10.10.1.2
20 Intra Network Mpls 0 ge-0/0/2.0 10.10.3.2
Bkup MPLS ge-0/0/3.0 10.10.3.6
20 (S=0) Intra Network Mpls 0 ge-0/0/2.0 10.10.3.2
Bkup MPLS ge-0/0/3.0 10.10.3.6
21 Intra Network Mpls 0 ge-0/0/3.0 10.10.3.6
Bkup MPLS ge-0/0/2.0 10.10.3.2
21 (S=0) Intra Network Mpls 0 ge-0/0/3.0 10.10.3.6
Bkup MPLS ge-0/0/2.0 10.10.3.2
81001 Intra Network Mpls 1 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
81001 (S=0) Intra Network Mpls 1 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
81003 Intra Network Mpls 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
81004 Intra Network Mpls 1 ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
81004 (S=0) Intra Network Mpls 1 ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
81006 Intra Network Mpls 2 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
81007 Intra Network Mpls 3 ge-0/0/0.0 10.10.1.2
ge-0/0/1.0 10.10.1.6
ge-0/0/2.0 10.10.3.2
ge-0/0/3.0 10.10.3.6
意义
该 show ospf route 命令扩展了 flex-algorithm 显示灵活算法特定于 OSPF 内部路由的选项。每个路由都以 flex-algo-id 为前缀:
验证 Flex 彩色路由
目的
验证是否显示特定于灵活算法的 OSPF 内部路由。
行动
在操作模式下,运行命令 show route protocol ospf 。
在 R0 上
user@R0>show route protocol ospf
junos-rti-tc-<color>.inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.168.255.11-128<c>/64
*[L-OSPF/10/5] 1w2d 01:23:04, metric 1
> to 10.10.1.2 via ge-0/0/0.0
to 10.10.3.2 via ge-0/0/2.0, Push 81281, Push 81283(top)
192.168.255.12-128<c>/64
*[L-OSPF/10/5] 1w2d 01:23:04, metric 2
to 10.10.1.2 via ge-0/0/0.0, Push 81283
> to 10.10.3.2 via ge-0/0/2.0, Push 81283
192.168.255.13-128<c>/64
*[L-OSPF/10/5] 1w2d 01:23:04, metric 1
> to 10.10.3.2 via ge-0/0/2.0
to 10.10.1.2 via ge-0/0/0.0, Push 81284, Push 81283(top)
192.168.255.14-128<c>/64
*[L-OSPF/10/5] 1w2d 01:23:04, metric 2
> to 10.10.3.2 via ge-0/0/2.0, Push 81286
to 10.10.1.2 via ge-0/0/0.0, Push 81286, Push 81283(top)
192.168.255.15-128<c>/64
*[L-OSPF/10/5] 1w2d 01:23:04, metric 3
to 10.10.1.2 via ge-0/0/0.0, Push 81287
> to 10.10.3.2 via ge-0/0/2.0, Push 81287
意义
输出显示在 junos-rti-tc-<color>.inet.0 表中编程的所有彩色 Flex 路由,格式如下:prefix_address-flex-algo-id<c>/64
验证 OSPF 日志
目的
验证 OSPF 日志是否显示 flexible algorithm 关键字。
行动
在操作模式下,运行命令 show ospf log 。
在 R0 上
user@R0>show ospf log
Topology default SPF log:
Last instance of each event type
When Type Elapsed
1w2d 13:59:18 SPF 0.000316
1w2d 13:59:18 Stub 0.000233
1w2d 13:59:18 Interarea 0.000002
1w2d 13:59:18 External 0.000004
1w2d 13:59:18 NSSA 0.000001
1w2d 13:59:18 Cleanup 0.000551
Maximum length of each event type
When Type Elapsed
1w2d 14:34:27 SPF 0.000997
1w2d 15:59:35 Stub 0.000675
1w3d 07:08:27 Interarea 0.000010
1w3d 07:29:07 External 0.000013
1w3d 07:15:21 NSSA 0.000008
1w3d 08:38:05 Cleanup 0.001044
Last 100 events
When Type Elapsed
1w2d 14:08:36 FlexAlgo SPF 0.000680
1w2d 14:08:36 SPF 0.000204
1w2d 14:08:36 Stub 0.000025
1w2d 14:08:36 Interarea 0.000003
1w2d 14:08:36 External 0.000002
1w2d 14:08:36 NSSA 0.000001
1w2d 14:08:36 Prefix SID 0.000222
1w2d 14:08:36 Adj SID 0.000074
1w2d 14:08:36 Cleanup 0.000607
1w2d 14:08:36 Total 0.001209
1w2d 14:08:31 SPF 0.000188
1w2d 14:08:31 Stub 0.000054
1w2d 14:08:31 Interarea 0.000002
1w2d 14:08:31 External 0.000001
1w2d 14:08:31 NSSA 0.000001
1w2d 14:08:31 Prefix SID 0.000181
1w2d 14:08:31 Adj SID 0.000178
1w2d 14:08:31 Cleanup 0.000413
1w2d 14:08:31 Total 0.001656
1w2d 14:06:54 FlexAlgo SPF 0.001914
1w2d 14:06:54 FlexAlgo SPF 0.000081
1w2d 14:06:54 SPF 0.000215
1w2d 14:06:54 Stub 0.000030
1w2d 14:06:54 Interarea 0.000003
1w2d 14:06:54 External 0.000001
1w2d 14:06:54 NSSA 0.000001
1w2d 14:06:54 Prefix SID 0.000227
1w2d 14:06:54 Adj SID 0.000075
1w2d 14:06:54 Cleanup 0.000233
1w2d 14:06:54 Total 0.000859
1w2d 14:06:49 SPF 0.000234
1w2d 14:06:49 Stub 0.000072
1w2d 14:06:49 Interarea 0.000003
1w2d 14:06:49 External 0.000002
1w2d 14:06:49 NSSA 0
1w2d 14:06:49 Prefix SID 0.000262
1w2d 14:06:49 Adj SID 0.000254
1w2d 14:06:49 Cleanup 0.000495
1w2d 14:06:49 Total 0.001936
1w2d 14:06:30 FlexAlgo SPF 0.001356
1w2d 14:06:30 FlexAlgo SPF 0.000061
1w2d 14:06:30 SPF 0.000207
1w2d 14:06:30 Stub 0.000023
1w2d 14:06:30 Interarea 0.000003
1w2d 14:06:30 External 0.000002
1w2d 14:06:30 NSSA 0.000001
1w2d 14:06:30 Prefix SID 0.000237
1w2d 14:06:30 Adj SID 0.000087
1w2d 14:06:30 Cleanup 0.000430
1w2d 14:06:30 Total 0.001060
1w2d 14:06:25 SPF 0.000207
1w2d 14:06:25 Stub 0.000077
1w2d 14:06:25 Interarea 0.000002
1w2d 14:06:25 External 0.000002
1w2d 14:06:25 NSSA 0.000001
1w2d 14:06:25 Prefix SID 0.000250
1w2d 14:06:25 Adj SID 0.000245
1w2d 14:06:25 Cleanup 0.000399
1w2d 14:06:25 Total 0.001840
1w2d 14:05:56 FlexAlgo SPF 0.001781
1w2d 14:05:56 FlexAlgo SPF 0.000080
1w2d 14:05:55 SPF 0.000215
1w2d 14:05:55 Stub 0.000025
1w2d 14:05:55 Interarea 0.000002
1w2d 14:05:55 External 0.000001
1w2d 14:05:55 NSSA 0.000001
1w2d 14:05:55 Prefix SID 0.000240
1w2d 14:05:55 Adj SID 0.000073
1w2d 14:05:55 Cleanup 0.000422
1w2d 14:05:55 Total 0.001055
1w2d 14:05:50 SPF 0.000212
1w2d 14:05:50 Stub 0.000082
1w2d 14:05:50 Interarea 0.000003
1w2d 14:05:50 External 0.000001
1w2d 14:05:50 NSSA 0.000001
1w2d 14:05:50 Prefix SID 0.000264
1w2d 14:05:50 Adj SID 0.000239
1w2d 14:05:50 Cleanup 0.000458
1w2d 14:05:50 Total 0.002053
1w2d 13:59:23 FlexAlgo SPF 0.001603
1w2d 13:59:23 FlexAlgo SPF 0.000062
1w2d 13:59:23 SPF 0.000224
1w2d 13:59:23 Stub 0.000021
1w2d 13:59:23 Interarea 0.000002
1w2d 13:59:23 External 0.000001
1w2d 13:59:23 NSSA 0.000001
1w2d 13:59:23 Prefix SID 0.000222
1w2d 13:59:23 Adj SID 0.000087
1w2d 13:59:23 Cleanup 0.000413
1w2d 13:59:23 Total 0.001228
1w2d 13:59:18 SPF 0.000316
1w2d 13:59:18 Stub 0.000233
1w2d 13:59:18 Interarea 0.000002
1w2d 13:59:18 External 0.000004
1w2d 13:59:18 NSSA 0.000001
1w2d 13:59:18 Prefix SID 0.000324
1w2d 13:59:18 Adj SID 0.000318
1w2d 13:59:18 Cleanup 0.000551
1w2d 13:59:18 Total 0.002751
意义
输出显示为 SPF 日志添加的 FlexAlgo 关键字。