帮助我们改善您的体验。

让我们了解您的想法。

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

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

机器翻译对您有帮助吗?

starstarstarstarstar
Go to English page
免责声明:

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

示例:配置多点 LDP 递归 FEC

date_range 18-Jan-25

注:

我们的内容测试团队已验证并更新了此示例。

使用此配置示例可配置和验证 OSPF 网络中的多点标签分发协议 (LDP) 递归转发等效类 (FEC)。这样,当主干网没有直接路由到根节点时,就可以在两个自治系统 (AS) 之间形成 MLDP 点对多点 (P2MP) 隧道。

提示:
表 1: 可读性分数和时间估计

阅读时间

45 分钟

配置时间

1 小时

先决条件示例

硬件要求

MX 系列路由器可用作 CE、PE 和中间路由器。

软件要求

在所有设备上运行的 Junos OS 23.4R1 或更高版本。

开始之前

优势

多点 LDP (MLDP) 递归转发等效类 (FEC) 在中间路由器没有到达根节点的路由的部署中非常有用。

了解更多

了解多点 LDP 递归 FEC

功能概述

使用的技术

  • 服务系列:三层VPN

  • 协议:BGP、IS-IS、LDP、MPLS、OSPF、PIM

  • 运输隧道:MLDP P2MP,

主要验证任务

  • 验证 LDP P2MP 隧道是否已形成。

  • 验证LDP递归FEC的形成

  • 验证入口和转发路由器中的递归不透明值功能。

拓扑概述

此配置示例描述了能够发送组播流量的主机系统和能够接收组播流量的主机系统。它显示了两个自治系统 (AS);AS65010 由 PE1、P1 和 ASBR1 路由器组成,AS65020 由 PE2、P2 和 ASBR2 路由器组成。AS 中的所有路由器都将 OSPF 作为 IGP 运行。所有路由器都属于区域 0。作为第 3 层 VPN 服务的一部分,客户边缘 (CE) 设备使用 EBGP 对等与其提供商边缘设备交换路由。PE 设备使用 IBGP 与远程 PE 交换 IPv4 路由。

提供商边缘 (PE2) 和 AS 边界路由器 (ASBR2) 路由器具有到根 PE1 的路由。但是,P(P1 和 P2)路由器没有指向根的路由。MLDP P2MP 隧道由出口 (PE2) 到入口 (PE1) 路由器组成,用于通过 mLDP 传递 FEC 元素。

主机名

角色

功能

CE1

远程 CE 设备。

EBGP 对等到 PE1 路由器,用于播发和学习 CE 设备环路地址。

PE1 (DUT)

本地 PE 设备。

在没有直接路由到 PE1 的情况下,另一个 AS 的中间路由器尝试到达的根节点。

P1

中间设备 P1。

没有到 PE2 路由器路由的中间路由器。它从 ASBR1 接收 PE1-FEC,并将其作为普通的 LDP P2MP FEC 进行处理。

ASBR1

AS 边界路由器 ASBR1

EBGP 对等到 ASBR2 路由器,用于播发和学习 IGP 路由。ASBR1 查找到根的路由(即 IGP 路由),并在执行任何进一步处理之前将 ASBR1-FEC 替换为递归不透明值 (PE1-FEC) 的内容。

ASBR2

AS 边界路由器 ASBR2

EBGP 对等到 ASBR1 路由器,用于播发和学习 IGP 路由。充当 P2 的根节点,并执行查找以查找到实际根 (PE1) 的路由。确定到 PE1 的路由是 BGP 路由,并使用 ASBR1 到 PE1 形成 LDP 递归 FEC。

P2

中间设备 P2。

没有到 PE1 路由器路由的中间路由器。它接收从 PE2 到 mLDP 的 FEC 元素。但是,它不能使用相同的 FEC 元素,因为它没有到 PE1 的路由。

PE2

本地 PE 设备。

PE2 创建一个 MP FEC 元素,将 PE1 的地址作为根节点地址,以形成从 PE2 到根 PE1 的 P2MP 隧道。

CE2

远程 CE 设备。

EBGP 对等到 PE2 路由器,以播发并学习 CE 设备环路地址。

拓扑图示

图 1: 用于 MVPN 选项 C 方案中具有递归不透明值的 AS 间 MLDP FEC 用于 MVPN 选项 C 方案中具有递归不透明值的 AS 间 MLDP FEC

PE1 配置步骤

