mpls跨域optionB

  optionB的核心思想是私网路由传递过程是 PE-ASBR1-ASBR2-PE2 在传递过程中私网标签发生了变化(由ASBR重新分配了私网标签),而在数据平面(不考虑PHP机制)当数据包到达ASBR1时标签存在公网标签和私网标签两层,当转发给ASBR2时只有一层由ASBR2分配的私网标签,通过EBGP隧道迭代直接到达ASBR2,ASBR2再把私网标签替换成PE分配的标签并压入公网标签后转发。

  所以在optionB中私网标签一共有三个,数据包标签最少时只有一层私网标签

  optionB的缺点是ASBR设备需要维护到用户侧的VPNV4路由,占用大量设备资源,所以现网中如果使用optionB做为跨域方案,建议ASBR设备只做MPLS设备来使用

拓扑

编址

  G0/0/0 G0/0/1 loopback0
CE1 10.0.0.1/30   192.168.0.1
PE1 12.1.1.1/24 10.0.0.2/30 1.1.1.1
P1 12.1.1.2/24 23.1.1.2/24 2.2.2.2
ASBR1 34.1.1.3/24 23.1.1.3/24 3.3.3.3
ASBR2 34.1.1.4/24 45.1.1.4/24 4.4.4.4
P2 56.1.1.5/24 45.1.1.5/24 5.5.5.5
PE2 56.1.1.6/24 10.10.10.2/30 6.6.6.6
CE1 10.10.10.1/30   192.168.1.1
  1. 底层互联地址ospf,域内mpls ldp配置略
    1.   查看ASBR路由表

    2.   查看ASBR mpls lsp

  2. PE配置VPN端口接入CE
    1.   PE1

      ip vpn-instance vpn1
      ipv4-family
      route-distinguisher 100:1
      vpn-target 100:1 export-extcommunity
      vpn-target 100:1 import-extcommunity

      interface GigabitEthernet0/0/1
      ip binding vpn-instance vpn1
      ip address 10.0.0.2 255.255.255.252

      bgp 100
      #
      ipv4-family unicast
      undo synchronization
      #
      ipv4-family vpn-instance vpn1
      peer 10.0.0.1 as-number 300

      CE1

      bgp 300
      peer 10.0.0.2 as-number 100
      #
      ipv4-family unicast
      undo synchronization
      network 192.168.0.1 255.255.255.255
      peer 10.0.0.2 enable
      #

    2. PE2

      ip vpn-instance vpn1
      ipv4-family
      route-distinguisher 100:1
      vpn-target 100:1 export-extcommunity
      vpn-target 100:1 import-extcommunity

      interface GigabitEthernet0/0/1
      ip binding vpn-instance vpn1
      ip address 10.10.10.2 255.255.255.252

      bgp 200
      #
      ipv4-family unicast
      undo synchronization
      #
      ipv4-family vpn-instance vpn1
      peer 10.10.10.1 as-number 400

  3. 查看BGP状态与路由
    1.   PE1

    2. PE2

  4. PE与ASBR间建立IBGP-VPNV4邻居关系,传递私网路由,注意ASBR一定要undo policy vpn-target,否则会因为VPN RT值不匹配导致无法安装私网路由

    ASBR
    bgp 100
    peer 1.1.1.1 as-number 100
    peer 1.1.1.1 connect-interface LoopBack0
    #
    ipv4-family unicast
    undo synchronization
    peer 1.1.1.1 enable
    peer 34.1.1.4 enable
    #
    ipv4-family vpnv4
    undo policy vpn-target
    peer 1.1.1.1 enable

    PE

    bgp 100
    peer 3.3.3.3 as-number 100
    peer 3.3.3.3 connect-interface LoopBack0
    #
    ipv4-family unicast
    undo synchronization
    peer 3.3.3.3 enable
    #
    ipv4-family vpnv4
    policy vpn-target
    peer 3.3.3.3 enable
    查看ASBR是否正常接收到PE传递的私网路由

  5. ASBR间建立EBGP-VPNV4邻居关系,并配置替换外层VPN标签,使公网LSP完整
    ASBR1

    bgp 100
    peer 1.1.1.1 as-number 100
    peer 1.1.1.1 connect-interface LoopBack0
    peer 34.1.1.4 as-number 200
    #
    ipv4-family unicast
    undo synchronization
    peer 1.1.1.1 enable
    peer 1.1.1.1 route-policy to-pe export
    peer 1.1.1.1 label-route-capability
    peer 34.1.1.4 enable
    peer 34.1.1.4 route-policy to-asbr export
    peer 34.1.1.4 label-route-capability
    #
    ipv4-family vpnv4
    undo policy vpn-target
    peer 1.1.1.1 enable
    peer 34.1.1.4 enable

    route-policy to-asbr permit node 10
    apply mpls-label
    #
    route-policy to-pe permit node 10
    if-match mpls-label
    apply mpls-label

    ASBR2

    bgp 200
    peer 6.6.6.6 as-number 200
    peer 6.6.6.6 connect-interface LoopBack0
    peer 34.1.1.3 as-number 100
    #
    ipv4-family unicast
    undo synchronization
    peer 6.6.6.6 enable
    peer 6.6.6.6 route-policy to-pe export
    peer 6.6.6.6 label-route-capability
    peer 34.1.1.3 enable
    peer 34.1.1.3 route-policy to-asbr export
    peer 34.1.1.3 label-route-capability
    #
    ipv4-family vpnv4
    undo policy vpn-target
    peer 6.6.6.6 enable
    peer 34.1.1.3 enable

    route-policy to-asbr permit node 10
    apply mpls-label
    #
    route-policy to-pe permit node 10
    if-match mpls-label
    apply mpls-label

    查看两端ASBR路由

    查看两端ASBR MPLS LSP

  6. 查看CE设备路由表,并测试连通性  

最新文章

  1. Appium移动自动化测试之问题总结
  2. PL/SQL 循环结构
  3. [php] php图表显示
  4. postgresql中执行计划
  5. 20145218 《Java程序设计》第03次实验报告
  6. Java基础——左移和右移
  7. Node.js V0.12 新特性之性能优化
  8. HDU 1527 取石子游戏(威佐夫博弈)
  9. Python collections.defaultdict() 与 dict的使用和区别
  10. .net数据统计系统设计(中小型)
  11. sql sever insert into混合嵌套插入
  12. 电子医疗设备创新研发应该用i.MX6Q开发板吗?为医疗设备提供解决方案
  13. MySQL一般查询日志或者慢查询日志历史数据的清理
  14. 『TensorFlow』网络操作API_中_损失函数及分类器
  15. C语言复习---比赛问题
  16. stark - filter、pop、总结
  17. Selenium之firefox浏览器的启动问题及解决
  18. JavaScript里面的居民们1-数据
  19. angularjs string format
  20. (7)C#流程控制

热门文章

  1. SpringCloud个人笔记-02-Feign初体验
  2. numpy计算数组中满足条件的个数
  3. 还能这样?把 Python 自动翻译成 C++
  4. keil Uvision4 面向51单片机数据类型属性一览表
  5. 让弹幕给 PPD 生个孩子
  6. turnjs fabricjs canvas 翻书
  7. 「腾讯视频」微信小程序插件介绍
  8. scrapy框架爬取国际庄2011-2022的天气情况
  9. java中类变量和实例变量的实质区别?
  10. vConsole移动端调试利器