配置跨域Kompella VPLS示例-OptionA
组网需求
如图6-42,某企业机构,分支Site1使用CE1连接PE1接入AS100的VPLS域,分支Site2使用CE2连接PE2接入AS200的VPLS域,分支Site网络环境不稳定。AS100与AS200分别通过ASBR_PE1和ASBR_PE2设备进行互通,一个AS内部的MPLS骨干网使用IS-IS作为IGP。现在Site1和Site2的用户需要进行二层业务的互通,同时要求在穿越骨干网时保留二层报文中用户信息。
配置思路
采用如下的思路配置跨域Kompella VPLS(OptionA)的基本功能:
为实现Site1和Site2的二层业务互通,同时在穿越骨干网时保留二层报文的用户信息,故需要使用VPLS技术在骨干网透传二层报文。
由于企业分支Site网络环境不稳定,故选择Kompella方式的VPLS,实现各CE设备二层网络的互通。
为实现PE间数据的公网传输,需要在骨干网上配置IGP路由协议实现同一个AS域内的各设备互通。
VPLS实现依靠MPLS基本功能,故需要在骨干网上的PE设备配置MPLS基本功能和LDP。
为使在同一AS域内PE间传输的数据不被公网感知,需要在PE间建立传输数据所使用的隧道。
为实现VPLS功能,需要在PE上使能MPLS L2VPN。
为实现Kompella方式VPLS,需要在同一AS域内的PE上使能BGP对等体交换VPLS信息的能力,同时在PE上创建VSI,指定信令为BGP,指定RD、VPN-Target和Site,再将AC接口与VSI进行绑定。
为实现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
配置完成后,同一个AS域内的ASBR-PE与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.0002.01 Up 8s L1(L1L2) 64 0000.0000.0002 Vlanif20 0000.0000.0002.01 Up 8s L2(L1L2) 64 Total Peer(s): 2
同一个AS域内的ASBR-PE与PE之间能够互相Ping通对方的Loopback1接口。以ASBR_PE1为例:
[ASBR_PE1] ping 1.1.1.1 PING 1.1.1.1: 56 data bytes, press CTRL_C to break Reply from 1.1.1.1: bytes=56 Sequence=1 ttl=255 time=47 ms Reply from 1.1.1.1: bytes=56 Sequence=2 ttl=255 time=31 ms Reply from 1.1.1.1: bytes=56 Sequence=3 ttl=255 time=31 ms Reply from 1.1.1.1: bytes=56 Sequence=4 ttl=255 time=31 ms Reply from 1.1.1.1: bytes=56 Sequence=5 ttl=255 time=31 ms --- 1.1.1.1 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 31/34/47 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
配置完成后,在PE上执行display mpls lsp命令,可以看到同一AS域内的PE和ASBR-PE之间成功建立LSP。
以PE1为例:
[PE1] display mpls lsp Flag after Out IF: (I) - LSP Is Only Iterated by RLFA ------------------------------------------------------------------------------- LSP Information: LDP LSP ------------------------------------------------------------------------------- FEC In/Out Label In/Out IF Vrf Name 1.1.1.1/32 3/NULL -/- 2.2.2.2/32 NULL/3 -/Vlanif20 2.2.2.2/32 1025/3 -/Vlanif20
- 配置域内的MP-IBGP连接
建立MP-IBGP连接,并使能BGP的VPLS能力。
# 配置PE1。
[PE1] bgp 100 [PE1-bgp] peer 2.2.2.2 as-number 100 [PE1-bgp] peer 2.2.2.2 connect-interface loopback 1 [PE1-bgp] vpls-family [PE1-bgp-af-vpls] peer 2.2.2.2 enable [PE1-bgp-af-vpls] quit [PE1-bgp] quit
# 配置ASBR_PE1。
[ASBR_PE1] bgp 100 [ASBR_PE1-bgp] peer 1.1.1.1 as-number 100 [ASBR_PE1-bgp] peer 1.1.1.1 connect-interface loopback 1 [ASBR_PE1-bgp] vpls-family [ASBR_PE1-bgp-af-vpls] peer 1.1.1.1 enable [ASBR_PE1-bgp-af-vpls] quit [ASBR_PE1-bgp] quit
# 配置PE2。
[PE2] bgp 200 [PE2-bgp] peer 3.3.3.3 as-number 200 [PE2-bgp] peer 3.3.3.3 connect-interface loopBack1 [PE2-bgp] vpls-family [PE2-bgp-af-vpls] peer 3.3.3.3 enable [PE2-bgp-af-vpls] quit [PE2-bgp] quit
# 配置ASBR_PE2。
[ASBR_PE2] bgp 200 [ASBR_PE2-bgp] peer 4.4.4.4 as-number 200 [ASBR_PE2-bgp] peer 4.4.4.4 connect-interface loopback 1 [ASBR_PE2-bgp] vpls-family [ASBR_PE2-bgp-af-vpls] peer 4.4.4.4 enable [ASBR_PE2-bgp-af-vpls] quit [ASBR_PE2-bgp] quit
完成此步骤后,在PE或ASBR-PE上执行display bgp vpls peer命令,可看到MP-IBGP对等体连接状态为“Established”。
以PE1的显示为例:
[PE1] display bgp vpls peer BGP local router ID : 1.1.1.1 Local AS number : 100 Total number of peers : 1 Peers in established state : 1 Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv 2.2.2.2 4 100 5 8 0 00:02:13 Established 0
- 在PE和ASBR-PE上使能MPLS L2VPN
# 配置PE1。
[PE1] mpls l2vpn [PE1-l2vpn] quit
# 配置ASBR_PE1。
[ASBR_PE1] mpls l2vpn [ASBR_PE1-l2vpn] quit
# 配置ASBR_PE2。
[ASBR_PE2] mpls l2vpn [ASBR_PE2-l2vpn] quit
# 配置PE2。
[PE2] mpls l2vpn [PE2-l2vpn] quit
- 在PE和ASBR上配置VSI实例,并与AC接口绑定
# 配置PE1。
[PE1] vsi v1 auto [PE1-vsi-v1] pwsignal bgp [PE1-vsi-v1-bgp] route-distinguisher 100:1 [PE1-vsi-v1-bgp] vpn-target 1:1 import-extcommunity [PE1-vsi-v1-bgp] vpn-target 1:1 export-extcommunity [PE1-vsi-v1-bgp] site 1 range 5 default-offset 0 [PE1-vsi-v1-bgp] quit [PE1-vsi-v1] quit [PE1] interface vlanif 10 [PE1-Vlanif10] l2 binding vsi v1 [PE1-Vlanif10] quit
# 配置ASBR_PE1。
[ASBR_PE1] vsi v1 auto [ASBR_PE1-vsi-v1] pwsignal bgp [ASBR_PE1-vsi-v1-bgp] route-distinguisher 100:2 [ASBR_PE1-vsi-v1-bgp] vpn-target 1:1 import-extcommunity [ASBR_PE1-vsi-v1-bgp] vpn-target 1:1 export-extcommunity [ASBR_PE1-vsi-v1-bgp] site 2 range 5 default-offset 0 [ASBR_PE1-vsi-v1-bgp] quit [ASBR_PE1-vsi-v1] quit [ASBR_PE1] interface vlanif 30 [ASBR_PE1-Vlanif30] l2 binding vsi v1 [ASBR_PE1-Vlanif30] quit
# 配置ASBR_PE2。
[ASBR_PE2] vsi v1 auto [ASBR_PE2-vsi-v1] pwsignal bgp [ASBR_PE2-vsi-v1-bgp] route-distinguisher 200:1 [ASBR_PE2-vsi-v1-bgp] vpn-target 1:1 import-extcommunity [ASBR_PE2-vsi-v1-bgp] vpn-target 1:1 export-extcommunity [ASBR_PE2-vsi-v1-bgp] site 1 range 5 default-offset 0 [ASBR_PE2-vsi-v1-bgp] quit [ASBR_PE2-vsi-v1] quit [ASBR_PE2] interface vlanif 30 [ASBR_PE2-Vlanif30] l2 binding vsi v1 [ASBR_PE2-Vlanif30] quit
# 配置PE2。
[PE2] vsi v1 auto [PE2-vsi-v1] pwsignal bgp [PE2-vsi-v1-bgp] route-distinguisher 200:2 [PE2-vsi-v1-bgp] vpn-target 1:1 import-extcommunity [PE2-vsi-v1-bgp] vpn-target 1:1 export-extcommunity [PE2-vsi-v1-bgp] site 2 range 5 default-offset 0 [PE2-vsi-v1-bgp] quit [PE2-vsi-v1] quit [PE2] interface vlanif 50 [PE2-Vlanif50] l2 binding vsi v1 [PE2-Vlanif50] quit
- 检验配置结果
在PE上执行display vpls connection bgp命令查看VSI信息,可发现VSI状态为Up。
以PE1的显示为例:
[PE1] display vpls connection bgp verbose VSI Name: v1 Signaling: bgp **Remote Site ID : 2 VC State : up RD : 100:2 Encapsulation : vlan MTU : 1500 Peer Ip Address : 2.2.2.2 PW Type : label Local VC Label : 35842 Remote VC Label : 31745 Tunnel Policy : -- Tunnel ID : 0x20020 Remote Label Block : 31744/5/0 Export vpn target : 1:1
CE1与CE2可以相互ping通。
[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=90 ms Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=255 time=77 ms Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=255 time=34 ms Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=255 time=46 ms Reply from 10.1.1.2: bytes=56 Sequence=5 ttl=255 time=94 ms --- 10.1.1.2 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 34/68/94 ms
在PE或ASBR-PE上执行display bgp vpls all命令,可以查看BGP的VPLS标签块信息。
以ASBR_PE1的显示为例:
[ASBR_PE1] display bgp vpls all BGP Local Router ID : 2.2.2.2, Local AS Number : 100 Status codes : * - active, > - best BGP.VPLS : 2 Label Blocks -------------------------------------------------------------------------------- Route Distinguisher: 100:1 SiteID Offset NextHop Range LabBase TunnelID FromPeer MHPref -------------------------------------------------------------------------------- *> 1 0 1.1.1.1 5 31744 0x0 1.1.1.1 0 -------------------------------------------------------------------------------- Route Distinguisher: 100:2 SiteID Offset NextHop Range LabBase TunnelID FromPeer MHPref -------------------------------------------------------------------------------- > 2 0 0.0.0.0 5 31744 0x0 0.0.0.0 0
配置文件
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 v1 auto pwsignal bgp route-distinguisher 100:1 vpn-target 1:1 import-extcommunity vpn-target 1:1 export-extcommunity site 1 range 5 default-offset 0 # mpls ldp # isis 1 network-entity 10.0000.0000.0001.00 # interface Vlanif10 l2 binding vsi v1 # 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 # bgp 100 peer 2.2.2.2 as-number 100 peer 2.2.2.2 connect-interface LoopBack1 # ipv4-family unicast undo synchronization peer 2.2.2.2 enable # vpls-family policy vpn-target peer 2.2.2.2 enable # return
ASBR_PE1的配置文件
# sysname ASBR_PE1 # vlan batch 20 30 # mpls lsr-id 2.2.2.2 mpls # mpls l2vpn # vsi v1 auto pwsignal bgp route-distinguisher 100:2 vpn-target 1:1 import-extcommunity vpn-target 1:1 export-extcommunity site 2 range 5 default-offset 0 # 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 v1 # 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 # bgp 100 peer 1.1.1.1 as-number 100 peer 1.1.1.1 connect-interface LoopBack1 # ipv4-family unicast undo synchronization peer 1.1.1.1 enable # vpls-family policy vpn-target peer 1.1.1.1 enable # return
ASBR_PE2的配置文件
# sysname ASBR_PE2 # vlan batch 30 40 # mpls lsr-id 3.3.3.3 mpls # mpls l2vpn # vsi v1 auto pwsignal bgp route-distinguisher 200:1 vpn-target 1:1 import-extcommunity vpn-target 1:1 export-extcommunity site 1 range 5 default-offset 0 # mpls ldp # isis 1 network-entity 10.0000.0000.0003.00 # interface Vlanif30 l2 binding vsi v1 # 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 # bgp 200 peer 4.4.4.4 as-number 200 peer 4.4.4.4 connect-interface LoopBack1 # ipv4-family unicast undo synchronization peer 4.4.4.4 enable # vpls-family policy vpn-target peer 4.4.4.4 enable # return
PE2的配置文件
# sysname PE2 # vlan batch 40 50 # mpls lsr-id 4.4.4.4 mpls # mpls l2vpn # vsi v1 auto pwsignal bgp route-distinguisher 200:2 vpn-target 1:1 import-extcommunity vpn-target 1:1 export-extcommunity site 2 range 5 default-offset 0 # 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 v1 # 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 # bgp 200 peer 3.3.3.3 as-number 200 peer 3.3.3.3 connect-interface LoopBack1 # ipv4-family unicast undo synchronization peer 3.3.3.3 enable # vpls-family policy vpn-target peer 3.3.3.3 enable # 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