本节重点介绍此示例配置 PE1 设备所需的主要配置任务。第一步是配置基本的第 3 层 VPN 服务。以下一组步骤特定于配置递归 FEC。两种 PE 设备具有相似的配置,这里我们重点介绍 PE1。

  1. 首先,配置常规的第 3 层 VPN:

    1. 为 IPv4 配置环路接口、面向核心接口和面向 CE 的接口并为其编号。请务必在连接到 P 设备的面向核心的接口上启用该 mpls 家族,以支持 MPLS 交换。

    2. 配置自治系统编号。

    3. 在环路接口和面向核心的接口上配置单区域 OSPF。

    4. 在所有接口上配置 LDP、MPLS。

    5. 配置 IBGP 对等会话以包含 inet-vpn 地址族以支持 IPv4 第 3 层 VPN。

    6. 为 CE1 设备配置基于 VRF 的路由实例。使用 EBGP 作为 PE-CE 路由协议。

      content_copy zoom_out_map
      [edit]
      set interfaces ge-0/0/0 description "CONNECTED TO CE1"
      set interfaces ge-0/0/0 unit 0 family inet address 172.16.1.2/30
      
      set interfaces ge-0/0/1 unit 0 family inet address 10.1.23.1/24
      set interfaces ge-0/0/1 unit 0 family mpls
      
      set interfaces lo0 unit 0 family inet address 192.168.100.2/32
      set interfaces lo0 unit 1 family inet address 192.168.102.1/32
      content_copy zoom_out_map
      [edit]
      set chassis network-services enhanced-ip
      
      content_copy zoom_out_map
      [edit]
      set routing-instances VPN1 instance-type vrf
      set routing-instances VPN1 protocols bgp group CE1-PE1 type external
      set routing-instances VPN1 protocols bgp group CE1-PE1 family inet unicast
      set routing-instances VPN1 protocols bgp group CE1-PE1 export EXPORT-LOCAL-ROUTES
      set routing-instances VPN1 protocols bgp group CE1-PE1 peer-as 65101
      set routing-instances VPN1 protocols bgp group CE1-PE1 local-as 65100
      set routing-instances VPN1 protocols bgp group CE1-PE1 neighbor 172.16.1.1
      set routing-instances VPN1 interface ge-0/0/0.0
      set routing-instances VPN1 interface lo0.1
      set routing-instances VPN1 route-distinguisher 192.168.100.2:1
      set routing-instances VPN1 vrf-table-label
      content_copy zoom_out_map
      [edit]
      set protocols bgp group INT type internal
      set protocols bgp group INT local-address 192.168.100.2
      set protocols bgp group INT family inet labeled-unicast resolve-vpn
      set protocols bgp group INT family inet-vpn any
      set protocols bgp group INT family inet-mvpn signaling
      set protocols bgp group INT peer-as 65100
      set protocols bgp group INT local-as 65100
      set protocols bgp group INT neighbor 192.168.100.3
      
      
      set protocols ospf area 0.0.0.0 interface lo0.0 passive
      set protocols ospf area 0.0.0.0 interface all
      set protocols ospf area 0.0.0.0 interface fxp0.0 disable
      
      
      set protocols ldp interface all
      set protocols ldp interface fxp0.0 disable
      
      set protocols mpls interface all
      set protocols mpls interface fxp0.0 disable
      content_copy zoom_out_map
      [edit]
      
      set routing-options router-id 192.168.100.2
      set routing-options autonomous-system 65100
      
  2. 将 C-PIM 联接消息的模式配置为使用集合点树,并在知道源后切换到最短路径树。

    content_copy zoom_out_map
    [edit]
    set routing-instances VPN1 protocols mvpn mvpn-mode rpt-spt
    set routing-instances VPN1 provider-tunnel ldp-p2mp
    set routing-instances VPN1 vrf-target target:1:1
    
  3. 配置 PIM 以启用 PE 到 CE 组播路由。

    content_copy zoom_out_map
    [edit]
    set routing-instances VPN1 protocols pim rp static address 192.168.100.1
  4. 在连接到客户边缘路由器的接口上启用 PIM。

    content_copy zoom_out_map
    [edit]
    set routing-instances VPN1 protocols pim interface lo0.1
    set routing-instances VPN1 protocols pim interface ge-0/0/0.0
  5. 配置动态选择性点对多点 LSP,并指定创建新隧道之前所需的数据阈值。

    content_copy zoom_out_map
    [edit]
    set routing-instances VPN1 provider-tunnel selective group 225.1.1.1/32 source 172.16.12.1/32 ldp-p2mp
    set routing-instances VPN1 provider-tunnel selective group 225.1.1.1/32 source 172.16.12.1/32 threshold-rate 1
  6. 配置点对多点递归 LDP FEC。

    content_copy zoom_out_map
    [edit]
    
    set protocols ldp p2mp recursive fec
    
  7. 配置路由策略。

    content_copy zoom_out_map
    [edit]
    
    set policy-options policy-statement EXPORT-LOCAL-ROUTES term 1 from protocol direct
    set policy-options policy-statement EXPORT-LOCAL-ROUTES term 1 then accept

验证

命令 验证任务
显示 LDP 概述 验证 Recursive fec LDP 概述信息中的启用。
显示 LDP 数据库 验证 LDP 数据库中播发的标签点对多点绑定信息。
显示 LDP P2MP 路径 验证 LDP P2MP FEC 信息。
显示 LDP P2MP FEC 验证 LDP P2MP LSP。

