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

[求助] MPLS-VPN

[复制链接]
发表于 2016-5-11 20:36:42 | 显示全部楼层 |阅读模式
5鸿鹄币
给位老师伙伴们,有个问题想请教下,在做MPLS-VPN实验的时候私网站点之间有相互的路由,但是ping不通是怎么回事?
拓扑图是这个样子 MPLS-VPN.png 每个 路由器的配置是,可能配置有点杂,看起来比较费劲


**************************************************************  
                                          R1
**************************************************************  
R1#show run
Building configuration...

Current configuration : 983 bytes
!
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 tcp synwait-time 5
!
!
ip cef
no ip domain lookup
!
!         
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
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
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 10.1.12.0 0.0.0.255 area 0
!
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






**************************************************************
                                                          R2
**************************************************************

R2#show run
Building configuration...

Current configuration : 1745 bytes
!
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 tcp synwait-time 5
!
!
ip cef
no ip domain lookup
!
!         
ip vrf cisco
rd 234:2
route-target export 234:2
route-target import 234:4
!
!
mpls label range 200 299
mpls label protocol ldp
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!         
!
!
!
!
!
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
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.2 255.255.255.0
duplex auto
speed auto
mpls ip
!
router ospf 1 vrf cisco
log-adjacency-changes
no auto-cost
redistribute bgp 234 subnets
network 10.1.12.0 0.0.0.255 area 0
!
router ospf 100
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 234
no synchronization
bgp router-id 2.2.2.2
bgp log-neighbor-changes
neighbor 4.4.4.4 remote-as 234
neighbor 4.4.4.4 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 4.4.4.4 activate
neighbor 4.4.4.4 send-community both
exit-address-family
!
address-family ipv4 vrf cisco
redistribute ospf 1 vrf cisco match internal external 1 external 2
no synchronization
exit-address-family
!
no ip http server
no ip http secure-server
!
!
!
no cdp log mismatch duplex
!
!
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




*************************************************
                                          R3
*************************************************
R3# show run  
Building configuration...

Current configuration : 1102 bytes
!
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 tcp synwait-time 5
!
!
ip cef
no ip domain lookup
!
!         
!
mpls label range 300 399
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 10.1.34.3 255.255.255.0
duplex auto
speed auto
mpls ip
!
interface FastEthernet0/1
ip address 10.1.23.3 255.255.255.0
duplex auto
speed auto
mpls ip
!
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
!
!
!
no cdp log mismatch duplex
!
!
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




**************************************************
                                         R 4
**************************************************

R4#show run
Building configuration...

Current configuration : 1723 bytes
!
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 tcp synwait-time 5
!
!
ip cef
no ip domain lookup
!
!         
ip vrf cisco
rd 234:4
route-target export 234:4
route-target import 234: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.4 255.255.255.0
duplex auto
speed auto
mpls ip
!
interface FastEthernet0/1
ip vrf forwarding cisco
ip address 10.1.45.4 255.255.255.0
duplex auto
speed auto
!
router ospf 1 vrf cisco
log-adjacency-changes
no auto-cost
redistribute bgp 234 subnets
network 10.1.45.0 0.0.0.255 area 0
!
router ospf 100
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 234
no synchronization
bgp router-id 4.4.4.4
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 234
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 both
exit-address-family
!
address-family ipv4 vrf cisco
redistribute ospf 1 vrf cisco match internal external 1 external 2
no synchronization
exit-address-family
!
no ip http server
no ip http secure-server
!
!
!
no cdp log mismatch duplex
!
!
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




**********************************************************
                                             R5
**********************************************************

R5#show run
Building configuration...

Current configuration : 983 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R5
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip tcp synwait-time 5
!
!
ip cef
no ip domain lookup
!
!         
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 5.5.5.5 255.255.255.255
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 10.1.45.5 255.255.255.0
duplex auto
speed auto
!
router ospf 1
router-id 5.5.5.5
log-adjacency-changes
network 5.5.5.5 0.0.0.0 area 0
network 10.1.45.0 0.0.0.255 area 0
!
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







配置大概就是这样子!非常谢谢各位帮忙解决一下!




最佳答案

查看完整内容

学会看提示 你配置的时候绝对会提示你环回口不是32位 标签转发是查看LFIB,show mpls forwardingtable 你现在的标签根本就是no label,怎么转发
 成长值: 51055
发表于 2016-5-11 20:36:43 | 显示全部楼层
学会看提示
你配置的时候绝对会提示你环回口不是32位
标签转发是查看LFIB,show mpls forwardingtable
你现在的标签根本就是no label,怎么转发
沙发 2016-5-11 20:36:43 回复 收起回复
回复

