帮助我们改善您的体验。

让我们了解您的想法。

您是否能抽出两分钟的时间完成一份问卷调查?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
MPLS 应用程序用户指南
Table of Contents Expand all
list Table of Contents

机器翻译对您有帮助吗?

starstarstarstarstar
Go to English page
免责声明:

我们将使用第三方机器翻译软件翻译本页面。瞻博网络虽已做出相当大的努力提供高质量译文,但无法保证其准确性。如果对译文信息的准确性有任何疑问,请参阅英文版本. 可下载的 PDF 仅提供英文版.

MPLS 的共享风险链路组

date_range 18-Jan-25

SRLG 概述

在 MPLS 信息流工程中,共享风险链路组 (SRLG) 是一组共享公共资源的链路,如果公用资源发生故障,它会影响该集中的所有链路。这些链路具有相同的故障风险,因此被视为属于同一 SRLG。例如,共享公共光纤的链路被称为位于同一 SRLG 中,因为光纤故障可能导致组中的所有链路出现故障。

SRLG 由 IGP(OSPFv2 和 IS-IS)域中唯一的 32 位数字表示。一个链路可能属于多个 SRLG。标签交换路径 (LSP) 中路径的 SRLG 是路径中所有链路的一组 SRLG。计算 LSP 的辅助路径时,最好找到一条路径,使辅助路径和主路径没有任何共同链路,以防主路径和辅助路径的 SRLG 不相交。这可确保特定链路上的单点故障不会同时关闭 LSP 中的主路径和辅助路径。

配置 SRLG 后,设备将使用约束最短路径优先 (CSPF) 算法,并尝试保持用于主路径和辅助路径的链路互斥。如果主路径关闭,CSPF 算法会尝试避免与主路径共享任何 SRLG 的链路,从而计算辅助路径。此外,在计算旁路 LSP 的路径时,CSPF 会尽量避免与受保护链路共享任何 SRLG 的链路。

如果未配置 SRLG,CSPF 仅在计算辅助路径时考虑链路成本。

链路 SRLG 信息的任何更改都会触发 IGP 为新链路 SRLG 信息发送 LSP 更新。CSPF 在下一轮重新优化期间重新计算路径。

Junos OS 11.4 及更高版本支持基于以下 RFC 的 SRLG:

  • RFC 4203,OSPF 扩展支持通用多协议标签交换 (GMPLS)。

  • RFC 5307, 支持通用多协议标签交换 (GMPLS) 的 IS-IS 扩展

注:

目前,SRLG 功能继续支持“命运共享”功能。

示例:配置 SRLG

此示例说明如何在设备上配置共享风险链路组 (SRLG)。

要求

此示例使用以下硬件和软件组件:

  • 七款路由器,可以是 M 系列、MX 系列或 T 系列路由器的组合

  • 在所有设备上运行的 Junos OS 11.4 或更高版本

概述

Junos OS 11.4 及更高版本支持 IGP(OSPFv2 和 IS-IS)域中的 SRLG 配置。在此示例中,您将配置 SRLG 并将其与设备上的 MPLS 接口关联。

设备将 SRLG 成本参数用于约束最短路径优先 (CSPF) 算法,并尝试通过避免与主路径共享任何 SRLG 的链路来保持用于主路径和辅助路径的链路互斥。

要配置 SRLG,请先在 [edit routing-options srlg srlg-name] 层次结构级别定义 SRLG 参数,然后将 SRLG 与层次结构级别的 MPLS 接口 [edit mpls interface interface-name] 关联。

srlg srlg-name 语句具有以下选项:

  • srlg-cost- 包括 SRLG 的成本,范围为 1 到 65535。SRLG 的成本决定了此 SRLG 对路径计算的 CSPF 算法的影响级别。成本越高,辅助路径与主路径共享同一 SRLG 的可能性就越小。默认情况下,为 srlg-cost 1。

  • srlg-value— 包括 SRLG 的组 ID,范围为 1 到 4294967295。