验证 LDP 概述信息中的递归 FEC。

目的

确认 recursive FEC 已启用,并显示在 PE1 LDP 概述信息中。

操作

在操作模式下,输入 show ldp overview 命令。

content_copy zoom_out_map
user@PE1 show ldp overview
Instance: master
  Reference count: 3
  Router ID: 192.168.100.2
  LDP inet: enabled
  Transport preference: IPv4
  Message id: 33
  Configuration sequence: 12
  Deaggregate: disabled
  Explicit null: disabled
  IPv6 tunneling: disabled
  Strict targeted hellos: disabled
  Loopback if added: yes
  Route preference: 9
  P2MP max branches: 4096
  Unicast transit LSP chaining: disabled
  P2MP transit LSP chaining: disabled
  Transit LSP statistics based on route statistics: disabled
  LDP route acknowledgement: enabled
  BGP export: enabled
  No TTL propagate: disabled
  LDP mtu discovery: disabled
  LDP SR Mapping Client: disabled
  Capabilities enabled: p2mp, make-before-break
  Egress FEC capabilities enabled: entropy-label-capability
  Downstream unsolicited Sessions:
    Operational: 1
    Retention: liberal
    Control: ordered
  Auto targeted sessions:
    Auto targeted: disabled
    Dynamic tunnel session count: 0
  P2MP:
    Recursive route: disabled           
    Recursive fec: enabled
    No rsvp tunneling: disabled
  Timers:
    Keepalive interval: 10, Keepalive timeout: 30
    Link hello interval: 5, Link hello hold time: 15
    Targeted hello interval: 15, Targeted hello hold time: 45
    Label withdraw delay: 60, Make before break timeout: 30
    Make before break switchover delay: 3
    Link protection timeout: 120
  Graceful restart:
    Restart: disabled, Helper: enabled, Restart in process: false
    Reconnect time: 60000, Max neighbor reconnect time: 120000
    Recovery time: 160000, Max neighbor recovery time: 240000
  Traffic Engineering:
    Bgp igp: disabled
    Both ribs: disabled
    Mpls forwarding: disabled
  IGP:
    Tracking igp metric: disabled
    Sync session up delay: 10
  Session protection:
    Session protection: disabled
    Session protection timeout: 0
  Interface addresses advertising:
    10.1.23.1
    192.168.100.2
  LDP Job:
    Read job time quantum: 1000, Write job time quantum: 1000
    Read job loop quantum: 100, Write job loop quantum: 100
    Backup inbound read job time quantum: 1000, Backup outbound read job time quantum: 1000
    Backup inbound read job loop quantum: 100, Backup outbound read job loop quantum: 100
  Label allocation:
    Current number of LDP labels allocated: 2
    Total number of LDP labels allocated: 51
    Total number of LDP labels freed: 49
    Total number of LDP label allocation failure: 0
    Current number of labels allocated by all protocols: 0

意义

输出确认在 PE1 上启用了递归 fec。

验证播发的标签

目的

验证从 ASBR1 播发并由 PE1 接收的标签。

操作

在操作模式下,输入 show ldp database 命令。

在 ASBR1 上

content_copy zoom_out_map
user@ASBR1 show ldp database
Input label database, 192.168.100.4:0--192.168.100.5:0
Labels received: 5
  Label     Prefix
    145      192.168.100.4/32
      3      192.168.100.5/32
    139      192.168.100.6/32
    140      192.168.100.7/32
    144      P2MP root-addr 192.168.100.2, lsp-id 16777220 next-root:192.168.100.4

Output label database, 192.168.100.4:0--192.168.100.5:0
Labels advertised: 4
  Label     Prefix
      3      192.168.100.4/32
    164      192.168.100.5/32
    159      192.168.100.2/32
    158      192.168.100.3/32

Input label database, 192.168.100.4:0--192.168.100.3:0
Labels received: 3
  Label     Prefix
    125      192.168.100.4/32
     88      192.168.100.2/32
      3      192.168.100.3/32

Output label database, 192.168.100.4:0--192.168.100.3:0
Labels advertised: 5
  Label     Prefix
      3      192.168.100.4/32
    164      192.168.100.5/32
    159      192.168.100.2/32
    158      192.168.100.3/32
    163      P2MP root-addr 192.168.100.2, lsp-id 16777220

在 PE1 上

content_copy zoom_out_map
user@PE1 show ldp database
Input label database, 192.168.100.2:0--192.168.100.3:0
Labels received: 4
  Label     Prefix
    125      192.168.100.4/32
     88      192.168.100.2/32
     3     192.168.100.3/32
    129      P2MP root-addr 192.168.100.2, lsp-id 16777220

