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

[求助] MPLS-VPN 求助

[复制链接]
发表于 2016-12-9 10:42:58 | 显示全部楼层 |阅读模式
3鸿鹄币
拓扑如图,配置附件。为什么两端都ping不通呢

结果

结果

拓扑

拓扑

R1.cfg

1.87 KB, 下载次数: 3, 下载积分: 鸿鹄币 -1 个

R2.cfg

1.25 KB, 下载次数: 0, 下载积分: 鸿鹄币 -1 个

R3.cfg

1.85 KB, 下载次数: 0, 下载积分: 鸿鹄币 -1 个

R4.cfg

1.11 KB, 下载次数: 0, 下载积分: 鸿鹄币 -1 个

R6.cfg

1.18 KB, 下载次数: 0, 下载积分: 鸿鹄币 -1 个

最佳答案

查看完整内容

把几个路由器的loopback0 改成/32掩码即可。 查看R4、R6路由表看到都有目标路由信息,R4 traceroute R6发现数据只能到R1,所以怀疑是MPLS环节出问题了。 R1上 show mpls forwarding 100 Pop tag 2.2.2.2/32 0 Fa0/0 12.1.1.2 101 Pop tag 23.1.1.0/24 0 Fa0/0 12.1.1.2 102 201 3.3.3.3/32 0 Fa0/0 12.1.1.2 103 ...
发表于 2016-12-9 10:42:59 | 显示全部楼层
把几个路由器的loopback0 改成/32掩码即可。
查看R4、R6路由表看到都有目标路由信息,R4 traceroute R6发现数据只能到R1,所以怀疑是MPLS环节出问题了。

R1上 show mpls forwarding

100    Pop tag     2.2.2.2/32        0          Fa0/0      12.1.1.2     
101    Pop tag     23.1.1.0/24       0          Fa0/0      12.1.1.2     
102    201         3.3.3.3/32        0          Fa0/0      12.1.1.2   
103    Untagged    4.4.4.0/24[V]     1314       Fa1/0      14.1.1.4     
104    Aggregate   14.1.1.0/24[V]    0                              

这里这些设备的router-id 地址掩码都是/32的,而配置的确实是/24。几个loopback地址更改后再测试

R4#traceroute 6.6.6.6 source 4.4.4.4

Type escape sequence to abort.
Tracing the route to 6.6.6.6

  1 14.1.1.1 20 msec 48 msec 24 msec
  2 12.1.1.2 [MPLS: Labels 201/303 Exp 0] 64 msec 80 msec 60 msec
  3 36.1.1.3 [MPLS: Label 303 Exp 0] 52 msec 68 msec 68 msec
  4 36.1.1.6 64 msec 80 msec 56 msec
沙发 2016-12-9 10:42:59 回复 收起回复
回复

使用道具 举报

发表于 2016-12-9 11:25:13 | 显示全部楼层
没诚意啊,帮你解决问题还要付你5币?自己贴配置吧
板凳 2016-12-9 11:25:13 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-12-9 11:47:20 | 显示全部楼层
附件下载竟然还要币,不知道怎么修改了,配置贴出来,如下
1:
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption

hostname R1
boot-start-marker
boot-end-marker
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip cef
!
ip vrf vpn1
rd 100:1
route-target export 100:1
route-target import 100:1
!
no ip domain lookup
!
mpls label range 100 199
multilink bundle-name authenticated

!
archive
log config
  hidekeys
!
ip tcp synwait-time 5
!
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
ip address 12.1.1.1 255.255.255.0
duplex auto
speed auto
mpls ip
!
interface FastEthernet0/1
ip vrf forwarding vpn1
ip address 14.1.1.1 255.255.255.0
duplex auto
speed auto
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
network 1.1.1.0 0.0.0.255 area 0
network 12.1.1.0 0.0.0.255 area 0
!
router rip
version 2
no auto-summary
!
address-family ipv4 vrf vpn1
  redistribute bgp 100 metric 1
  network 14.0.0.0
  no auto-summary
exit-address-family
!
router bgp 100
no synchronization
bgp router-id 1.1.1.1
bgp log-neighbor-changes
neighbor 3.3.3.3 remote-as 100
neighbor 3.3.3.3 update-source Loopback0
no auto-summary
!
address-family vpnv4
  neighbor 3.3.3.3 activate
  neighbor 3.3.3.3 send-community both
exit-address-family
!
address-family ipv4 vrf vpn1
  redistribute rip
  no synchronization
exit-address-family
!
no ip http server
no ip http secure-server
!
mpls ldp router-id Loopback0
!
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

2:
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
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
!
mpls label range 200 299
multilink bundle-name authenticated
!
archive
log config
  hidekeys
!
ip tcp synwait-time 5
!
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface FastEthernet0/0
ip address 12.1.1.2 255.255.255.0
duplex auto
speed auto
mpls ip
!
interface FastEthernet0/1
ip address 23.1.1.2 255.255.255.0
duplex auto
speed auto
mpls ip
!
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
network 2.2.2.0 0.0.0.255 area 0
network 12.1.1.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0
!
no ip http server
no ip http secure-server
!
mpls ldp router-id Loopback0
!
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

3、
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip cef
!
ip vrf vpn1
rd 100:1
route-target export 100:1
route-target import 100:1
!
no ip domain lookup
!
mpls label range 300 399
multilink bundle-name authenticated
!
archive
log config
  hidekeys
!
ip tcp synwait-time 5
!
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface FastEthernet0/0
ip vrf forwarding vpn1
ip address 36.1.1.3 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 23.1.1.3 255.255.255.0
duplex auto
speed auto
mpls ip
!
router ospf 100 vrf vpn1
router-id 36.1.1.3
log-adjacency-changes
redistribute bgp 100 subnets
network 36.1.1.3 0.0.0.0 area 0
!
router ospf 1
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0
!
router bgp 100
no synchronization
bgp router-id 3.3.3.3
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source Loopback0
no auto-summary
!
address-family vpnv4
  neighbor 1.1.1.1 activate
  neighbor 1.1.1.1 send-community both
exit-address-family
!
address-family ipv4 vrf vpn1
  redistribute ospf 100 vrf vpn1
  no synchronization
exit-address-family
!
no ip http server
no ip http secure-server
!
mpls ldp router-id Loopback0
!
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

4、
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4
!
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 4.4.4.4 255.255.255.0
!
interface FastEthernet0/0
ip address 45.1.1.4 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 14.1.1.4 255.255.255.0
duplex auto
speed auto
!
router rip
version 2
network 4.0.0.0
network 14.0.0.0
network 45.0.0.0
no auto-summary
!
no ip http server
no ip http secure-server
!
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

6、
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R6
!
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 6.6.6.6 255.255.255.0
!
interface FastEthernet0/0
ip address 36.1.1.6 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 67.1.1.6 255.255.255.0
duplex auto
speed auto
!
router ospf 100
router-id 6.6.6.6
log-adjacency-changes
network 6.6.6.0 0.0.0.255 area 0
network 36.1.1.6 0.0.0.0 area 0
network 67.1.1.0 0.0.0.255 area 0
!
no ip http server
no ip http secure-server
!
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
地板 2016-12-9 11:47:20 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-12-9 11:48:19 | 显示全部楼层
Viger 发表于 2016-12-9 11:25
没诚意啊,帮你解决问题还要付你5币?自己贴配置吧

不好意思,没注意设置,没找到修改的地方。配置贴出来了。。。。
5# 2016-12-9 11:48:19 回复 收起回复
回复

使用道具 举报

发表于 2016-12-10 00:18:53 | 显示全部楼层
从配置上可以粗略判断为R1针对VRF的RIP版本没指定为Version 2;
但是我建议你养成良好的排错思路,对以后考试,工作都很有帮助;
针对MPLSVPN的排错可以使用以下命令:
1,show  ip  route  查询CE能否学习到路由;
2,show  ip route vrf xxx 查询VRF的路由表中是否存在对应的路由;
3,show bgp vpnv4 u all  查询是否从对端PE学习到VPNv4 的路由;
4,show bgp vpnv4 u all summary 查询PE之间是否建立VPNv4 邻居;
5,show ip os nei 查询ospf邻居是否建立
6,show mpls ldp nei        查询LDP邻居是否建立
   希望对您有帮助
   ----来自【广州华尔思网络实验室】何老师解答。
6# 2016-12-10 00:18:53 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-12-10 21:03:34 | 显示全部楼层
Viger 发表于 2016-12-10 19:23
把几个路由器的loopback0 改成/32掩码即可。
查看R4、R6路由表看到都有目标路由信息,R4 traceroute R6发 ...

经您提点,我多试了下。
将R1、R3的lo0添加一条配置;
ip ospf network point-to-point
就好了。
所以这应该是IGP用了ospf,而ospf默认将lo口通告为32位路由造成的。并且跟CE端的ospf无关
只是仍然不理解的是,为什么将lo通告为32位,实际配置的是24位,mpls就有问题了。。。
在修改之前,在R1上sh ip cef vrf vpn1 6.6.6.6,明明也可以看到正常的标签信息,反之在R3上也可以看到4.4.4.4的
需要继续学习,期待跟您继续讨论。
7# 2016-12-10 21:03:34 回复 收起回复
回复

使用道具 举报

发表于 2016-12-11 09:46:13 | 显示全部楼层
本帖最后由 Viger 于 2016-12-11 09:53 编辑
ahjxmsw 发表于 2016-12-10 21:03
经您提点,我多试了下。
将R1、R3的lo0添加一条配置;
ip ospf network point-to-point

    在R1上show mpls forwarding 和show mpls ldp binding 更改配置前后的对比发现了不同,show mpls ldp binding更改配置前的1.1.1.1 和2.2.2.2分别有/24和/32的,并且分别只绑定了remot 或local标签,而正常通讯的时候每一条路由前缀绑定了remot 和local 标签。show mpls forwarding时,对2.2.2.2的标签处理方式也不同,更改前是untaged,更改后是pop tag 。我没弄明白这是什么意思,但是这也许是理解这个问题的突破口。
8# 2016-12-11 09:46:13 回复 收起回复
回复

使用道具 举报

发表于 2016-12-14 00:37:12 | 显示全部楼层
Viger 发表于 2016-12-11 09:46
在R1上show mpls forwarding 和show mpls ldp binding 更改配置前后的对比发现了不同,show mpls ldp ...

是由于ospf网络类型导致的,R1的1.1.1.1/24 在R1上是属于/24的路由,R1是给/24的路由分配标签再分发给邻居;R2学习到的是/32的路由,R2给/32的路由分配标签再分发给邻居;R3接收到的是/32的路由及对应的标签信息;
此时R3将数据发送给R1将通过/32对应的标签进行转发,转发到R2时就不能转发给R1了,因为R1上是没有/32的标签信息的。整个从R1至R3关于/24的隧道是不连续的,关于/32的隧道也是不连续的。所以出了上述问题;

改成p2p网络类型之后,整个从R1至R3都是关于/24的路由,标签正常分发,隧道也是连续的,所以就通了。。
9# 2016-12-14 00:37:12 回复 收起回复
回复

使用道具 举报

发表于 2016-12-20 09:46:20 | 显示全部楼层
广州华尔思 发表于 2016-12-14 00:37
是由于ospf网络类型导致的,R1的1.1.1.1/24 在R1上是属于/24的路由,R1是给/24的路由分配标签再分发给邻 ...

多谢,明白了
10# 2016-12-20 09:46:20 回复 收起回复
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-25 00:36 , Processed in 0.093953 second(s), 26 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

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