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设备路由表,并测试连通性  

MPLS L3 跨域 optionB 配置的更多相关文章

  1. spring mvc \ spring boot 允许跨域请求 配置类

    用@Component 注释下,随便放个地方就可以了 package com.chinaws.wsarchivesserver.core.config; import org.springframew ...

  2. Web Api跨域访问配置及调用示例

    1.Web Api跨域访问配置. 在Web.config中的system.webServer内添加以下代码: <httpProtocol> <customHeaders> &l ...

  3. nginx反向代理跨域基本配置与常见误区

    最近公司前后端分离,前端独立提供页面和静态服务很自然的就想到了用nginx去做静态服务器.同时由于跨域了,就想利用nginx的反向代理去处理一下跨域,但是在解决问题的同时,发现网上有些方案的确是存在一 ...

  4. geoserver源码学习与扩展——跨域访问配置

    在 geoserver源码学习与扩展——restAPI访问 博客中提到了geoserver的跨域参数设置,本文详细讲一下geoserver的跨域访问配置. geoserver的跨域访问依赖java-p ...

  5. django允许跨域请求配置

    django允许跨域请求配置 下载corsheader pip install django-cors-headers 修改setting.py中配置 在INSTALLED_APPS中增加corshe ...

  6. Asp.Net SignalR 使用记录 技术回炉重造-总纲 动态类型dynamic转换为特定类型T的方案 通过对象方法获取委托_C#反射获取委托_ .net core入门-跨域访问配置

    Asp.Net SignalR 使用记录   工作上遇到一个推送消息的功能的实现.本着面向百度编程的思想.网上百度了一大堆.主要的实现方式是原生的WebSocket,和SignalR,再次写一个关于A ...

  7. 跨域请求配置 Amazon AWS S3 腾讯云 阿里云 COS OSS 文件桶解决方案以及推荐 Lebal:Research

    跨域请求配置 跨域请求指的就是不同的域名和端口之间的访问.由于 ajax 的同源策略影响.跨域请求默认是不被允许的. 使用@font-face外挂字体时,可能遇到跨域请求CROS问题:F12控制台报错 ...

  8. Django 处理跨域的配置、前台处理ajax

    一. Django处理跨域 跨域的处理方式有很多,使用最多的就是CORS(跨域资源共享),接下来大致提一下django中处理跨域的配置. 首先安装django-cors-headers模块: pip ...

  9. angualr跨域访问配置

    浏览器对于javascript的同源策略的限制,例如a.cn下面的js不能调用b.cn中的js,对象或数据(因为a.cn和b.cn是不同域),所以跨域就出现了: 简单的解释就是相同域名,端口相同,协议 ...

随机推荐

  1. 爬虫-数据解析-bs4

    1.数据解析 解析: 根据指定的规则对数据进行提取 作用: 实现聚焦爬虫 数据解析方式: - 正则表达式 - bs4 - xpath 数据解析的通用原理: 数据解析需要作用在页面源码中(一组html标 ...

  2. 学习openstack(六)

    VIII openstack(1) 传统的数据中心面临的问题:成本.效率(要快).管理方面(物理机.云主机): 云计算:对运维需求总体量是减少了,尤其是硬件工程师,对运维的技术要求提高了: 云计算是个 ...

  3. Effective Java —— 优先考虑依赖注入来引用资源

    本文参考 本篇文章参考自<Effective Java>第三版第五条"Prefer dependency injection to hardwiring resources&qu ...

  4. 12 Factor App

    The Twelve-Factor App Introduction In the modern era, software is commonly delivered as a service: c ...

  5. 浏览器默认解析文档模式IE7

    背景:实习期间开发了一套页面,兼容到IE8+,可是在给产品体验时,他的QQ浏览器默认解析到了文档模式IE7,出现了页面的兼容性问题.问题排查:QQ浏览器目前有两个模式,极速模式和兼容模式,其中极速模式 ...

  6. turnjs fabricjs canvas 翻书

    最近做了一个翻书效果的项目, 来总结一下实现过程和遇到的一些问题, 供自己以后快速解决问题, 希望也能帮到同样遇到此类问题的同学, 如果有更好的方法,希望你能分享给我git地址 插件: Turn.js ...

  7. GoF设计模式-23大设计模式(表格)-程序员必备+必背

    在GoF经典著作<设计模式:可复用面向对象软件的基础>中一共描述了23种设计模式. <Design Patterns:Elements of Reusable Object-Orie ...

  8. java的原子类到底是啥?ABA,CAS又是些什么?

    1)解决并发不是用锁就能解决吗,那SDK干嘛还要搞个原子类出来? 锁虽然能解决,但是加锁解锁始终还是对性能是有影响的,并且使用不当可能会造成死锁之类的问题. 2)原子类是怎样使用的,比如说我要实现一个 ...

  9. Python输出数字金字塔

    使用Python输出一个数字金字塔 运行结果: 源代码: ''' Python输出数字金字塔 ''' for x in range(1,10): print(' '*(15-x),end='') n= ...

  10. HTTP长连接和短连接及应用情景

    HTTP短连接 HTTP/1.0中默认使用短连接, 客户端和服务器进行一次HTTP操作, 就需要建立一次连接, 任务结束连接也关闭. 当客户端浏览器访问的web网页中包含其他的web资源时, 每遇到一 ...