华为运营商级路由器配置示例 | 配置VPLS Multi-homing示例
Posted 一个热爱编程的通信人
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了华为运营商级路由器配置示例 | 配置VPLS Multi-homing示例相关的知识,希望对你有一定的参考价值。
组网需求
在VPLS网络中运营商为了提供高可靠性的服务,往往会部署冗余链路,CE通过冗余链路接入一对PE。然而这种冗余链路在提供了链路保护的同时,也存在环路风险。为解决环路问题,可以提出通过在PE上部署VPLS Multi-homing,解决多归属场景下环路问题。
如图1所示,PE1为CE1分配默认站点并配置MH-ID,PE3为CE3分配默认站点并配置MH-ID,由于CE2双归接入PE1和PE2,因此PE1和PE2为CE2分配站点并配置相同的MH-ID,实现的功能如下:
- 通过依次比较ACS(AC state)、PREF(preference,多归站点优先级)和PE-ID(BGP Router ID)的优先级,调整多归链路的优先级,实现CE的一条多归链路处于活跃状态,其他处于阻断状态,从而有效防止环路出现。
- PE之间建立PW,实现端到端的业务承载。
配置思路
-
在骨干网上配置路由协议实现互通,并配置MPLS基本功能。
-
在PE之间建立LSP隧道。
-
在PE上使能MPLS L2VPN。
-
在PE上使能BGP对等体交换VPLS信息的功能。
-
在PE上创建VSI,指定信令为BGP,指定RD和VPN-Target。
-
配置VPLS Multi-homing。
-
将AC接口与站点进行绑定。
操作步骤
1.配置骨干网各设备的IP地址。
# 配置PE1。
<HUAWEI> system-view
[~HUAWEI] sysname PE1
[*HUAWEI] commit
[~PE1] interface loopback1
[*PE1-Loopback1] ip address 1.1.1.9 32
[*PE1-Loopback1] quit
[*PE1] interface gigabitethernet 1/0/0
[*PE1-GigabitEthernet1/0/0] ip address 192.168.1.1 24
[*PE1-GigabitEthernet1/0/0] quit
[*PE1] interface gigabitethernet 2/0/0
[*PE1-GigabitEthernet2/0/0] ip address 192.168.10.1 24
[*PE1-GigabitEthernet2/0/0] quit
[*PE1] interface gigabitethernet 3/0/0.1
[*PE1-GigabitEthernet3/0/0.1] undo shutdown
[*PE1-GigabitEthernet3/0/0.1] quit
[*PE1] interface gigabitethernet 4/0/0.1
[*PE1-GigabitEthernet4/0/0.1] undo shutdown
[*PE1-GigabitEthernet4/0/0.1] quit
[*PE1] commit
# 配置PE2。
<HUAWEI> system-view
[~HUAWEI] sysname PE2
[*HUAWEI] commit
[~PE2] interface loopback1
[*PE2-Loopback1] ip address 2.2.2.9 32
[*PE2-Loopback1] quit
[*PE2] interface gigabitethernet 1/0/0
[*PE2-GigabitEthernet1/0/0] 192.168.20.1 24
[*PE2-GigabitEthernet1/0/0] quit
[*PE2] interface gigabitethernet 2/0/0
[*PE2-GigabitEthernet2/0/0] 192.168.10.2 24
[*PE2-GigabitEthernet2/0/0] quit
[*PE2] interface gigabitethernet 3/0/0.1
[*PE2-GigabitEthernet3/0/0.1] undo shutdown
[*PE2-GigabitEthernet3/0/0.1] quit
[*PE2] commit
# 配置PE3。
<HUAWEI> system-view
[~HUAWEI] sysname PE3
[*HUAWEI] commit
[~PE3] interface loopback1
[*PE3-Loopback1] ip address 3.3.3.9 32
[*PE3-Loopback1] quit
[*PE3] interface gigabitethernet 1/0/0
[*PE3-GigabitEthernet1/0/0] 192.168.1.2 24
[*PE3-GigabitEthernet1/0/0] quit
[*PE3] interface gigabitethernet 2/0/0
[*PE3-GigabitEthernet2/0/0] 192.168.20.2 24
[*PE3-GigabitEthernet2/0/0] quit
[*PE3] interface gigabitethernet 3/0/0.1
[*PE3-GigabitEthernet3/0/0.1] undo shutdown
[*PE3-GigabitEthernet3/0/0.1] quit
[*PE3] commit
# 配置CE1。
<HUAWEI> system-view
[~HUAWEI] sysname CE1
[*HUAWEI] commit
[~CE1] interface gigabitethernet 1/0/0.1
[*CE1-GigabitEthernet1/0/0.1] undo shutdown
[*CE1-GigabitEthernet1/0/0.1] vlan-type dot1q 10
[*CE1-GigabitEthernet1/0/0.1] ip address 10.1.1.1 24
[*CE1-GigabitEthernet1/0/0.1] quit
[*CE1] commit
# 配置CE2。
<HUAWEI> system-view
[~HUAWEI] sysname CE2
[*HUAWEI] commit
[~CE2] vlan 10
[*CE2-vlan10] quit
[*CE2] interface gigabitethernet 1/0/0
[*CE2-GigabitEthernet1/0/0] portswitch
[*CE2-GigabitEthernet1/0/0] port trunk allow-pass vlan 10
[*CE2-GigabitEthernet1/0/0] quit
[*CE2] interface gigabitethernet 2/0/0
[*CE2-GigabitEthernet2/0/0] portswitch
[*CE2-GigabitEthernet2/0/0] port trunk allow-pass vlan 10
[*CE2-GigabitEthernet2/0/0] quit
[*CE2] interface vlanif10
[*CE2-Vlanif10] ip address 10.1.1.2 24
[*CE2-Vlanif10] quit
[*CE2] commit
# 配置CE3。
<HUAWEI> system-view
[~HUAWEI] sysname CE3
[*HUAWEI] commit
[~CE3] interface gigabitethernet 1/0/0.1
[*CE3-GigabitEthernet1/0/0.1] undo shutdown
[*CE3-GigabitEthernet1/0/0.1] vlan-type dot1q 10
[*CE3-GigabitEthernet1/0/0.1] ip address 10.1.1.4 24
[*CE3-GigabitEthernet1/0/0.1] quit
[*CE3] commit
2.配置IGP,本示例使用OSPF。
# 配置PE1。
[~PE1] ospf 1
[*PE1-ospf-1] area 0.0.0.0
[*PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0
[*PE1-ospf-1-area-0.0.0.0] network 192.168.1.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] quit
[*PE1] commit
# 配置PE2。
[~PE2] ospf 1
[*PE2-ospf-1] area 0.0.0.0
[*PE2-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0
[*PE2-ospf-1-area-0.0.0.0] network 192.168.10.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] quit
[*PE2] commit
# 配置PE3。
[~PE3] ospf 1
[*PE3-ospf-1] area 0.0.0.0
[*PE3-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0
[*PE3-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[*PE3-ospf-1-area-0.0.0.0] network 192.168.20.0 0.0.0.255
[*PE3-ospf-1-area-0.0.0.0] quit
[*PE3-ospf-1] quit
[*PE3] commit
3.使能MPLS,建立LSP隧道
# 配置PE1。
[~PE1] mpls lsr-id 1.1.1.9
[*PE1] mpls
[*PE1-mpls] quit
[*PE1] mpls ldp
[*PE1-mpls-ldp] quit
[*PE1] interface gigabitethernet 1/0/0
[*PE1-GigabitEthernet1/0/0] mpls
[*PE1-GigabitEthernet1/0/0] mpls ldp
[*PE1-GigabitEthernet1/0/0] quit
[*PE1] interface gigabitethernet 2/0/0
[*PE1-GigabitEthernet2/0/0] mpls
[*PE1-GigabitEthernet2/0/0] mpls ldp
[*PE1-GigabitEthernet2/0/0] quit
[*PE1] commit
# 配置PE2。
[~PE2] mpls lsr-id 2.2.2.9
[*PE2] mpls
[*PE2-mpls] quit
[*PE2] mpls ldp
[*PE2-mpls-ldp] quit
[*PE2] interface gigabitethernet 1/0/0
[*PE2-GigabitEthernet1/0/0] mpls
[*PE2-GigabitEthernet1/0/0] mpls ldp
[*PE2-GigabitEthernet1/0/0] quit
[*PE2] interface gigabitethernet 2/0/0
[*PE2-GigabitEthernet2/0/0] mpls
[*PE2-GigabitEthernet2/0/0] mpls ldp
[*PE2-GigabitEthernet2/0/0] quit
[*PE2] commit
# 配置PE3。
[~PE3] mpls lsr-id 3.3.3.9
[*PE3] mpls
[*PE3-mpls] quit
[*PE3] mpls ldp
[*PE3-mpls-ldp] quit
[*PE3] interface gigabitethernet 1/0/0
[*PE3-GigabitEthernet1/0/0] mpls
[*PE3-GigabitEthernet1/0/0] mpls ldp
[*PE3-GigabitEthernet1/0/0] quit
[*PE3] interface gigabitethernet 2/0/0
[*PE3-GigabitEthernet2/0/0] mpls
[*PE3-GigabitEthernet2/0/0] mpls ldp
[*PE3-GigabitEthernet2/0/0] quit
[*PE3] commit
4.使能BGP对等体交换VPLS信息的能力
# Configure PE1。
[~PE1] bgp 100
[*PE1-bgp] peer 2.2.2.9 as-number 100
[*PE1-bgp] peer 2.2.2.9 connect-interface loopback1
[*PE1-bgp] peer 3.3.3.9 as-number 100
[*PE1-bgp] peer 3.3.3.9 connect-interface loopback1
[*PE1-bgp] l2vpn-ad-family
[*PE1-bgp-af-l2vpn-ad] signaling vpls
[*PE1-bgp-af-l2vpn-ad] signaling multi-homing non-standard-compatible
[*PE1-bgp-af-l2vpn-ad] peer 2.2.2.9 enable
[*PE1-bgp-af-l2vpn-ad] peer 3.3.3.9 enable
[*PE1-bgp-af-l2vpn-ad] quit
[*PE1-bgp] quit
[*PE1] commit
# Configure PE2。
[~PE2] bgp 100
[*PE2-bgp] peer 1.1.1.9 as-number 100
[*PE2-bgp] peer 1.1.1.9 connect-interface loopback1
[*PE2-bgp] peer 3.3.3.9 as-number 100
[*PE2-bgp] peer 3.3.3.9 connect-interface loopback1
[*PE2-bgp] l2vpn-ad-family
[*PE2-bgp-af-l2vpn-ad] signaling vpls
[*PE2-bgp-af-l2vpn-ad] signaling multi-homing non-standard-compatible
[*PE2-bgp-af-l2vpn-ad] peer 1.1.1.9 enable
[*PE2-bgp-af-l2vpn-ad] peer 3.3.3.9 enable
[*PE2-bgp-af-l2vpn-ad] quit
[*PE2-bgp] quit
[*PE2] commit
# Configure PE3。
[~PE3] bgp 100
[*PE3-bgp] peer 1.1.1.9 as-number 100
[*PE3-bgp] peer 1.1.1.9 connect-interface loopback1
[*PE3-bgp] peer 2.2.2.9 as-number 100
[*PE3-bgp] peer 2.2.2.9 connect-interface loopback1
[*PE3-bgp] l2vpn-ad-family
[*PE3-bgp-af-l2vpn-ad] signaling vpls
[*PE3-bgp-af-l2vpn-ad] signaling multi-homing non-standard-compatible
[*PE3-bgp-af-l2vpn-ad] peer 1.1.1.9 enable
[*PE3-bgp-af-l2vpn-ad] peer 2.2.2.9 enable
[*PE3-bgp-af-l2vpn-ad] quit
[*PE3-bgp] quit
[*PE3] commit
5.在PE上使能MPLS L2VPN、
# 配置PE1。
[~PE1] mpls l2vpn
[*PE1-l2vpn] quit
[*PE1] commit
# 配置PE2。
[~PE2] mpls l2vpn
[*PE2-l2vpn] quit
[*PE2] commit
# 配置PE3。
[~PE3] mpls l2vpn
[*PE3-l2vpn] quit
[*PE3] commit
6.创建多归属站点,并配置VPLS连接
# 配置PE1。
[~PE1] vsi bgp1
[*PE1-vsi-bgp1] pwsignal bgp multi-homing
[*PE1-vsi-bgp1-bgp] route-distinguisher 192.168.1.1:1
[*PE1-vsi-bgp1-bgp] vpn-target 100:1 import-extcommunity
[*PE1-vsi-bgp1-bgp] vpn-target 100:1 export-extcommunity
[*PE1-vsi-bgp1-bgp] site-range 1000 default-offset 0
[*PE1-vsi-bgp1-bgp] site default
[*PE1-vsi-bgp1-bgp-site-default] site-id 10
[*PE1-vsi-bgp1-bgp-site-site1] quit
[*PE1-vsi-bgp1-bgp] site name site2
[*PE1-vsi-bgp1-bgp-site-site2] site-id 20
[*PE1-vsi-bgp1-bgp-site-site2] quit
[*PE1-vsi-bgp1-bgp] site name best
[*PE1-vsi-bgp1-bgp-site-best] site-id 100
[*PE1-vsi-bgp1-bgp-site-best] best-site
[*PE1-vsi-bgp1-bgp-site-best] quit
[*PE1-vsi-bgp1] quit
[*PE1] commit
# 配置PE2。
[~PE2] vsi bgp1
[*PE2-vsi-bgp1] pwsignal bgp multi-homing
[*PE2-vsi-bgp1-bgp] route-distinguisher 192.168.10.2:1
[*PE2-vsi-bgp1-bgp] vpn-target 100:1 import-extcommunity
[*PE2-vsi-bgp1-bgp] vpn-target 100:1 export-extcommunity
[*PE2-vsi-bgp1-bgp] site-range 1000 default-offset 0
[*PE2-vsi-bgp1-bgp] site name site2
[*PE2-vsi-bgp1-bgp-site-site2] site-id 20
[*PE2-vsi-bgp1-bgp-site-site2] quit
[*PE2-vsi-bgp1-bgp] site name best
[*PE2-vsi-bgp1-bgp-site-best] site-id 200
[*PE2-vsi-bgp1-bgp-site-best] best-site
[*PE2-vsi-bgp1-bgp-site-best] quit
[*PE2-vsi-bgp1-bgp] quit
[*PE2-vsi-bgp1] quit
[*PE2] commit
# 配置PE3。
[~PE3] vsi bgp1
[*PE3-vsi-bgp1] pwsignal bgp multi-homing
[*PE3-vsi-bgp1-bgp] route-distinguisher 192.168.20.2:1
[*PE3-vsi-bgp1-bgp] vpn-target 100:1 import-extcommunity
[*PE3-vsi-bgp1-bgp] vpn-target 100:1 export-extcommunity
[*PE3-vsi-bgp1-bgp] site-range 1000 default-offset 0
[*PE3-vsi-bgp1-bgp] site default
[*PE3-vsi-bgp1-bgp-site-site1] site-id 30
[*PE3-vsi-bgp1-bgp-site-site1] quit
[*PE3-vsi-bgp1-bgp] site name best
[*PE3-vsi-bgp1-bgp-site-best] site-id 300
[*PE3-vsi-bgp1-bgp-site-best] best-site
[*PE3-vsi-bgp1-bgp-site-best] quit
[*PE3-vsi-bgp1-bgp] quit
[*PE3-vsi-bgp1] quit
[*PE3] commit
7.配置AC接口和多归属站点绑定。
# 在PE1上创建子接口,允许接收VLAN10的报文,绑定多归属站点。
[~PE1] interface gigabitethernet3/0/0.1
[*PE1-GigabitEthernet3/0/0.1] vlan-type dot1q 10
[*PE1-GigabitEthernet3/0/0.1] l2 binding vsi bgp1 multi-homing-site default
[*PE1-GigabitEthernet3/0/0.1] quit
[*PE1] interface gigabitethernet4/0/0.1
[*PE1-GigabitEthernet4/0/0.1] vlan-type dot1q 10
[*PE1-GigabitEthernet4/0/0.1] l2 binding vsi bgp1 multi-homing-site site2
[*PE1-GigabitEthernet4/0/0.1] quit
[*PE1] commit
# 在PE2上创建子接口,允许接收VLAN10的报文,绑定多归属站点。
[~PE2] interface gigabitethernet3/0/0.1
[*PE2-GigabitEthernet3/0/0.1] vlan-type dot1q 10
[*PE1-GigabitEthernet3/0/0.1] l2 binding vsi bgp1 multi-homing-site site2
[*PE2-GigabitEthernet3/0/0.1] quit
[*PE2] commit
# 在PE3上创建子接口,允许接收VLAN10的报文,绑定多归属站点。
[~PE3] interface gigabitethernet3/0/0.1
[*PE3-GigabitEthernet3/0/0.1] vlan-type dot1q 10
[*PE3-GigabitEthernet3/0/0.1] l2 binding vsi bgp1 multi-homing-site default
[*PE3-GigabitEthernet3/0/0.1] quit
[*PE3] commit
8.验证配置结果
完成上述配置后,在PE1上执行display vsi verbose,可以查看到VPLS Multi-homing场景中VPLS的连接信息。
[~PE1] display vsi verbose
***VSI Name : bgp1
Work Mode : normal
Administrator VSI : no
Isolate Spoken : disable
VSI Index : 1
PW Signaling : bgpmh
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
Create Time : 0 days, 3 hours, 58 minutes, 56 seconds
VSI State : up
Resource Status : --
BGP RD : 192.168.1.1:1
Import vpn target : 100:1
Export vpn target : 100:1
Local Label Block : 0/33176/8/1
Interface Name : GigabitEthernet3/0/0.1
State : up
Ac Block State : unblocked
Access Port : false
Last Up Time : 2016/03/31 20:50:42
Total Up Time : 0 days, 3 hours, 42 minutes, 15 seconds
Interface Name : GigabitEthernet4/0/0.1
State : up
Ac Block State : unblocked
Access Port : false
Last Up Time : 2016/03/31 20:51:47
Total Up Time : 0 days, 3 hours, 40 minutes, 43 seconds
# CE1能够Ping通CE3。
[~CE1] ping 10.1.1.4
PING 10.1.1.4: 56 data bytes, press CTRL_C to break
Reply from 10.1.1.4: bytes=56 Sequence=1 ttl=255 time=90 ms
Reply from 10.1.1.4: bytes=56 Sequence=2 ttl=255 time=77 ms
Reply from 10.1.1.4: bytes=56 Sequence=3 ttl=255 time=34 ms
Reply from 10.1.1.4: bytes=56 Sequence=4 ttl=255 time=46 ms
Reply from 10.1.1.4: bytes=56 Sequence=5 ttl=255 time=94 ms
--- 10.1.1.4 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 34/68/94 ms
以上是关于华为运营商级路由器配置示例 | 配置VPLS Multi-homing示例的主要内容,如果未能解决你的问题,请参考以下文章
华为运营商级路由器配置示例 | 配置BGP VPLS和LDP VPLS interworking示例