找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 24473|回复: 0

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

[复制链接]

1

主题

0

回帖

5

积分

新手上路

积分
5
发表于 2026-8-3 18:23:37 | 显示全部楼层 |阅读模式
MPLS VLL (Virtual Leased Line) 二层专线配置指南

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

基本概念

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

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


配置步骤

1. 基础MPLS配置
  1. ! 在PE路由器上
  2. mpls ip
  3. !
  4. mpls l2 transport
  5. !
  6. interface Loopback0
  7. ip address x.x.x.x 255.255.255.255  ! 用于MPLS LDP会话
  8. !
  9. router ospf 1
  10. network x.x.x.x 0.0.0.0 area 0     ! 或其他IGP协议
复制代码

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

方式一:Martini方式(使用VC类型4)
  1. ! PE1配置
  2. interface Virtual-Template1
  3. type frame-relay  ! 或以太网、ATM等,根据实际需求
  4. !
  5. xconnect <PE2_LOOPBACK_IP> <VC_ID> encapsulation mpls
  6.   ! 或更详细的:
  7.   ! xconnect <PE2_LOOPBACK_IP> <VC_ID> encapsulation l2tpv3 (或其他)
  8.   ! 但MPLS方式更常见
  9. !
  10. ! 实际绑定到物理接口的示例:
  11. interface GigabitEthernet0/1
  12. description Connected_to_CE1
  13. xconnect <对应VC参数或使用下面模板方式>
  14. ! 更常见的是使用下面方式:
  15. ! 或者先创建virtual-template然后绑定
  16. !
  17. ! 更完整的示例:
  18. interface Virtual-Template1
  19. ip unnumbered Loopback0  ! 或其他IP配置,视需求而定
  20. !
  21. interface GigabitEthernet0/1
  22. description To_CE1
  23. no ip address
  24. xconnect vc 101 encapsulation mpls  ! 101为本地VC ID
复制代码

方式二:Kommella方式(使用LDP信号)
  1. ! PE1配置
  2. mpls l2 vc
  3.   local circuit-id 100  ! 本地电路ID
  4.   remote circuit-id 200 ! 远端电路ID(需与PE2协商)
  5.   peer <PE2_LOOPBACK_IP>
  6.   !
  7.   interface GigabitEthernet0/1  ! 绑定到物理接口
  8. !
  9. ! 或者使用VC ID方式:
  10. mpls l2 vc 101
  11.   peer <PE2_LOOPBACK_IP>
  12.   interface GigabitEthernet0/1
复制代码

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

PE1配置
  1. mpls ip
  2. mpls l2 transport
  3. !
  4. interface Loopback0
  5. ip address 1.1.1.1 255.255.255.255
  6. !
  7. interface GigabitEthernet0/0
  8. description Uplink_to_P
  9. mpls ip
  10. !
  11. interface GigabitEthernet0/1
  12. description To_CE1
  13. no ip address
  14. xconnect vc 100 encapsulation mpls
  15.   ! 或使用:
  16.   ! xconnect <PE2_LOOPBACK> 100 encapsulation mpls
  17. !
  18. ! 或者使用virtual-template方式:
  19. interface Virtual-Template1
  20. type ethernet
  21. !
  22. interface GigabitEthernet0/1
  23. no ip address
  24. mpls l2 transport
  25.   ! 或使用xconnect指向template
  26.   xconnect vc 100 encapsulation mpls  # 或绑定到template
复制代码

PE2配置(对称配置)
  1. mpls ip
  2. mpls l2 transport
  3. !
  4. interface Loopback0
  5. ip address 2.2.2.2 255.255.255.255
  6. !
  7. interface GigabitEthernet0/0
  8. description Uplink_to_P
  9. mpls ip
  10. !
  11. interface GigabitEthernet0/1
  12. description To_CE2
  13. no ip address
  14. xconnect vc 100 encapsulation mpls  # VC ID需与PE1协商一致
  15.   ! 或 xconnect 1.1.1.1 100 encapsulation mpls
复制代码

验证命令
  1. show mpls l2 transport vc
  2. show mpls l2 transport vc <vc-id> detail
  3. show mpls forward table
  4. show xconnect all
  5. show mpls l2 vc [vc-id]
复制代码

注意事项

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


优势

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


以上配置可根据具体设备厂商(Cisco, Huawei等)和实际网络需求进行调整。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|五云论坛 ( 黔ICP备2022001370号-1|贵公网安备52032102000798号 )

GMT+8, 2026-9-12 18:10 , Processed in 0.072827 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表