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

[求助] MPLS VPN与DHCP中继问题

[复制链接]
发表于 2016-7-7 11:33:50 | 显示全部楼层 |阅读模式
5鸿鹄币
   客户端如何从运营商端的子路由表中获取到DHCP服务器分配的地址(DHCP服务器在运营商端,客户端的PC需从运营商端的子路由表获取到DHCP服务器地址池的地址)。求MPLS VPN和DHCP中继结合使用的资料或者配置命令。求大神解答!

最佳答案

查看完整内容

其实只要客户端CE能够与运营商子路由表通信即可。 配置: R1: interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface FastEthernet0/0 ip address 192.168.12.1 255.255.255.0 ! interface FastEthernet1/0 ip address 10.0.0.1 255.255.255.0 ip helper-address 44.44.44.44 ! router ospf 1 router-id 1.1.1.1 network 1.1.1.1 0.0.0.0 area 0 network 10.0.0.1 0.0.0.0 area 0 netwo ...
发表于 2016-7-7 11:33:51 | 显示全部楼层
本帖最后由 shenka 于 2016-7-8 11:30 编辑

其实只要客户端CE能够与运营商子路由表通信即可。
0708112332.png
配置:
R1:
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.12.1 255.255.255.0
!
interface FastEthernet1/0
ip address 10.0.0.1 255.255.255.0
ip helper-address 44.44.44.44
!
router ospf 1
router-id 1.1.1.1
network 1.1.1.1 0.0.0.0 area 0
network 10.0.0.1 0.0.0.0 area 0
network 192.168.12.1 0.0.0.0 area 0
====================================================
R2:
ip vrf cisco
rd 1:1
route-target export 234:1
route-target import 234:1
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip vrf forwarding cisco
ip address 192.168.12.2 255.255.255.0
!
interface FastEthernet1/0
ip address 192.168.23.2 255.255.255.0
mpls ip
!
router eigrp 1
network 2.2.2.2 0.0.0.0
network 192.168.23.2 0.0.0.0
!
router ospf 1 vrf cisco
router-id 2.2.2.2
redistribute bgp 234 subnets
network 192.168.12.2 0.0.0.0 area 0
!
router bgp 234
no bgp default ipv4-unicast
neighbor 4.4.4.4 remote-as 234
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 cisco
  redistribute ospf 1 match internal external 1 external 2
exit-address-family
====================================================
R3:
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.34.3 255.255.255.0
mpls ip
!
interface FastEthernet1/0
ip address 192.168.23.3 255.255.255.0
mpls ip
!
router eigrp 1
network 3.3.3.3 0.0.0.0
network 192.168.23.3 0.0.0.0
network 192.168.34.3 0.0.0.0
====================================================
R4:
ip vrf cisco
rd 1:1
route-target export 234:1
route-target import 234:1
!
ip dhcp excluded-address 10.0.0.1 10.0.0.100
!
ip dhcp pool SHENKA
network 10.0.0.0 255.255.255.0
default-router 10.0.0.1
dns-server 10.0.0.1
domain-name shenka.com
lease 0 3
!
interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface Loopback1
ip vrf forwarding cisco
ip address 44.44.44.44 255.255.255.255
!
interface Loopback2
ip vrf forwarding cisco
ip address 40.0.0.1 255.255.255.0
ip ospf network point-to-point
!
interface FastEthernet0/0
ip address 192.168.34.4 255.255.255.0
mpls ip
!
router eigrp 1
network 4.4.4.4 0.0.0.0
network 192.168.34.4 0.0.0.0
!
router ospf 1 vrf cisco
router-id 4.4.4.4
redistribute bgp 234 subnets
network 40.0.0.1 0.0.0.0 area 0
network 44.44.44.44 0.0.0.0 area 0
network 192.168.45.4 0.0.0.0 area 0
!
router bgp 234
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 2.2.2.2 remote-as 234
neighbor 2.2.2.2 update-source Loopback0
!
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
  redistribute ospf 1 match internal external 1 external 2
exit-address-family

沙发 2016-7-7 11:33:51 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-7-10 12:31:58 | 显示全部楼层
shenka 发表于 2016-7-8 11:26
其实只要客户端CE能够与运营商子路由表通信即可。

配置:

