• 產品與解決方案
  • 行業解決方案
  • 服務
  • 支持
  • 合作夥伴
  • 關於我們

07-MPLS配置舉例

目錄

05-H3C_MPLS_TE轉發鄰接典型配置舉例

本章節下載 05-H3C_MPLS_TE轉發鄰接典型配置舉例  (221.21 KB)

05-H3C_MPLS_TE轉發鄰接典型配置舉例

H3C MPLS TE轉發鄰接典型配置舉例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

資料版本:6W100-20200330

產品版本:Release 7585P05

 

Copyright © 2020 bobty下载软件 版權所有,保留一切權利。

非經本公司書麵許可,任何單位和個人不得擅自摘抄、複製本文檔內容的部分或全部,並不得以任何形式傳播。

除bobty下载软件 的商標外,本手冊中出現的其它公司的商標、產品標識及商品名稱,由各自權利人擁有。

本文檔中的信息可能變動,恕不另行通知。



1  簡介

本文檔介紹MPLS TE轉發鄰接的配置舉例。

2  配置前提

本文檔中的配置均是在實驗室環境下進行的配置和驗證,配置前設備的所有參數均采用出廠時的缺省配置。如果您已經對設備進行了配置,為了保證配置效果,請確認現有配置和以下舉例中的配置不衝突。

本文檔假設您已了解MPLS TE轉發鄰接特性。

3  配置舉例

3.1  組網需求

圖1所示,各設備之間通過OSPF協議實現互通,各鏈路的度量值已在鏈路中標注。缺省情況下,Device A發往Device D的流量會通過Vlan-interface23轉發。現要求在Device B上創建一條經過Device C到達Device D的MPLS TE隧道,並通過配置MPLS TE轉發鄰接,實現:

·            MPLS TE隧道被當作一條鏈路發布出去,OSPF網絡中的其他設備在路由計算時都會考慮MPLS TE隧道;

·            配置MPLS TE隧道的開銷,使Device A發往Device D的流量通過MPLS TE隧道轉發。

圖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  配置步驟

說明

本文隻介紹MPLS TE隧道及轉發鄰接的相關配置,對於組網需求中已經存在的配置(包括:各接口IP地址、OSPF基本功能和各鏈路OSPF開銷)本節中省略,具體配置可參考配置文件

 

3.3.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 CLSR ID,開啟MPLSMPLS TERSVP-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 DLSR ID,開啟MPLSMPLS TERSVP-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.3.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.3.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.2.2.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.4  驗證配置

# 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

# 在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         O_INTRA 10  10          12.12.12.2      Vlan12

3.3.3.3/32         O_INTRA 10  20          12.12.12.2      Vlan12

4.4.4.4/32         O_INTRA 10  22          12.12.12.2      Vlan12

9.2.2.0/24         O_INTRA 10  22          12.12.12.2      Vlan12

10.1.0.3/32        Direct  0   0           127.0.0.1       InLoop0

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      O_INTRA 10  20          12.12.12.2      Vlan12

34.34.34.0/24      O_INTRA 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.5  配置文件

·            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.2.2.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 S10500係列交換機 MPLS配置指導-R758X

·            H3C S10500係列交換機 MPLS命令參考-R758X

不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!

BOB登陆
官網
聯係我們