Output label database, 192.168.100.2:0--192.168.100.3:0
Labels advertised: 3
  Label     Prefix
    107      192.168.100.4/32
      3      192.168.100.2/32
    104      192.168.100.3/32

意义

您可以看到从 ASBR1 播发的标签 3 和 PE1 收到的标签 3

验证 P2MP FEC 信息

目的

验证来自 ASBR2 的 LDP P2MP FEC 信息。

操作

在操作模式下,输入 show ldp p2mp fec extensive 命令。

content_copy zoom_out_map
user@PE2 show ldp p2mp fec extensive
LDP P2MP FECs:
 P2MP root-addr 192.168.100.2, lsp-id 16777220 next-root: 192.168.100.5 
  Fec type: Egress (Active)
  Label: 52, Reference count:    1
content_copy zoom_out_map
user@ASBR2 show ldp p2mp fec extensive
LDP P2MP FECs:
 P2MP root-addr 192.168.100.2, lsp-id 16777220
  Fec type: Transit (Active)
  Label: 144, Reference count:    1

意义

输出显示 PE2 形成 LDP 递归 FEC 以查找到实际根 (PE1) 的路由。

验证 P2MP 路径信息

目的

验证来自 PE2 的 LDP P2MP 路径信息。

操作

在操作模式下,输入 show ldp p2mp path extensive 命令。

content_copy zoom_out_map
user@PE2 show ldp p2mp path extensive
P2MP path type: Transit/Egress
  Output Session (label): 192.168.100.6:0 (52) (Primary)
  Egress label: 52
  Attached FECs:  P2MP root-addr 192.168.100.2, lsp-id 16777220 next-root:192.168.100.5 (Active)
  Address: 0x76f69e0, Reference count: 2

意义

输出显示了带有 FEC 元素的 PE2,其中根节点地址是协议下一跃点 ASBR2 的地址。

附录1:在所有设备上设置命令

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

注:

对于此示例,我们使用逻辑系统来表示源和接收器。

CE1

content_copy zoom_out_map
set system host-name CE1-source
set logical-systems source interfaces lt-0/0/0 unit 12 encapsulation ethernet
set logical-systems source interfaces lt-0/0/0 unit 12 peer-unit 11
set logical-systems source interfaces lt-0/0/0 unit 12 family inet address 172.16.12.1/30
set logical-systems source interfaces lo0 unit 12 family inet address 192.168.12.12/32
set logical-systems source protocols ospf area 0.0.0.0 interface all
set logical-systems source protocols ospf area 0.0.0.0 interface lo0.12 passive
set logical-systems source protocols pim rp static address 192.168.100.1
set logical-systems source protocols pim interface lt-0/0/0.12
set chassis fpc 0 pic 0 tunnel-services
set chassis network-services enhanced-ip
set interfaces lt-0/0/0 description "CONNECTED TO source"
set interfaces lt-0/0/0 unit 11 encapsulation ethernet
set interfaces lt-0/0/0 unit 11 peer-unit 12
set interfaces lt-0/0/0 unit 11 family inet address 172.16.12.2/30
set interfaces ge-0/0/1 description "CONNECTED TO PE1"
set interfaces ge-0/0/1 unit 0 family inet address 172.16.1.1/30
set interfaces lo0 unit 0 family inet address 192.168.100.1/32
set policy-options policy-statement EXPORT-LOCAL-ROUTES term 1 from protocol direct
set policy-options policy-statement EXPORT-LOCAL-ROUTES term 1 then accept
set routing-options router-id 192.168.100.1
set routing-options autonomous-system 65101
set protocols bgp group CE1-PE1 type external
set protocols bgp group CE1-PE1 family inet unicast
set protocols bgp group CE1-PE1 export EXPORT-LOCAL-ROUTES
set protocols bgp group CE1-PE1 peer-as 65100
set protocols bgp group CE1-PE1 local-as 65101
set protocols bgp group CE1-PE1 neighbor 172.16.1.2
set protocols ospf area 0.0.0.0 interface all
set protocols ospf area 0.0.0.0 interface fxp0.0 disable
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols pim rp local family inet address 192.168.100.1
set protocols pim interface lo0.0
set protocols pim interface ge-0/0/1.0
set protocols pim interface lt-0/0/0.11

PE1

