• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

07-MPLS配置举例

目录

06-H3C_12500_MPLS_TE转发邻接典型配置举例

本章节下载 06-H3C_12500_MPLS_TE转发邻接典型配置举例  (206.06 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S12500/S12500-S/Configure/Typical_Configuration_Example/H3C_S12500-S_CE-R7536P05-6W100/07/201709/1032197_30005_0.htm

06-H3C_12500_MPLS_TE转发邻接典型配置举例

H3C MPLS TE转发邻接典型配置举例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2017新华三技术有限公司 版权所有,保留一切权利。

非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,

并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。

H3C_彩色.emf

 



1 简介

本文档介绍MPLS TE转发邻接的配置举例。

2 配置前提

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文档假设您已了解MPLS TE转发邻接特性。

3 配置举例

3.1  组网需求

图3-1所示,各设备之间通过OSPF协议实现互通,各链路的度量值已在链路中标注。缺省情况下,Device A发往Device D的流量会通过GigabitEthernet3/0/2转发。现要求在Device B上创建一条经过Device C到达Device D的MPLS TE隧道,并通过配置MPLS TE转发邻接,实现:

·     MPLS TE隧道被当作一条链路发布出去,OSPF网络中的其他设备在路由计算时都会考虑MPLS TE隧道;

·     配置MPLS TE隧道的开销,使Device A发往Device D的流量通过MPLS TE隧道转发。

图3-1 转发邻接配置组网图

 

 

3.2  配置思路

·     创建MPLS TE隧道前,需要在MPLS TE隧道经过的各个节点和接口上开启MPLS TE能力。

·     要想使转发邻接功能生效,需要创建方向相反的两条MPLS TE隧道,并在隧道的两端同时配置转发邻接功能;

·     为了控制MPLS TE隧道的实际转发路径经过Device C,需要配置显式路径;

·     为了保证Device A发往Device D的流量通过MPLS TE隧道转发,必须在OSPF计算中使包含MPLS TE隧道的路径度量值小于25,即MPLS TE隧道度量值小于15,本例中我们选择12。

3.3  使用版本

本举例在S12500S-CMW710-R7536P05版本上进行配置和验证。

3.4  配置步骤

说明

本文只介绍MPLS TE隧道及转发邻接的相关配置,对于组网需求中已经存在的配置(包括:各接口IP地址、OSPF基本功能和各链路OSPF开销)本节中省略,具体配置可参考配置文件

 

3.4.1  在MPLS TE隧道经过的各个节点和接口上开启MPLS TE能力

# 配置Device B的LSR ID,开启MPLS、MPLS TE和RSVP-TE能力。

[DeviceB] mpls lsr-id 2.2.2.2

[DeviceB] mpls te

[DeviceB-te] quit

[DeviceB] rsvp

[DeviceB-rsvp] quit

[DeviceB] interface vlan-interface 23

[DeviceB-Vlan-interface23] mpls enable

[DeviceB-Vlan-interface23] mpls te enable

[DeviceB-Vlan-interface23] rsvp enable

[DeviceB-Vlan-interface23] quit

# 配置Device C的LSR ID,开启MPLS、MPLS TE和RSVP-TE能力。

[DeviceC] mpls lsr-id 3.3.3.3

[DeviceC] mpls te

[DeviceC-te] quit

[DeviceC] rsvp

[DeviceC-rsvp] quit

[DeviceC] interface vlan-interface 23

[DeviceC-Vlan-interface23] mpls enable

[DeviceC-Vlan-interface23] mpls te enable

[DeviceC-Vlan-interface23] rsvp enable

[DeviceC-Vlan-interface23] ospf cost 10

[DeviceC-Vlan-interface23] quit

[DeviceC] interface vlan-interface 34

[DeviceC-Vlan-interface34] mpls enable

[DeviceC-Vlan-interface34] mpls te enable

[DeviceC-Vlan-interface34] rsvp enable

[DeviceC-Vlan-interface34] ospf cost 10

[DeviceC-Vlan-interface34] quit

# 配置Device D的LSR ID,开启MPLS、MPLS TE和RSVP-TE能力。

[DeviceD] mpls lsr-id 4.4.4.4

[DeviceD] mpls te

[DeviceD-te] quit

[DeviceD] rsvp

[DeviceD-rsvp] quit

[DeviceD] interface vlan-interface 34

[DeviceD-Vlan-interface34] mpls enable

[DeviceD-Vlan-interface34] mpls te enable

[DeviceD-Vlan-interface34] rsvp enable

[DeviceD-Vlan-interface34] quit

3.4.2  配置OSPF TE,发布链路的MPLS TE属性

# 在Device B上使能OSPF的Opaque LSA发布接收能力(缺省情况下处于开启状态),并在OSPF区域0内使能MPLS TE能力

[DeviceB] ospf

[DeviceB-ospf-1] opaque-capability enable

[DeviceB-ospf-1] area 0

[DeviceB-ospf-1-area-0.0.0.0] mpls te enable

[DeviceB-ospf-1-area-0.0.0.0] quit

[DeviceB-ospf-1] quit

# 在Device C上使能OSPF的Opaque LSA发布接收能力(缺省情况下处于开启状态),并在OSPF区域0内使能MPLS TE能力

[DeviceC] ospf

[DeviceC-ospf-1] opaque-capability enable

[DeviceC-ospf-1] area 0

[DeviceC-ospf-1-area-0.0.0.0] mpls te enable

[DeviceC-ospf-1-area-0.0.0.0] quit

[DeviceC-ospf-1] quit

# 在Device D上使能OSPF的Opaque LSA发布接收能力(缺省情况下处于开启状态),并在OSPF区域0内使能MPLS TE能力

[DeviceD] ospf

[DeviceD-ospf-1] opaque-capability enable

[DeviceD-ospf-1] area 0

[DeviceD-ospf-1-area-0.0.0.0] mpls te enable

[DeviceD-ospf-1-area-0.0.0.0] quit

[DeviceD-ospf-1] quit

3.4.3  配置MPLS TE隧道

1. 在Device B上配置MPLS TE隧道

# 在Device B上使用RSVP-TE信令协议建立MPLS TE隧道Tunnel1,目的地址为Device D的LSR ID(4.4.4.4)。

[DeviceB] interface tunnel 1 mode mpls-te

[DeviceB-Tunnel1] ip address 9.2.2.2 255.255.255.0

[DeviceB-Tunnel1] destination 4.4.4.4

[DeviceB-Tunnel1] mpls te signaling rsvp-te

[DeviceB-Tunnel1] quit

# 创建隧道的显式路径,指定Tunnel1的流量从Device C转发。

[DeviceB] explicit-path tun1

[DeviceB-explicit-path-tun1] nexthop 23.23.23.3

[DeviceB-explicit-path-tun1] nexthop 34.34.34.4

[DeviceB-explicit-path-tun1]quit

[DeviceB] interface tunnel 1

[DeviceB–Tunnel1] mpls te path preference 1 explicit-path tun1

# 开启隧道的IGP转发邻接功能,使MPLS TE隧道加入IGP路由计算。

[DeviceA-Tunnel1] mpls te igp advertise

# 在隧道接口tunnel 1上使能OSPF,设置隧道接口的OSPF开销为12。

[DeviceA-Tunnel1] ospf 1 area 0

[DeviceA-Tunnel1] ospf cost 12

[DeviceA-Tunnel1] quit

2. 在Device D上配置MPLS TE隧道

# 在Device D上使用RSVP-TE信令协议建立MPLS TE隧道Tunnel1,目的地址为Device B的LSR ID(2.2.2.2)。

[DeviceD] interface tunnel 1 mode mpls-te

[DeviceD-Tunnel1] ip address 9.4.4.4 255.255.255.0

[DeviceD-Tunnel1] destination 2.2.2.2

[DeviceD-Tunnel1] mpls te signaling rsvp-te

[DeviceD-Tunnel1] quit

# 创建隧道的显式路径,指定Tunnel1的流量从Device C转发。

[DeviceD] explicit-path tun1

[DeviceD-explicit-path-tun1] nexthop 34.34.34.3

[DeviceD-explicit-path-tun1] nexthop 23.23.23.2

[DeviceD-explicit-path-tun1]quit

[DeviceD] interface tunnel 1

[DeviceD–Tunnel1] mpls te path preference 1 explicit-path tun1

# 开启隧道的IGP转发邻接功能,使MPLS TE隧道加入IGP路由计算。

[DeviceD-Tunnel1] mpls te igp advertise

# 在隧道接口tunnel 1上使能OSPF,设置隧道接口的OSPF开销为12。

[DeviceD-Tunnel1] ospf 1 area 0

[DeviceD-Tunnel1] ospf cost 12

[DeviceD-Tunnel1] quit

3.5  验证配置

# Device BDevice D上执行display interface tunnel brief命令,可以看到Tunnel1的状态为up,以DeviceB为例:

[DeviceB] display interface tunnel brief

Brief information on interfaces in route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface            Link Protocol Primary IP      Description

Tun1                 UP   UP       9.2.2.2         Tunnel1 Interface

# 在Device A上查看路由表,可以看到去往Device D(4.4.4.4)的下一跳为Device B(12.12.12.2),开销为22(10+12),说明MPLS TE隧道已加入OSPF路由计算。

[Device A] display ip routing-table

 

Destinations : 24        Routes : 24

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

0.0.0.0/32          Direct 0    0            127.0.0.1       InLoop0

1.1.1.1/32          Direct 0    0            127.0.0.1       InLoop0

2.2.2.2/32          OSPF   10   10           12.12.12.2      Vlan12

3.3.3.3/32          OSPF   10   20           12.12.12.2      Vlan12

4.4.4.4/32          OSPF   10   22           12.12.12.2      Vlan12

9.2.2.0/24          OSPF   10   22           12.12.12.2      Vlan12

9.4.4.0/24          OSPF   10   34           12.12.12.2      Vlan12

12.12.12.0/24       Direct 0    0            12.12.12.1      Vlan12

12.12.12.0/32       Direct 0    0            12.12.12.1      Vlan12

12.12.12.1/32       Direct 0    0            127.0.0.1       InLoop0

12.12.12.255/32     Direct 0    0            12.12.12.1      Vlan12

14.14.14.0/24       Direct 0    0            14.14.14.1      Vlan14

14.14.14.0/32       Direct 0    0            14.14.14.1      Vlan14

14.14.14.1/32       Direct 0    0            127.0.0.1       InLoop0

14.14.14.255/32     Direct 0    0            14.14.14.1      Vlan14

23.23.23.0/24       OSPF   10   20           12.12.12.2      Vlan12

34.34.34.0/24       OSPF   10   30           12.12.12.2      Vlan12

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.0/32        Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

127.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

224.0.0.0/4         Direct 0    0            0.0.0.0         NULL0

224.0.0.0/24        Direct 0    0            0.0.0.0         NULL0

255.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

3.6  配置文件

·     Device A:

#

ospf 1

 area 0.0.0.0

  network 1.1.1.1 0.0.0.0

  network 12.12.12.0 0.0.0.255

  network 14.14.14.0 0.0.0.255

#

vlan 12

#

vlan 14

#

interface LoopBack0

 ip address 1.1.1.1 255.255.255.255

#

interface Vlan-interface12

 ip address 12.12.12.1 255.255.255.0

 ospf cost 10

#

interface Vlan-interface14

 ip address 14.14.14.1 255.255.255.0

 ospf cost 25

·     Device B :

#

ospf 1

 area 0.0.0.0

  network 2.2.2.2 0.0.0.0

  network 12.12.12.0 0.0.0.255

  network 23.23.23.0 0.0.0.255

  mpls te enable

#

 mpls lsr-id 2.2.2.2

#

mpls te

#

explicit-path tun1

 nexthop index 1 23.23.23.3 include strict

 nexthop index 101 34.34.34.4 include strict

#

rsvp

#

vlan 12

#

vlan 23

#

interface LoopBack0

 ip address 2.2.2.2 255.255.255.255

#

interface Vlan-interface12

 ip address 12.12.12.2 255.255.255.0

 ospf cost 10

#

interface Vlan-interface23

 ip address 23.23.23.2 255.255.255.0

 ospf cost 10

 mpls enable

 mpls te enable

 rsvp enable

#

interface Tunnel1 mode mpls-te

 ip address 9.2.2.2 255.255.255.0

 ospf cost 12

 ospf 1 area 0.0.0.0

 mpls te path preference 1 explicit-path tun1

 mpls te igp advertise

 destination 4.4.4.4

#

·     Device C :

#

ospf 1

 area 0.0.0.0

  network 3.3.3.3 0.0.0.0

  network 23.23.23.0 0.0.0.255

  network 34.34.34.0 0.0.0.255

  mpls te enable

#

 mpls lsr-id 3.3.3.3

#

mpls te

#

rsvp

#

vlan 23

#

vlan 34

#

interface LoopBack0

 ip address 3.3.3.3 255.255.255.255

#

interface Vlan-interface23

 ip address 23.23.23.3 255.255.255.0

 ospf cost 10

 mpls enable

 mpls te enable

 rsvp enable

#

interface Vlan-interface34

 ip address 34.34.34.3 255.255.255.0

 ospf cost 10

 mpls enable

 mpls te enable

 rsvp enable

#

·     Device D:

#

ospf 1

 area 0.0.0.0

  network 4.4.4.4 0.0.0.0

  network 14.14.14.0 0.0.0.255

  network 34.34.34.0 0.0.0.255

  mpls te enable

#

 mpls lsr-id 4.4.4.4

#

mpls te

#

explicit-path tun1

 nexthop index 1 34.34.34.3 include strict

 nexthop index 101 23.23.23.2 include strict

#

rsvp

#

vlan 14

#

vlan 34

#

interface LoopBack0

 ip address 4.4.4.4 255.255.255.255

#

interface Vlan-interface14

 ip address 14.14.14.4 255.255.255.0

 ospf cost 25

#

interface Vlan-interface34

 ip address 34.34.34.4 255.255.255.0

 ospf cost 10

 mpls enable

 mpls te enable

 rsvp enable

#

interface Tunnel1 mode mpls-te

 ip address 9.4.4.4 255.255.255.0

 ospf cost 12

 ospf 1 area 0.0.0.0

 mpls te path preference 1 explicit-path tun1

 mpls te igp advertise

 destination 2.2.2.2

#

4 相关资料

·     H3C S12500-S系列交换机 MPLS配置指导-R7536P05

·     H3C S12500-S系列交换机 MPLS命令参考-R7536P05

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们