使用道具 举报

发表于 2016-5-11 22:34:14 | 显示全部楼层
看起来配置没问题啊。我随便做了一个mpls vpn,地址和你也许不一样,八九不离十。
当中有两层标签,内层是mpbgp分配的,外层是ldp分配的。完全没问题。

R1#traceroute 5.5.5.5 source lo0

Type escape sequence to abort.
Tracing the route to 5.5.5.5

  1 12.1.1.2 36 msec 72 msec 76 msec
  2 23.1.1.3 [MPLS: Labels 17/20 Exp 0] 180 msec 140 msec 76 msec
  3 45.1.1.4 [MPLS: Label 20 Exp 0] 60 msec 72 msec 124 msec
  4 45.1.1.5 152 msec 84 msec 120 msec
R1#ping 5.5.5.5 so lo0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 72/124/148 ms
R1#
板凳 2016-5-11 22:34:14 回复 收起回复
回复

使用道具 举报

发表于 2016-5-11 22:37:34 | 显示全部楼层
本帖最后由 asd379762019 于 2016-5-11 23:04 编辑

111
地板 2016-5-11 22:37:34 回复 收起回复
回复

使用道具 举报

发表于 2016-5-11 23:50:02 | 显示全部楼层
PE和P设备的LDP配置呢?
5# 2016-5-11 23:50:02 回复 收起回复
回复

使用道具 举报

 成长值: 51055
发表于 2016-5-11 23:53:38 | 显示全部楼层
学会看提示
你配置的时候绝对会提示你环回口不是32位
标签转发是查看LFIB,show mpls forwardingtable
你现在的标签根本就是no label,怎么转发
6# 2016-5-11 23:53:38 回复 收起回复
回复

使用道具 举报

发表于 2016-5-11 23:58:46 来自手机 | 显示全部楼层
R2和R4上关于vrf cisco的RD值需要一致。
7# 2016-5-11 23:58:46 回复 收起回复
回复

使用道具 举报

发表于 2016-5-12 10:11:21 | 显示全部楼层
楼上说得对,有路由ping不通就是转发层面的事,而mpls ldp router-id Loopback0这条命令要求loopback0必须是32位的。估计是因为你的R2没法运行LDP
8# 2016-5-12 10:11:21 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-5-12 15:25:06 | 显示全部楼层
worm1943 发表于 2016-5-11 23:58
R2和R4上关于vrf cisco的RD值需要一致。

RD不需要一至吧!RD值用于识别的VRF的
9# 2016-5-12 15:25:06 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-5-12 15:28:39 | 显示全部楼层
qsy112233 发表于 2016-5-11 23:53
学会看提示
你配置的时候绝对会提示你环回口不是32位
标签转发是查看LFIB,show mpls forwardingtable

好像是有提示,在R2上会提示
*Mar  1 00:01:40.111: %BGP-4-VPNV4NH_MASK: Nexthop 2.2.2.2 may not be reachable from neigbor 4.4.4.4 - not /32 mask。请问这是什么错误呀
10# 2016-5-12 15:28:39 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-5-12 15:29:14 | 显示全部楼层
qsy112233 发表于 2016-5-11 23:53
学会看提示
你配置的时候绝对会提示你环回口不是32位
标签转发是查看LFIB,show mpls forwardingtable

确实是这样提示的
11# 2016-5-12 15:29:14 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-5-12 15:29:35 | 显示全部楼层
962456310@qq.co 发表于 2016-5-11 23:50
PE和P设备的LDP配置呢?

有配置的哦
12# 2016-5-12 15:29:35 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-5-12 15:30:06 | 显示全部楼层
vaio 发表于 2016-5-11 22:34
看起来配置没问题啊。我随便做了一个mpls vpn,地址和你也许不一样,八九不离十。
当中有两层标签,内层是 ...

嗯,,谢谢,楼下估计给找出问题所在了
13# 2016-5-12 15:30:06 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-5-12 15:30:58 | 显示全部楼层
gole_huang 发表于 2016-5-12 10:11
楼上说得对,有路由ping不通就是转发层面的事,而mpls ldp router-id Loopback0这条命令要求loopback0必须 ...

搜嘎,我在看看配置,还有就是换回接口必须配置为32的mask ?
14# 2016-5-12 15:30:58 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-5-12 15:32:46 | 显示全部楼层
Angel炳 发表于 2016-5-12 15:30
搜嘎,我在看看配置,还有就是换回接口必须配置为32的mask ?

嗯,。谢谢。,就是R2上的换回接口没有把掩码配置为32的
15# 2016-5-12 15:32:46 回复 收起回复
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-4-27 01:06 , Processed in 0.121824 second(s), 25 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

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