首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用BGP、RIP和OSPF的MPLS VPN网络

使用BGP、RIP和OSPF的MPLS VPN网络
EN

Network Engineering用户
提问于 2016-08-02 11:02:47
回答 2查看 1K关注 0票数 2

我正在配置MPLS网络。

下面是我正在做的工作:

从CE1,我希望能够平移CE2的回环地址,反之亦然,这还不可能,我不知道我在哪里出了问题……我迄今所采取的步骤如下:

前提条件:

  • 在P和PE路由器上启用OSPF,在网络内广告加上回环
  • 在P和PE路由器上启用MPLS

采取的步骤:

  1. 在PE和CE路由器上,我启用了RIP V2
  2. 在这两个PE路由器上,我为客户端启用了VRF (在PE2上重复)PE1(配置)#ip vrf client1 PE1(config-vrf)#rd 999:1 PE1(config-vrf)#PE1(config-vrf)#PE1 64999:1 PE1(config-vrf)#PE1--目标导入64999:1
  3. 将两个PE路由器上的VRF分配给CE路由器面临的接口
  4. 在两个PE路由器上设置基本BGP,我将列出两个PE路由器的运行配置:

PE1配置

代码语言:javascript
复制
Current configuration : 2176 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname PE1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip cef
!
!
!
!
ip vrf client1
 rd 999:1
 route-target export 64999:1
 route-target import 64999:1
!
no ip domain lookup
!
multilink bundle-name authenticated
!
archive
 log config
  hidekeys
!
!
!
!
ip tcp synwait-time 5
!

interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
 ip vrf forwarding client1
 ip address 10.1.1.2 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 192.168.1.1 255.255.255.252
 duplex auto
 speed auto
 mpls label protocol ldp
 mpls ip
!
interface FastEthernet1/0
 no ip address
 shutdown
 duplex auto
 speed auto
!

router ospf 10
 log-adjacency-changes
 network 1.1.1.1 0.0.0.0 area 0
 network 192.168.1.0 0.0.0.3 area 0
!
router rip
 version 2
 network 10.0.0.0
 no auto-summary
 !
 address-family ipv4 vrf client1
  redistribute bgp 64999 metric 1
  network 10.0.0.0
  no auto-summary
  version 2
 exit-address-family
!
router bgp 64999
 no bgp default ipv4-unicast
 bgp log-neighbor-changes
 neighbor 4.4.4.4 remote-as 64999
 neighbor 4.4.4.4 update-source Loopback0
 !
 address-family vpnv4
  neighbor 4.4.4.4 activate
  neighbor 4.4.4.4 send-community extended
 exit-address-family
 !
 address-family ipv4 vrf client1
  redistribute rip metric 1
  no synchronization
 exit-address-family
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
no cdp log mismatch duplex
!
control-plane
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end

PE2配置

代码语言:javascript
复制
Building configuration...

Current configuration : 2145 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname PE2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip cef
!

ip vrf client2
 rd 999:1
 route-target export 64999:1
 route-target import 64999:1
!
no ip domain lookup
!
multilink bundle-name authenticated
!

archive
 log config
  hidekeys
!
!
!
!
ip tcp synwait-time 5
!
!
!
!
interface Loopback0
 ip address 4.4.4.4 255.255.255.255
!
interface FastEthernet0/0
 ip vrf forwarding client2
 ip address 10.1.1.6 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 192.168.1.9 255.255.255.252
 duplex auto
 speed auto
 mpls label protocol ldp
 mpls ip
!
interface FastEthernet1/0
 no ip address
 shutdown
 duplex auto
 speed auto
!

router ospf 10
 log-adjacency-changes
 network 4.4.4.4 0.0.0.0 area 0
 network 192.168.1.8 0.0.0.3 area 0
!
router rip
 version 2
 network 10.0.0.0
 no auto-summary
 !
 address-family ipv4 vrf client2
  redistribute bgp 64999 metric 1
  no auto-summary
 exit-address-family
!
router bgp 64999
 no bgp default ipv4-unicast
 bgp log-neighbor-changes
 neighbor 1.1.1.1 remote-as 64999
 neighbor 1.1.1.1 update-source Loopback0
 !
 address-family vpnv4
  neighbor 1.1.1.1 activate
  neighbor 1.1.1.1 send-community extended
 exit-address-family
 !
 address-family ipv4 vrf client2
  redistribute rip metric 1
  no synchronization
 exit-address-family
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
no cdp log mismatch duplex
!
control-plane
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end
  1. 将RIP配置为使用用于PE1和PE2的VRF表。PE1(配置)#路由器撕裂PE1(配置-路由器)#地址-家庭ipv4 vrf client1 PE1(配置-路由器-af)#第2版(配置-路由器-af)#网络10.0.0.0 PE1(配置-路由器-af)#无自动摘要
  2. 路线的重新分配
    • 到BGP的旅行路线
    • 到RIP的BGP路线

在进行了上述配置之后,我运行了以下命令.

CE1 -只能在CE1和CE2上看到连接的路由

代码语言:javascript
复制
     10.0.0.0/30 is subnetted, 2 subnets
C       10.1.1.8 is directly connected, Loopback0
C       10.1.1.0 is directly connected, FastEthernet0/0

PE1

代码语言:javascript
复制
PE1#show ip route
Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/11] via 192.168.1.2, 01:02:04, FastEthernet0/1
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/21] via 192.168.1.2, 01:02:04, FastEthernet0/1
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/31] via 192.168.1.2, 01:02:04, FastEthernet0/1
     192.168.1.0/30 is subnetted, 3 subnets
O       192.168.1.8 [110/30] via 192.168.1.2, 01:02:06, FastEthernet0/1
C       192.168.1.0 is directly connected, FastEthernet0/1
O       192.168.1.4 [110/20] via 192.168.1.2, 01:02:06, FastEthernet0/1

代码语言:javascript
复制
PE1#show ip route vrf client1
     10.0.0.0/30 is subnetted, 2 subnets
R       10.1.1.8 [120/1] via 10.1.1.1, 00:00:18, FastEthernet0/0
C       10.1.1.0 is directly connected, FastEthernet0/0

PE2

代码语言:javascript
复制
PE2#show ip route

     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/31] via 192.168.1.10, 01:08:58, FastEthernet0/1
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/21] via 192.168.1.10, 01:09:08, FastEthernet0/1
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/11] via 192.168.1.10, 01:09:08, FastEthernet0/1
     4.0.0.0/32 is subnetted, 1 subnets
C       4.4.4.4 is directly connected, Loopback0
     192.168.1.0/30 is subnetted, 3 subnets
C       192.168.1.8 is directly connected, FastEthernet0/1
O       192.168.1.0 [110/30] via 192.168.1.10, 01:08:59, FastEthernet0/1
O       192.168.1.4 [110/20] via 192.168.1.10, 01:09:09, FastEthernet0/1

代码语言:javascript
复制
PE2#show ip route vrf client2
     10.0.0.0/30 is subnetted, 3 subnets
B       10.1.1.8 [200/1] via 1.1.1.1, 00:55:41
B       10.1.1.0 [200/0] via 1.1.1.1, 00:55:41
C       10.1.1.4 is directly connected, FastEthernet0/0
  • 为什么我只看到PE1的RIP路线?在PE2中只有BGP路线?
  • 我应该看到从PE1和2到CE网络的BGP和RIP的路由吗?
  • 我错过了什么/做错了什么不让我从CE1到CE2,反之亦然?

加法运行配置

CE2:

代码语言:javascript
复制
CE2#show run
Building configuration...

Current configuration : 1396 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname CE2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip cef
!
!
!
!
no ip domain lookup
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
archive
 log config
  hidekeys
!
!
!
!
ip tcp synwait-time 5
!
!
!
!
interface Loopback0
 ip address 10.1.1.17 255.255.255.252
!
interface FastEthernet0/0
 ip address 10.1.1.5 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet1/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial2/0
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial2/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial2/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial2/3
 no ip address
 shutdown
 serial restart-delay 0
!
router rip
 version 2
 network 10.0.0.0
 no auto-summary
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
no cdp log mismatch duplex
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end

提前感谢!

EN

回答 2

Network Engineering用户

回答已采纳

发布于 2016-08-02 12:51:40

PE2不见了

代码语言:javascript
复制
address-family  ipv4  vrf  client1

在RIP配置下

票数 1
EN

Network Engineering用户

发布于 2016-08-02 13:04:26

PE2丢失(在RIP地址-家庭ipv4 vrf client2下)

代码语言:javascript
复制
version 2
network 10.0.0.0
no auto-summary
票数 1
EN
页面原文内容由Network Engineering提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://networkengineering.stackexchange.com/questions/33677

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档