在此示例中:

  • PE1 是入口路由器,PE2 是出口路由器。

  • P1、P2 和 P3、P4 和 P5 是转发路由器。

    • P1 具有到 PE1 入口和 PE2 出口路由器的直接主路径连接。

    • P2 具有到 PE1 和 PE2 的直接辅助路径连接。

    • P3 具有到 PE1 的直接次级路径连接,以及通过 P4 和 P5 到 PE2 的间接次级路径。

    • P4 具有到 PE1 到 P3 和到 PE2 到 P5 的间接次要路径。

    • P5 有一条通过 P4 和 P3 到 PE1 的间接路径,以及一条到 PE2 的直接辅助路径。

OSPF 在所有路由器上配置为内部网关协议 (IGP)。SRLG 在所有七个路由器上配置。主路径包括 SRLG srlg-a。对于备用辅助路径,链路 P2>PE2 属于 SRLG srlg-a。添加 10 后 srlg-cost ,有效链路指标变为 11。因此,计算的辅助路径为 PE1>P3>P4>P5>PE2,CSPF 链路指标为 4。

拓扑学

配置

CLI 快速配置

要快速配置示例的此部分,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改任何必要的详细信息以匹配您的网络配置,然后将命令复制并粘贴到层次结构级别的 CLI [edit] 中。

路由器 PE1

content_copy zoom_out_map
set interfaces ge-0/0/1 unit 0 family inet address 192.168.12.1/24
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces ge-0/0/2 unit 0 family inet address 192.168.13.1/24
set interfaces ge-0/0/2 unit 0 family mpls
set interfaces ge-0/0/3 unit 0 family inet address 192.168.14.1/24
set interfaces ge-0/0/3 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.255.0.1/32
set routing-options srlg srlg-a srlg-value 101
set routing-options srlg srlg-a srlg-cost 10
set protocols rsvp interface ge-0/0/1.0
set protocols rsvp interface ge-0/0/2.0
set protocols rsvp interface ge-0/0/3.0
set protocols mpls optimize-timer 120
set protocols mpls label-switched-path pe1-pe2 to 10.255.0.7
set protocols mpls label-switched-path pe1-pe2 primary via-p1
set protocols mpls label-switched-path pe1-pe2 secondary path2 standby
set protocols mpls path via-p1 10.255.0.2 strict
set protocols mpls path path2
set protocols mpls interface ge-0/0/1.0
set protocols mpls interface ge-0/0/2.0
set protocols mpls interface ge-0/0/3.0
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface ge-0/0/2.0
set protocols ospf area 0.0.0.0 interface ge-0/0/3.0
set protocols ospf area 0.0.0.0 interface lo0.0

路由器 P1

content_copy zoom_out_map
set interfaces ge-0/0/1 unit 0 family inet address 192.168.12.2/24
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces ge-0/0/2 unit 0 family inet address 192.168.27.2/24
set interfaces ge-0/0/2 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.255.0.2/32
set routing-options srlg srlg-a srlg-value 101
set routing-options srlg srlg-a srlg-cost 10
set protocols rsvp interface ge-0/0/1.0
set protocols rsvp interface ge-0/0/2.0
set protocols mpls interface ge-0/0/1.0
set protocols mpls interface ge-0/0/2.0 srlg srlg-a
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface ge-0/0/2.0
set protocols ospf area 0.0.0.0 interface lo0.0

路由器 P2

content_copy zoom_out_map
set interfaces ge-0/0/1 unit 0 family inet address 192.168.13.3/24
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces ge-0/0/2 unit 0 family inet address 192.168.37.3/24
set interfaces ge-0/0/2 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.255.0.3/32
set routing-options srlg srlg-a srlg-value 101
set routing-options srlg srlg-a srlg-cost 10
set protocols rsvp interface ge-0/0/1.0
set protocols rsvp interface ge-0/0/2.0
set protocols mpls interface ge-0/0/1.0
set protocols mpls interface ge-0/0/2.0 srlg srlg-a
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface ge-0/0/2.0
set protocols ospf area 0.0.0.0 interface lo0.0

路由器 P3

