实验:跨域VPN-OptionC方式-方案二

配置思路
        基础配置:各接口IP地址、环回口IP地址

        IGP配置:各AS内环回口IP地址互通

        MPLS配置:PE和ASBR之间配置MPLS LDP,建立LSP隧道

        BGP基础配置:PE和ASBR之间建立IBGP邻居;ASBR之间建立EBGP邻居

        VPN配置:PE配置VPN实例,并同CE建立EBGP邻居

        IGP引入:将对端PE和RR环回口地址引入到IGP中

        MP-BGP:PE和RR,RR和RR之间建立VPNv4邻居,传递vpnv4时下一跳不变

        标签交换:PE、RR使能标签交换;ASBR和ASBR之间配置标签策略;ASBR之间触发为BGP路由分发标签

     

配置步骤

步骤一:基础配置(略)、IGP配置(略)、MPLS配置(略)、BGP基础(略) VPN配置(略)

完成后检查PE设备上有私网路由,并且同反射器RR1建立vpnv4邻居;同ASBR建立LSP通道方案二是通过ASBR映入到IGP中再由LDP分发标签,所以此拓扑中ASBR和P设备可以不用同反射器建立BGP邻居

 

 步骤二:ASBR上将对端PE和RR环回口地址引入到IGP中

ASBR1

bgp 100
        network 1.1.1.1 255.255.255.255 
        network 7.7.7.7 255.255.255.255

ip ip-prefix 68 index 10 permit 6.6.6.6 32
ip ip-prefix 68 index 20 permit 8.8.8.8 32

route-policy 68 permit node 10 
         if-match ip-prefix 68

ospf 100 
         import-route bgp route-policy 68

ASBR2

bgp 200
        network 6.6.6.6 255.255.255.255 
        network 8.8.8.8 255.255.255.255
ip ip-prefix 17 index 10 permit 1.1.1.1 32
ip ip-prefix 17 index 20 permit 7.7.7.7 32
route-policy 17 permit node 10 
        if-match ip-prefix 17 

isis 200
        import-route bgp route-policy 17 

查看PE设备已经能够从IGP协议获取对端反射器和PE的环回口路由

步骤三:MP-BGP:PE和RR,RR和RR之间建立VPNv4邻居

PE1

bgp 100
 ipv4-family vpnv4
  peer 7.7.7.7 enable

PE1

bgp 200
 ipv4-family vpnv4
  peer 8.8.8.8 enable

RR1
bgp 100
        peer 8.8.8.8 as-number 200 
        peer 8.8.8.8 ebgp-max-hop 10 
        peer 8.8.8.8 connect-interface LoopBack0
 ipv4-family vpnv4
          undo policy vpn-target
          peer 1.1.1.1 enable
          peer 1.1.1.1 reflect-client
          peer 1.1.1.1 next-hop-invariable 
          peer 8.8.8.8 enable
          peer 8.8.8.8 next-hop-invariable 

RR2
bgp 200
         peer 7.7.7.7 as-number 100 
         peer 7.7.7.7 ebgp-max-hop 10 
         peer 7.7.7.7 connect-interface LoopBack0
 ipv4-family vpnv4
          undo policy vpn-target
          peer 6.6.6.6 enable
          peer 6.6.6.6 reflect-client
          peer 6.6.6.6 next-hop-invariable 
          peer 7.7.7.7 enable
          peer 7.7.7.7 next-hop-invariable        

完成后在反射器上查看反射器已经同PE和对端RR建立MP-BGP邻居,并且状态正常

步骤四:配置数据传递中的标签交换

[pe1-bgp]
bgp 100
  peer 7.7.7.7 label-route-capability

[pe2-bgp]
bgp 200
  peer 8.8.8.8 label-route-capability

 [rr1-bgp]
bgp 100
  peer 1.1.1.1 label-route-capability
  peer 8.8.8.8 label-route-capability 

[rr2-bgp]
bgp 200
  peer 6.6.6.6 label-route-capability
  peer 7.7.7.7 label-route-capability

[asbr1-bgp]
bgp 100
  peer 34.34.34.2 route-policy 111 export
  peer 34.34.34.2 label-route-capability

[asbr2-bgp]
bgp 200
  peer 34.34.34.1 route-policy 111 export
  peer 34.34.34.1 label-route-capability

ASBR1和ASBR2相同配置,配置为BGP路由分发标签和策略

mpls
        lsp-trigger bgp-label-route

route-policy 111 permit node 10 
        apply mpls-label

完成后PE上查看能够同对端PE和RR建立LSP通道,并且PE能够获取到对端PE传递vpnv4私网路由测试私网通信正常

报文转发时标签传递过程

1、CE1访问CE2,查找路由表转发;

2、PE1从VPN实例1接受数据查找VPN实例转发路由表,tunnelID不为0则添加对应私网标签1032;添加下一跳6.6.6.6 的LDP标签3、P1查标签转发表,将1027替换为1031转发4、ASBR1查找标签转发表,将LDP标签1031替换BGP标签1069转发5、ASBR2查标签转发表,剥离BGP标签,添加LDP标签1027转发6、P2根据标签转发表,剥离LDP标签转发7、PE2查标签表后剥离标签,安装VPN实例路由表转发,流量反方向传递时类似

 学习中欢迎大家讨论和指导!

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值