网络 华为 运维 网络协议 网络安全 实验:跨域VPN-OptionC方式-方案二 - 8 label-route-capability
配置思路 基础配置:各接口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实例路由表转发,流量反方向传递时类似
学习中欢迎大家讨论和指导!
好文推荐,网络