HuaWei ❀ 配置静态BFD检测静态LSP
程序员文章站
2022-06-21 18:52:41
...
配置静态BFD检测静态LSP
如下图所示,PE1和PE2之间有两条静态LSP,LSP 1通过P1,LSP 2通过P2,接口感知故障,花费时间较长,要求对静态LSP 1进行连通性检测,当静态LSP 1出现故障时,PE 1能够在500ms之内收到通告,转换为LSP 2;
配置接口IP地址:
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip address 12.1.1.1 24
配置OSPF协议:
[r1]ospf 100
[r1-ospf-100]area 0
[r1-ospf-100-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[r1-ospf-100-area-0.0.0.0]network 12.1.1.0 0.0.0.255
[r1-ospf-100-area-0.0.0.0]network 14.1.1.0 0.0.0.255
配置节点使用MPLS功能:
[r1]mpls lsr-id 1.1.1.1
[r1]mpls
配置接口使用MPLS功能:
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]mpls
[r1]int g0/0/1
[r1-GigabitEthernet0/0/1]mpls
配置静态LSP 1与LSP 2:
[r1]static-lsp ingress lsp1 destination 3.3.3.3 32 nexthop 12.1.1.2 out-label 20
[r2]static-lsp transit lsp1 incoming-interface g0/0/0 in-label 20 nexthop 23.1.1.2 out-label 40
[r3]static-lsp egress lsp1 incoming-interface g0/0/1 in-label 40
[r1]static-lsp ingress lsp2 destination 3.3.3.3 32 nexthop 14.1.1.2 out-label 30
[r4]static-lsp transit lsp2 incoming-interface g0/0/1 in-label 30 nexthop 34.1.1.1 out-label 60
[r3]static-lsp egress lsp2 incoming-interface g0/0/0 in-label 60
配置BFD检测静态LSP 1:
[r1]bfd
[r1-bfd]quit
[r1]bfd peltope2 bind static-lsp lsp1
[r1-bfd-lsp-session-peltope2]discriminator local 1
[r1-bfd-lsp-session-peltope2]discriminator remote 2
[r1-bfd-lsp-session-peltope2]min-rx-interval 100
[r1-bfd-lsp-session-peltope2]min-tx-interval 100
[r1-bfd-lsp-session-peltope2]process-pst
[r1-bfd-lsp-session-peltope2]commit
[r3]bfd
[r3-bfd]quit
[r3]bfd pe2tope1 bind peer-ip 1.1.1.1
[r3-bfd-session-pe2tope1]discriminator local 2
[r3-bfd-session-pe2tope1]discriminator remote 1
[r3-bfd-session-pe2tope1]min-rx-interval 100
[r3-bfd-session-pe2tope1]min-tx-interval 100
[r3-bfd-session-pe2tope1]commit
查看配置结果:
[r1]display bfd session all verbose
--------------------------------------------------------------------------------
Session MIndex : 512 State : Up Name : peltope2
--------------------------------------------------------------------------------
Local Discriminator : 1 Remote Discriminator : 2
Session Detect Mode : Asynchronous Mode Without Echo Function
BFD Bind Type : STATIC_LSP
Bind Session Type : Static
Bind Peer IP Address : 3.3.3.3
NextHop Ip Address : 12.1.1.2
Bind Interface : -
Static LSP name : lsp1 LSP Token : 0x1
FSM Board Id : 0 TOS-EXP : 7
Min Tx Interval (ms) : 100 Min Rx Interval (ms) : 100
Actual Tx Interval (ms): 100 Actual Rx Interval (ms): 100
Local Detect Multi : 3 Detect Interval (ms) : 300
Echo Passive : Disable Acl Number : -
Destination Port : 3784 TTL : 1
Proc Interface Status : Disable Process PST : Enable
WTR Interval (ms) : -
Active Multi : 3
Last Local Diagnostic : No Diagnostic
Bind Application : LSPM | L2VPN | OAM_MANAGER
Session TX TmrID : - Session Detect TmrID : -
Session Init TmrID : - Session WTR TmrID : -
Session Echo Tx TmrID : -
PDT Index : FSM-0 | RCV-0 | IF-0 | TOKEN-1
Session Description : -
--------------------------------------------------------------------------------
Total UP/DOWN Session Number : 1/0
验证BFD会话检测LSP 1的配置结果:
[r2]int g0/0/1
[r2-GigabitEthernet0/0/1]shutdown
[r1]
Jun 18 2020 13:24:10-08:00 r1 %%01BFD/4/STACHG_TODWN(l)[13]:BFD session changed to Down. (SlotNumber=0, Discriminator=16777216, Diagnostic=DetectDown, Applications=LSPM | L2VPN | OAM_MANAGER, ProcessPST=True, BindInterfaceName=None, InterfacePhysicalState=None, InterfaceProtocolState=None)