content_copy zoom_out_map
set interfaces ge-0/0/1 unit 0 family inet address 192.168.14.4/24
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces ge-0/0/2 unit 0 family inet address 192.168.45.4/24
set interfaces ge-0/0/2 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.255.0.4/32
set routing-options srlg srlg-a srlg-value 101
set routing-options srlg srlg-a srlg-cost 10
set protocols rsvp interface ge-0/0/1.0
set protocols rsvp interface ge-0/0/2.0
set protocols mpls interface ge-0/0/1.0
set protocols mpls interface ge-0/0/2.0
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface ge-0/0/2.0
set protocols ospf area 0.0.0.0 interface lo0.0

路由器 P4

content_copy zoom_out_map
set interfaces ge-0/0/1 unit 0 family inet address 192.168.45.5/24
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces ge-0/0/2 unit 0 family inet address 192.168.56.5/24
set interfaces ge-0/0/2 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.255.0.5/32
set routing-options srlg srlg-a srlg-value 101
set routing-options srlg srlg-a srlg-cost 10
set protocols rsvp interface ge-0/0/1.0
set protocols rsvp interface ge-0/0/2.0
set protocols mpls interface ge-0/0/1.0
set protocols mpls interface ge-0/0/2.0
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface ge-0/0/2.0
set protocols ospf area 0.0.0.0 interface lo0.0

路由器 P5

content_copy zoom_out_map
set interfaces ge-0/0/1 unit 0 family inet address 192.168.56.6/24
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces ge-0/0/2 unit 0 family inet address 192.168.67.6/24
set interfaces ge-0/0/2 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.255.0.6/32
set routing-options srlg srlg-a srlg-value 101
set routing-options srlg srlg-a srlg-cost 10
set protocols rsvp interface ge-0/0/1.0
set protocols rsvp interface ge-0/0/2.0
set protocols mpls interface ge-0/0/1.0
set protocols mpls interface ge-0/0/2.0
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface ge-0/0/2.0
set protocols ospf area 0.0.0.0 interface lo0.0

路由器 PE2

content_copy zoom_out_map
set interfaces ge-0/0/1 unit 0 family inet address 192.168.27.7/24
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces ge-0/0/2 unit 0 family inet address 192.168.37.7/24
set interfaces ge-0/0/2 unit 0 family mpls
set interfaces ge-0/0/3 unit 0 family inet address 192.168.67.7/24
set interfaces ge-0/0/3 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.255.0.7/32
set routing-options srlg srlg-a srlg-value 101
set routing-options srlg srlg-a srlg-cost 10
set protocols rsvp interface ge-0/0/1.0
set protocols rsvp interface ge-0/0/2.0
set protocols rsvp interface ge-0/0/3.0
set protocols mpls interface ge-0/0/1.0
set protocols mpls interface ge-0/0/2.0
set protocols mpls interface ge-0/0/3.0
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface ge-0/0/2.0
set protocols ospf area 0.0.0.0 interface ge-0/0/3.0
set protocols ospf area 0.0.0.0 interface lo0.0

程序

分步过程

下面的示例要求您在各个配置层级中进行导航。有关导航 CLI 的信息,请参阅 Junos OS CLI 用户指南

要配置入口路由器 PE1:

  1. 配置设备接口。

    content_copy zoom_out_map
    [edit interfaces]
    user@PE1# set ge-0/0/1 unit 0 family inet address 192.168.12.1/24
    user@PE1# set ge-0/0/1 unit 0 family mpls
    user@PE1# set ge-0/0/2 unit 0 family inet address 192.168.13.1/24
    user@PE1# set ge-0/0/2 unit 0 family mpls
    user@PE1# set ge-0/0/3 unit 0 family inet address 192.168.14.1/24
    user@PE1# set ge-0/0/3 unit 0 family mpls
    user@PE1# set lo0 unit 0 family inet address 10.255.0.1/32
    
  2. 在接口上配置 OSPF。

    content_copy zoom_out_map
    [edit protocols ospf]
    user@PE1# set traffic-engineering
    user@PE1# set area 0.0.0.0 interface ge-0/0/1.0
    user@PE1# set area 0.0.0.0 interface ge-0/0/2.0
    user@PE1# set area 0.0.0.0 interface ge-0/0/3.0
    user@PE1# set area 0.0.0.0 interface lo0.0
    
  3. 配置 SRLG 定义。

    content_copy zoom_out_map
    [edit routing-options]
    user@PE1# set srlg srlg-a srlg-value 101
    user@PE1# set srlg srlg-a srlg-cost 10
    
  4. 配置 MPLS 和 LSP。

    content_copy zoom_out_map
    [edit protocols mpls]
    user@PE1# set interface ge-0/0/1.0
    user@PE1# set interface ge-0/0/2.0
    user@PE1# set interface ge-0/0/3.0
    user@PE1# set optimize-timer 120
    user@PE1# set label-switched-path pe1-pe2 to 10.255.0.7
    user@PE1# set label-switched-path pe1-pe2 primary via-p1
    user@PE1# set label-switched-path pe1-pe2 secondary path2 standby
    user@PE1# set path via-p1 10.255.0.2 strict
    user@PE1# set path path2
    
  5. 在接口上启用 RSVP。

    content_copy zoom_out_map
    [edit protocols rsvp]
    user@PE1# set interface ge-0/0/1.0
    user@PE1# set interface ge-0/0/2.0
    user@PE1# set interface ge-0/0/3.0
    
结果

在配置模式下,输入 show interfacesshow protocols ospfshow protocols mplsshow routing-optionsshow protocols rsvp命令来确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明,以便进行更正。

content_copy zoom_out_map
user@PE1# show interfaces
interfaces {
    ge-0/0/1 {
        unit 0 {
            family inet {
                address 192.168.12.1/24;
            }
            family mpls;
        }
    }
    ge-0/0/2 {
        unit 0 {
            family inet {
                address 192.168.13.1/24;
            }
            family mpls;
        }
    }
    ge-0/0/3 {
        unit 0 {
            family inet {
                address 192.168.14.1/24;
            }
            family mpls;
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 10.255.0.1/32;
            }
        }
    }
}
content_copy zoom_out_map
user@PE1# show protocols ospf
traffic-engineering;
area 0.0.0.0 {
    interface ge-0/0/1.0;;
    interface ge-0/0/2.0;
    interface ge-0/0/3.0;
    interface lo0.0;
}
content_copy zoom_out_map
user@PE1# show protocols mpls
optimize-timer 120;
label-switched-path pe1-pe2 {
    to 10.255.0.7;
    primary via-p1;
    secondary path2 {
        standby;
    }
}
path via-p1 {
    10.255.0.2 strict;
}
path path2;
interface ge-0/0/1.0;
interface ge-0/0/2.0;
interface ge-0/0/3.0;
content_copy zoom_out_map
user@PE1# show protocols rsvp
interface ge-0/0/1.0;
interface ge-0/0/2.0;
interface ge-0/0/3.0;
content_copy zoom_out_map
user@PE1# show routing-options
routing-options {
    srlg {
        srlg-a {
            srlg-value 101;
            srlg-cost 10;
        }
    }
}

如果完成设备配置,请从配置模式输入 commit

注:

在修改每个路由器的相应接口名称、地址和任何其他参数后,对 IGP 域中的每个瞻博网络路由器重复此过程。

验证

确认配置工作正常。

验证 SRLG 定义

目的

验证 SRLG 到值的映射和 SRLG 成本。

操作
content_copy zoom_out_map
user@PE1> show mpls srlg

SRLG             Value      Cost
srlg-a             101        10

验证 TE-Link SRLG

目的

验证信息流工程链路 SRLG 关联。

操作
content_copy zoom_out_map
user@PE1> show ted link detail
...
10.255.0.2->192.168.27.7-1, Local: 192.168.27.2, Remote: 0.0.0.0
  Local interface index: 0, Remote interface index: 0
  LocalPath: 1, Metric: 1, StaticBW: 1000Mbps, AvailBW: 1000Mbps
      Color: 0 <none>
  SRLGs: srlg-a
  localBW [0] 0bps  [1] 0bps  [2] 0bps  [3] 0bps
  localBW [4] 0bps  [5] 0bps  [6] 0bps  [7] 0bps

...
10.255.0.3->192.168.37.7-1, Local: 192.168.37.3, Remote: 0.0.0.0
  Local interface index: 0, Remote interface index: 0
  LocalPath: 0, Metric: 1, StaticBW: 1000Mbps, AvailBW: 1000Mbps
      Color: 0 <none>
  SRLGs: srlg-a
  localBW [0] 0bps  [1] 0bps  [2] 0bps  [3] 0bps
  localBW [4] 0bps  [5] 0bps  [6] 0bps  [7] 0bps

...

意义

链路 P1-PE2 和 P2-PE2 与 SRLG srlg-a相关联。

验证备用辅助路径

目的

检查 SRLG 链路成本及其对备用辅助路径链路的 CSPF 计算的影响。

操作
content_copy zoom_out_map
user@PE1> show mpls lsp ingress extensive
Ingress LSP: 1 sessions

10.255.0.7
  From: 10.255.0.1, State: Up, ActiveRoute: 0, LSPname: pe1-pe2
  ActivePath: via-p1 (primary)
  LSPtype: Static Configured
  LoadBalance: Random
  Encoding type: Packet, Switching type: Packet, GPID: IPv4
 *Primary   via-p1           State: Up
    Priorities: 7 0
    OptimizeTimer: 120
    SmartOptimizeTimer: 180
    SRLG: srlg-a
    Reoptimization in 110 second(s).
    Computed ERO (S [L] denotes strict [loose] hops): (CSPF metric: 2)
 192.168.12.2 S 192.168.27.7 S
    Received RRO (ProtectionFlag 1=Available 2=InUse 4=B/W 8=Node 10=SoftPreempt 20=Node-ID):
          192.168.12.2 192.168.27.7
    7 Oct 13 15:17:11.310 CSPF: computation result ignored, new path no benefit
    6 Oct 13 15:15:14.959 Selected as active path
    5 Oct 13 15:15:14.958 Record Route:  192.168.12.2 192.168.27.7
    4 Oct 13 15:15:14.954 Up
    3 Oct 13 15:15:14.793 Originate Call
    2 Oct 13 15:15:14.793 CSPF: computation result accepted  192.168.12.2 192.168.27.7
    1 Oct 13 15:14:46.214 CSPF failed: no route toward 10.255.0.2
  Standby   path2            State: Up
    Priorities: 7 0
    OptimizeTimer: 120
    SmartOptimizeTimer: 180
    Reoptimization in 115 second(s).
    Computed ERO (S [L] denotes strict [loose] hops): (CSPF metric: 4)
 192.168.14.4 S 192.168.45.5 S 192.168.56.6 S 192.168.67.7 S
    Received RRO (ProtectionFlag 1=Available 2=InUse 4=B/W 8=Node 10=SoftPreempt 20=Node-ID):
          192.168.14.4 192.168.45.5 192.168.56.6 192.168.67.7
   10 Oct 13 15:17:11.929 Record Route:  192.168.14.4 192.168.45.5 192.168.56.6 192.168.67.7
    9 Oct 13 15:17:11.929 Up
    8 Oct 13 15:17:11.729 Originate Call
    7 Oct 13 15:17:11.729 Clear Call
    6 Oct 13 15:17:11.729 CSPF: computation result accepted  192.168.14.4 192.168.45.5 192.168.56.6 192.168.67.7
    5 Oct 13 15:17:11.729 CSPF: Reroute due to re-optimization
    4 Oct 13 15:15:14.984 Record Route:  192.168.13.3 192.168.37.7
    3 Oct 13 15:15:14.984 Up
    2 Oct 13 15:15:14.830 Originate Call
    1 Oct 13 15:15:14.830 CSPF: computation result accepted  192.168.13.3 192.168.37.7
  Created: Thu Oct 13 15:13:46 2011
Total 1 displayed, Up 1, Down 0
意义

检查备用辅助路径。P2>PE2 的有效链路成本为 11(加上 srlg-cost 10)。CSPF 将辅助路径计算为 PE1>P3>P4>P5>PE2,CSPF 链路指标为 4。

footer-navigation