配置SVC方式的VPWS实例
SVC方式VPWS是一种静态的VPWS,不使用信令协议传递L2VPN信息,需要手工配置VC标签信息。
操作步骤
- 按图9-22配置CE、PE和P的各接口地址
具体配置过程略。
- 在MPLS骨干网上配置IGP,本示例中使用OSPF
配置OSPF时,注意需要发布PE1、P和PE2作为LSR ID的32位Loopback接口地址。
具体配置过程略。
- 在MPLS骨干网上配置MPLS基本能力和LDP,即,使用LDP LSP隧道
# 配置PE1。
[~PE1] mpls lsr-id 1.1.1.9
[*PE1] mpls
[*PE1-mpls] quit
[*PE1] mpls ldp
[*PE1-mpls-ldp] quit
[*PE1] mpls ldp remote-peer 3.3.3.9
[*PE1-mpls-ldp-remote-3.3.3.9] remote-peer 3.3.3.9
[*PE1-mpls-ldp-remote-3.3.3.9] 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
# 配置P。
[~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
# 配置PE2。
[~PE2] mpls lsr-id 3.3.3.9
[*PE2] mpls
[*PE2-mpls] quit
[*PE2] mpls ldp
[*PE2-mpls-ldp] quit
[*PE2] mpls ldp remote-peer 1.1.1.9
[*PE2-mpls-ldp-remote-1.1.1.9] remote-peer 1.1.1.9
[*PE2-mpls-ldp-remote-1.1.1.9] quit
[*PE2] interface gigabitethernet 1/0/0
[*PE2-GigabitEthernet1/0/0] mpls
[*PE2-GigabitEthernet1/0/0] mpls ldp
[*PE2-GigabitEthernet1/0/0] quit
[*PE2] commit
上述配置完成后,PE1、P、PE2之间应能建立LDP会话,执行display mpls ldp session命令可以看到显示结果中Session State项为Operational。
以PE1的显示为例。
<PE1> display mpls ldp session
LDP Session(s) in Public Network Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM) An asterisk (*) before a session means the session is being deleted. ------------------------------------------------------------------------------ PeerID Status LAM SsnRole SsnAge KASent/Rcv ------------------------------------------------------------------------------ 2.2.2.9:0 Operational DU Passive 000:02:22 572/572 3.3.3.9:0 Operational DU Passive 000:02:21 566/566 ------------------------------------------------------------------------------ TOTAL: 2 session(s) Found.
- 在PE上使能MPLS L2VPN,并创建静态VC连接
# 配置PE1:在接入CE1的接口GE1/0/0上创建静态VC。
[~PE1] mpls l2vpn
[*PE1-l2vpn] quit
[*PE1] interface gigabitethernet 1/0/0
[*PE1-GigabitEthernet1/0/0] mpls static-l2vc destination 3.3.3.9 transmit-vpn-label 100 receive-vpn-label 200
[*PE1-GigabitEthernet1/0/0] undo shutdown
[*PE1-GigabitEthernet1/0/0] quit
[*PE1] commit
# 配置PE2:在接入CE2的接口GE2/0/0上创建静态VC。
[~PE2] mpls l2vpn
[*PE2-l2vpn] quit
[*PE2] interface gigabitethernet 2/0/0
[*PE2-GigabitEthernet2/0/0] mpls static-l2vc destination 1.1.1.9 transmit-vpn-label 200 receive-vpn-label 100
[*PE2-GigabitEthernet2/0/0] undo shutdown
[*PE2-GigabitEthernet2/0/0] quit
[*PE2] commit
- 验证配置结果
在PE上查看SVC的L2VPN连接信息,可以看到建立了一条静态L2VC连接。
以PE1的显示为例:
<PE1> display mpls static-l2vc interface gigabitethernet 1/0/0
*Client Interface : GigabitEthernet1/0/0 is up
AC Status : up
VC State : up
VC ID : 0
VC Type : Ethernet
Destination : 3.3.3.9
Transmit VC Label : 100
Receive VC Label : 200
Label Status : 0
Token Status : 0
Control Word : Disable
VCCV Capability : alert lsp-ping bfd
active state : active
OAM Protocol : --
OAM Status : --
OAM Fault Type : --
PW APS ID : --
PW APS Status : --
TTL Value : 1
Link State : up
Tunnel Policy : --
PW Template Name : --
Traffic Behavior : --
Main or Secondary : Main
VC tunnel/token info : 1 tunnels/tokens
NO.0 TNL Type : lsp , TNL ID : 0x2002002
Create time : 0 days, 0 hours, 8 minutes, 2 seconds
UP time : 0 days, 0 hours, 6 minutes, 12 seconds
Last change time : 0 days, 0 hours, 6 minutes, 12 seconds
VC last up time : 2008-07-24 12:31:31 VC total up time: 0 days, 2 hours, 12 minutes, 51 seconds
CKey : 17 NKey : 18
执行命令display l2vpn ccc-interface vc-type static-vc up,可以看到VC Type为static-vc,状态为up。以PE1的显示为例:
<PE1> display l2vpn ccc-interface vc-type static-vc up
Total ccc-interface of SVC VC: 1
up (1), down (0)
Interface Encap Type State VC Type
GigabitEthernet1/0/0 ethernet up static-vc
CE1和CE2能够相互Ping通。
<CE1> 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=46 ms
Reply from 10.10.1.2: bytes=56 Sequence=2 ttl=255 time=91 ms
Reply from 10.10.1.2: bytes=56 Sequence=3 ttl=255 time=74 ms
Reply from 10.10.1.2: bytes=56 Sequence=4 ttl=255 time=88 ms
Reply from 10.10.1.2: bytes=56 Sequence=5 ttl=255 time=82 ms
--- 10.10.1.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 46/76/91 ms
配置文件
CE1的配置文件
#
sysname CE1
#
interface GigabitEthernet1/0/0
undo shutdown
ip address 10.10.1.1 255.255.255.0
#
return
PE1的配置文件
#
sysname PE1
#
mpls lsr-id 1.1.1.9
mpls
#
mpls l2vpn
#
mpls ldp
#
mpls ldp remote-peer 3.3.3.9 remote-ip 3.3.3.9 #
interface GigabitEthernet1/0/0
undo shutdown
mpls static-l2vc destination 3.3.3.9 transmit-vpn-label 100 receive-vpn-label 200
#
interface GigabitEthernet2/0/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 GigabitEthernet1/0/0
undo shutdown
ip address 10.2.2.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet2/0/0
undo shutdown
ip address 10.1.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.1.1.0 0.0.0.255
network 10.2.2.0 0.0.0.255
#
return
PE2的配置文件
#
sysname PE2
#
mpls lsr-id 3.3.3.9
mpls
#
mpls l2vpn
#
mpls ldp
#
mpls ldp remote-peer 1.1.1.9 remote-ip 1.1.1.9 #
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
mpls static-l2vc destination 1.1.1.9 transmit-vpn-label 200 receive-vpn-label 100
#
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
CE2的配置文件
#
sysname CE2
#
interface GigabitEthernet1/0/0
undo shutdown
ip address 10.10.1.2 255.255.255.0
#
return