• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 关于我们

H3C 园区盒式交换机典型配置举例-6W105

目录

70-MPLS OAM典型配置举例

本章节下载 70-MPLS OAM典型配置举例  (339.48 KB)

70-MPLS OAM典型配置举例


1  简介

本文档介绍MPLS OAM配置举例。

MPLS OAM(Operations, Administration and Maintenance,操作、管理和维护)功能为MPLS网络提供了数据平面连通性检测、数据平面与控制平面一致性校验、故障点定位等多种错误管理(Fault Management)工具。MPLS OAM利用这些错误管理工具对LSP、MPLS TE隧道和MPLS PW进行检测和故障定位,降低了MPLS网络的管理和维护的复杂度,提高了MPLS网络的可用性。

2  配置前提

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

本文档假设您已了解MPLS OAM特性。

3  BFD检测LSP典型配置举例

3.1  组网需求

图1所示,某公司有两个位于不同的地理位置的分支机构通过运营商的MPLS骨干网互联,两个分支机构之间需要进行实时业务的同步传输。该公司要求运营商提供高可靠性的服务,以保证实时业务的不间断性。

为满足该用户需求,可通过在MPLS骨干网中部署LDP FRR服务来提供主备两条LSP链路,并配置LDP与BFD联动技术提高主备链路的切换速度,具体实现如下:

·     正常情况下,使用主LSP链路转发PE 1和PE 2之间的流量。

·     使用BFD对主链路进行监测,当主链路发生故障时,BFD能够快速感知并通告LDP协议,使得PE 1和PE 2之间的流量迅速切换到备LSP链路进行转发。

图1 BFD检测LSP配置组网图

3.2  适用产品及版本

表1 适用产品及版本

产品

软件版本

S6812系列

S6813系列

Release 6615Pxx系列、Release 6628Pxx系列

S6550XE-HI系列

Release 8106Pxx

S6525XE-HI系列

Release 8106Pxx

S5850系列

不支持

S5570S-EI系列

不支持

S5560X-EI系列

Release 65xx系列、Release 6615Pxx系列、Release 6628P

S5560X-HI系列

Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx

S5500V2-EI系列

Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4520V2-30F

Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4520V2-30C

MS4520V2-54C

Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4520V2-28S

MS4520V2-24TP

不支持

S6520X-HI系列

S6520X-EI系列

Release 65xx系列、Release 6615Pxx系列、Release 65xx系列、Release 6628Pxx系列

S6520X-SI系列

S6520-SI系列

Release 65xx系列、Release 6615Pxx系列、Release 65xx系列、Release 6628Pxx系列

S5000-EI系列

Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4600系列

Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

ES5500系列

Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx

S5560S-EI系列

S5560S-SI系列

不支持

S5500V3-24P-SI

S5500V3-48P-SI

不支持

S5500V3-SI系列(除S5500V3-24P-SI、S5500V3-48P-SI)

不支持

S5170-EI系列

不支持

S5130S-HI系列

S5130S-EI[-R]系列

S5130S-SI系列

S5130S-LI系列

不支持

S5120V2-SI系列

S5120V2-LI系列

不支持

S5120V3-EI系列

不支持

S5120V3-36F-SI

S5120V3-28P-HPWR-SI

S5120V3-54P-PWR-SI

不支持

S5120V3-SI系列(除S5120V3-36F-SI、S5120V3-28P-HPWR-SI、S5120V3-54P-PWR-SI)

不支持

S5120V3-LI系列

不支持

S3600V3-EI系列

不支持

S3600V3-SI系列

不支持

S3100V3-EI系列

S3100V3-SI系列

不支持

S5110V2系列

不支持

S5110V2-SI系列

不支持

S5000V3-EI系列

S5000V5-EI系列

不支持

S5000E-X系列

S5000X-EI系列

不支持

E128C

E152C

E500C系列

E500D系列

不支持

MS4320V2系列

MS4320V3系列

MS4300V2系列

MS4320系列

MS4200系列

不支持

WS5850-WiNet系列

不支持

WS5820-WiNet系列

WS5810-WiNet系列

不支持

WAS6000系列

不支持

IE4300-12P-AC & IE4300-12P-PWR

IE4300-M系列

IE4320系列

不支持

IE4520系列

不支持

S5135S-EI系列

不支持

 

3.3  配置注意事项

进行本案例配置之前,需要先全局关闭STP功能,或为每个VLAN映射一个MSTP实例,否则可能会阻断环路中的一条链路。

3.4  配置步骤

(1)     配置各接口的IP地址

# 按照图1配置各接口的IP地址和掩码,包括LoopBack接口,下面以PE 1为例,其它设备配置方法类似,具体配置过程略。

<PE1> system-view

[PE1] vlan 10

[PE1-vlan10] port gigabitethernet 1/0/3

[PE1-vlan10] quit

[PE1] interface vlan-interface 10

[PE1-Vlan-interface10] ip address 192.168.10.1 24

[PE1] vlan 12

[PE1-vlan12] port gigabitethernet 1/0/1

[PE1-vlan12] quit

[PE1] interface vlan-interface 12

[PE1-Vlan-interface12] ip address 12.12.12.1 24

[PE1-Vlan-interface12] quit

[PE1] vlan 14

[PE1-vlan14] port gigabitethernet 1/0/2

[PE1-vlan14] quit

[PE1] interface vlan-interface 14