content_copy zoom_out_map
set system host-name PE1
set chassis network-services enhanced-ip
set interfaces ge-0/0/0 description "CONNECTED TO CE1"
set interfaces ge-0/0/0 unit 0 family inet address 172.16.1.2/30
set interfaces ge-0/0/1 description "CONNECTED TO P1"
set interfaces ge-0/0/1 unit 0 family inet address 10.1.23.1/24
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 192.168.100.2/32
set interfaces lo0 unit 1 family inet address 192.168.102.1/32
set policy-options policy-statement EXPORT-LOCAL-ROUTES term 1 from protocol direct
set policy-options policy-statement EXPORT-LOCAL-ROUTES term 1 then accept
set routing-instances VPN1 instance-type vrf
set routing-instances VPN1 protocols bgp group CE1-PE1 type external
set routing-instances VPN1 protocols bgp group CE1-PE1 family inet unicast
set routing-instances VPN1 protocols bgp group CE1-PE1 export EXPORT-LOCAL-ROUTES
set routing-instances VPN1 protocols bgp group CE1-PE1 peer-as 65101
set routing-instances VPN1 protocols bgp group CE1-PE1 local-as 65100
set routing-instances VPN1 protocols bgp group CE1-PE1 neighbor 172.16.1.1
set routing-instances VPN1 protocols mvpn mvpn-mode rpt-spt
set routing-instances VPN1 protocols pim rp static address 192.168.100.1
set routing-instances VPN1 protocols pim interface lo0.1 mode sparse
set routing-instances VPN1 protocols pim interface ge-0/0/0.0 mode sparse
set routing-instances VPN1 interface ge-0/0/0.0
set routing-instances VPN1 interface lo0.1
set routing-instances VPN1 route-distinguisher 192.168.100.2:1
set routing-instances VPN1 vrf-target target:1:1
set routing-instances VPN1 vrf-table-label
set routing-instances VPN1 provider-tunnel ldp-p2mp
set routing-instances VPN1 provider-tunnel selective group 225.1.1.1/32 source 172.16.12.1/32 ldp-p2mp
set routing-instances VPN1 provider-tunnel selective group 225.1.1.1/32 source 172.16.12.1/32 threshold-rate 51
set routing-options router-id 192.168.100.2
set routing-options autonomous-system 65100
set protocols bgp group INT type internal
set protocols bgp group INT local-address 192.168.100.2
set protocols bgp group INT family inet labeled-unicast resolve-vpn
set protocols bgp group INT family inet-vpn any
set protocols bgp group INT family inet-mvpn signaling
set protocols bgp group INT peer-as 65100
set protocols bgp group INT local-as 65100
set protocols bgp group INT neighbor 192.168.100.3
set protocols ldp interface all
set protocols ldp interface fxp0.0 disable
set protocols ldp p2mp recursive fec    
set protocols mpls interface all
set protocols mpls interface fxp0.0 disable
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive

P1

content_copy zoom_out_map
set system host-name P1
set chassis network-services enhanced-ip
set interfaces ge-0/0/0 unit 0 family inet address 10.1.23.2/24
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces ge-0/0/1 unit 0 family inet address 10.1.34.1/24
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 192.168.100.3/32
set routing-options router-id 192.168.100.3
set routing-options autonomous-system 65100
set protocols bgp group INT type internal
set protocols bgp group INT local-address 192.168.100.3
set protocols bgp group INT family inet labeled-unicast resolve-vpn
set protocols bgp group INT family inet-vpn any
set protocols bgp group INT family inet-mvpn signaling
set protocols bgp group INT cluster 192.168.100.3
set protocols bgp group INT local-as 65100
set protocols bgp group INT neighbor 192.168.100.2
set protocols bgp group INT neighbor 192.168.100.4
set protocols bgp group eBGP_PE_PE type external
set protocols bgp group eBGP_PE_PE multihop ttl 25
set protocols bgp group eBGP_PE_PE local-address 192.168.100.3
set protocols bgp group eBGP_PE_PE family inet-vpn any
set protocols bgp group eBGP_PE_PE family inet-mvpn signaling
set protocols bgp group eBGP_PE_PE neighbor 192.168.100.6 peer-as 65200
set protocols ldp interface all
set protocols ldp interface fxp0.0 disable
set protocols ldp p2mp recursive route
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive

ASBR1

content_copy zoom_out_map
set system host-name ASBR1
set chassis network-services enhanced-ip
set interfaces ge-0/0/0 unit 0 family inet address 10.1.34.2/24
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces ge-0/0/1 unit 0 family inet address 10.1.45.1/24
set interfaces ge-0/0/1 unit 0 family iso
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 192.168.100.4/32
set interfaces lo0 unit 0 family iso address 49.0001.0040.0400.4004.00
set policy-options policy-statement To-ASBR2 term 1 from route-filter 192.168.100.2/32 exact
set policy-options policy-statement To-ASBR2 term 1 from route-filter 192.168.100.3/32 exact
set policy-options policy-statement To-ASBR2 term 1 then accept
set policy-options policy-statement To-ASBR2 term 2 then reject
set policy-options policy-statement from-direct term 1 from interface lo0.0
set policy-options policy-statement from-direct term 1 then accept
set policy-options policy-statement from-ospf term 1 from protocol ospf
set policy-options policy-statement from-ospf term 1 then accept
set routing-options router-id 192.168.100.4
set routing-options autonomous-system 65100
set protocols bgp group INT type internal
set protocols bgp group INT local-address 192.168.100.4
set protocols bgp group INT family inet labeled-unicast resolve-vpn
set protocols bgp group INT peer-as 65100
set protocols bgp group INT local-as 65100
set protocols bgp group INT neighbor 192.168.100.3
set protocols bgp group eBGP_ASBR type external
set protocols bgp group eBGP_ASBR multihop ttl 2
set protocols bgp group eBGP_ASBR local-address 192.168.100.4
set protocols bgp group eBGP_ASBR family inet labeled-unicast resolve-vpn
set protocols bgp group eBGP_ASBR export from-ospf
set protocols bgp group eBGP_ASBR export from-direct
set protocols bgp group eBGP_ASBR export To-ASBR2
set protocols bgp group eBGP_ASBR neighbor 192.168.100.5 peer-as 65200
set protocols isis interface ge-0/0/1.0 level 2 disable
set protocols isis interface lo0.0      
set protocols isis level 2 disable
set protocols ldp interface all
set protocols ldp interface fxp0.0 disable
set protocols ldp p2mp recursive fec
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive

ASBR2

content_copy zoom_out_map
set system host-name ASBR2
set chassis network-services enhanced-ip
set interfaces ge-0/0/0 unit 0 family inet address 10.1.45.2/24
set interfaces ge-0/0/0 unit 0 family iso
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces ge-0/0/1 unit 0 family inet address 10.1.56.1/24
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 192.168.100.5/32
set interfaces lo0 unit 0 family iso address 49.0001.0050.0500.5005.00
set policy-options policy-statement To-ASBR1 term 1 from route-filter 192.168.100.7/32 exact
set policy-options policy-statement To-ASBR1 term 1 from route-filter 192.168.100.6/32 exact
set policy-options policy-statement To-ASBR1 term 1 then accept
set policy-options policy-statement To-ASBR1 term 2 then reject
set policy-options policy-statement from-direct term 1 from interface lo0.0
set policy-options policy-statement from-direct term 1 then accept
set policy-options policy-statement from-ospf term 1 from protocol ospf
set policy-options policy-statement from-ospf term 1 then accept
set routing-options router-id 192.168.100.5
set routing-options autonomous-system 65200
set protocols bgp group INT type internal
set protocols bgp group INT local-address 192.168.100.5
set protocols bgp group INT family inet labeled-unicast resolve-vpn
set protocols bgp group INT peer-as 65200
set protocols bgp group INT local-as 65200
set protocols bgp group INT neighbor 192.168.100.6
set protocols bgp group eBGP_ASBR type external
set protocols bgp group eBGP_ASBR multihop ttl 2
set protocols bgp group eBGP_ASBR local-address 192.168.100.5
set protocols bgp group eBGP_ASBR family inet labeled-unicast resolve-vpn
set protocols bgp group eBGP_ASBR export from-ospf
set protocols bgp group eBGP_ASBR export from-direct
set protocols bgp group eBGP_ASBR export To-ASBR1
set protocols bgp group eBGP_ASBR neighbor 192.168.100.4 peer-as 65100
set protocols isis interface ge-0/0/0.0 level 2 disable
set protocols isis interface lo0.0
set protocols isis level 2 disable
set protocols ldp interface all
set protocols ldp interface fxp0.0 disable
set protocols ldp p2mp recursive fec
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive

P2

content_copy zoom_out_map
set system host-name P2
set chassis network-services enhanced-ip
set interfaces ge-0/0/0 unit 0 family inet address 10.1.56.2/24
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces ge-0/0/1 unit 0 family inet address 10.1.67.1/24
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 192.168.100.6/32
set routing-options router-id 192.168.100.6
set routing-options autonomous-system 65200
set protocols bgp group INT type internal
set protocols bgp group INT local-address 192.168.100.6
set protocols bgp group INT family inet labeled-unicast resolve-vpn
set protocols bgp group INT family inet-vpn any
set protocols bgp group INT family inet-mvpn signaling
set protocols bgp group INT cluster 192.168.100.6
set protocols bgp group INT local-as 65200
set protocols bgp group INT neighbor 192.168.100.5
set protocols bgp group INT neighbor 192.168.100.7
set protocols bgp group eBGP_PE_PE type external
set protocols bgp group eBGP_PE_PE multihop ttl 25
set protocols bgp group eBGP_PE_PE local-address 192.168.100.6
set protocols bgp group eBGP_PE_PE family inet-vpn any
set protocols bgp group eBGP_PE_PE family inet-mvpn signaling
set protocols bgp group eBGP_PE_PE neighbor 192.168.100.3 peer-as 65100
set protocols ldp interface all
set protocols ldp interface fxp0.0 disable
set protocols ldp p2mp recursive route
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive

PE2

