DHCP中继***支持1--VRF

拓扑:

 

R4配置:

interface FastEthernet0/0
ip address dhcp

R5配置:

ip dhcp excluded-address 192.168.14.1
!
ip dhcp pool ***dhcp
network 192.168.14.0 255.255.255.0
default-router 192.168.14.1

interface Loopback0
ip address 5.5.5.5 255.255.255.0

interface FastEthernet0/1
ip address 172.16.35.5 255.255.255.0
duplex auto
speed auto
!
router rip
version 2
network 5.0.0.0
network 172.16.0.0
no auto-summary

R1配置:

ip dhcp relay information option *** //将中继代理插入DHCP 82选项
!
!
ip vrf pe1
rd 100:1
*** id ACDE48:27   //VRF标识
route-target export 100:1
route-target import 100:1
route-target import 100:2
!
mpls label range 100 199
mpls label protocol ldp
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip vrf forwarding pe1
ip address 192.168.14.1 255.255.255.0
ip helper-address VRF pe1 172.16.35.5
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 12.1.1.1 255.255.255.0
duplex auto
speed auto
mpls ip
!
router ospf 100
router-id 1.1.1.1
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 12.1.1.0 0.0.0.255 area 0
!
router bgp 100
bgp router-id 1.1.1.1
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 3.3.3.3 remote-as 100
neighbor 3.3.3.3 update-source Loopback0
!
address-family ***v4
neighbor 3.3.3.3 activate
neighbor 3.3.3.3 send-community extended
exit-address-family
!
address-family ipv4 vrf pe1
redistribute connected
no synchronization
exit-address-family
!
mpls ldp router-id Loopback0

R2配置:

interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 23.1.1.2 255.255.255.0
duplex auto
speed auto
mpls ip
!
interface FastEthernet0/1
ip address 12.1.1.2 255.255.255.0
duplex auto
speed auto
mpls ip
!
router ospf 100
router-id 2.2.2.2
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 0
network 12.1.1.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0

R3配置:

ip vrf pe2
rd 100:2
route-target export 100:2
route-target import 100:2
route-target import 100:1
!
mpls label range 300 399
mpls label protocol ldp
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 23.1.1.3 255.255.255.0
duplex auto
speed auto
mpls ip
!
interface FastEthernet0/1
ip vrf forwarding pe2
ip address 172.16.35.3 255.255.255.0
duplex auto
speed auto
!
router ospf 100
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 0
network 23.1.1.0 0.0.0.255 area 0
!
router rip
!
address-family ipv4 vrf pe2
redistribute bgp 100 metric transparent
network 172.16.0.0
no auto-summary
version 2
exit-address-family
!
router bgp 100
bgp router-id 3.3.3.3
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source Loopback0
!
address-family ***v4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community extended
exit-address-family
!
address-family ipv4 vrf pe2
redistribute rip
no synchronization
exit-address-family
!
mpls ldp router-id Loopback0

验证:

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值