设为首页收藏本站language 语言切换
查看: 2513|回复: 2
收起左侧

[求助] 关于MPLS VPN,PE和CE路由器运行BGP的问题

[复制链接]
发表于 2016-10-9 00:21:16 | 显示全部楼层 |阅读模式
100鸿鹄币
首先配置是配通了的,拓扑如下
QQ图片20161009000423.png 左边CE1和PE1之间运行的BGP,as为1,R2和R4运行的BGPAS号为2,CE2运行的BGPAS号为5.
这里CE1和PE1,CE2和PE2运行BGP协议,PE1和PE2上创建VRF,R2-R4间运行MPLS和IGP,PE1和PE2运行BGP互指邻居,这里吧CE1和PE1的配置贴上来,其他的类似
CE1:
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.12.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet1/0
no ip address
shutdown
duplex half
!
router bgp 1
no synchronization
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
neighbor 10.1.12.2 remote-as 2
no auto-summary



PE1:
ip vrf cisco
rd 2:2
route-target export 2:2
route-target import 2:4
!
!
mpls label range 200 299
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip vrf forwarding cisco
ip address 10.1.12.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 10.1.23.1 255.255.255.0
duplex auto
speed auto
mpls ip
!
interface FastEthernet1/0
no ip address
shutdown
duplex half
!
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 0
network 10.1.23.0 0.0.0.255 area 0
!
router bgp 2
no synchronization
bgp log-neighbor-changes
network 2.2.2.2 mask 255.255.255.255
neighbor 4.4.4.4 remote-as 2
no auto-summary
!
address-family vpnv4
neighbor 4.4.4.4 activate
neighbor 4.4.4.4 send-community extended
exit-address-family
!
address-family ipv4 vrf cisco
neighbor 10.1.12.1 remote-as 1
neighbor 10.1.12.1 activate
no synchronization
network 2.2.2.2 mask 255.255.255.255
network 10.1.12.0 mask 255.255.255.0
exit-address-family
!

然后在R1上我能ping通R5上的loopback接口5.5.5.5
我这里虽然配置通了,但是总有点不解,R2上实际上运行了一个名为CISCO的vrf,然后R2和R4互指邻居的时候是通过loopback接口2.2.2.2和4.4.4.4建立的,这个时候R2上的路由表实际上有两张,一个是全局路由表,一个是VRF路由表,这里我感觉很不解的就是,既然路由表也是区分开来的,那为什么对于路由器R4来说它两张路由表都能接收到(R2上的BGP路由表和VRF路由表),总感觉需要什么命令把VRF的路由重发布进BGP里的感觉,但实际又不需要,如果这里只是运行了多个BGP我都能理解,关键运行了VRF,所以有点不知道(还是说不管建立多少VRF路由,最终都会通过BGP的全局路由发给对方,即使同一台路由器上路由表有多张?),请问这里应该怎么理解呢,请知道的告诉下,谢谢了



这里附上R3-R5的配置
R3:
mpls label range 300 399
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.23.2 255.255.255.0
duplex auto
speed auto
mpls ip
!
interface FastEthernet0/1
ip address 10.1.34.1 255.255.255.0
duplex auto
speed auto
mpls ip
!
interface FastEthernet1/0
no ip address
shutdown
duplex half
!
router ospf 1
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 0
network 10.1.23.0 0.0.0.255 area 0
network 10.1.34.0 0.0.0.255 area 0
!
!
no ip http server
no ip http secure-server
!
!
!
!
mpls ldp router-id Loopback0
!




R4:
ip vrf cisco
rd 2:4
route-target export 2:4
route-target import 2:2
!
!
mpls label range 400 499
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.34.2 255.255.255.0
duplex auto
speed auto
mpls ip
!
interface FastEthernet0/1
ip vrf forwarding cisco
ip address 10.1.45.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
no ip address
shutdown
duplex half
!
router ospf 1
router-id 4.4.4.4
log-adjacency-changes
network 4.4.4.4 0.0.0.0 area 0
network 10.1.34.0 0.0.0.255 area 0
!
router bgp 2
no synchronization
bgp log-neighbor-changes
network 4.4.4.4 mask 255.255.255.255
neighbor 2.2.2.2 remote-as 2
neighbor 2.2.2.2 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community extended
exit-address-family
!
address-family ipv4 vrf cisco
neighbor 10.1.45.2 remote-as 5
neighbor 10.1.45.2 activate
no synchronization
network 10.1.12.0 mask 255.255.255.0
network 10.1.45.0 mask 255.255.255.0
exit-address-family
!
!
no ip http server
no ip http secure-server
!
!
!
!
mpls ldp router-id Loopback0
!
!




R5:
interface Loopback0
ip address 5.5.5.5 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.45.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet1/0
no ip address
shutdown
duplex half
!
router bgp 5
no synchronization
bgp log-neighbor-changes
network 5.5.5.5 mask 255.255.255.255
neighbor 10.1.45.1 remote-as 2
no auto-summary
!
!


最佳答案

查看完整内容

在MPLS VPN中用到的是MP-BGP R2和R4是address-family vpnv4邻居 从而可相互学习到vpn路由信息
发表于 2016-10-9 00:21:17 | 显示全部楼层
在MPLS VPN中用到的是MP-BGP
R2和R4是address-family vpnv4邻居 从而可相互学习到vpn路由信息
沙发 2016-10-9 00:21:17 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-10-9 21:27:21 | 显示全部楼层
abluesky 发表于 2016-10-9 20:20
在MPLS VPN中用到的是MP-BGP
R2和R4是address-family vpnv4邻居 从而可相互学习到vpn路由信息

谢谢了,经过一天大概明白了,感谢回答
板凳 2016-10-9 21:27:21 回复 收起回复
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-4-30 19:50 , Processed in 0.064905 second(s), 27 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表