content_copy zoom_out_map
set system host-name PE2
set chassis network-services enhanced-ip
set interfaces ge-0/0/0 unit 0 family inet address 10.1.67.2/24
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces ge-0/0/1 description "CONNECTED TO CE2"
set interfaces ge-0/0/1 unit 0 family inet address 172.16.2.2/30
set interfaces lo0 unit 0 family inet address 192.168.100.7/32
set interfaces lo0 unit 1 family inet address 192.168.100.17/32
set policy-options policy-statement EXPORT-LOCAL-ROUTES term 1 from protocol direct
set policy-options policy-statement EXPORT-LOCAL-ROUTES term 1 then accept
set routing-instances VPN2 instance-type vrf
set routing-instances VPN2 protocols bgp group PE2-CE2 type external
set routing-instances VPN2 protocols bgp group PE2-CE2 family inet unicast
set routing-instances VPN2 protocols bgp group PE2-CE2 export EXPORT-LOCAL-ROUTES
set routing-instances VPN2 protocols bgp group PE2-CE2 peer-as 65201
set routing-instances VPN2 protocols bgp group PE2-CE2 local-as 65200
set routing-instances VPN2 protocols bgp group PE2-CE2 neighbor 172.16.2.1
set routing-instances VPN2 protocols mvpn mvpn-mode rpt-spt
set routing-instances VPN2 protocols pim rp static address 192.168.100.1
set routing-instances VPN2 protocols pim interface lo0.1 mode sparse
set routing-instances VPN2 protocols pim interface ge-0/0/1.0 mode sparse
set routing-instances VPN2 protocols pim interface all
set routing-instances VPN2 interface ge-0/0/1.0
set routing-instances VPN2 interface lo0.1
set routing-instances VPN2 route-distinguisher 192.168.100.17:1
set routing-instances VPN2 vrf-target target:1:1
set routing-instances VPN2 vrf-table-label
set routing-options router-id 192.168.100.7
set routing-options autonomous-system 65200
set protocols bgp group INT type internal
set protocols bgp group INT local-address 192.168.100.7
set protocols bgp group INT family inet labeled-unicast resolve-vpn
set protocols bgp group INT family inet-vpn any
set protocols bgp group INT family inet-mvpn signaling
set protocols bgp group INT peer-as 65200
set protocols bgp group INT local-as 65200
set protocols bgp group INT neighbor 192.168.100.6
set protocols ldp interface all
set protocols ldp interface fxp0.0 disable
set protocols ldp p2mp recursive fec
set protocols mpls interface all
set protocols mpls interface fxp0.0 disable
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive

CE2

content_copy zoom_out_map
set system host-name CE2-receiver
set logical-systems receiver interfaces lt-0/0/0 unit 22 encapsulation ethernet
set logical-systems receiver interfaces lt-0/0/0 unit 22 peer-unit 21
set logical-systems receiver interfaces lt-0/0/0 unit 22 family inet address 172.16.22.22/30
set logical-systems receiver interfaces lo0 unit 22 family inet address 192.168.22.22/32
set logical-systems receiver protocols ospf area 0.0.0.0 interface all
set chassis fpc 0 pic 0 tunnel-services
set chassis network-services enhanced-ip
set interfaces ge-0/0/0 description "CONNECTED TO PE2"
set interfaces ge-0/0/0 unit 0 family inet address 172.16.2.1/30
set interfaces lt-0/0/0 description "CONNECTED FROM CE2 TO receiver"
set interfaces lt-0/0/0 unit 21 encapsulation ethernet
set interfaces lt-0/0/0 unit 21 peer-unit 22
set interfaces lt-0/0/0 unit 21 family inet address 172.16.22.21/30
set interfaces lo0 unit 0 family inet address 192.168.100.8/32
set policy-options policy-statement EXPORT-LOCAL-ROUTES term 1 from protocol direct
set policy-options policy-statement EXPORT-LOCAL-ROUTES term 1 then accept
set routing-options router-id 192.168.100.8
set routing-options autonomous-system 65201
set protocols bgp group CE2-PE2 type external
set protocols bgp group CE2-PE2 family inet unicast
set protocols bgp group CE2-PE2 export EXPORT-LOCAL-ROUTES
set protocols bgp group CE2-PE2 peer-as 65200
set protocols bgp group CE2-PE2 local-as 65201
set protocols bgp group CE2-PE2 neighbor 172.16.2.2
set protocols igmp interface lt-0/0/0.21 static group 225.1.1.1
set protocols ospf area 0.0.0.0 interface all
set protocols ospf area 0.0.0.0 interface fxp0.0 disable
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols pim rp static address 192.168.100.1
set protocols pim interface all
set protocols pim interface fxp0.0 disable
set protocols sap listen 225.1.1.1 port 5000

附录2:显示 PE1 和 ASBR2 上的配置输出

大括号格式的完整 PE1 配置

