玩转华为ENSP模拟器系列 | 配置动态VPWS接入VPLS示例
Posted COCOgsta
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了玩转华为ENSP模拟器系列 | 配置动态VPWS接入VPLS示例相关的知识,希望对你有一定的参考价值。
素材来源:华为路由器配置指南
一边学习一边整理试验笔记,并与大家分享,侵权即删,谢谢支持!
附上汇总贴:玩转华为ENSP模拟器系列 | 合集_COCOgsta的博客-CSDN博客_ensp实验大全
目标
如果UPE设备不支持VPLS,可以配置VPWS接入VPLS。
组网需求
如图1所示,UPE通过VPWS接入SPE,CE1和CE2通过UPE接入VPLS全连接网络。
配置思路
- 在SPE之间配置LDP方式VPLS。
- UPE、SPE配置MPLS L2VPN基本能力。
- 在SPE上配置VPWS和VSI,VSI使能MAC-withdraw功能。
- 在UPE上配置VPWS接入SPE。
操作步骤
- 配置IP地址
按照图1所示,配置各接口的IP地址和掩码,包括各Loopback接口。
- 配置IGP
在SPE和P设备上配置OSPF协议,发布网段及LSR ID主机路由
配置SPE1
ospf 1
area 0.0.0.0
network 1.1.1.9 0.0.0.0
network 10.10.1.0 0.0.0.255
network 10.10.3.0 0.0.0.255
配置P
ospf 1
area 0.0.0.0
network 2.2.2.9 0.0.0.0
network 10.10.1.0 0.0.0.255
network 10.10.2.0 0.0.0.255
配置SPE2
ospf 1
area 0.0.0.0
network 3.3.3.9 0.0.0.0
network 10.10.2.0 0.0.0.255
network 10.10.4.0 0.0.0.255
配置UPE1
ospf 1
area 0.0.0.0
network 4.4.4.9 0.0.0.0
network 10.10.3.0 0.0.0.255
配置UPE2
ospf 1
area 0.0.0.0
network 5.5.5.9 0.0.0.0
network 10.10.4.0 0.0.0.255
- 配置MPLS 基本能力和LDP
配置SPE1
mpls lsr-id 1.1.1.9
mpls
mpls ldp
interface Ethernet1/0/0
mpls
mpls ldp
interface Ethernet1/0/1
mpls
mpls ldp
配置P
mpls lsr-id 2.2.2.9
mpls
mpls ldp
interface Ethernet1/0/0
mpls
mpls ldp
interface Ethernet1/0/1
mpls
mpls ldp
配置SPE2
mpls lsr-id 3.3.3.9
mpls
mpls ldp
interface Ethernet1/0/0
mpls
mpls ldp
interface Ethernet1/0/1
mpls
mpls ldp
配置UPE1
mpls lsr-id 4.4.4.9
mpls
mpls ldp
interface Ethernet1/0/0
mpls
mpls ldp
配置UPE2
mpls lsr-id 5.5.5.9
mpls
mpls ldp
interface Ethernet1/0/0
mpls
mpls ldp
配置完成后,在SPE1、P和SPE2上执行display mpls ldp session命令可以看到SPE1和P之间或SPE2和P之间的对等体Status项为“Operational”,即对等体关系已建立。执行display mpls lsp命令可以看到LSP的建立情况。
以SPE1的显示为例。
[~SPE1-Ethernet1/0/1]dis mpls ldp session
LDP Session(s) in Public Network
Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
An asterisk (*) before a session means the session is being deleted.
--------------------------------------------------------------------------
PeerID Status LAM SsnRole SsnAge KASent/Rcv
--------------------------------------------------------------------------
2.2.2.9:0 Operational DU Passive 0000:00:11 46/46
4.4.4.9:0 Operational DU Passive 0000:00:05 22/22
--------------------------------------------------------------------------
TOTAL: 2 Session(s) Found.
[~SPE1-Ethernet1/0/1]dis mpls lsp
Flag after Out IF: (I) - RLFA Iterated LSP, (I*) - Normal and RLFA Iterated LSP
Flag after LDP FRR: (L) - Logic FRR LSP
-------------------------------------------------------------------------------
LSP Information: LDP LSP
-------------------------------------------------------------------------------
FEC In/Out Label In/Out IF Vrf Name
1.1.1.9/32 3/NULL -/-
2.2.2.9/32 NULL/3 -/Eth1/0/1
2.2.2.9/32 48120/3 -/Eth1/0/1
3.3.3.9/32 NULL/48121 -/Eth1/0/1
3.3.3.9/32 48121/48121 -/Eth1/0/1
4.4.4.9/32 NULL/3 -/Eth1/0/0
4.4.4.9/32 48122/3 -/Eth1/0/0
5.5.5.9/32 NULL/48123 -/Eth1/0/1
5.5.5.9/32 48123/48123 -/Eth1/0/1
[~SPE1-Ethernet1/0/1]
- 在SPE之间建立远端LDP会话
配置SPE1
mpls ldp remote-peer 3.3.3.9
remote-ip 3.3.3.9
配置SPE2
mpls ldp remote-peer 1.1.1.9
remote-ip 1.1.1.9
配置完成后,在SPE1和SPE2上执行display mpls ldp session命令可以看到SPE1和SPE2之间的对等体Status项为“Operational”,即对等体关系已建立。
以SPE1的显示为例。
[~SPE1]dis mpls ldp session
LDP Session(s) in Public Network
Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
An asterisk (*) before a session means the session is being deleted.
--------------------------------------------------------------------------
PeerID Status LAM SsnRole SsnAge KASent/Rcv
--------------------------------------------------------------------------
2.2.2.9:0 Operational DU Passive 0000:00:00 4/4
3.3.3.9:0 Operational DU Passive 0000:00:00 3/3
4.4.4.9:0 Operational DU Passive 0000:00:02 13/13
--------------------------------------------------------------------------
TOTAL: 3 Session(s) Found.
[~SPE1]
- 使能UPE的MPLS L2VPN功能,配置UPE通过VPWS接入SPE
配置UPE1
mpls l2vpn
interface Ethernet1/0/1.1
vlan-type dot1q 1
mpls l2vc 1.1.1.9 100
配置UPE2
mpls l2vpn
interface Ethernet1/0/1.1
vlan-type dot1q 1
mpls l2vc 3.3.3.9 100
- 使能SPE的MPLS L2VPN功能,并绑定VSI
配置SPE1
mpls l2vpn
vsi v100
pwsignal ldp
vsi-id 100
mac-withdraw enable
peer 3.3.3.9
peer 4.4.4.9 upe
配置SPE2
mpls l2vpn
vsi v100
pwsignal ldp
vsi-id 100
mac-withdraw enable
peer 1.1.1.9
peer 5.5.5.9 upe
检验配置结果
完成上述配置后,在UPE上执行display mpls l2vc命令,可以看到PW已经建立,VC的状态为UP。以UPE1的显示为例。
[~UPE1-Ethernet1/0/1.1]dis mpls l2vc interface ethe 1/0/1.1
*client interface : Ethernet1/0/1.1 is up
Administrator PW : no
session state : up
AC status : up
Ignore AC state : disable
VC state : up
Label state : 0
Token state : 0
VC ID : 100
VC type : VLAN
destination : 1.1.1.9
local group ID : 0 remote group ID : 0
local VC label : 48124 remote VC label : 48125
local AC OAM State : up
local PSN OAM State : up
local forwarding state : forwarding
local status code : 0x0 (forwarding)
remote AC OAM state : up
remote PSN OAM state : up
remote forwarding state: forwarding
remote status code : 0x0 (forwarding)
ignore standby state : no
BFD for PW : unavailable
VCCV State : up
manual fault : not set
active state : active
forwarding entry : exist
OAM Protocol : --
OAM Status : --
OAM Fault Type : --
PW APS ID : --
PW APS Status : --
TTL Value : 1
link state : up
local VC MTU : 1500 remote VC MTU : 1500
local VCCV : alert ttl lsp-ping bfd
remote VCCV : alert lsp-ping bfd
local control word : disable remote control word : disable
tunnel policy name : --
PW template name : --
primary or secondary : primary
load balance type : flow
Access-port : false
Switchover Flag : false
VC tunnel info : 1 tunnels
NO.0 TNL type : ldp , TNL ID : 0x0000000001004c4b42
create time : 0 days, 0 hours, 4 minutes, 32 seconds
up time : 0 days, 0 hours, 2 minutes, 1 seconds
last change time : 0 days, 0 hours, 2 minutes, 1 seconds
VC last up time : 2021/01/17 10:43:57
VC total up time : 0 days, 0 hours, 2 minutes, 1 seconds
CKey : 1
NKey : 16777342
PW redundancy mode : frr
AdminPw interface : --
AdminPw link state : --
Forward state : send active, receive active
Diffserv Mode : uniform
Service Class : --
Color : --
DomainId : --
Domain Name : --
[~UPE1-Ethernet1/0/1.1]
在SPE上执行display vsi name v100 verbose命令,可以看到名字为v100的VSI的状态为UP;对应的PW状态也为UP。以SPE1的显示为例。
[~SPE1-vsi-v100]dis vsi name v100 verbose
***VSI Name : v100
Work Mode : normal
Administrator VSI : no
Isolate Spoken : disable
VSI Index : 1
PW Signaling : ldp
Member Discovery Style : --
Bridge-domain Mode : disable
PW MAC Learn Style : unqualify
Encapsulation Type : vlan
MTU : 1500
Diffserv Mode : uniform
Service Class : --
Color : --
DomainId : 255
Domain Name :
Ignore AcState : disable
P2P VSI : disable
Multicast Fast Switch : disable
Create Time : 0 days, 0 hours, 2 minutes, 36 seconds
VSI State : up
Resource Status : --
VSI ID : 100
LDP MAC-WITHDRAW : mac-withdraw Enable
*Peer Router ID : 3.3.3.9
Negotiation-vc-id : 100
Encapsulation Type : vlan
primary or secondary : primary
ignore-standby-state : no
VC Label : 48124
Peer Type : dynamic
Session : up
Tunnel ID : 0x0000000001004c4b44
Broadcast Tunnel ID : --
Broad BackupTunnel ID : --
CKey : 1
NKey : 16777374
Stp Enable : 0
PwIndex : 1
Control Word : disable
BFD for PW : unavailable
*Peer Router ID : 4.4.4.9
Negotiation-vc-id : 100
Encapsulation Type : vlan
primary or secondary : primary
ignore-standby-state : no
VC Label : 48125
Peer Type : dynamic
Session : up
Tunnel ID : 0x0000000001004c4b42
Broadcast Tunnel ID : --
Broad BackupTunnel ID : --
CKey : 2
NKey : 16777375
Stp Enable : 0
PwIndex : 2
Control Word : disable
BFD for PW : unavailable
**PW Information:
*Peer Ip Address : 3.3.3.9
PW State : up
Local VC Label : 48124
Remote VC Label : 48124
Remote Control Word : disable
PW Type : label
Local VCCV : alert lsp-ping bfd
Remote VCCV : alert lsp-ping bfd
Tunnel ID : 0x0000000001004c4b44
Broadcast Tunnel ID : --
Broad BackupTunnel ID : --
Ckey : 1
Nkey : 16777374
Main PW Token : 0x0
Slave PW Token : 0x0
Tnl Type : ldp
OutInterface : --
Backup OutInterface : --
Stp Enable : 0
Mac Flapping : 0
Monitor Group Name : --
PW Last Up Time : 2021/01/17 10:44:42
PW Total Up Time : 0 days, 0 hours, 1 minutes, 51 seconds
*Peer Ip Address : 4.4.4.9
PW State : up
Local VC Label : 48125
Remote VC Label : 48124
Remote Control Word : disable
PW Type : MEHVPLS
Local VCCV : alert lsp-ping bfd
Remote VCCV : alert ttl lsp-ping bfd
Tunnel ID : 0x0000000001004c4b42
Broadcast Tunnel ID : --
Broad BackupTunnel ID : --
Ckey : 2
Nkey : 16777375
Main PW Token : 0x0
Slave PW Token : 0x0
Tnl Type : ldp
OutInterface : --
Backup OutInterface : --
Stp Enable : 0
Mac Flapping : 0
Monitor Group Name : --
PW Last Up Time : 2021/01/17 10:43:57
PW Total Up Time : 0 days, 0 hours, 2 minutes, 36 seconds
[~SPE1-vsi-v100]
处于同一网段下的CE1和CE2之间应能相互ping通。把UPE或PE上绑定该VSI的接口GE0/2/0.1执行shutdown命令后,CE1与CE2之间不能互相ping通,说明业务数据通过该VSI的PW传输。
SPE1的GE0/2/0接口shutdown之前,在SPE2上查看VSI学习到的MAC表
[~SPE2-vsi-v100]dis mac-address dynamic
MAC address table of slot 0:
-------------------------------------------------------------------------------
MAC Address VLAN/BD/ PEVLAN CEVLAN Port/Peerip Type LSP/LSR-ID
VSI/SI/EVPN MAC-Tunnel
-------------------------------------------------------------------------------
5489-98ee-7a9e v100 - - Eth1/0/0 dynamic 0/65
5489-98cf-6062 v100 - - Eth1/0/1 dynamic 0/64
-------------------------------------------------------------------------------
Total matching items on slot 0 displayed = 2
MAC address table of slot 1:
-------------------------------------------------------------------------------
MAC Address VLAN/BD/ PEVLAN CEVLAN Port/Peerip Type LSP/LSR-ID
VSI/SI/EVPN MAC-Tunnel
-------------------------------------------------------------------------------
5489-98ee-7a9e v100 - - Eth1/0/0 dynamic 1/65
5489-98cf-6062 v100 - - Eth1/0/1 dynamic 1/64
-------------------------------------------------------------------------------
Total matching items on slot 1 displayed = 2
[~SPE2-vsi-v100]
[~SPE2-vsi-v100]
SPE1的Ethernet1/0/0接口shutdown之后,使VSI变为Down状态,在SPE2上查看VSI学习到的MAC表,发现来自接口GE0/2/0的MAC地址已经被删除
[~SPE2-vsi-v100]dis mac-address dynamic
[~SPE2-vsi-v100]
- 使能UPE与SPE之前的BFD for PW,使能BFD前需要修改伪线携带control-word
配置UPE
bfd
interface Ethernet1/0/1.1
mpls l2vc 1.1.1.9 100 control-word
mpls l2vpn pw bfd
配置SPE1
bfd
vsi v100
pwsignal ldp
peer 4.4.4.9 pw 4
control-word enable
bfd-detect
- 检查BFD状态
UPE上查看BFD for PW状态
[~UPE1-Ethernet1/0/1.1]dis bfd session all verbose
(w): State in WTR
(*): State is invalid
--------------------------------------------------------------------------------
State : Up Name : dyn_16385
--------------------------------------------------------------------------------
Local Discriminator : 16385 Remote Discriminator : 16385
Session Detect Mode : Asynchronous Mode Without Echo Function
BFD Bind Type : PW(Master)
Bind Session Type : Dynamic
Bind Peer IP Address : -.-.-.-
NextHop Ip Address : -.-.-.-
Bind Interface : Ethernet1/0/1.1
PW TTL Mode : - PW TTL : -
Node : UPE
Encapsulation Type : - Vc Id : -
Track Interface : -
Local Vc Label : 48124 Remote Vc Label : 48125
Swap Vc Label : -
FSM Board Id : 1 TOS-EXP : 7
Min Tx Interval (ms) : 10 Min Rx Interval (ms) : 10
Actual Tx Interval (ms): 10 Actual Rx Interval (ms): 10
Local Detect Multi : 3 Detect Interval (ms) : 30
Echo Passive : Disable Acl Number : -
Destination Port : 3784 TTL : 1
Proc Interface Status : Disable Process PST : Enable
WTR Interval (ms) : - Config PST : Disable
Active Multi : 3
Last Local Diagnostic : No Diagnostic
Bind Application : L2VPN
Session TX TmrID : - Session Detect TmrID : -
Session Init TmrID : - Session WTR TmrID : -
Session Echo Tx TmrID : -
Session Description : -
--------------------------------------------------------------------------------
Total UP/DOWN Session Number : 1/0
[~UPE1-Ethernet1/0/1.1]
[~UPE1-Ethernet1/0/1.1]
SPE上查看BFD for PW状态
[~SPE1-vsi-v100] dis bfd session all verbose
(w): State in WTR
(*): State is invalid
--------------------------------------------------------------------------------
State : Up Name : dyn_16385
--------------------------------------------------------------------------------
Local Discriminator : 16385 Remote Discriminator : 16385
Session Detect Mode : Asynchronous Mode Without Echo Function
BFD Bind Type : VSI_PW
Bind Session Type : Dynamic
Bind Peer IP Address : 4.4.4.9
NextHop Ip Address : -.-.-.-
Bind Interface : -
LSP Token : -
Vsi Name : v100
Vsi Pw Peer Ip Address : 4.4.4.9
Vc Id : 100
PW TTL Mode : - PW TTL : -
Remote Peer : 4.4.4.9
FSM Board Id : 1 TOS-EXP : 7
Min Tx Interval (ms) : 10 Min Rx Interval (ms) : 10
Actual Tx Interval (ms): 10 Actual Rx Interval (ms): 10
Local Detect Multi : 3 Detect Interval (ms) : 30
Echo Passive : Disable Acl Number : -
Destination Port : 3784 TTL : 255
Proc Interface Status : Disable Process PST : Enable
WTR Interval (ms) : - Config PST : Disable
Active Multi : 3
Last Local Diagnostic : No Diagnostic
Bind Application : L2VPN
Session TX TmrID : - Session Detect TmrID : -
Session Init TmrID : - Session WTR TmrID : -
Session Echo Tx TmrID : -
Session Description : -
--------------------------------------------------------------------------------
Total UP/DOWN Session Number : 1/0
[~SPE1-vsi-v100]
以上是关于玩转华为ENSP模拟器系列 | 配置动态VPWS接入VPLS示例的主要内容,如果未能解决你的问题,请参考以下文章
玩转华为ENSP模拟器系列 | 配置单段动态VPWS示例 - 使用LSP隧道
玩转华为ENSP模拟器系列 | 配置VPWS主备伪线特性示例
玩转华为ENSP模拟器系列 | 配置静态BFD检测VPWS PW示例
玩转华为ENSP模拟器系列 | 配置动态BFD检测LDP LSP示例