使用Global-VE接口配置LDP方式VPWS接入公网示例
通过Global-VE接口,实现VPWS接入公网。
组网需求
如图11-10所示,UPE、P、NPE组成LDP方式VPWS接入网。CE经过VPWS网络,接入公网。
在NPE上创建两个全局虚拟接口Global-VE1和Global-VE2,其中Global-VE1接口为L2VE用来终结VPWS,Global-VE2接口为L3VE用来接入公网。
公网使用OSPF发布路由,OSPF进程为2。
配置思路
采用如下的思路配置LDP方式VPWS接入公网:
在NPE上创建全局L2VE接口和全局L3VE接口。并绑定在同一个VE-Group。
配置LDP方式VPWS,包括以下步骤:
在相关设备(UPE、P和NPE)上配置路由协议实现互通,并使能MPLS。
本例使用缺省隧道策略,建立LSP作为传输业务数据的隧道。
PE上使能MPLS L2VPN,并创建VC连接。
配置CE接入公网。
操作步骤
- 在NPE上创建两个Global-VE接口,并绑定到同一个VE-Group
# 创建Global-VE1接口,用来终结MPLS L2VPN。
<HUAWEI> system-view
[~HUAWEI] sysname NPE
[*HUAWEI] commit
[~NPE] interface global-ve 1
[*NPE-Global-VE1] ve-group 1 l2-terminate
[*NPE-Global-VE1] quit
[*NPE] commit
# 创建Global-VE2接口,用来接入MPLS L3VPN网络。
[~NPE] interface global-ve 2
[*NPE-Global-VE2] ve-group 1 l3-access
[*NPE-Global-VE2] quit
[*NPE] commit
配置完成后,在NPE上执行display virtual-ethernet ve-group命令可以看到VE接口与VE-Group之间的绑定关系。
[~NPE] display virtual-ethernet ve-group
Ve-groupID L2VE L3VE
1 Global-VE1 Global-VE2
Total 1, 1 printed
- 在接入网上配置IGP,本示例中使用OSPF(略)
按照图11-10配置UPE、P和NPE的各接口地址,配置OSPF时,注意需要发布UPE、P和NPE的32位Loopback接口地址。
具体配置,请参见配置文件。
- 在接入网上配置MPLS基本能力和LDP
# 配置UPE。
<HUAWEI> system-view
[~HUAWEI] sysname UPE
[*HUAWEI] commit
[~UPE] mpls lsr-id 1.1.1.9
[*UPE] mpls
[*UPE-mpls] quit
[*UPE] mpls ldp
[*UPE-mpls-ldp] quit
[*UPE] interface gigabitethernet 2/0/0
[*UPE-GigabitEthernet2/0/0] mpls
[*UPE-GigabitEthernet2/0/0] mpls ldp
[*UPE-GigabitEthernet2/0/0] quit
[*UPE] commit
# 配置P。
<HUAWEI> system-view
[~HUAWEI] sysname P
[*HUAWEI] commit
[~P] mpls lsr-id 2.2.2.9
[*P] mpls
[*P-mpls] quit
[*P] mpls ldp
[*P-mpls-ldp] quit
[*P] interface gigabitethernet 1/0/0
[*P-GigabitEthernet1/0/0] mpls
[*P-GigabitEthernet1/0/0] mpls ldp
[*P-GigabitEthernet1/0/0] quit
[*P] interface gigabitethernet 2/0/0
[*P-GigabitEthernet2/0/0] mpls
[*P-GigabitEthernet2/0/0] mpls ldp
[*P-GigabitEthernet2/0/0] quit
[*P] commit
# 配置NPE。
[~NPE] mpls lsr-id 3.3.3.9
[*NPE] mpls
[*NPE-mpls] quit
[*NPE] mpls ldp
[*NPE-mpls-ldp] quit
[*NPE] interface gigabitethernet 2/0/0
[*NPE-GigabitEthernet2/0/0] mpls
[*NPE-GigabitEthernet2/0/0] mpls ldp
[*NPE-GigabitEthernet2/0/0] quit
[*NPE] commit
- 在UPE和NPE之间建立远端LDP会话
# 配置UPE。
[~UPE] mpls ldp remote-peer 1
[*UPE-mpls-ldp-remote-1] remote-ip 3.3.3.9
[*UPE-mpls-ldp-remote-1] quit
[*UPE] commit
# 配置NPE。
[~NPE] mpls ldp remote-peer 1
[*NPE-mpls-ldp-remote-1] remote-ip 1.1.1.9
[*NPE-mpls-ldp-remote-1] quit
[*NPE] commit
- 在UPE和NPE上使能MPLS L2VPN,并创建VC连接
# 配置UPE。
[~UPE] mpls l2vpn
[*UPE-l2vpn] quit
[*UPE] interface gigabitethernet 1/0/0.1
[*UPE-GigabitEthernet1/0/0.1] shutdown
[*UPE-GigabitEthernet1/0/0.1] vlan-type dot1q 10
[*UPE-GigabitEthernet1/0/0.1] mpls l2vc 3.3.3.9 101
[*UPE-GigabitEthernet1/0/0.1] undo shutdown
[*UPE-GigabitEthernet1/0/0.1] quit
[*UPE] commit
# 配置NPE。
[~NPE] mpls l2vpn
[*NPE-l2vpn] quit
[*NPE] interface global-ve 1.1 [*NPE-Global-VE1.1] vlan-type dot1q 1 [*NPE-Global-VE1.1] mpls l2vc 1.1.1.9 101 [*NPE-Global-VE1.1] quit
[*NPE] commit
- 验证配置结果
在PE上查看L2VPN连接信息,可以看到建立了一条L2VC,状态为UP。
以NPE的显示为例:
[~NPE] display mpls l2vc
Total ldp vc : 1 1 up 0 down
*Client Interface : Global-VE1.1 is up
Administrator PW : no
Session State : up
AC Status : up
VC State : up
Label state : 0
Token state : 0
VC ID : 101
VC Type : vlan
Destination : 1.1.1.9
local VC label : 140288 remote VC label : 140292
control word : disable
remote control word : disable
forwarding entry : exist
local group ID : 0
remote group ID : 0 local AC OAM State : up local PSN OAM State : up local forwarding state : forwarding local status code : 0x0 remote AC OAM state : up remote PSN OAM state : up remote forwarding state : forwarding remote status code : 0x0 ignore standby state : no BFD for PW : unavailable VCCV State : up
manual fault : not set
active state : active
link state : up
local VC MTU : 1500 remote VC MTU : 1500
local VCCV : alert ttl lsp-ping bfd remote VCCV : alert ttl lsp-ping bfd
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 : 0x0000000001004c4e42
create time : 0 days, 0 hours, 30 minutes, 18 seconds
up time : 0 days, 0 hours, 0 minutes, 0 seconds
last change time : 0 days, 0 hours, 30 minutes, 18 seconds VC last up time : 2012/07/24 12:31:31 VC total up time : 0 days, 2 hours, 12 minutes, 51 seconds
CKey : 11 NKey : 10
PW redundancy mode : frr
AdminPw interface : -- AdminPw link state : -- Forward state : send inactive, receive inactive Diffserv Mode : uniform Service Class : -- Color : -- DomainId : -- Domain Name : --
- 配置CE接入公网
# 配置NPE。
[~NPE] interface global-ve 2.1 [*NPE-Global-VE2.1] vlan-type dot1q 1 [*NPE-Global-VE2.1] ip address 10.10.1.2 24 [*NPE-Global-VE2.1] quit
[*NPE] ospf 2
[*NPE-ospf-2] area 0
[*NPE-ospf-2-area-0.0.0.0] network 10.10.1.0 0.0.0.255
[*NPE-ospf-2-area-0.0.0.0] quit
[*NPE-ospf-2] quit
[*NPE] commit
# 配置CE。
<HUAWEI> system-view
[~HUAWEI] sysname CE
[*HUAWEI] commit
[~CE] interface gigabitethernet1/0/0.1
[*CE-GigabitEthernet1/0/0.1] vlan-type dot1q 10
[*CE-GigabitEthernet1/0/0.1] ip address 10.10.1.1 24
[*CE-GigabitEthernet1/0/0.1] quit
[*CE] ospf 2
[*CE-ospf-2] area 0
[*CE-ospf-2-area-0.0.0.0] network 10.10.1.0 0.0.0.255
[*CE-ospf-2-area-0.0.0.0] quit
[*CE-ospf-2] quit
[*CE] commit
- 检查配置结果
# CE和NPE的Global-VE2接口能够相互ping通。
以CE为例:
[~CE] ping 10.10.1.2
PING 10.10.1.2: 56 data bytes, press CTRL_C to break
Reply from 10.10.1.2: bytes=56 Sequence=1 ttl=255 time=31 ms
Reply from 10.10.1.2: bytes=56 Sequence=2 ttl=255 time=10 ms
Reply from 10.10.1.2: bytes=56 Sequence=3 ttl=255 time=5 ms
Reply from 10.10.1.2: bytes=56 Sequence=4 ttl=255 time=2 ms
Reply from 10.10.1.2: bytes=56 Sequence=5 ttl=255 time=28 ms
--- 10.10.1.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 2/15/31 ms
配置文件
UPE的配置文件
#
sysname UPE
#
mpls lsr-id 1.1.1.9
mpls
#
mpls l2vpn
#
mpls ldp
#
mpls ldp remote-peer 1
remote-ip 3.3.3.9
#
interface GigabitEthernet1/0/0
undo shutdown
#
interface GigabitEthernet1/0/0.1
vlan-type dot1q 10
mpls l2vc 3.3.3.9 101
#
interface GigabitEthernet2/0/0
undo shutdown
ip address 10.2.1.1 255.255.255.0
mpls
mpls ldp
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 1.1.1.9 0.0.0.0
network 10.2.1.0 0.0.0.255
#
return
P的配置文件
#
sysname P
#
mpls lsr-id 2.2.2.9
mpls
#
mpls ldp
#
interface GigabitEthernet1/0/0
undo shutdown
ip address 10.2.2.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet2/0/0
undo shutdown
ip address 10.2.1.2 255.255.255.0
mpls
mpls ldp
#
interface LoopBack1
ip address 2.2.2.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.9 0.0.0.0
network 10.2.1.0 0.0.0.255
network 10.2.2.0 0.0.0.255
#
return
NPE的配置文件
#
sysname NPE
#
mpls lsr-id 3.3.3.9
mpls
#
mpls l2vpn
#
mpls ldp
#
mpls ldp remote-peer 1
remote-ip 1.1.1.9
#
interface Global-VE1
ve-group 1 l2-terminate
#
# interface Global-VE1.1 vlan-type dot1q 1 mpls l2vc 1.1.1.9 101
#
interface Global-VE2
ve-group 1 l3-access
# interface Global-VE2.1 vlan-type dot1q 1 ip address 10.10.1.2 255.255.255.0
#
interface GigabitEthernet2/0/0
undo shutdown
ip address 10.2.2.2 255.255.255.0
mpls
mpls ldp
#
interface LoopBack1
ip address 3.3.3.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 3.3.3.9 0.0.0.0
network 10.2.2.0 0.0.0.255
#
ospf 2
area 0.0.0.0
network 10.10.1.0 0.0.0.255
#
return
CE的配置文件
#
sysname CE
#
interface GigabitEthernet1/0/0
undo shutdown
#
interface GigabitEthernet1/0/0.1
vlan-type dot1q 10
ip address 10.10.1.1 255.255.255.0
#
ospf 2
area 0.0.0.0
network 10.10.1.0 0.0.0.255
#
return