赞
踩
配置思路
基础配置:各接口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路由分发标签
完成后检查PE设备上有私网路由,并且同反射器RR1建立vpnv4邻居;同ASBR建立LSP通道方案二是通过ASBR映入到IGP中再由LDP分发标签,所以此拓扑中ASBR和P设备可以不用同反射器建立BGP邻居
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
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的环回口路由
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实例路由表转发,流量反方向传递时类似
学习中欢迎大家讨论和指导!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。