[PE1-Vlan-interface14] ip address 14.14.14.1 24

[PE1-Vlan-interface14] quit

[PE1] interface loopback 0

[PE1-LoopBack0] ip address 1.1.1.1 32

[PE1-LoopBack0] quit

(2)     在MPLS骨干网内配置OSPF,以保证各路由器之间路由可达,并使能OSPF快速重路由功能。

# 配置PE 1。

[PE1] ospf

[PE1-ospf-1] area 0

[PE1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0

[PE1-ospf-1-area-0.0.0.0] network 12.12.12.0 0.0.0.255

[PE1-ospf-1-area-0.0.0.0] network 14.14.14.0 0.0.0.255

[PE1-ospf-1-area-0.0.0.0] network 192.168.10.0 0.0.0.255

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

[PE1-ospf-1] fast-reroute lfa

[PE1-ospf-1] quit

# 配置P 1

[P1] ospf

[P1-ospf-1] area 0

[P1-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0

[P1-ospf-1-area-0.0.0.0] network 12.12.12.0 0.0.0.255

[P1-ospf-1-area-0.0.0.0] network 23.23.23.0 0.0.0.255

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

[P1-ospf-1] quit

# 配置PE 2。

[PE2] ospf

[PE2-ospf-1] area 0

[PE2-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0

[PE2-ospf-1-area-0.0.0.0] network 23.23.23.0 0.0.0.255

[PE2-ospf-1-area-0.0.0.0] network 34.34.34..0 0.0.0.255

[PE2-ospf-1-area-0.0.0.0] network 192.168.20.0 0.0.0.255

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

[PE2-ospf-1] fast-reroute lfa

[PE2-ospf-1] quit

# 配置P 2

[P2] ospf

[P2-ospf-1] area 0

[P2-ospf-1-area-0.0.0.0] network 4.4.4.4 0.0.0.0

[P2-ospf-1-area-0.0.0.0] network 14.14.14.0 0.0.0.255

[P2-ospf-1-area-0.0.0.0] network 34.34.34.0 0.0.0.255

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

[P2-ospf-1] quit

# 调整P 2上Vlan-interface14和Vlan-interface34的OSPF cost值,使备份LSP路径上的OSPF开销值大于主LSP路径。

[P2] interface vlan-interface 14

[P2-Vlan-interface14] ospf cost 10

[P2-Vlan-interface14] quit

[P2] interface vlan-interface 34

[P2-Vlan-interface34] ospf cost 10

[P2-Vlan-interface34] quit

(3)     配置MPLS基本能力,并使能LDP

# 配置PE 1。

[PE1] mpls lsr-id 1.1.1.1

[PE1] mpls ldp

[PE1-ldp] quit

[PE1] interface vlan-interface 12

[PE1-Vlan-interface12] mpls enable

[PE1-Vlan-interface12] mpls ldp enable

[PE1-Vlan-interface12] quit

[PE1] interface vlan-interface 14

[PE1-Vlan-interface14] mpls enable

[PE1-Vlan-interface14] mpls ldp enable

[PE1-Vlan-interface14] quit

# 配置P 1。

[P1] mpls lsr-id 2.2.2.2

[P1] mpls ldp

[P1-ldp] quit

[P1] interface vlan-interface 12

[P1-Vlan-interface12] mpls enable

[P1-Vlan-interface12] mpls ldp enable

[P1-Vlan-interface12] quit

[P1] interface vlan-interface 23

[P1-Vlan-interface23] mpls enable

[P1-Vlan-interface23] mpls ldp enable

[P1-Vlan-interface23] quit

# 配置PE 2。

[PE2] mpls lsr-id 3.3.3.3

[PE2] mpls ldp

[PE2-ldp] quit

[PE2] interface vlan-interface 23

[PE2-Vlan-interface23] mpls enable

[PE2-Vlan-interface23] mpls ldp enable

[PE2-Vlan-interface23] quit

[PE2] interface vlan-interface 34

[PE2-Vlan-interface34] mpls enable

[PE2-Vlan-interface34] mpls ldp enable

[PE2-Vlan-interface34] quit

# 配置P 2。

[P2] mpls lsr-id 4.4.4.4

[P2] mpls ldp

[P2-ldp] quit

[P2] interface vlan-interface 14

[P2-Vlan-interface14] mpls enable

[P2-Vlan-interface14] mpls ldp enable

[P2-Vlan-interface14] quit

[P2] interface vlan-interface 34

[P2-Vlan-interface34] mpls enable

[P2-Vlan-interface34] mpls ldp enable

[P2-Vlan-interface34] quit

完成上述配置后,在各设备上可以看到LDP会话的状态为operational,会话建立成功。以PE1为例:

[PE1] display mpls ldp peer

Total number of peers: 2

Peer LDP ID             State         Role     GR   MD5  KA Sent/Rcvd

2.2.2.2:0               Operational   Passive  Off  Off  55/55

4.4.4.4:0               Operational   Passive  Off  Off  6/6

(4)     配置LSP的触发策略,为目的地址为192.168.10.0/24、192.168.20.0/24、1.1.1.1/32和3.3.3.3/32的路由表项建立LSP

# 在PE 1上创建IP地址前缀列表PE1,并配置只有通过该列表过滤的路由表项能够触发LDP建立LSP

[PE1] ip prefix-list PE1 index 10 permit 192.168.10.0 24

[PE1] ip prefix-list PE1 index 20 permit 192.168.20.0 24

[PE1] ip prefix-list PE1 index 30 permit 1.1.1.1 32

[PE1] ip prefix-list PE1 index 40 permit 3.3.3.3 32

[PE1] mpls ldp

[PE1-ldp] lsp-trigger prefix-list PE1

[PE1-ldp] quit

# 在P 1上创建IP地址前缀列表P1,并配置只有通过该列表过滤的路由表项能够触发LDP建立LSP

[P1] ip prefix-list P1 index 10 permit 192.168.10.0 24

[P1] ip prefix-list P1 index 20 permit 192.168.20.0 24

[P1] ip prefix-list P1 index 30 permit 1.1.1.1 32

[P1] ip prefix-list P1 index 40 permit 3.3.3.3 32

[P1] mpls ldp

[P1-ldp] lsp-trigger prefix-list P1

[P1-ldp] quit

# 在PE 2上创建IP地址前缀列表PE 2,并配置只有通过该列表过滤的路由表项能够触发LDP建立LSP

[PE2] ip prefix-list PE2 index 10 permit 192.168.10.0 24

[PE2] ip prefix-list PE2 index 20 permit 192.168.20.0 24

[PE2] ip prefix-list PE2 index 30 permit 1.1.1.1 32

[PE2] ip prefix-list PE2 index 40 permit 3.3.3.3 32

[PE2] mpls ldp

[PE2-ldp] lsp-trigger prefix-list PE2

[PE2-ldp] quit

# 在P 2上创建IP地址前缀列表P2,并配置只有通过该列表过滤的路由表项能够触发LDP建立LSP

[P2] ip prefix-list P2 index 10 permit 192.168.10.0 24

[P2] ip prefix-list P2 index 20 permit 192.168.20.0 24

[P2] ip prefix-list P2 index 30 permit 1.1.1.1 32

[P2] ip prefix-list P2 index 40 permit 3.3.3.3 32

[P2] mpls ldp

[P2-ldp] lsp-trigger prefix-list P2

[P2-ldp] quit

# 配置完成后,在PE 1上执行display mpls ldp lsp命令,查看LDP LSP的建立情况,可以看到去往192.168.20.0/24网段的两条LSP已经建立完成,出接口为Vlan-interface12LSP为主LSP,出接口为Vlan-interface14LSP为备用LSP

[PE1]display mpls ldp lsp

Status Flags: * - stale, L - liberal, B - backup

Statistics:

  FECs: 4      Ingress LSPs: 4     Transit LSPs: 4     Egress LSPs: 2

 

FEC                In/Out Label        Nexthop         OutInterface

1.1.1.1/32         3/-

                   -/1151(L)

                   -/1279(L)

3.3.3.3/32         -/1150              12.12.12.2      Vlan12

                   1150/1150           12.12.12.2      Vlan12

                   -/1150(B)           12.12.12.2      Vlan14

                   1150/1150(B)        12.12.12.2      Vlan14

192.168.10.0/24    1141/-

                   -/1141(L)

                   -/1141(L)

192.168.20.0/24    -/1133              12.12.12.2      Vlan12

                   1133/1133           12.12.12.2      Vlan12

                   -/1133(B)           14.14.14.4      Vlan14

                   1133/1133(B)        14.14.14.4      Vlan14

(5)     使能MPLS与BFD联动功能,并配置通过BFD检测LSP的连通性

# 配置PE 1。

[PE1] mpls bfd enable

[PE1] mpls bfd 3.3.3.3 32

# 配置PE 2。

[PE2] mpls bfd enable

[PE2] mpls bfd 1.1.1.1 32

3.5  验证配置

(1)     配置完成后,在设备PE 1和PE 2上执行display mpls bfd命令,可以看到检测LSP的BFD会话的建立情况。以PE 1为例。

[PE1] display mpls bfd

 Total number of sessions: 2, 2 up, 0 down, 0 init

 

 FEC Type: LSP

 FEC Info:

   Destination: 1.1.1.1

   Mask Length: 32

 NHLFE ID: -

 Local Discr: 1026                   Remote Discr: 514

 Source IP: 1.1.1.1                  Destination IP: 3.3.3.3

 Session State: Up                   Session Role: Active

 Template Name: -

 

 FEC Type: LSP

 FEC Info:

   Destination: 3.3.3.3

   Mask Length: 32

 NHLFE ID: 1028

 Local Discr: 1025                   Remote Discr: -

 Source IP: 1.1.1.1                  Destination IP: 127.0.0.1

 Session State: Up                   Session Role: Passive

 Template Name: -

(2)     在PE 1上使用tracert mpls ipv4命令查看到当前所使用的路径是主LSP。(使用Tracert功能需要在中间设备上开启ICMP超时报文发送功能,在目的端开启ICMP目的不可达报文发送功能)

[PE1] tracert mpls -a 192.168.10.1 ipv4 192.168.20.0 24

MPLS trace route FEC 192.168.20.0/24

  TTL   Replier            Time    Type      Downstream

  0                                Ingress   12.12.12.2/[1148]

  1     12.12.12.2         2 ms    Transit   23.23.23.3/[1148]

  2     23.23.23.3         2 ms    Egress

(3)     在PE 1上持续ping PE 2,期间将P 1Vlan-interface23接口shutdown,查看通信是否中断。

#PE 1上持续ping PE 2

[PE1] ping -c 100000 -a 192.168.10.1 192.168.20.1

Ping 192.168.20.1 (192.168.20.1) from 192.168.10.1: 56 data bytes, press CTRL_C

to break

56 bytes from 192.168.20.1: icmp_seq=0 ttl=254 time=2.576 ms

56 bytes from 192.168.20.1: icmp_seq=1 ttl=254 time=1.996 ms

...

# 关闭P 1的Vlan-interface23接口。

[P1] interface vlan-interface 23

[P1-Vlan-interface23] shutdown

#在PE1上查看到通讯断开后迅速恢复。

[PE1] ping -c 100000 -a 192.168.10.1 192.168.20.1

Ping 192.168.20.1 (192.168.20.1) from 192.168.10.1: 56 data bytes, press CTRL_C

to break

56 bytes from 192.168.20.1: icmp_seq=0 ttl=254 time=2.576 ms

56 bytes from 192.168.20.1: icmp_seq=1 ttl=254 time=1.996 ms

...

56 bytes from 192.168.20.1: icmp_seq=7 ttl=254 time=2.214 ms

Request time out

56 bytes from 192.168.20.1: icmp_seq=9 ttl=254 time=2.659 ms

56 bytes from 192.168.20.1: icmp_seq=10 ttl=254 time=5.049 ms

56 bytes from 192.168.20.1: icmp_seq=11 ttl=254 time=2.098 ms

56 bytes from 192.168.20.1: icmp_seq=12 ttl=254 time=2.225 ms

56 bytes from 192.168.20.1: icmp_seq=13 ttl=254 time=2.187 ms

 

--- Ping statistics for 192.168.20.1 ---

14 packet(s) transmitted, 13 packet(s) received, 7.1% packet loss

round-trip min/avg/max/std-dev = 1.990/2.455/5.049/0.772 ms

(4)     查看链路是否发生切换。

# PE 1上使用tracert mpls ipv4命令查看到当前所使用的路径是备份LSP

[PE1] tracert mpls -a 192.168.10.1 ipv4 192.168.20.0 24

MPLS trace route FEC 192.168.20.0/24

  TTL   Replier            Time    Type      Downstream

  0                                Ingress   14.14.14.4/[1276]

  1     14.14.14.4         2 ms    Transit   34.34.34.3/[1148]

  2     34.34.34.3         2 ms    Egress

3.6  配置文件

·     PE 1

#

ospf 1

 fast-reroute lfa

 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

  network 192.168.10.0 0.0.0.255

#

 mpls lsr-id 1.1.1.1

#

vlan 10

#

vlan 12

#

vlan 14

#

mpls ldp

 lsp-trigger prefix-list PE1

#

 mpls bfd enable

#

interface LoopBack0

 ip address 1.1.1.1 255.255.255.255

#

interface Vlan-interface10

 ip address 192.168.10.1 255.255.255.0

#

interface Vlan-interface12

 ip address 12.12.12.1 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface Vlan-interface14

 ip address 14.14.14.1 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 12

#

interface GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 14

#

interface GigabitEthernet1/0/3

 port link-mode bridge

 port access vlan 10

#

 ip prefix-list PE1 index 10 permit 192.168.10.0 24

 ip prefix-list PE1 index 20 permit 192.168.20.0 24

 ip prefix-list PE1 index 30 permit 1.1.1.1 32

 ip prefix-list PE1 index 40 permit 3.3.3.3 32

#

 mpls bfd 3.3.3.3 32

#

·     PE 2

#

ospf 1

 fast-reroute lfa

 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

  network 192.168.20.0 0.0.0.255

#

vlan 23

#

vlan 30

#

vlan 34

#

 mpls lsr-id 3.3.3.3

#

mpls ldp

 lsp-trigger prefix-list PE2

#

 mpls bfd enable

#

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

 mpls enable

 mpls ldp enable

#

interface Vlan-interface30

 ip address 192.168.20.1 255.255.255.0

#

interface Vlan-interface34

 ip address 34.34.34.3 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 34

#

interface GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 23

#

interface GigabitEthernet1/0/3

 port link-mode bridge

 port access vlan 30

#

 ip prefix-list PE2 index 10 permit 192.168.10.0 24

 ip prefix-list PE2 index 20 permit 192.168.20.0 24

 ip prefix-list PE2 index 30 permit 1.1.1.1 32

 ip prefix-list PE2 index 40 permit 3.3.3.3 32

#

 mpls bfd 1.1.1.1 32

#

·     P 1

#

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 lsr-id 2.2.2.2

#

vlan 12

#

vlan 23

#

mpls ldp

 lsp-trigger prefix-list P1

#

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

 mpls enable

 mpls ldp enable

#

interface Vlan-interface23

 ip address 23.23.23.2 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 12

#

interface GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 23

#

 ip prefix-list P1 index 10 permit 192.168.10.0 24

 ip prefix-list P1 index 20 permit 192.168.20.0 24

 ip prefix-list P1 index 30 permit 1.1.1.1 32

 ip prefix-list P1 index 40 permit 3.3.3.3 32

#

·     P 2

#

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 lsr-id 4.4.4.4

#

vlan 14

#

vlan 34

#

mpls ldp

 lsp-trigger prefix-list P2

#

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 10

 mpls enable

 mpls ldp enable

#

interface Vlan-interface34

 ip address 34.34.34.4 255.255.255.0

 ospf cost 10

 mpls enable

 mpls ldp enable

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 34

#

interface GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 14

#

 ip prefix-list P2 index 10 permit 192.168.10.0 24

 ip prefix-list P2 index 20 permit 192.168.20.0 24

 ip prefix-list P2 index 30 permit 1.1.1.1 32

 ip prefix-list P2 index 40 permit 3.3.3.3 32

#

4  SBFD检测LSP典型配置举例

4.1  组网需求

图2所示,某公司有两个位于不同的地理位置的分支机构通过运营商的MPLS骨干网互联,两个分支机构之间需要进行实时业务的同步传输。该公司要求运营商提供高可靠性的服务,以保证实时业务的不间断性。

为满足该用户需求,可通过在MPLS骨干网中部署LDP FRR服务来提供主备两条LSP链路,并配置LDP与SBFD联动技术提高主备链路的切换速度,具体实现如下:

·     正常情况下,使用主LSP链路转发PE 1和PE 2之间的流量。

·     使用SBFD对主链路进行监测,当主链路发生故障时,BFD能够快速感知并通告LDP协议,使得PE 1和PE 2之间的流量迅速切换到备LSP链路进行转发。

图2 BFD检测LSP配置组网图

4.2  适用产品及版本

表2 适用产品及版本

产品

软件版本

S6812系列

S6813系列

Release 6615Pxx系列、Release 6628Pxx系列

S6550XE-HI系列

Release 8106Pxx

S6525XE-HI系列

Release 8106Pxx

S5850系列

不支持

S5570S-EI系列

不支持

S5560X-EI系列

Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx

S5560X-HI系列

Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx

S5500V2-EI系列

Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx

MS4520V2-30F

Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4520V2-30C

MS4520V2-54C

Release 6615Pxx系列、Release 6628Pxx系列

MS4520V2-28S

MS4520V2-24TP

不支持

S6520X-HI系列

S6520X-EI系列

Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

S6520X-SI系列

S6520-SI系列

Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

ES5500系列

Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

MS4600系列

Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

S5000-EI系列

Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列

S5560S-EI系列

S5560S-SI系列

不支持

S5500V3-24P-SI

S5500V3-48P-SI

不支持

S5500V3-SI系列(除S5500V3-24P-SI、S5500V3-48P-SI)

不支持

S5170-EI系列

不支持

S5130S-HI系列

S5130S-EI[-R]系列

S5130S-SI系列

S5130S-LI系列

不支持

S5120V2-SI系列

S5120V2-LI系列

不支持

S5120V3-EI系列

不支持

S5120V3-36F-SI

S5120V3-28P-HPWR-SI

S5120V3-54P-PWR-SI

不支持

S5120V3-SI系列(除S5120V3-36F-SI、S5120V3-28P-HPWR-SI、S5120V3-54P-PWR-SI)

不支持

S5120V3-LI系列

不支持

S3600V3-EI系列

不支持

S3600V3-SI系列

不支持

S3100V3-EI系列

S3100V3-SI系列

不支持

S5110V2系列

不支持

S5110V2-SI系列

不支持

S5000V3-EI系列

S5000V5-EI系列

不支持

S5000E-X系列

S5000X-EI系列

不支持

E128C

E152C

E500C系列

E500D系列

不支持

MS4320V2系列

MS4320V3系列

MS4300V2系列

MS4320系列

MS4200系列

不支持

WS5850-WiNet系列

不支持

WS5820-WiNet系列

WS5810-WiNet系列

不支持

WAS6000系列

不支持

IE4300-12P-AC & IE4300-12P-PWR

IE4300-M系列

IE4320系列

不支持

IE4520系列

不支持

S5135S-EI系列

不支持

 

4.3  配置注意事项

进行本案例配置之前,需要先全局关闭STP功能,或为每个VLAN映射一个MSTP实例,否则可能会阻断环路中的一条链路。

4.4  配置步骤

(1)     配置各接口的IP地址

# 按照图2配置各接口的IP地址和掩码,包括LoopBack接口,下面以PE 1为例,其它设备配置方法类似,具体配置过程略。

<PE1> system-view

[PE1] vlan 10

[PE1-vlan10] port gigabitethernet 1/0/3

[PE1-vlan10] quit

[PE1] interface vlan-interface 10

[PE1-Vlan-interface10] ip address 192.168.10.1 24

[PE1] vlan 12

[PE1-vlan12] port gigabitethernet 1/0/1

[PE1-vlan12] quit

[PE1] interface vlan-interface 12

[PE1-Vlan-interface12] ip address 12.12.12.1 24

[PE1-Vlan-interface12] quit

[PE1] vlan 14

[PE1-vlan14] port gigabitethernet 1/0/2

[PE1-vlan14] quit

[PE1] interface vlan-interface 14

[PE1-Vlan-interface14] ip address 14.14.14.1 24

[PE1-Vlan-interface14] quit

[PE1] interface loopback 0

[PE1-LoopBack0] ip address 1.1.1.1 32

[PE1-LoopBack0] quit

(2)     在MPLS骨干网内配置OSPF,以保证各路由器之间路由可达,并使能OSPF快速重路由功能。

# 配置PE 1。

[PE1] ospf

[PE1-ospf-1] area 0

[PE1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0

[PE1-ospf-1-area-0.0.0.0] network 12.12.12.0 0.0.0.255

[PE1-ospf-1-area-0.0.0.0] network 14.14.14.0 0.0.0.255

[PE1-ospf-1-area-0.0.0.0] network 192.168.10.0 0.0.0.255

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

[PE1-ospf-1] fast-reroute lfa

[PE1-ospf-1] quit

# 配置P 1

[P1] ospf

[P1-ospf-1] area 0

[P1-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0

[P1-ospf-1-area-0.0.0.0] network 12.12.12.0 0.0.0.255

[P1-ospf-1-area-0.0.0.0] network 23.23.23.0 0.0.0.255

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

[P1-ospf-1] quit

# 配置PE 2。

[PE2] ospf

[PE2-ospf-1] area 0

[PE2-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0

[PE2-ospf-1-area-0.0.0.0] network 23.23.23.0 0.0.0.255

[PE2-ospf-1-area-0.0.0.0] network 34.34.34..0 0.0.0.255

[PE2-ospf-1-area-0.0.0.0] network 192.168.20.0 0.0.0.255

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

[PE2-ospf-1] fast-reroute lfa

[PE2-ospf-1] quit

# 配置P 2

[P2] ospf

[P2-ospf-1] area 0

[P2-ospf-1-area-0.0.0.0] network 4.4.4.4 0.0.0.0

[P2-ospf-1-area-0.0.0.0] network 14.14.14.0 0.0.0.255

[P2-ospf-1-area-0.0.0.0] network 34.34.34.0 0.0.0.255

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

[P2-ospf-1] quit

# 调整P 2上Vlan-interface14和Vlan-interface34的OSPF cost值,使备份LSP路径上的OSPF开销值大于主LSP路径。

[P2] interface vlan-interface 14

[P2-Vlan-interface14] ospf cost 10

[P2-Vlan-interface14] quit

[P2] interface vlan-interface 34

[P2-Vlan-interface34] ospf cost 10

[P2-Vlan-interface34] quit

(3)     配置MPLS基本能力,并使能LDP

# 配置PE 1。

[PE1] mpls lsr-id 1.1.1.1

[PE1] mpls ldp

[PE1-ldp] quit

[PE1] interface vlan-interface 12

[PE1-Vlan-interface12] mpls enable

[PE1-Vlan-interface12] mpls ldp enable

[PE1-Vlan-interface12] quit

[PE1] interface vlan-interface 14

[PE1-Vlan-interface14] mpls enable

[PE1-Vlan-interface14] mpls ldp enable

[PE1-Vlan-interface14] quit

# 配置P 1。

[P1] mpls lsr-id 2.2.2.2

[P1] mpls ldp

[P1-ldp] quit

[P1] interface vlan-interface 12

[P1-Vlan-interface12] mpls enable

[P1-Vlan-interface12] mpls ldp enable

[P1-Vlan-interface12] quit

[P1] interface vlan-interface 23

[P1-Vlan-interface23] mpls enable

[P1-Vlan-interface23] mpls ldp enable

[P1-Vlan-interface23] quit

# 配置PE 2。

[PE2] mpls lsr-id 3.3.3.3

[PE2] mpls ldp

[PE2-ldp] quit

[PE2] interface vlan-interface 23

[PE2-Vlan-interface23] mpls enable

[PE2-Vlan-interface23] mpls ldp enable

[PE2-Vlan-interface23] quit

[PE2] interface vlan-interface 34

[PE2-Vlan-interface34] mpls enable

[PE2-Vlan-interface34] mpls ldp enable

[PE2-Vlan-interface34] quit

# 配置P 2。

[P2] mpls lsr-id 4.4.4.4

[P2] mpls ldp

[P2-ldp] quit

[P2] interface vlan-interface 14

[P2-Vlan-interface14] mpls enable

[P2-Vlan-interface14] mpls ldp enable

[P2-Vlan-interface14] quit

[P2] interface vlan-interface 34

[P2-Vlan-interface34] mpls enable

[P2-Vlan-interface34] mpls ldp enable

[P2-Vlan-interface34] quit

完成上述配置后,在各设备上可以看到LDP会话的状态为operational,会话建立成功。以PE1为例:

[PE1] display mpls ldp peer

Total number of peers: 2

Peer LDP ID             State         Role     GR   MD5  KA Sent/Rcvd

2.2.2.2:0               Operational   Passive  Off  Off  55/55

4.4.4.4:0               Operational   Passive  Off  Off  6/6

(4)     配置LSP的触发策略,为目的地址为192.168.10.0/24、192.168.20.0/24、1.1.1.1/32和3.3.3.3/32的路由表项建立LSP

# 在PE 1上创建IP地址前缀列表PE1,并配置只有通过该列表过滤的路由表项能够触发LDP建立LSP

[PE1] ip prefix-list PE1 index 10 permit 192.168.10.0 24

[PE1] ip prefix-list PE1 index 20 permit 192.168.20.0 24

[PE1] ip prefix-list PE1 index 30 permit 1.1.1.1 32

[PE1] ip prefix-list PE1 index 40 permit 3.3.3.3 32

[PE1] mpls ldp

[PE1-ldp] lsp-trigger prefix-list PE1

[PE1-ldp] quit

# 在P 1上创建IP地址前缀列表P1,并配置只有通过该列表过滤的路由表项能够触发LDP建立LSP

[P1] ip prefix-list P1 index 10 permit 192.168.10.0 24

[P1] ip prefix-list P1 index 20 permit 192.168.20.0 24

[P1] ip prefix-list P1 index 30 permit 1.1.1.1 32

[P1] ip prefix-list P1 index 40 permit 3.3.3.3 32

[P1] mpls ldp

[P1-ldp] lsp-trigger prefix-list P1

[P1-ldp] quit

# 在PE 2上创建IP地址前缀列表PE 2,并配置只有通过该列表过滤的路由表项能够触发LDP建立LSP

[PE2] ip prefix-list PE2 index 10 permit 192.168.10.0 24

[PE2] ip prefix-list PE2 index 20 permit 192.168.20.0 24

[PE2] ip prefix-list PE2 index 30 permit 1.1.1.1 32

[PE2] ip prefix-list PE2 index 40 permit 3.3.3.3 32

[PE2] mpls ldp

[PE2-ldp] lsp-trigger prefix-list PE2

[PE2-ldp] quit

# 在P 2上创建IP地址前缀列表P2,并配置只有通过该列表过滤的路由表项能够触发LDP建立LSP

[P2] ip prefix-list P2 index 10 permit 192.168.10.0 24

[P2] ip prefix-list P2 index 20 permit 192.168.20.0 24

[P2] ip prefix-list P2 index 30 permit 1.1.1.1 32

[P2] ip prefix-list P2 index 40 permit 3.3.3.3 32

[P2] mpls ldp

[P2-ldp] lsp-trigger prefix-list P2

[P2-ldp] quit

# 配置完成后,在PE 1上执行display mpls ldp lsp命令,查看LDP LSP的建立情况,可以看到去往192.168.20.0/24网段的两条LSP已经建立完成,出接口为Vlan-interface12LSP为主LSP,出接口为Vlan-interface14LSP为备用LSP

[PE1] display mpls ldp lsp

Status Flags: * - stale, L - liberal, B - backup

Statistics:

  FECs: 4      Ingress LSPs: 4     Transit LSPs: 4     Egress LSPs: 2

 

FEC                In/Out Label        Nexthop         OutInterface

1.1.1.1/32         3/-

                   -/1151(L)

                   -/1279(L)

3.3.3.3/32         -/1150              12.12.12.2      Vlan12

                   1150/1150           12.12.12.2      Vlan12

                   -/1150(B)           12.12.12.2      Vlan14

                   1150/1150(B)        12.12.12.2      Vlan14

192.168.10.0/24    1141/-

                   -/1141(L)

                   -/1141(L)

192.168.20.0/24    -/1133              12.12.12.2      Vlan12

                   1133/1133           12.12.12.2      Vlan12

                   -/1133(B)           14.14.14.4      Vlan14

                   1133/1133(B)        14.14.14.4      Vlan14

(5)     使能MPLS与BFD联动功能,并配置通过SBFD检测LSP的连通性

# 配置PE 1。

[PE1] mpls bfd enable

[PE1] sbfd local-discriminator 3000000

[PE1] mpls sbfd 3.3.3.3 32 remote 2000000

# 配置PE 2。

[PE2] mpls bfd enable

[PE2] sbfd local-discriminator 2000000

[PE2] mpls sbfd 1.1.1.1 32 remote 3000000

4.5  验证配置

(1)     配置完成后,在设备PE 1和PE 2上执行display mpls sbfd命令,可以看到检测LSP的BFD会话的建立情况。以PE 1为例。

[PE1] display mpls sbfd

 Total number of sessions: 1, 1 up, 0 down, 0 init

 

 FEC Type: LSP

 FEC Info:

   Destination: 3.3.3.3

   Mask Length: 32

 NHLFE ID: 2

 Local Discr: 513                    Remote Discr: 2000000

 Source IP: 1.1.1.1                  Destination IP: 127.0.0.1

 Session State: Up

 Template Name: -

(2)     在PE 1上使用tracert mpls ipv4命令查看到当前所使用的路径是主LSP。(使用Tracert功能需要在中间设备上开启ICMP超时报文发送功能,在目的端开启ICMP目的不可达报文发送功能)

[PE1] tracert mpls -a 192.168.10.1 ipv4 192.168.20.0 24

MPLS trace route FEC 192.168.20.0/24

  TTL   Replier            Time    Type      Downstream

  0                                Ingress   12.12.12.2/[1148]

  1     12.12.12.2         2 ms    Transit   23.23.23.3/[1148]

  2     23.23.23.3         2 ms    Egress

(3)     在PE 1上持续ping PE 2,期间将P 1Vlan-interface23接口shutdown,查看通信是否中断。

# PE 1上持续ping PE 2

[PE1] ping -c 100000 -a 192.168.10.1 192.168.20.1

Ping 192.168.20.1 (192.168.20.1) from 192.168.10.1: 56 data bytes, press CTRL_C

to break

56 bytes from 192.168.20.1: icmp_seq=0 ttl=254 time=2.576 ms

56 bytes from 192.168.20.1: icmp_seq=1 ttl=254 time=1.996 ms

...

# 关闭P 1的Vlan-interface23接口。

[P1] interface vlan-interface 23

[P1-Vlan-interface23] shutdown

#在PE1上查看到通讯断开后迅速恢复。

[PE1] ping -c 100000 -a 192.168.10.1 192.168.20.1

Ping 192.168.20.1 (192.168.20.1) from 192.168.10.1: 56 data bytes, press CTRL_C

to break

56 bytes from 192.168.20.1: icmp_seq=0 ttl=254 time=2.576 ms

56 bytes from 192.168.20.1: icmp_seq=1 ttl=254 time=1.996 ms

...

56 bytes from 192.168.20.1: icmp_seq=7 ttl=254 time=2.214 ms

Request time out

56 bytes from 192.168.20.1: icmp_seq=9 ttl=254 time=2.659 ms

56 bytes from 192.168.20.1: icmp_seq=10 ttl=254 time=5.049 ms

56 bytes from 192.168.20.1: icmp_seq=11 ttl=254 time=2.098 ms

56 bytes from 192.168.20.1: icmp_seq=12 ttl=254 time=2.225 ms

56 bytes from 192.168.20.1: icmp_seq=13 ttl=254 time=2.187 ms

 

--- Ping statistics for 192.168.20.1 ---

14 packet(s) transmitted, 13 packet(s) received, 7.1% packet loss

round-trip min/avg/max/std-dev = 1.990/2.455/5.049/0.772 ms

(4)     查看链路是否发生切换。

# PE 1上使用tracert mpls ipv4命令查看到当前所使用的路径是备份LSP

[PE1] tracert mpls -a 192.168.10.1 ipv4 192.168.20.0 24

MPLS trace route FEC 192.168.20.0/24

  TTL   Replier            Time    Type      Downstream

  0                                Ingress   14.14.14.4/[1276]

  1     14.14.14.4         2 ms    Transit   34.34.34.3/[1148]

  2     34.34.34.3         2 ms    Egress

4.6  配置文件

·     PE 1

#

ospf 1

 fast-reroute lfa

 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

  network 192.168.10.0 0.0.0.255

#

 mpls lsr-id 1.1.1.1

#

vlan 10

#

vlan 12

#

vlan 14

#

mpls ldp

 lsp-trigger prefix-list PE1

#

 mpls bfd enable

#

interface LoopBack0

 ip address 1.1.1.1 255.255.255.255

#

interface Vlan-interface10

 ip address 192.168.10.1 255.255.255.0

#

interface Vlan-interface12

 ip address 12.12.12.1 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface Vlan-interface14

 ip address 14.14.14.1 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 12

#

interface GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 14

#

interface GigabitEthernet1/0/3

 port link-mode bridge

 port access vlan 10

#

 ip prefix-list PE1 index 10 permit 192.168.10.0 24

 ip prefix-list PE1 index 20 permit 192.168.20.0 24

 ip prefix-list PE1 index 30 permit 1.1.1.1 32

 ip prefix-list PE1 index 40 permit 3.3.3.3 32

#

 mpls sbfd 3.3.3.3 32 remote 2000000

#

·     PE 2

#

ospf 1

 fast-reroute lfa

 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

  network 192.168.20.0 0.0.0.255

#

vlan 23

#

vlan 30

#

vlan 34

#

 sbfd local-discriminator 2000000

#

 mpls lsr-id 3.3.3.3

#

mpls ldp

 lsp-trigger prefix-list PE2

#

 mpls bfd enable

#

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

 mpls enable

 mpls ldp enable

#

interface Vlan-interface30

 ip address 192.168.20.1 255.255.255.0

#

interface Vlan-interface34

 ip address 34.34.34.3 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 34

#

interface GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 23

#

interface GigabitEthernet1/0/3

 port link-mode bridge

 port access vlan 30

#

 ip prefix-list PE2 index 10 permit 192.168.10.0 24

 ip prefix-list PE2 index 20 permit 192.168.20.0 24

 ip prefix-list PE2 index 30 permit 1.1.1.1 32

 ip prefix-list PE2 index 40 permit 3.3.3.3 32

#

 mpls bfd 1.1.1.1 32

#

·     P 1

#

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 lsr-id 2.2.2.2

#

vlan 12

#

vlan 23

#

mpls ldp

 lsp-trigger prefix-list P1

#

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

 mpls enable

 mpls ldp enable

#

interface Vlan-interface23

 ip address 23.23.23.2 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 12

#

interface GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 23

#

 ip prefix-list P1 index 10 permit 192.168.10.0 24

 ip prefix-list P1 index 20 permit 192.168.20.0 24

 ip prefix-list P1 index 30 permit 1.1.1.1 32

 ip prefix-list P1 index 40 permit 3.3.3.3 32

#

·     P 2

#

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 lsr-id 4.4.4.4

#

vlan 14

#

vlan 34

#

mpls ldp

 lsp-trigger prefix-list P2

#

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 10

 mpls enable

 mpls ldp enable

#

interface Vlan-interface34

 ip address 34.34.34.4 255.255.255.0

 ospf cost 10

 mpls enable

 mpls ldp enable

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 34

#

interface GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 14

#

 ip prefix-list P2 index 10 permit 192.168.10.0 24

 ip prefix-list P2 index 20 permit 192.168.20.0 24

 ip prefix-list P2 index 30 permit 1.1.1.1 32

 ip prefix-list P2 index 40 permit 3.3.3.3 32

#

 

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

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

新华三官网
联系我们