R4ping10.0.0.1通,但是PC获取不到地址?求解!!!R1内网接口上也配了ip helper-address 44.44.44.44。
板凳 2016-7-10 12:31:58 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-7-10 12:41:33 | 显示全部楼层
本帖最后由 H_Allen 于 2016-7-10 12:49 编辑
shenka 发表于 2016-7-8 11:26
其实只要客户端CE能够与运营商子路由表通信即可。

配置:

C:\Users\admin\Desktop
DHCP.jpg
R2子路由表.jpg
vpnv4.jpg
QQ截图20160710124324.jpg
接口.jpg
拓扑图.jpg
地板 2016-7-10 12:41:33 回复 收起回复
回复

使用道具 举报

发表于 2016-7-10 15:35:23 | 显示全部楼层
配置的dhcp是可以正常工作的:
152859.png
但如果尝试使用路由ip address dhcp获取ip地址就会有问题。看拓扑应该是使用路由的。
在路由上debug dhcp:
*Jul 10 15:22:00.163: DHCP: SRequest- Server ID option: 192.168.34.4
*Jul 10 15:22:00.167: DHCP: SRequest- Requested IP addr option: 10.0.0.155
*Jul 10 15:22:00.167: DHCP: SRequest placed lease len option: 10800
*Jul 10 15:22:00.171: DHCP: SRequest: 309 bytes
*Jul 10 15:22:00.171: DHCP: SRequest: 309 bytes
*Jul 10 15:22:00.175:             B'cast on FastEthernet0/0 interface from 0.0.0.0
R5#%Unknown DHCP problem.. No allocation possible
*Jul 10 15:22:09.759: DHCP: Waiting for 25 seconds on interface FastEthernet0/0

这是cisco IOS的bug:
710153239.png
5# 2016-7-10 15:35:23 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-7-18 10:15:22 | 显示全部楼层
shenka 发表于 2016-7-10 15:35
配置的dhcp是可以正常工作的:

但如果尝试使用路由ip address dhcp获取ip地址就会有问题。看拓扑应该是 ...

为什么还要创建一个loopback2呢??
interface Loopback2
ip vrf forwarding cisco
ip address 40.0.0.1 255.255.255.0
ip ospf network point-to-point
6# 2016-7-18 10:15:22 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-7-18 10:29:13 | 显示全部楼层
shenka 发表于 2016-7-10 15:35
配置的dhcp是可以正常工作的:

但如果尝试使用路由ip address dhcp获取ip地址就会有问题。看拓扑应该是 ...

而且实际环境中,DHCP服务器应该是台PC,怎么可能配置MPLS,BGP等协议呢?
7# 2016-7-18 10:29:13 回复 收起回复
回复

使用道具 举报

发表于 2016-7-18 11:17:47 | 显示全部楼层
H_Allen 发表于 2016-7-18 10:29
而且实际环境中,DHCP服务器应该是台PC,怎么可能配置MPLS,BGP等协议呢?

HDCP服务器不需要运行MPLS,当成一台PC接入R4 VRF cisco即可。例中使用R4同时作为DHCP服务器。lo2没有什么特别的意思,可删掉
8# 2016-7-18 11:17:47 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-7-18 11:35:14 | 显示全部楼层
shenka 发表于 2016-7-18 11:17
HDCP服务器不需要运行MPLS,当成一台PC接入R4 VRF cisco即可。例中使用R4同时作为DHCP服务器。lo2没有什 ...

当成一台PC接入R4的 VRF cisco,指的物理接口绑定VRF cisco吗?但是这样的,一台DHCP服务器只能为一个VRF 绑定接口的主机分配地址了?
9# 2016-7-18 11:35:14 回复 收起回复
回复

使用道具 举报

发表于 2016-7-18 13:24:23 | 显示全部楼层
H_Allen 发表于 2016-7-18 11:35
当成一台PC接入R4的 VRF cisco,指的物理接口绑定VRF cisco吗?但是这样的,一台DHCP服务器只能为一个VRF ...

一台DHCP可以为很多VRF服务,灵活设置VRF RT即可
10# 2016-7-18 13:24:23 回复 收起回复
回复

使用道具 举报

发表于 2016-12-13 02:36:51 | 显示全部楼层
其实只要客户端CE能够与运营商子路由表通信即可
11# 2016-12-13 02:36:51 回复 收起回复
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-4-25 20:42 , Processed in 0.163763 second(s), 27 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

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