配置VPLS PW透传特殊链路层协议示例
CE1和CE2为其他厂商设备,且支持CDP(Cisco Discovery Protocol)协议,为保证其他厂商设备与NE20E互通正常,需要在PE1和PE2之间建立VPLS PW,在使CE1和CE2通过PW互通的同时,透明传输CDP协议,保证CE1和CE2能够通过CDP协议发现对方。
组网需求
如图6-7,两台设备PE1和PE2作为PE启动VPLS功能。CE1连接到PE1设备上,CE2连接到PE2上。CE1和CE2属于一个VPLS。采用LDP作为VPLS信令建立PW,配置VPLS,实现CE1与CE2的互通。
CE1和CE2为其他厂商设备,且支持CDP(Cisco Discovery Protocol)协议,为保证其他厂商设备与NE20E互通正常,需要在PE1和PE2之间建立VPLS PW,在使CE1和CE2通过PW互通的同时,透明传输CDP协议,保证CE1和CE2能够通过CDP协议发现对方。
设备名称 |
接口 |
IP地址 |
---|---|---|
CE1 |
GE0/1/0.1 |
10.10.1.1/24 |
PE1 |
GE0/1/0.1 |
- |
PE1 |
GE0/2/0 |
10.1.1.1/24 |
PE1 |
loopback 1 |
1.1.1.9/32 |
P |
GE0/1/0 |
10.2.2.1/24 |
P |
GE0/2/0 |
10.1.1.2/24 |
P |
loopback 1 |
2.2.2.9/24 |
PE2 |
GE0/1/0 |
- |
PE2 |
GE0/2/0 |
10.2.2.2/24 |
PE2 |
loopback 1 |
3.3.3.9/32 |
CE2 |
GE0/1/0.1 |
10.10.1.2/24 |
配置思路
采用如下的思路配置VPLS PW透传特殊链路层协议的基本功能:
在骨干网上配置路由协议实现互通。
在PE之间建立远端LDP会话。
PE间建立传输业务数据所使用的隧道。
PE上使能MPLS L2VPN。
在PE上创建VSI,指定信令为LDP,然后将VSI与AC接口绑定。
在PE与CE相连的AC接口上使能透传CDP协议的功能。
操作步骤
- 配置IGP,本例中使用OSPF。
配置完成后,在PE1、P和PE2上执行display ip routing-table命令可以看到已学到彼此的路由。
按图6-7配置PE和P的各接口地址,配置OSPF时,注意需要发布PE1、P和PE2的32位Loopback接口地址(LSR-ID)。
具体配置步骤参考后面的配置文件。
- 配置MPLS基本能力和LDP
具体配置步骤参考后面的配置文件。
配置完成后,在PE1、P和PE2上执行display mpls ldp session命令可以看到PE1和P之间或PE2和P之间的对等体的Status项为“Operational”,即对等体关系已建立。执行display mpls lsp命令可以看到LSP的建立情况。
- 在PE之间建立远端LDP会话
# 配置PE1。
[*PE1] mpls ldp remote-peer 3.3.3.9
[*PE1-mpls-ldp-remote-3.3.3.9] remote-ip 3.3.3.9
[*PE1-mpls-ldp-remote-3.3.3.9] quit
[*PE1] commit
# 配置PE2。
[*PE2] mpls ldp remote-peer 1.1.1.9
[*PE2-mpls-ldp-remote-1.1.1.9] remote-ip 1.1.1.9
[*PE2-mpls-ldp-remote-1.1.1.9] quit
[*PE2] commit
配置完成后,在PE1或PE2上执行display mpls ldp session命令可以看到PE1和PE2之间的对等体的Status项为“Operational”,即远端对等体关系已建立。
- 在PE上使能MPLS L2VPN
# 配置PE1。
[*PE1] mpls l2vpn
[*PE1-l2vpn] quit
[*PE1] commit
# 配置PE2。
[*PE2] mpls l2vpn
[*PE2-l2vpn] quit
[*PE2] commit
- 在PE上配置VSI
# 配置PE1。
[*PE1] vsi a2 static
[*PE1-vsi-a2] pwsignal ldp
[*PE1-vsi-a2-ldp] vsi-id 2
[*PE1-vsi-a2-ldp] peer 3.3.3.9
[*PE1-vsi-a2-ldp] commit
# 配置PE2。
[*PE2] vsi a2 static
[*PE2-vsi-a2] pwsignal ldp
[*PE2-vsi-a2-ldp] vsi-id 2
[*PE2-vsi-a2-ldp] peer 1.1.1.9
[*PE2-vsi-a2-ldp] commit
- 在PE上配置VSI与接口的绑定
# 配置PE1。
[*PE1] interface gigabitethernet0/1/0.1
[*PE1-GigabitEthernet0/1/0.1] shutdown
[*PE1-GigabitEthernet0/1/0.1] vlan-type dot1q 10
[*PE1-GigabitEthernet0/1/0.1] l2 binding vsi a2
[*PE1-GigabitEthernet0/1/0.1] undo shutdown
[*PE1-GigabitEthernet0/1/0.1] quit
[*PE1] commit
# 配置PE2。
[*PE2] interface gigabitethernet0/2/0.1
[*PE2-GigabitEthernet0/2/0.1] shutdown
[*PE2-GigabitEthernet0/2/0.1] vlan-type dot1q 10
[*PE2-GigabitEthernet0/2/0.1] l2 binding vsi a2
[*PE2-GigabitEthernet0/2/0.1] undo shutdown
[*PE2-GigabitEthernet0/2/0.1] quit
[*PE2] commit
- 在PE上使能CDP协议透传功能。
# 配置PE1。
[*PE1] interface gigabitethernet 0/1/0.1
[*PE1-GigabitEthernet0/1/0.1] link-protocol transport cdp
[*PE1-GigabitEthernet0/1/0.1] quit
[*PE1] commit
# 配置PE2。
[*PE2] interface gigabitethernet0/2/0.1
[*PE2-GigabitEthernet0/2/0.1] link-protocol transport cdp
[*PE2-GigabitEthernet0/2/0.1] quit
[*PE2] commit
- 配置CE
配置CE1和CE2上GE0/1/0.1子接口的IP地址。CE为其他厂商设备,此处省略具体配置。
- 验证配置结果
完成上述配置后,在PE1上执行display vsi name a2 verbose命令,可以看到名字为a2的VSI建立了一条PW到PE2,VSI状态为UP。
<PE1> display vsi name a2 verbose
***VSI Name : a2
Administrator VSI : no
Isolate Spoken : disable
VSI Index : 0
PW Signaling : ldp
Member Discovery Style : static
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, 30 minutes, 31 seconds
VSI State : up
VSI ID : 2
*Peer Router ID : 3.3.3.9
primary or secondary : primary
ignore-standby-state : no
VC Label : 23552
Peer Type : dynamic
Session : up
Tunnel ID : 0x2002001
Broadcast Tunnel ID : --
Broad BackupTunnel ID : --
CKey : 2
NKey : 3439331285
Stp Enable : 0
PwIndex : 2
Interface Name : GigabitEthernet0/1/0.1
State : up
Last Up Time : 2012-08-15 15:41:59
Total Up Time : 0 days, 0 hours, 1 minutes, 2 seconds
**PW Information:
*Peer Ip Address : 3.3.3.9
PW State : up
Local VC Label : 23552
Remote VC Label : 23552
PW Type : label
Tunnel ID : 0x0000000001006ad122
Broadcast Tunnel ID : --
Broad BackupTunnel ID : --
Ckey : 36033
Nkey : 3053453715
Main PW Token : 0x0
Slave PW Token : 0x0
Tnl Type : ldp
OutInterface : LDP LSP
Backup OutInterface : --
Stp Enable : 0
PW Last Up Time : 2012-08-15 15:41:59
PW Total Up Time : 0 days, 0 hours, 1 minutes, 3 seconds
在CE1(10.1.1.1)上能够ping通CE2(10.1.1.2)。
<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
CE1和CE2能够通过CDP协议互相发现对方。
配置文件
PE1的配置文件
#
sysname PE1
#
mpls lsr-id 1.1.1.9
mpls
#
mpls l2vpn
#
vsi a2 static
pwsignal ldp
vsi-id 2
peer 3.3.3.9
#
mpls ldp
#
mpls ldp remote-peer 3.3.3.9
remote-ip 3.3.3.9
#
interface GigabitEthernet0/1/0.1
undo shutdown
vlan-type dot1q 10
link-protocol transport cdp
l2 binding vsi a2
#
interface GigabitEthernet0/2/0
undo shutdown
ip address 10.1.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.1.1.0 0.0.0.255
#
return
P的配置文件
#
sysname P
#
mpls lsr-id 2.2.2.9
mpls
#
mpls ldp
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 10.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/2/0
undo shutdown
ip address 10.2.2.1 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 10.1.1.0 0.0.0.255
network 10.2.2.0 0.0.0.255
network 2.2.2.9 0.0.0.0
#
return
PE2的配置文件
#
sysname PE2
#
mpls lsr-id 3.3.3.9
mpls
#
mpls l2vpn
#
vsi a2 static
pwsignal ldp
vsi-id 2
peer 1.1.1.9
#
mpls ldp
#
mpls ldp remote-peer 1.1.1.9
remote-ip 1.1.1.9
#
interface GigabitEthernet0/1/0
undo shutdown
ip address 10.2.2.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet0/2/0.1
undo shutdown
vlan-type dot1q 10
link-protocol transport cdp
l2 binding vsi a2
#
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
#
return