8.5 L2VPN-SVC典型配置
【需求】
CE-A的S2/0/0和CE-B的S2/0/0之间建立L2VPN Martini连接
【组网图】
【配置脚本】
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 # # radius scheme system # mpls # mpls ldp # mpls ldp remote 1
/建立remote LDP会话用来发布VC标签/ remote-ip 3.3.3.3 # domain system # interface Serial2/0/0 link-protocol ppp mpls l2vc 3.3.3.3 100
/创建martini方式的MPLS L2VPN连接/ # 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 # mpls ldp
remote 1
/建立remote LDP会话用来发布VC标签/ remote-ip 1.1.1.1 # 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 l2vc 1.1.1.1 100 /创建martini方式的MPLS L2VPN连接/ # 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的martini连接状态
[PE-A-mpls-remote1]disp mpls l2vc
Total l2vc : 1
l2vc : 1 up
l2vc : 0 down
Interface: Serial2/0/0, Encapsulation: ppp, Service: VLL
VC-ID Destination State Lcl-Label/Rmt-Label Tunnel/Index
100 3.3.3.3 up 1025/1025 LSP/2
查看PE-A的LSP
[PE-A-mpls-remote1]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 -----/1025 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 2.2.2.2/32 127.0.0.1 3/----- -------
2 1.1.1.1/32 10.0.0.1 -----/3 S2/0/0
3 2.2.2.2/32 127.0.0.1 3/----- -------
4 1.1.1.1/32 10.0.0.1 1024/3 S2/0/0
5 3.3.3.3/32 10.0.0.6 -----/3 S2/0/1
6 3.3.3.3/32 10.0.0.6 1025/3 S2/0/1
查看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 2.2.2.2/32 10.0.0.5 -----/3 S2/0/0
2 1.1.1.1/32 10.0.0.5 -----/1024 S2/0/0
3 3.3.3.3/32 127.0.0.1 3/----- -------
查看PE-B的martini连接状态
<PE-B>disp mpls l2vc
Total l2vc : 1
l2vc : 1 up
l2vc : 0 down
Interface: Serial2/0/1, Encapsulation: ppp, Service: VLL
VC-ID Destination State Lcl-Label/Rmt-Label Tunnel/Index
100 1.1.1.1 up 1025/1025 LSP/1
【提示】
1、 Martini方式的VC标签由LDP来发布