思科CCNP CCIE-51-静态方式及EIGRP配置MPLS VPN接入

一个VRF可拥有多个接口,每个接口只能属于一个VRF

把VRF路由表引入到VPNV4路由表

如果是VRF的静态路由或IGP路由,那么需要在BGP的VRF地址族重分布

相应的还需要把BGP重分布到IGP中

使用R1 R3 R4 R6 R7进行组网:

IGP使用OSPF

思科CCNP CCIE-51-静态方式及EIGRP配置MPLS VPN接入

1、IGP

思科CCNP CCIE-51-静态方式及EIGRP配置MPLS VPN接入

lo 口使用32位

LDP配置,完成R1 R3 R4 MPLS IP配置

2、VRF配置

R1(config)#ip vrf cisco

R1(config-vrf)#rd 100:1

R1(config-vrf)#route-target 100:100

R1(config)#interface ethernet 0/1

R1(config-if)#ip vrf forwarding cisco

*Oct 31 08:59:08.249: %LINK-3-UPDOWN: Interface Ethernet0/1, changed state to up

*Oct 31 08:59:09.254: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/1, changed state to up

R1(config-if)#ip add 16.1.1.1 255.255.255.0

R4以命名的方式配置VRF,需要增加ipv4地址族下面的配置:

R4(config)#vrf definition cisco

R4(config-vrf)#address-family ipv4

R4(config-vrf-af)#rd 100:1

R4(config-vrf-af)#route-target 100:100

R4(config)#interface ethernet 0/0

R4(config-if)#vrf forwarding cisco

R4(config-if)#ip address 47.1.1.4 255.255.255.0

思科CCNP CCIE-51-静态方式及EIGRP配置MPLS VPN接入

3、配置VPNV4

R1(config)#router bgp 100

R1(config-router)#no bgp default ipv4-unicast ---关掉BGP默认的承载ipv4单播的能力

R1(config-router)# neighbor 44.1.1.1 remote-as 100

R1(config-router)# neighbor 44.1.1.1 up lo 0

R1(config-router)#address-family ipv4

R1(config-router-af)#neighbor 44.1.1.1 activate ----进入vpnv4地址族激活邻居

4、完成客户路由和PE之间的路由交换

R4和R7之间使用EIGRP

R4(config)#router eigrp 90

R4(config-router-af)#no auto-summary

R4(config-router)#address-family ipv4 vrf cisco autonomous-system 90--此处才是真正的AS号码和CE相同

R4(config-router-af)#network 47.1.1.0 0.0.0.255

R4(config)#router eigrp 90

R4(config-router)#address-family ipv4 vrf cisco autonomous-system 90

R4(config-router-af)#redistribute bgp 100 metric 1000 100 255 1 1500--把BGP路由进入到VRF更新给客户端

R4(config)#router bgp 100

R4(config-router)#address-family ipv4 vrf cisco

R4(config-router-af)#redistribute eigrp 90 ---重分布eigrp90

R6(config)#ip route 77.1.1.1 255.255.255.255 e0/1 16.1.1.1

R1(config)#ip route vrf cisco 66.1.1.1 255.255.255.255 e0/1 16.1.1.6

R1(config)#router bgp 100

R1(config-router)#address-family ipv4 vrf cisco

R1(config-router-af)#redistribute static ---注入静态路由

此时R4 VRF可以学到R6的路由

思科CCNP CCIE-51-静态方式及EIGRP配置MPLS VPN接入

R4已经把BGP路由注入到VRF,R7通过EIGRP可以学到R6的路由:

思科CCNP CCIE-51-静态方式及EIGRP配置MPLS VPN接入

此时R6和R7之间lo0可以实现互通:

思科CCNP CCIE-51-静态方式及EIGRP配置MPLS VPN接入

R7#traceroute 66.1.1.1 sou lo 0

Type escape sequence to abort.

Tracing the route to 66.1.1.1

VRF info: (vrf in name/id, vrf out name/id)

1 47.1.1.4 0 msec 1 msec 0 msec

2 34.1.1.3 [MPLS: Labels 16/19 Exp 0] 1 msec 1 msec 0 msec----16是外层标签是LDP为去往11.1.1.1分配的;16是R1的BGP为VPN路由66.1.1.1分配的

3 16.1.1.1 [MPLS: Label 19 Exp 0] 1 msec 0 msec 0 msec

4 16.1.1.6 1 msec * 2 msec

R1#show ip bgp vpnv4 all 66.1.1.1

R1#show ip route vrf cisco 16.1.1.0 查看:

思科CCNP CCIE-51-静态方式及EIGRP配置MPLS VPN接入

欢迎关注和转发,更多精彩内容下期继续分享!


分享到:


相關文章: