帮助我们改善您的体验。

让我们了解您的想法。

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

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 OAM 配置

date_range 18-Jan-25

为 OAM 配置 MPLS 传输配置文件

MPLS 传输配置文件概述

RFC 5654“ MPLS 传输配置文件的要求”描述了 MPLS 传输配置文件 (MPLS-TP) 的要求,当 MPLS 用于传输服务和传输网络操作时,该配置文件扩展了操作、管理和维护 (OAM) 的功能。这些功能有助于排除和维护伪线或标签交换路径 (LSP)。

OAM 的 MPLS-TP 机制包含两个主要组件:

  • 通用关联通道标签 (GAL) — 一种特殊标签,用于启用例外机制,通知出口 标签交换路由器 (LSR),它在 LSP 上接收的数据包属于关联的控制通道或控制平面。

  • 通用关联信道报头 (G-Ach) — 一个特殊的报头字段,用于标识 MPLS 标签交换路径 (LSP) 中包含的有效负载类型。G-Ach 的格式与伪线关联控制通道标头相同。

有关 MPLS-TP 的详细信息,请参阅 RFC 5654, MPLS 传输配置文件的要求。有关 GAL 和 G-ACH 的特定信息,请参阅 RFC 5586,MPLS 通用关联通道

MPLS-TP 的 Junos OS 实施支持以下功能:

  • MPLS-TP OAM 可以使用 GAL 和 G-Ach 发送和接收数据包,无需 IP 封装。

  • 一对路由器之间的两个单向 RSVP LSP 可以相互关联,以创建关联的双向 LSP,用于绑定 GAL 和 G-Ach OAM 消息的路径。为关联的双向 LSP 建立单个双向转发检测 (BFD) 会话。

示例:为 OAM 配置 MPLS 传输配置文件

此示例说明如何配置 MPLS 传输配置文件 (MPLS-TP),以便通过标签交换路径 (LSP) 发送和接收 OAM GAL 和 G-Ach 消息。

要求

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

  • 六台设备,可组合使用 M 系列、MX 系列和 T 系列路由器

  • 在设备上运行的 Junos OS 12.1 或更高版本

概述

Junos OS 12.1 及更高版本支持 MPLS 传输配置文件 (MPLS-TP) 操作、管理和维护 (OAM) 功能。当 MPLS 用于传输服务和传输网络操作时,MPLS-TP 为 OAM 引入了新功能。这包括为 OAM 消息配置通用关联通道标签 (GAL) 和通用关联通道标头 (G-Ach)。

此示例说明如何配置 MPLS-TP OAM 功能,以便在没有 IP 封装的情况下发送和接收 GAL 和 G-Ach OAM 消息。此外,它还展示了如何在一对路由器之间关联两个单向 RSVP 标签交换路径 (LSP),以创建关联的双向 LSP,用于绑定 GAL 和 G-Ach OAM 消息的路径。

Junos OS 12.1 及更高版本支持以下 MPLS-TP 功能:

  • MPLS 应用程序在没有 IP 封装的情况下使用 GAL 和 G-Ach 发送和接收数据包所需的 MPLS-TP OAM 功能和基础架构。

  • LSP-ping 和双向转发检测 (BFD) 应用程序,使用 GAL 和 G-Ach 发送和接收数据包,无需在传输 LSP 上进行 IP 封装。

  • 在一对路由器之间将两个单向 RSVP LSP 相互关联,以创建关联的双向 LSP,用于绑定 GAL 和 G-Ach OAM 消息的路径。关联的双向 LSP 模型仅支持关联主路径。将为关联的双向 LSP 建立单个 BFD 会话。

Junos OS 12.1 及更高版本不支持以下 MPLS-TP 功能:

  • 点对多点 RSVP LSP 和 BGP LSP

  • 损耗测量和延迟测量

您可以使用以下配置语句启用 GAL 和 G-Ach OAM 操作:

  • mpls-tp-mode— 在层次结构级别包含此语句 [edit protocols mpls oam] ,以便在 MPLS 网络中的所有 LSP 上启用 GAL 和 G-Ach OAM 操作,而无需 IP 封装。

    content_copy zoom_out_map
    [edit protocols mpls oam]
    mpls-tp-mode;
    

    [edit protocols mpls label-switched-path lsp-name oam] 层次结构级别包含此语句,以便在网络中的特定 LSP 上启用 GAL 和 G-Ach OAM 操作,而无需 IP 封装。

    content_copy zoom_out_map
    [edit protocols mpls label-switched-path lsp-name oam]
    mpls-tp-mode;
    
    注:

    从 Junos OS 16.1 版开始,MPLS-TP 为 mpls-tp-mode 语句下的默认 LSPING (0x0008) 通道类型支持另外两种通道类型。这些附加通道类型提供带或不带 IP/UDP 封装的按需连接验证 (CV)。

    • 按需 CV (0x0025) — 此通道类型是一种新的伪线通道类型,用于没有 IP/UDP 封装的按需 CV,其中 IP 寻址不可用或首选非 IP 封装。

    • IPv4 (0x0021) — 此通道类型使用 IP/UDP 封装,并使用 IP 寻址提供与其他供应商设备的互操作性支持。

    GACH-TLV 与默认的 LSPING 通道类型一起使用。根据 RFC 7026,GACH-TLV 已弃用0x0021和0x0025通道类型。

    要为 MPLS-TP 配置通道类型,请在 和 [edit protocols mpls label-switched-path lsp-name oam mpls-tp-mode][edit protocols mpls oam mpls-tp-mode] 层次结构级别包含lsping-channel-type channel-type语句。

  • associate-lsp lsp-name from from-ip-address— 在层次结构级别包含 [edit protocols mpls label-switched-path lsp-name] 此语句,以在 LSP 的两端配置关联的双向 LSP。

    content_copy zoom_out_map
    [edit protocols mpls label-switched-path lsp-name ]
    associate-lsp lsp-name {
        from from-ip-address;
    }
    

    from from-ip-address LSP 的配置是可选的。如果省略,则从入口 LSP 配置的地址派生。to

  • transit-lsp-association—将此语句包含在 [edit protocols mpls]用于在传输路由器上关联两个 LSP 的层次结构级别。

    content_copy zoom_out_map
    [edit protocols mpls]
    transit-lsp-association transit-association-lsp-group-name {
        lsp-name-1 name-of-associated-lsp-1;
        from-1     address-of-associated-lsp-1;
        lsp-name-2 name-of-associated-lsp-2;
        from-2     address-of-associated-lsp-2;
    }
    

    中转节点中 LSP 的关联对于 TTL 过期的 LSP ping 数据包或跟踪路由的返回 LSP 路径非常有用。

在此示例中,R0 是入口路由器,R4 是出口路由器。R1、R2、R3 和 R5 是转发路由器。在传输路由器之间建立关联的双向 LSP,用于发送和接收 GAL 和 G-Ach OAM 消息。

图 1 显示了此示例中使用的拓扑。

拓扑学
图 1: MPLS-TP OAM 相关双向 LSPMPLS-TP OAM 相关双向 LSP

配置

CLI 快速配置
注:

此示例显示了所有设备上的配置,并显示了配置入口路由器 R0 和中转路由器 R1 的分步过程。对出口路由器 R4 上的入口路由器 R0 重复所述分步过程。对其他转发路由器 R2、R3 和 R5 上的传输路由器 R1 重复分步过程。请务必相应地修改相应的接口名称、地址和其他参数。

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

路由器 R0

content_copy zoom_out_map
set interfaces ge-4/1/1 unit 0 family inet address 10.10.11.1/30
set interfaces ge-4/1/1 unit 0 family iso
set interfaces ge-4/1/1 unit 0 family inet6
set interfaces ge-4/1/1 unit 0 family mpls
set interfaces ge-5/0/0 unit 0 family inet address 10.10.10.1/30
set interfaces ge-5/0/0 unit 0 family iso
set interfaces ge-5/0/0 unit 0 family inet6
set interfaces ge-5/0/0 unit 0 family mpls
set protocols rsvp interface ge-5/0/0.0
set protocols rsvp interface ge-4/1/1.0
set protocols mpls label-switched-path r0-to-r4 to 10.255.8.86
set protocols mpls label-switched-path r0-to-r4 oam mpls-tp-mode
set protocols mpls label-switched-path r0-to-r4 associate-lsp r4-to-r0 from 10.255.8.86
set protocols mpls interface ge-5/0/0.0
set protocols mpls interface ge-4/1/1.0
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface ge-5/0/0.0
set protocols ospf area 0.0.0.0 interface ge-4/1/1.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive

路由器 R1

content_copy zoom_out_map
set interfaces ge-0/0/5 unit 0 family inet address 10.10.10.2/30
set interfaces ge-0/0/5 unit 0 family iso
set interfaces ge-0/0/5 unit 0 family inet6
set interfaces ge-0/0/5 unit 0 family mpls
set interfaces ge-0/2/2 unit 0 family inet address 10.10.12.2/30
set interfaces ge-0/2/2 unit 0 family iso
set interfaces ge-0/2/2 unit 0 family inet6
set interfaces ge-0/2/2 unit 0 family mpls
set interfaces ge-1/0/2 unit 0 family inet address 10.10.13.2/30
set interfaces ge-1/0/2 unit 0 family iso
set interfaces ge-1/0/2 unit 0 family inet6
set interfaces ge-1/0/2 unit 0 family mpls
set interfaces ge-2/0/2 unit 0 family inet address 10.10.11.2/30
set interfaces ge-2/0/2 unit 0 family iso
set interfaces ge-2/0/2 unit 0 family inet6
set interfaces ge-2/0/2 unit 0 family mpls
set protocols rsvp interface ge-0/2/2.0
set protocols rsvp interface ge-0/0/5.0
set protocols rsvp interface ge-1/0/2.0
set protocols rsvp interface ge-2/0/2.0
set protocols mpls transit-lsp-association trace1 lsp-name-1 r0-to-r4
set protocols mpls transit-lsp-association trace1 from-1 10.255.8.207
set protocols mpls transit-lsp-association trace1 lsp-name-2 r4-to-r0
set protocols mpls transit-lsp-association trace1 from-2 10.255.8.86
set protocols mpls interface ge-0/0/5.0
set protocols mpls interface ge-2/0/2.0
set protocols mpls interface ge-1/0/2.0
set protocols mpls interface ge-0/2/2.0
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface ge-0/0/5.0
set protocols ospf area 0.0.0.0 interface ge-0/2/2.0 metric 100
set protocols ospf area 0.0.0.0 interface ge-1/0/2.0
set protocols ospf area 0.0.0.0 interface ge-2/0/2.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive

路由器 R2

content_copy zoom_out_map
set interfaces ge-0/2/3 unit 0 family inet address 10.10.13.1/30
set interfaces ge-0/2/3 unit 0 family iso
set interfaces ge-0/2/3 unit 0 family inet6
set interfaces ge-0/2/3 unit 0 family mpls
set interfaces ge-1/3/2 unit 0 family inet address 10.10.14.1/30
set interfaces ge-1/3/2 unit 0 family iso
set interfaces ge-1/3/2 unit 0 family inet6
set interfaces ge-1/3/2 unit 0 family mpls
set interfaces ge-1/3/4 unit 0 family inet address 10.10.15.1/30
set interfaces ge-1/3/4 unit 0 family iso
set interfaces ge-1/3/4 unit 0 family inet6
set interfaces ge-1/3/4 unit 0 family mpls
set protocols rsvp interface ge-0/2/3.0
set protocols rsvp interface ge-1/3/2.0
set protocols rsvp interface ge-1/3/4.0
set protocols mpls transit-lsp-association trace1 lsp-name-1 r0-to-r4
set protocols mpls transit-lsp-association trace1 from-1 10.255.8.207
set protocols mpls transit-lsp-association trace1 lsp-name-2 r4-to-r0
set protocols mpls transit-lsp-association trace1 from-2 10.255.8.86
set protocols mpls interface ge-0/2/3.0
set protocols mpls interface ge-1/3/2.0
set protocols mpls interface ge-1/3/4.0
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface ge-0/2/3.0
set protocols ospf area 0.0.0.0 interface ge-1/3/2.0
set protocols ospf area 0.0.0.0 interface ge-1/3/4.0 metric 100
set protocols ospf area 0.0.0.0 interface lo0.0 passive

路由器 R3

content_copy zoom_out_map
set interfaces ge-1/2/1 unit 0 family inet address 10.10.16.2/30
set interfaces ge-1/2/1 unit 0 family iso
set interfaces ge-1/2/1 unit 0 family inet6
set interfaces ge-1/2/1 unit 0 family mpls
set interfaces ge-2/0/7 unit 0 family inet address 10.10.17.2/30
set interfaces ge-2/0/7 unit 0 family iso
set interfaces ge-2/0/7 unit 0 family inet6
set interfaces ge-2/0/7 unit 0 family mpls
set interfaces ge-2/2/0 unit 0 family inet address 10.10.14.2/30
set interfaces ge-2/2/0 unit 0 family iso
set interfaces ge-2/2/0 unit 0 family inet6
set interfaces ge-2/2/0 unit 0 family mpls
set protocols rsvp interface ge-2/2/0.0
set protocols rsvp interface ge-1/2/1.0
set protocols rsvp interface ge-2/0/7.0
set protocols mpls transit-lsp-association trace1 lsp-name-1 r0-to-r4
set protocols mpls transit-lsp-association trace1 from-1 10.255.8.207
set protocols mpls transit-lsp-association trace1 lsp-name-2 r4-to-r0
set protocols mpls transit-lsp-association trace1 from-2 10.255.8.86
set protocols mpls interface ge-2/2/0.0
set protocols mpls interface ge-1/2/1.0
set protocols mpls interface ge-2/0/7.0
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface ge-2/2/0.0
set protocols ospf area 0.0.0.0 interface ge-1/2/1.0
set protocols ospf area 0.0.0.0 interface ge-2/0/7.0 metric 100
set protocols ospf area 0.0.0.0 interface lo0.0 passive

路由器 R4

content_copy zoom_out_map
set interfaces ge-0/0/3 unit 0 family inet address 10.10.16.1/30
set interfaces ge-0/0/3 unit 0 family iso
set interfaces ge-0/0/3 unit 0 family inet6
set interfaces ge-0/0/3 unit 0 family mpls
set protocols rsvp interface ge-0/0/3.0
set protocols mpls label-switched-path r4-to-r0 to 10.255.8.207
set protocols mpls label-switched-path r4-to-r0 oam mpls-tp-mode
set protocols mpls label-switched-path r4-to-r0 associate-lsp r0-to-r4 from 10.255.8.207
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/3.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive

路由器 R5

content_copy zoom_out_map
set interfaces ge-1/2/0 unit 0 family inet address 10.10.15.2/30
set interfaces ge-1/2/0 unit 0 family iso
set interfaces ge-1/2/0 unit 0 family inet6
set interfaces ge-1/2/0 unit 0 family mpls
set interfaces ge-2/0/0 unit 0 family inet address 10.10.12.1/30
set interfaces ge-2/0/0 unit 0 family iso
set interfaces ge-2/0/0 unit 0 family inet6
set interfaces ge-2/0/0 unit 0 family mpls
set interfaces ge-4/0/7 unit 0 family inet address 10.10.17.1/30
set interfaces ge-4/0/7 unit 0 family iso
set interfaces ge-4/0/7 unit 0 family inet6
set interfaces ge-4/0/7 unit 0 family mpls
set protocols rsvp interface ge-2/0/0.0
set protocols rsvp interface ge-1/2/0.0
set protocols rsvp interface ge-4/0/7.0
set protocols mpls transit-lsp-association trace1 lsp-name-1 r0-to-r4
set protocols mpls transit-lsp-association trace1 from-1 10.255.8.207
set protocols mpls transit-lsp-association trace1 lsp-name-2 r4-to-r0
set protocols mpls transit-lsp-association trace1 from-2 10.255.8.86
set protocols mpls interface ge-2/0/0.0
set protocols mpls interface ge-1/2/0.0
set protocols mpls interface ge-4/0/7.0
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface ge-2/0/0.0 metric 100
set protocols ospf area 0.0.0.0 interface ge-1/2/0.0 metric 100
set protocols ospf area 0.0.0.0 interface ge-4/0/7.0 metric 100
set protocols ospf area 0.0.0.0 interface lo0.0 passive
配置设备 R0
分步过程

要配置入口路由器,R0:

  1. 配置接口。

    content_copy zoom_out_map
    [edit interfaces]
    user@R0# set ge-4/1/1 unit 0 family inet address 10.10.11.1/30
    user@R0# set ge-4/1/1 unit 0 family iso
    user@R0# set ge-4/1/1 unit 0 family inet6
    user@R0# set ge-4/1/1 unit 0 family mpls
    user@R0# set ge-5/0/0 unit 0 family inet address 10.10.10.1/30
    user@R0# set ge-5/0/0 unit 0 family iso
    user@R0# set ge-5/0/0 unit 0 family inet6
    user@R0# set ge-5/0/0 unit 0 family mpls
    
  2. 在接口上配置 MPLS。

    content_copy zoom_out_map
    [edit protocols mpls]
    user@R0# set interface ge-5/0/0.0
    user@R0# set interface ge-4/1/1.0
    
  3. 配置内部网关协议,例如 OSPF。

    content_copy zoom_out_map
    [edit protocols ospf]
    user@R0# set traffic-engineering
    user@R0# set area 0.0.0.0 interface ge-5/0/0.0
    user@R0# set area 0.0.0.0 interface ge-4/1/1.0
    user@R0# set area 0.0.0.0 interface lo0.0 passive
    
  4. 配置信令协议,例如 RSVP。

    content_copy zoom_out_map
    [edit protocols rsvp]
    user@R0# set interface ge-5/0/0.0
    user@R0# set interface ge-4/1/1.0
    
  5. 配置 LSP。

    content_copy zoom_out_map
    [edit protocols mpls]
    user@R0# set label-switched-path r0-to-r4 to 10.255.8.86
    
  6. 在 LSP 上启用无需 IP 封装的 GAL 和 G-Ach OAM 操作。

    content_copy zoom_out_map
    [edit protocols mpls]
    user@R0# set label-switched-path r0-to-r4 oam mpls-tp-mode
    
  7. 在 LSP 的两端配置关联的双向 LSP。

    content_copy zoom_out_map
    [edit protocols mpls]
    user@R0# set label-switched-path r0-to-r4 associate-lsp to-r0 from 10.255.8.86
    
  8. 配置完设备后,提交配置。

    content_copy zoom_out_map
    [edit]
    user@R0#  commit
    
结果

通过发出 show interfacesshow protocols 命令来确认您的配置。

content_copy zoom_out_map
user@R0# show interfaces
ge-4/1/1 {
    unit 0 {
        family inet {
            address 10.10.11.1/30;
        }
        family iso;
        family inet6;
        family mpls;
    }
}
ge-5/0/0 {
    unit 0 {
        family inet {
            address 10.10.10.1/30;
        }
        family iso;
        family inet6;
        family mpls;
    }
}
content_copy zoom_out_map
user@R0# show protocols
rsvp {
    interface ge-5/0/0.0;
    interface ge-4/1/1.0;
}
mpls {
    label-switched-path r0-to-r4 {
        to 10.255.8.86;
        oam mpls-tp-mode;
        associate-lsp r4-to-r0 {
            from 10.255.8.86;
        }
    }
    interface ge-4/1/1.0;
    interface ge-5/0/0.0;
}
ospf {
    traffic-engineering;
    area 0.0.0.0 {
        interface ge-5/0/0.0;
        interface ge-4/1/1.0;
        interface lo0.0 {
            passive;
        }
    }
}
配置设备 R1
分步过程

要配置转发路由器,R1:

  1. 配置接口。

    content_copy zoom_out_map
    [edit interfaces]
    user@R1# set ge-0/0/5 unit 0 family inet address 10.10.10.2/30
    user@R1# set ge-0/0/5 unit 0 family iso
    user@R1# set ge-0/0/5 unit 0 family inet6
    user@R1# set ge-0/0/5 unit 0 family mpls
    user@R1# set ge-0/2/2 unit 0 family inet address 10.10.12.2/30
    user@R1# set ge-0/2/2 unit 0 family iso
    user@R1# set ge-0/2/2 unit 0 family inet6
    user@R1# set ge-0/2/2 unit 0 family mpls
    user@R1# set ge-2/0/2 unit 0 family inet address 10.10.11.2/30
    user@R1# set ge-2/0/2 unit 0 family iso
    user@R1# set ge-2/0/2 unit 0 family inet6
    user@R1# set ge-2/0/2 unit 0 family mpls
    user@R1# set ge-1/0/2 unit 0 family inet address 10.10.13.2/30
    user@R1# set ge-1/0/2 unit 0 family iso
    user@R1# set ge-1/0/2 unit 0 family inet6
    user@R1# set ge-1/0/2 unit 0 family mpls
    
  2. 在接口上配置 MPLS。

    content_copy zoom_out_map
    [edit protocols mpls]
    user@R1# set interface ge-0/0/5.0
    user@R1# set interface ge-2/0/2.0
    user@R1# set interface ge-1/0/2.0
    user@R1# set interface ge-0/2/2.0
    
  3. 配置内部网关协议,例如 OSPF。

    content_copy zoom_out_map
    [edit protocols ospf]
    user@R1# set traffic-engineering
    user@R1# set area 0.0.0.0 interface ge-0/0/5.0
    user@R1# set area 0.0.0.0 interface ge-2/0/2.0
    user@R1# set area 0.0.0.0 interface ge-1/0/2.0
    user@R1# set area 0.0.0.0 interface ge-0/2/2.0 metric 100
    user@R1# set area 0.0.0.0 interface lo0.0 passive
    
  4. 配置信令协议,例如 RSVP。

    content_copy zoom_out_map
    [edit protocols rsvp]
    user@R1# set interface ge-0/0/5.0
    user@R1# set interface ge-2/0/2.0
    user@R1# set interface ge-1/0/2.0
    user@R1# set interface ge-0/2/2.0
    
  5. 在传输路由器上配置两个 LSP 的关联。

    content_copy zoom_out_map
    [edit protocols mpls]
    user@R1# set transit-lsp-association trace1 lsp-name-1 r0-to-r4
    user@R1# set transit-lsp-association trace1 from-1 10.255.8.207
    user@R1# set transit-lsp-association trace1 lsp-name-2 r4-to-r0
    user@R1# set transit-lsp-association trace1 from-2 10.255.8.86
    
  6. 如果完成设备配置,请提交配置。

    content_copy zoom_out_map
    [edit]
    user@R1# commit
    
结果

通过发出 show interfacesshow protocols 命令来确认您的配置。

content_copy zoom_out_map
user@R1# show interfaces
ge-0/0/5 {
    unit 0 {
        family inet {
            address 10.10.10.2/30;
        }
        family iso;
        family inet6;
        family mpls;
    }
}
ge-0/2/2 {
    unit 0 {
        family inet {
            address 10.10.12.2/30;
        }
        family iso;
        family inet6;
        family mpls;
    }
}
ge-2/0/2 {
    unit 0 {
        family inet {
            address 10.10.11.2/30;
        }
        family iso;
        family inet6;
        family mpls;
    }
}
ge-1/0/2 {
    unit 0 {
        family inet {
            address 10.10.13.2/30;
        }
        family iso;
        family inet6;
        family mpls;
    }
}
content_copy zoom_out_map
user@R1# show protocols
rsvp {
    interface ge-0/0/5.0;
    interface ge-2/0/2.0;
    interface ge-1/0/2.0;
    interface ge-0/2/2.0;
}
mpls {
    transit-lsp-association trace1 {
        lsp-name-1 r0-to-r4;
        from-1 10.255.8.207;
        lsp-name-2 r4-to-r0;
        from-2 10.255.8.86;
    }
    interface ge-0/0/5.0;
    interface ge-2/0/2.0;
    interface ge-1/0/2.0;
    interface ge-0/2/2.0;
}
ospf {
    traffic-engineering;
    area 0.0.0.0 {
        interface ge-0/0/5.0;
        interface ge-1/0/2.0;
        interface ge-2/0/2.0;
        interface ge-0/2/2.0 {
            metric 100;
        }
        interface lo0.0 {
            passive;
        }
    }
}

验证

确认配置工作正常。

验证关联的双向 LSP
目的

验证关联的双向 LSP 配置是否正常工作。

操作
content_copy zoom_out_map
user@host> show mpls lsp
Ingress LSP: 1 sessions
To              From            State Rt P   ActivePath   LSPname
10.10.11.1  10.255.8.86  			 Up     0 *                r0-to-r4 Assoc-Bidir
Total 1 displayed, Up 1, Down 0

Egress LSP: 1 sessions
To         From           State Rt Style Labelin Labelout LSPname
10.10.16.1  10.255.8.207  Up    0  1 FF       3           r4-to-r0 Assoc-Bidir
Total 2 displayed, Up 2, Down 0

Transit LSP: 1 sessions
To          From           State  Rt Style Labelin Labelout LSPname
10.10.10.2  10.255.8.168  Up      1  1 FF  301264        3 r0-to-r4 Assoc-Bidir
Total 3 displayed, Up 3, Down 0

content_copy zoom_out_map
user@host> show mpls lsp detail
Ingress LSP: 1 sessions

10.10.11.1
  From: 10.255.8.86, State: Up, ActiveRoute: 0, LSPname: r0-to-r4
  Associated Bidirectional
  Associated LSP: r0-to-r4, 10.255.8.86
  ActivePath:  (primary)
  LSPtype: Static Configured
  LoadBalance: Random
  Encoding type: Packet, Switching type: PSC-1, GPID: Unknown
 *Primary                    State: Up

Egress LSP: 1 sessions

10.255.102.29
  From: 10.255.102.172, LSPstate: Up, ActiveRoute: 0
    LSPname: r4-to-r0, LSPpath: Primary
    Associated Bidirectional
    Associated LSP: 10.10.16.1, to-r0>
    Suggested label received: -, Suggested label sent: -
    Recovery label received: -, Recovery label sent: -
    Resv style: 1 FF, Label in: 3, Label out: -
    Time left:  144, Since: Fri Jun 17 21:41:05 2011
    Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500
    Port number: sender 6 receiver 14468 protocol 0
    PATH rcvfrom: 10.10.13.1 (ge-2/0/0.0) 84 pkts
    Adspec: received MTU 1500
    PATH sentto: localclient
    RESV rcvfrom: localclient
    Record route: 10.10.14.2 10.10.13.1 <self>

Transit LSP: 1 sessions

10.255.102.30
  From: 10.255.102.172, LSPstate: Up, ActiveRoute: 1
    LSPname: to_airstream, LSPpath: Primary
    Associated Bidirectional
    Associated LSP: r0-to-r4, 10.255.8.168
    Suggested label received: -, Suggested label
    Recovery label received: -, Recovery label sent: 3
    Resv style: 1 FF, Label in: 301264, Label out: 3
    Time left:  132, Since: Fri Jun 17 21:40:56 2011
    Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500
    Port number: sender 28 receiver 14465 protocol 0
    PATH rcvfrom: 10.10.13.1 (ge-2/0/0.0) 84 pkts
    Adspec: received MTU 1500 sent MTU 1500
    PATH sentto: 10.10.10.1 (ge-3/0/0.0) 84 pkts
    RESV rcvfrom: 10.10.10.1 (ge-3/0/0.0) 84 pkts
    Explct route: 10.10.10.1
    Record route: 10.10.16.1 10.10.15.2 10.10.13.1 <self> 10.10.10.1
content_copy zoom_out_map
user@host> show mpls lsp bidirectional
Ingress LSP: 1 session
To              From            State Rt P     ActivePath       LSPname
10.255.8.86     10.255.8.207    Up     0 *                      r0-to-r4 
 Assoc-Bidir
Total 1 displayed, Up 1, Down 0
Aug 28 06:56:26 [TRACE] [R0 coleman re0]
Egress LSP: 1 session
To              From            State   Rt Style Labelin Labelout LSPname
10.255.8.207    10.255.8.86  	Up       0  1 FF       3        - to-r0
 Assoc-Bidir
Total 1 displayed, Up 1, Down 0
Aug 28 06:56:26 [TRACE] [R0 coleman re0]
Transit LSP: 0 sessions
Total 0 displayed, Up 0, Down 0
意义

show mpls lspshow mpls detailshow mpls bidirectional命令的输出将显示关联的双向 LSP 的详细信息以及 LSP 关联信息。

为 LDP 配置 OAM 入口策略

ingress-policy使用该语句,您可以配置操作、管理和管理 (OAM) 策略,以选择需要启用 OAM 的转发等效类 (FEC)。如果 FEC 通过策略或显式配置 FEC,则会为 FEC 启用 OAM。对于使用策略选择的 FC,将应用在下 [edit protocols ldp oam bfd-liveness-detection] 配置的 BFD 参数。

您可以在 [edit policy-options] 层次结构级别配置 OAM 入口策略。要配置 OAM 入口策略,请包含以下 ingress-policy 语句:

content_copy zoom_out_map
ingress-policy ingress-policy-name;

您可以在以下层次结构级别配置此语句:

  • [edit protocols ldp oam]

  • [edit logical-systems logical-system-name protocols ldp oam]

注:

ACX 系列路由器不支持 [edit logical-systems] 层次结构级别。

跟踪 MPLS 和 LSP 数据包及操作

要跟踪 MPLS 和 LSP 数据包及操作,请包含以下 traceoptions 语句:

content_copy zoom_out_map
traceoptions {
    file filename <files number> <size size> <world-readable | no-world-readable>;
    flag flag; 
}

有关可包含此语句的层次结构级别的列表,请参阅此语句的语句摘要部分。

您可以在 MPLS traceoptions 语句中指定以下特定于 MPLS 的标志:

  • all- 跟踪所有操作。

  • connection- 跟踪所有电路交叉连接 (CCC) 活动。

  • connection-detail- 跟踪详细的 CCC 活动。

  • cspf— 跟踪 CSPF 计算。

  • cspf-link- 在 CSPF 计算期间访问的跟踪链接。

  • cspf-node- CSPF 计算期间访问的追踪节点。

  • error— 跟踪 MPLS 错误条件。

  • graceful-restart— 跟踪 MPLS 平稳重新启动事件。

  • lsping— 跟踪 LSP ping 数据包和返回代码。

  • nsr-synchronization— 跟踪不间断路由 (NSR) 同步事件。

  • nsr-synchronization-detail- 详细跟踪 NSR 同步事件。

  • state— 跟踪所有 LSP 状态转换。

  • static— 跟踪静态标签交换路径。

配置跟踪选项以使用该选项跟踪 cspf MPLS LSP 时,CSPF 日志将使用术语“通用 MPLS”(GMPLS) 显示有关 MPLS LSP 的信息。例如,CSPF 日志中的消息可能会指出“链路通过 GMPLS 约束”。广义 MPLS (GMPLS) 是 MPLS 的超集,因此此消息是正常的,不会影响正常的 MPLS LSP 操作。

变更历史表

是否支持某项功能取决于您使用的平台和版本。 使用 Feature Explorer 查看您使用的平台是否支持某项功能。

版本
说明
16.1
从 Junos OS 16.1 版开始,MPLS-TP 为 mpls-tp-mode 语句下的默认 LSPING (0x0008) 通道类型支持另外两种通道类型。
footer-navigation