content_copy zoom_out_map
user@PE1# show | no-more
system {
    host-name PE1;
}
interfaces {
    ge-0/0/0 {
        description "CONNECTED TO CE1";
        unit 0 {
            family inet {
                address 172.16.1.2/30;
            }
        }
    }
    ge-0/0/1 {
        description "CONNECTED TO P1";
        unit 0 {
            family inet {
                address 10.1.23.1/24;
            }
            family mpls;
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 192.168.100.2/32;
            }
        }
        unit 1 {
            family inet {
                address 192.168.102.1/32;
            }
        }
    }
}
policy-options {
    policy-statement EXPORT-LOCAL-ROUTES {
        term 1 {
            from protocol direct;
            then accept;
        }
    }
}
routing-instances {
    VPN1 {
        instance-type vrf;
        protocols {
            bgp {
                group CE11-PE1 {
                    type external;
                    family inet {
                        unicast;
                    }
                    export EXPORT-LOCAL-ROUTES;
                    peer-as 65101;
                    local-as 65100;
                    neighbor 172.16.1.1;
                }
            }
            mvpn {
                mvpn-mode {
                    rpt-spt;
                }
            }
            pim {
                rp {
                    static {
                        address 192.168.100.1;
                    }
                }
                interface lo0.1;
                interface ge-0/0/0.0;
            }
        }
        interface ge-0/0/0.0;
        interface lo0.1;
        route-distinguisher 192.168.100.2:1;
        vrf-target target:1:1;
        vrf-table-label;
        provider-tunnel {
            ldp-p2mp;
            selective {
                group 225.1.1.1/32 {
                    source 172.16.12.1/32 {
                        ldp-p2mp;
                        threshold-rate 1;
                    }
                }
            }
        }
    }
}
routing-options {
    router-id 192.168.100.2;
    autonomous-system 65100;
    nonstop-routing;
}
protocols {
    bgp {
        group INT {
            type internal;
            local-address 192.168.100.2;
            family inet {
                labeled-unicast {
                    resolve-vpn;
                }
            }
            family inet-vpn {
                any;
            }
            family inet-mvpn {
                signaling;
            }
            export from-direct;
            peer-as 65100;
            local-as 65100;
            neighbor 192.168.100.3;
        }
    }
    ldp {
        interface all;
        interface fxp0.0 {
            disable;
        }
        p2mp {
            recursive {
                fec;
            }
        }
    }
    mpls {
        interface all;
        interface fxp0.0 {
            disable;
        }
    }
    ospf {
        area 0.0.0.0 {
            interface lo0.0 {
                passive;
            }
            interface all;
            interface fxp0.0 {
                disable;
            }
        }
    }
}

大括号格式的完整 ASBR2 配置

content_copy zoom_out_map
user@ASBR2# show | no-more
system {
    host-name ASBR2;
}
interfaces {
    ge-0/0/0 {
        unit 0 {
            family inet {
                address 10.1.45.2/24;
            }
            family iso;
            family mpls;
        }
    }
    ge-0/0/1 {
        unit 0 {
            family inet {
                address 10.1.56.1/24;
            }
            family mpls;
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 192.168.100.5/32;
            }
            family iso {
                address 49.0001.0060.0600.6006.00;
            }
        }
    }
}
policy-options {
    policy-statement NHP {
        term 1 {
            from protocol bgp;
            then {
                next-hop self;
                accept;
            }
        }
    }
    policy-statement To-ASBR1 {
        term 1 {
            from {
                route-filter 192.168.100.7/32 exact;
                route-filter 192.168.100.6/32 exact;
            }
            then accept;
        }
        term 2 {
            then reject;
        }
    }
    policy-statement from-direct {
        term 1 {
            from interface lo0.0;
            then accept;
        }
    }
    policy-statement from-ospf {
        term 1 {
            from protocol ospf;
            then accept;
        }
    }
}
routing-options {
    router-id 192.168.100.5;
    autonomous-system 65200;
    nonstop-routing;
}
protocols {
    bgp {
        group INT {
            type internal;
            local-address 192.168.100.5;
            family inet {
                labeled-unicast {
                    resolve-vpn;
                }
            }
            peer-as 65200;
            local-as 65200;
            neighbor 192.168.100.6 {
                export NHP;
            }
        }
        group eBGP_ASBR1-ASBR2 {
            type external;
            local-address 192.168.100.5;
            family inet {
                labeled-unicast {
                    resolve-vpn;
                }
            }
            export [ from-ospf from-direct To-ASBR1 ];
            neighbor 192.168.100.4 {
                multihop;
                peer-as 65100;
            }
        }
    }
    isis {
        interface ge-0/0/0.0 {
            level 2 disable;
        }
        interface lo0.0 {
            level 1 {
                passive;
            }
        }
    }
    ldp {
        interface all;
        interface fxp0.0 {
            disable;
        }
        p2mp {
            recursive {
                fec;
            }
        }
    }
    ospf {
        traffic-engineering;
        area 0.0.0.0 {
            interface ge-0/0/1.0;
            interface lo0.0 {
                passive;
            }
        }
    }
}                         
external-footer-nav