配置跨域Martini VPLS示例-OptionA
组网需求
如图6-41,某企业机构,分支Site1使用CE1连接PE1接入AS100的VPLS域,分支Site2使用CE2连接PE2接入AS200的VPLS域,分支Site网络环境稳定。AS100与AS200分别通过ASBR_PE1和ASBR_PE2设备进行互通,一个AS内部的MPLS骨干网使用IS-IS作为IGP。现在Site1和Site2的用户需要进行二层业务的互通,同时要求在穿越骨干网时保留二层报文中用户信息。
配置思路
采用如下的思路配置跨域Martini VPLS(OptionA)的基本功能:
为实现Site1和Site2的二层业务互通,同时在穿越骨干网时保留二层报文的用户信息,故需要使用VPLS技术在骨干网透传二层报文。
由于企业分支Site网络环境稳定,故选择Martini方式的VPLS,实现各CE设备二层网络的互通。
为实现PE间数据的公网传输,需要在骨干网上配置IGP路由协议实现同一个AS域内的各设备互通。
VPLS实现依靠MPLS基本功能,故需要在骨干网上的PE设备配置MPLS基本功能和LDP。
为使在同一AS域内PE间传输的数据不被公网感知,需要在PE间建立传输数据所使用的隧道(同一AS域内的PE与ASBR_PE之间建立动态LSP隧道;如果PE与ASBR_PE非直连,则建立LDP远程会话)。
为实现VPLS功能,需要在PE上使能MPLS L2VPN。
为实现Martini方式VPLS,需要在同一AS域内的PE上创建VSI,指定信令为LDP,然后将VSI与AC接口绑定。
为实现VPLS的OptionA跨域功能,需要在ASBR_PE设备上将对端ASBR看作自己的CE,将VSI与对端接口绑定。
操作步骤
- 配置接口所属的VLAN
在各Switch上配置各接口所属的VLAN以及相关接口IP地址。
# 配置CE1。PE1、PE2、ASBR_PE1、ASBR_PE2和CE2的配置与CE1类似,不再赘述。
<HUAWEI> system-view [HUAWEI] sysname CE1 [CE1] vlan 10 [CE1-vlan10] quit [CE1] interface vlanif 10 [CE1-Vlanif10] ip address 10.1.1.1 255.255.255.0 [CE1-Vlanif10] quit [CE1] interface gigabitethernet 1/0/0 [CE1-GigabitEthernet1/0/0] port link-type trunk [CE1-GigabitEthernet1/0/0] port trunk allow-pass vlan 10 [CE1-GigabitEthernet1/0/0] quit
避免将PE上AC侧和PW侧的物理接口加入相同的VLAN中,否则可能引起环路。
- 配置骨干网的IGP
在MPLS骨干网上配置IGP协议,实现骨干网PE和ASBR_PE的互通。本例采用IS-IS,注意Loopback1上也要使能IS-IS。
在PE1和ASBR_PE1以及PE2和ASBR_PE2上配置IS-IS。
# 配置PE1。ASBR_PE1、ASBR_PE2和PE2的配置与PE1类似,不再赘述。
[PE1] isis 1 [PE1-isis-1] network-entity 10.0000.0000.0001.00 [PE1-isis-1] quit [PE1] interface loopback 1 [PE1-LoopBack1] ip address 1.1.1.1 255.255.255.255 [PE1-LoopBack1] isis enable 1 [PE1-LoopBack1] quit [PE1] interface vlanif 20 [PE1-Vlanif20] isis enable 1 [PE1-Vlanif20] quit
配置完成后,ASBR_PE与本AS的PE之间应能建立IS-IS邻居,执行display isis peer命令可以看到邻居达到Up状态。
以PE1的显示为例:
[PE1] display isis peer Peer information for ISIS(1) System Id Interface Circuit Id State HoldTime Type PRI ------------------------------------------------------------------------------- 0000.0000.0002 Vlanif20 0000.0000.0001.01 Up 27s L1(L1L2) 64 0000.0000.0002 Vlanif20 0000.0000.0001.01 Up 27s L2(L1L2) 64 Total Peer(s): 2
ASBR_PE与本AS内的PE之间应能互相Ping通。
以PE1的显示为例:
[PE1] ping 2.2.2.2 PING 2.2.2.2: 56 data bytes, press CTRL_C to break Reply from 2.2.2.2: bytes=56 Sequence=1 ttl=255 time=180 ms Reply from 2.2.2.2: bytes=56 Sequence=2 ttl=255 time=90 ms Reply from 2.2.2.2: bytes=56 Sequence=3 ttl=255 time=60 ms Reply from 2.2.2.2: bytes=56 Sequence=4 ttl=255 time=60 ms Reply from 2.2.2.2: bytes=56 Sequence=5 ttl=255 time=100 ms --- 2.2.2.2 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 60/98/180 ms
- 配置MPLS基本能力和LDP
在MPLS骨干网上配置MPLS基本能力。同一AS域内的PE与ASBR_PE之间建立动态LDP LSP。
在PE1和ASBR_PE1以及PE2和ASBR_PE2上配置MPLS基本能力和LDP。
# 配置PE1。ASBR_PE1、ASBR_PE2和PE2的配置与PE1类似,不再赘述。
[PE1] mpls lsr-id 1.1.1.1 [PE1] mpls [PE1-mpls] quit [PE1] mpls ldp [PE1-mpls-ldp] quit [PE1] interface vlanif 20 [PE1-Vlanif20] mpls [PE1-Vlanif20] mpls ldp [PE1-Vlanif20] quit
使用display mpls ldp session命令查询LDP会话建立情况。
以ASBR_PE1为例:
[ASBR_PE1] display mpls ldp session LDP Session(s) in Public Network Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM) A '*' before a session means the session is being deleted. ------------------------------------------------------------------------------ PeerID Status LAM SsnRole SsnAge KASent/Rcv ------------------------------------------------------------------------------ 1.1.1.1:0 Operational DU Active 0000:00:08 34/34 ------------------------------------------------------------------------------ TOTAL: 1 session(s) Found.
- 在PE上使能MPLS L2VPN
# 配置PE1。
[PE1] mpls l2vpn [PE1-l2vpn] quit
# 配置PE2。
[PE2] mpls l2vpn [PE2-l2vpn] quit
# 配置ASBR_PE1。
[ASBR_PE1] mpls l2vpn [ASBR_PE1-l2vpn] quit
# 配置ASBR_PE2。
[ASBR_PE2] mpls l2vpn [ASBR_PE2-l2vpn] quit
- 配置LDP方式VPLS,并将VSI与接口绑定
在PE和ASBR_PE上配置VSI,并将VSI与接口绑定。
# 配置PE1。
[PE1] vsi a1 static [PE1-vsi-a1] pwsignal ldp [PE1-vsi-a1-ldp] vsi-id 2 [PE1-vsi-a1-ldp] peer 2.2.2.2 [PE1-vsi-a1-ldp] quit [PE1-vsi-a1] quit [PE1] interface vlanif 10 [PE1-Vlanif10] l2 binding vsi a1 [PE1-Vlanif10] quit
# 配置ASBR_PE1。
[ASBR_PE1] vsi a1 static [ASBR_PE1-vsi-a1] pwsignal ldp [ASBR_PE1-vsi-a1-ldp] vsi-id 2 [ASBR_PE1-vsi-a1-ldp] peer 1.1.1.1 [ASBR_PE1-vsi-a1-ldp] quit [ASBR_PE1-vsi-a1] quit [ASBR_PE1] interface vlanif 30 [ASBR_PE1-Vlanif30] l2 binding vsi a1 [ASBR_PE1-Vlanif30] quit
# 配置ASBR_PE2。
[ASBR_PE2] vsi a1 static [ASBR_PE2-vsi-a1] pwsignal ldp [ASBR_PE2-vsi-a1-ldp] vsi-id 3 [ASBR_PE2-vsi-a1-ldp] peer 4.4.4.4 [ASBR_PE2-vsi-a1-ldp] quit [ASBR_PE2-vsi-a1] quit [ASBR_PE2] interface vlanif 30 [ASBR_PE2-Vlanif30] l2 binding vsi a1 [ASBR_PE2-Vlanif30] quit
# 配置PE2。
[PE2] vsi a1 static [PE2-vsi-a1] pwsignal ldp [PE2-vsi-a1-ldp] vsi-id 3 [PE2-vsi-a1-ldp] peer 3.3.3.3 [PE2-vsi-a1-ldp] quit [PE2-vsi-a1] quit [PE2] interface vlanif 50 [PE2-Vlanif50] l2 binding vsi a1 [PE2-Vlanif50] quit
- 验证配置结果
完成上述配置后,在PE1上执行display vsi name verbose命令,可以看到名字为a1的VSI建立了一条PW到PE2,VSI状态为Up。
[PE1] display vsi name a1 verbose ***VSI Name : a1 Administrator VSI : no Isolate Spoken : disable VSI Index : 0 PW Signaling : ldp Member Discovery Style : static PW MAC Learn Style : unqualify Encapsulation Type : vlan MTU : 1500 Diffserv Mode : uniform Mpls Exp : -- DomainId : 255 Domain Name : Ignore AcState : disable P2P VSI : disable Create Time : 0 days, 3 hours, 30 minutes, 31 seconds VSI State : up VSI ID : 2 *Peer Router ID : 2.2.2.2 Negotiation-vc-id : 2 primary or secondary : primary ignore-standby-state : no VC Label : 23552 Peer Type : dynamic Session : up Tunnel ID : 0x20020 Broadcast Tunnel ID : 0x20020 Broad BackupTunnel ID : 0x0 CKey : 6 NKey : 5 Stp Enable : 0 PwIndex : 0 Control Word : disable Interface Name : Vlanif10 State : up Access Port : false Last Up Time : 2009-08-15 15:41:59 Total Up Time : 0 days, 0 hours, 1 minutes, 2 seconds **PW Information: *Peer Ip Address : 2.2.2.2 PW State : up Local VC Label : 23552 Remote VC Label : 23552 Remote Control Word : disable PW Type : label Local VCCV : alert lsp-ping bfd Remote VCCV : alert lsp-ping bfd Tunnel ID : 0x20020 Broadcast Tunnel ID : 0x20020 Broad BackupTunnel ID : 0x0 Ckey : 0x6 Nkey : 0x5 Main PW Token : 0x20020 Slave PW Token : 0x0 Tnl Type : LSP OutInterface : Vlanif20 Backup OutInterface : Stp Enable : 0 PW Last Up Time : 2009-08-15 15:41:59 PW Total Up Time : 0 days, 0 hours, 1 minutes, 3 seconds
CE1和CE2能够相互Ping通。
以CE1的显示为例:
[CE1] ping 10.1.1.2 PING 10.1.1.2: 56 data bytes, press CTRL_C to break Reply from 10.1.1.2: bytes=56 Sequence=1 ttl=255 time=172 ms Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=255 time=156 ms Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=255 time=156 ms Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=255 time=156 ms Reply from 10.1.1.2: bytes=56 Sequence=5 ttl=255 time=156 ms --- 10.1.1.2 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 156/159/172 ms
配置文件
CE1的配置文件
# sysname CE1 # vlan batch 10 # interface Vlanif10 ip address 10.1.1.1 255.255.255.0 # interface GigabitEthernet1/0/0 port link-type trunk port trunk allow-pass vlan 10 # return
PE1的配置文件
# sysname PE1 # vlan batch 10 20 # mpls lsr-id 1.1.1.1 mpls # mpls l2vpn # vsi a1 static pwsignal ldp vsi-id 2 peer 2.2.2.2 # mpls ldp # isis 1 network-entity 10.0000.0000.0001.00 # interface Vlanif10 l2 binding vsi a1 # interface Vlanif20 ip address 100.1.1.1 255.255.255.0 isis enable 1 mpls mpls ldp # interface GigabitEthernet1/0/0 port link-type trunk port trunk allow-pass vlan 10 # interface GigabitEthernet2/0/0 port link-type trunk port trunk allow-pass vlan 20 # interface LoopBack1 ip address 1.1.1.1 255.255.255.255 isis enable 1 # return
ASBR_PE1的配置文件
# sysname ASBR_PE1 # vlan batch 20 30 # mpls lsr-id 2.2.2.2 mpls # mpls l2vpn # vsi a1 static pwsignal ldp vsi-id 2 peer 1.1.1.1 # mpls ldp # isis 1 network-entity 10.0000.0000.0002.00 # interface Vlanif20 ip address 100.1.1.2 255.255.255.0 isis enable 1 mpls mpls ldp # interface Vlanif30 l2 binding vsi a1 # interface GigabitEthernet1/0/0 port link-type trunk port trunk allow-pass vlan 20 # interface GigabitEthernet2/0/0 port link-type trunk port trunk allow-pass vlan 30 # interface LoopBack1 ip address 2.2.2.2 255.255.255.255 isis enable 1 # return
ASBR_PE2的配置文件
# sysname ASBR_PE2 # vlan batch 30 40 # mpls lsr-id 3.3.3.3 mpls # mpls l2vpn # vsi a1 static pwsignal ldp vsi-id 3 peer 4.4.4.4 # mpls ldp # isis 1 network-entity 10.0000.0000.0003.00 # interface Vlanif30 l2 binding vsi a1 # interface Vlanif40 ip address 100.3.1.1 255.255.255.0 isis enable 1 mpls mpls ldp # interface GigabitEthernet1/0/0 port link-type trunk port trunk allow-pass vlan 30 # interface GigabitEthernet2/0/0 port link-type trunk port trunk allow-pass vlan 40 # interface LoopBack1 ip address 3.3.3.3 255.255.255.255 isis enable 1 # return
PE2的配置文件
# sysname PE2 # vlan batch 40 50 # mpls lsr-id 4.4.4.4 mpls # mpls l2vpn # vsi a1 static pwsignal ldp vsi-id 3 peer 3.3.3.3 # mpls ldp # isis 1 network-entity 10.0000.0000.0004.00 # interface Vlanif40 ip address 100.3.1.2 255.255.255.0 isis enable 1 mpls mpls ldp # interface Vlanif50 l2 binding vsi a1 # interface GigabitEthernet1/0/0 port link-type trunk port trunk allow-pass vlan 40 # interface GigabitEthernet2/0/0 port link-type trunk port trunk allow-pass vlan 50 # interface LoopBack1 ip address 4.4.4.4 255.255.255.255 isis enable 1 # return
CE2的配置文件
# sysname CE2 # vlan batch 50 # interface Vlanif50 ip address 10.1.1.2 255.255.255.0 # interface GigabitEthernet1/0/0 port link-type trunk port trunk allow-pass vlan 50 # return