admin 发表于 2026-8-3 18:23:37

MPLS VLL 二层专线配置,实现异地局域网二层透明互通配置

MPLS VLL (Virtual Leased Line) 二层专线配置指南

MPLS VLL (也称为Kommella方式或Martini方式的二层VPN变种)可以实现异地局域网的二层透明互通。以下是基本的配置步骤和示例:

基本概念

MPLS VLL通过MPLS网络在两个站点之间建立点对点的二层连接,实现:

[*]透明传输二层帧
[*]保持MAC地址学习
[*]无需改变现有IP地址方案


配置步骤

1. 基础MPLS配置

! 在PE路由器上
mpls ip
!
mpls l2 transport
!
interface Loopback0
ip address x.x.x.x 255.255.255.255! 用于MPLS LDP会话
!
router ospf 1
network x.x.x.x 0.0.0.0 area 0   ! 或其他IGP协议

2. VLL配置(两种主要方式)

方式一:Martini方式(使用VC类型4)

! PE1配置
interface Virtual-Template1
type frame-relay! 或以太网、ATM等,根据实际需求
!
xconnect <PE2_LOOPBACK_IP> <VC_ID> encapsulation mpls
! 或更详细的:
! xconnect <PE2_LOOPBACK_IP> <VC_ID> encapsulation l2tpv3 (或其他)
! 但MPLS方式更常见
!
! 实际绑定到物理接口的示例:
interface GigabitEthernet0/1
description Connected_to_CE1
xconnect <对应VC参数或使用下面模板方式>
! 更常见的是使用下面方式:
! 或者先创建virtual-template然后绑定
!
! 更完整的示例:
interface Virtual-Template1
ip unnumbered Loopback0! 或其他IP配置,视需求而定
!
interface GigabitEthernet0/1
description To_CE1
no ip address
xconnect vc 101 encapsulation mpls! 101为本地VC ID

方式二:Kommella方式(使用LDP信号)

! PE1配置
mpls l2 vc
local circuit-id 100! 本地电路ID
remote circuit-id 200 ! 远端电路ID(需与PE2协商)
peer <PE2_LOOPBACK_IP>
!
interface GigabitEthernet0/1! 绑定到物理接口
!
! 或者使用VC ID方式:
mpls l2 vc 101
peer <PE2_LOOPBACK_IP>
interface GigabitEthernet0/1

3. 完整配置示例(PE1和PE2)

PE1配置

mpls ip
mpls l2 transport
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface GigabitEthernet0/0
description Uplink_to_P
mpls ip
!
interface GigabitEthernet0/1
description To_CE1
no ip address
xconnect vc 100 encapsulation mpls
! 或使用:
! xconnect <PE2_LOOPBACK> 100 encapsulation mpls
!
! 或者使用virtual-template方式:
interface Virtual-Template1
type ethernet
!
interface GigabitEthernet0/1
no ip address
mpls l2 transport
! 或使用xconnect指向template
xconnect vc 100 encapsulation mpls# 或绑定到template

PE2配置(对称配置)

mpls ip
mpls l2 transport
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface GigabitEthernet0/0
description Uplink_to_P
mpls ip
!
interface GigabitEthernet0/1
description To_CE2
no ip address
xconnect vc 100 encapsulation mpls# VC ID需与PE1协商一致
! 或 xconnect 1.1.1.1 100 encapsulation mpls

验证命令

show mpls l2 transport vc
show mpls l2 transport vc <vc-id> detail
show mpls forward table
show xconnect all
show mpls l2 vc

注意事项

[*]VC ID协调:两端VC ID可以相同(对称)或不同(非对称),但需协调一致
[*]封装类型:确保两端使用相同的封装类型(mpls, l2tpv3等)
[*]MTU设置:确保整个路径的MTU足够大以传输业务流量
[*]QoS:如需QoS,应在MPLS域内配置相应策略
[*]冗余:考虑配置主备路径以提高可靠性


优势

[*]快速部署:相比传统专线,部署更快
[*]灵活性:可以快速调整带宽和路径
[*]成本效益:利用现有MPLS网络资源


以上配置可根据具体设备厂商(Cisco, Huawei等)和实际网络需求进行调整。
页: [1]
查看完整版本: MPLS VLL 二层专线配置,实现异地局域网二层透明互通配置