8.5
L2VPN-SVC典型配置
【需求】
CE-A的S2/0/0和CE-B的S2/0/0之间建立L2VPN
SVC连接
【组网图】
【配置脚本】
CE-A配置脚本 |
# sysname CE-A # radius scheme system # domain system # interface Serial2/0/0 link-protocol ppp ip address 192.168.21.1 255.255.255.0 # interface NULL0 # user-interface con 0 user-interface vty 0 4 # return |
PE-A配置脚本 |
# sysname PE-A # router id 1.1.1.1 # mpls lsr-id 1.1.1.1 # mpls l2vpn /启用MPLS L2VPN/ # # radius scheme system # mpls # mpls ldp # domain system # interface Serial2/0/0 link-protocol ppp mpls static-l2vc destination 3.3.3.3 transmit-vpn-label 100 receive-vpn-label 300 /创建到CE-B的SVC连接/ # interface Serial2/0/1 link-protocol ppp ip address 10.0.0.1 255.255.255.252 mpls mpls ldp enable # interface NULL0 # interface LoopBack0 ip address 1.1.1.1 255.255.255.255 # ospf 1 area 0.0.0.0 network 1.1.1.1 0.0.0.0 network 10.0.0.0 0.0.0.3 # user-interface con 0 user-interface vty 0 4 # return |
P配置脚本 |
# sysname P # router id 2.2.2.2 # mpls lsr-id 2.2.2.2 # mpls l2vpn # # radius scheme system # mpls # mpls ldp # domain system # interface Serial2/0/0 link-protocol ppp ip address 10.0.0.2 255.255.255.252 mpls mpls ldp enable # interface Serial2/0/1 link-protocol ppp ip address 10.0.0.5 255.255.255.252 mpls mpls ldp enable # interface NULL0 # interface LoopBack0 ip address 2.2.2.2 255.255.255.255 # ospf 1 area 0.0.0.0 network 2.2.2.2 0.0.0.0 network 10.0.0.0 0.0.0.3 network 10.0.0.4 0.0.0.3 # user-interface con 0 user-interface vty 0 4 # return |
PE-B配置脚本 |
# sysname PE-B # router id 3.3.3.3 # mpls lsr-id 3.3.3.3 # mpls l2vpn # # radius scheme system # mpls # mpls ldp # domain system # interface Serial2/0/0 link-protocol ppp ip address 10.0.0.6 255.255.255.252 mpls mpls ldp enable # interface Serial2/0/1 link-protocol ppp mpls static-l2vc destination 1.1.1.1 transmit-vpn-label 300 receive-vpn-label 100 /创建到CE-A的SVC连接/ # interface NULL0 # interface LoopBack0 ip address 3.3.3.3 255.255.255.255 # ospf 1 area 0.0.0.0 network 2.2.2.2 0.0.0.0 network 3.3.3.3 0.0.0.0 network 10.0.0.4 0.0.0.3 # user-interface con 0 user-interface vty 0 4 # return |
CE-B配置脚本 |
# sysname CE-B # radius scheme system # domain system # interface Serial2/0/0 link-protocol ppp ip address 192.168.21.2 255.255.255.0 # interface NULL0 # user-interface con 0 user-interface vty 0 4 # return |
【验证】
查看PE-A的SVC连接状态
[PE-A]disp mpls static-l2vc
total connections: 1, 1 up, 0 down
ce-intf state destination tr-label rcv-label tnl-type tnl-index
Serial2/0/0 up 3.3.3.3 100 300 LSP 2
查看PE-A的LSP
[PE-A]disp mpls lsp
-----------------------------------------------------------------------
LSP Information: Ldp Lsp
-----------------------------------------------------------------------
TOTAL: 3 Record(s) Found.
NO FEC NEXTHOP I/O-LABEL OUT-INTERFACE
1 1.1.1.1/32 127.0.0.1 3/----- -------
2 2.2.2.2/32 10.0.0.2 -----/3 S2/0/1
3 3.3.3.3/32 10.0.0.2 -----/1024 S2/0/1
查看P的LSP
[P]disp mpls lsp
-----------------------------------------------------------------------
LSP Information: Ldp Lsp
-----------------------------------------------------------------------
TOTAL: 6 Record(s) Found.
NO FEC NEXTHOP I/O-LABEL OUT-INTERFACE
1 1.1.1.1/32 10.0.0.1 -----/3 S2/0/0
2 2.2.2.2/32 127.0.0.1 3/----- -------
3 3.3.3.3/32 10.0.0.6 -----/3 S2/0/1
4 3.3.3.3/32 10.0.0.6 1024/3 S2/0/1
5 1.1.1.1/32 10.0.0.1 1025/3 S2/0/0
6 2.2.2.2/32 127.0.0.1 3/----- -------
查看PE-B的LSP
[PE-B]disp mpls lsp
-----------------------------------------------------------------------
LSP Information: Ldp Lsp
-----------------------------------------------------------------------
TOTAL: 3 Record(s) Found.
NO FEC NEXTHOP I/O-LABEL OUT-INTERFACE
1 3.3.3.3/32 127.0.0.1 3/----- -------
2 1.1.1.1/32 10.0.0.5 -----/1025 S2/0/0
3 2.2.2.2/32 10.0.0.5 -----/3 S2/0/0
查看PE-B的SVC连接状态
[PE-B]disp mpls static-l2vc
total connections: 1, 1 up, 0 down
ce-intf state destination tr-label rcv-label tnl-type tnl-index
Serial2/0/1 up 1.1.1.1 300 100 LSP 1