十九、MPLS隧道基本原理与配置

  • MPLS VPN
    • 为什么需要MPLS VPN
      • 用户端搭建的VPN只能由用户自行配置、管理和维护,随着用户网络规模扩大,VPN隧道的数量不断增长,配置、管理和维护的难度不断增加。
      • 是否可以将VPN的配置、管理、维护工作交给运营商
    • MPLS VPN解决了哪些问题
      • 1.解决用户侧地址重叠
        • VRF Virtual Routing and Forwarding,虚拟路由转发
        • RD Route Distinguisher,路由区分,即可区分相同地址空间的路由
        • VPNV4地址/路由/前缀
          • VPN IPv4地址的简称
          • 也就是RD值+IPv4地址前缀,例如 100:1:192.168.1.0
          • 华为配置命令
            • PE配置命令(华为):
            • ip vpn-instance huawei1 //VRF创建,名字两端可以不一致
            • route-distinguisher 14:4 // RD 值配置
            • interface GigabitEthernet0/0/1 //接口划入到对应VRF中
            • ip binding vpn-instance huawei1
            • ip vpn-instance huawei2
            • route-distinguisher 15:5 // RD 值配置
            • interface GigabitEthernet2/0/0
            • ip binding vpn-instance huawei2
            • 查看命令
              • display ip routing-table vpn-instance X
            • 测试命令
              • ping -vpn-instance X X.X.X.X
          • 思科配置命令
            • PE配置命令(思科):
            • Ip vrf cisco1 //VRF创建
            • rd 14:4 // RD 值配置
            • interface GigabitEthernet0/0/1 //接口划入到对应VRF中
            • ip vrf forwarding cisco1
            • Ip vrf cisco2 //VRF创建
            • rd 15:5 // RD 值配置
            • interface GigabitEthernet2/0/0 //接口划入到对应VRF中
            • ip vrf forwarding cisco2
            • 查看命令
              • show ip route vrf X
            • 测试命令
              • ping vrf X x.x.x.x
      • 2.路由传递时候,VPN实例是否接收对应路由
        • RT华为
          • PE1配置命令:
          • ip vpn-instance huawei1 //VRF创建
          • vpn-target 14:4 export-extcommunity //配置RT export 值
          • ip vpn-instance huawei2
          • vpn-target 15:5 export-extcommunity
          • PE2配置命令:
          • ip vpn-instance huawei1 //VRF创建
          • vpn-target 14:4 import-extcommunity //配置RT import 值
          • ip vpn-instance huawei2 //VRF创建
          • vpn-target 15:5 import-extcommunity //配置RT import 值
        • PE1配置命令(思科):
          • ip vrf cisco1 //VRF创建
          • route-target export 14:4
          • PE2配置命令:
          • ip vrf cisco1 //VRF创建
          • route-target import 14:4
          • …其他略
      • 3.私网路由的传递,
        • MP-BGP
          • bgp 123
          • peer 3.3.3.3 as-number 123
          • peer 3.3.3.3 connect-interface LoopBack0
          • ipv4-family vpnv4
          • peer 3.3.3.3 enable
      • 4.确保数据报文转发到达对应的VPN实例
        • MP-BGP可以打内层标签(私网标签)
        • MP-BGP(Multiprotocol Border Gateway Protocol)是在BGP协议基础上扩展的协议。MP-BGP支持为MPLS
        • VPN业务中私网路由和跨域VPN的标签路由分配标签。
      • 查看命令
        • display bgp vpnv4 vpn-instance X peer //查看对应VRF BGP邻居关系
        • display bgp vpnv4 all peer
        • display bgp vpnv4 all routing-table
    • 华为配置
      • BGP
        • PE端配置
          • bgp 123
          • ipv4-family vpn-instance 14
          • peer 14.1.1.4 as-number 400
      • OSPF
        • PE端配置
          • ospf 2 router-id 3.3.3.3 vpn-instance 36
          • import-route bgp
          • area 0.0.0.0
          • network 36.1.1.3 0.0.0.0
      • RIP.
        • PE端配置
          • rip 1 vpn-instance 37
          • version 2
          • network 37.0.0.0
          • import-route bgp
    • 思科
    • 思科配置
      • rip
        router rip
        !
        address-family ipv4 vrf A
        redistribute bgp 2345 metric 1
        network 56.0.0.0
        no auto-summary
        version 2
      • ospf
        router ospf 2 vrf A
        redistribute bgp 2345 subnets
        network 56.1.1.5 0.0.0.0 area 0
      • bgp
        router bgp 2345
        no synchronization
        bgp router-id 2.2.2.2
        neighbor 5.5.5.5 remote-as 2345
        neighbor 5.5.5.5 update-source Loopback0
        neighbor 5.5.5.5 next-hop-self

        address-family vpnv4
        neighbor 5.5.5.5 activate
        neighbor 5.5.5.5 send-community extended

        address-family ipv4 vrf A
        neighbor 12.1.1.1 remote-as 1

        关闭RT值的过滤
        No bgp default route-target filter
      • 防环
        1. PE-CE之间的路由协议---Static
        ​2.PE-CE之间的路由协议——EIGRP
        防环:SOo
        Route-map打上Tag
        3. PE-CE之间的路由协议---OSPF
        防环︰域间(down-bit)
        域外(tag)
        sham-link
        4.PE-CE之间的路由协议---BGP
        防环:Soo
        as-over/allowas-in
  • 3
    点赞
  • 32
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值