Inter-Provider MPLS Solutions之option A
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Inter-Provider MPLS Solutions之option A相关的知识,希望对你有一定的参考价值。
OptionA又称作VRF-to-VRF方式,ASBR和ASBR通过背靠背的方式互连,ASBR同时也是各自所在AS的PE 。两个ASBR都把对端ASBR看作自己的CE设备,将会为每一个***创建***实例,通过划分子接口的方式,每个子接口分别绑定一个*** 实例。因为OptionA的ASBR之间互为CE的关系,所以ASBR之间不需要任何标签(也可以理解为断裂的标签),不用运行LDP。ASBR之间可以运行多种路由协议,包括BGP , OSPF、静态等。目前,在实际网络中,使用静态路由配置居多。从转发层来看,针对某个***的数据包在ASBR之间是纯IP转发,不带任何标签,就像在CE和PE之间转发的一样。优点:简单也是实用的,因为在ASBR之间不需要运行MPLS ,所以不要扩展协议和做特殊的配置,属于天然支持。在需要跨域的***数量比较少的情况下可以考虑使用。
缺点: ASBR需要为每个*** 创建一个***实例,需要管理和维护所有***路由,如果***数量众多,将导致ASBR的***v4路由表空间过于庞大,资源开销大。如果跨多个域,配置的工作量很大,扩展性太差。
实验拓扑
需求
1)网段以及IP地址如拓扑所示
2)运行各种协议如拓扑所示
3)实施VRF-to-VRF的***
***配置
*****Y-PE1*
!
hostname Y-PE1
!
mpls label range 100 199
mpls ldp router-id Loopback0 force
!
ip vrf Cust-A
rd 100:7
route-target export 100:100
route-target import 100:100
route-target import 100:200
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Ethernet0/0
ip address 10.1.12.1 255.255.255.0
mpls ip
!
interface Ethernet0/1
ip vrf forwarding Cust-A
ip address 202.100.1.1 255.255.255.0
!
router ospf 17 vrf Cust-A
router-id 11.11.11.11
redistribute bgp 100 subnets
network 202.100.1.0 0.0.0.255 area 0
!
router ospf 110
router-id 1.1.1.1
network 1.1.1.1 0.0.0.0 area 0
network 10.1.12.0 0.0.0.255 area 0
!
router bgp 100
bgp router-id 1.1.1.1
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 2.2.2.2 remote-as 100
neighbor 2.2.2.2 update-source Loopback0
!
address-family ipv4
exit-address-family
!
address-family ***v4
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community extended
exit-address-family
!
address-family ipv4 vrf Cust-A
redistribute ospf 17 match internal external 1 external 2
exit-address-family
!
*****Y-RR1*
!
hostname Y-RR1
!
mpls label range 200 299
mpls ldp router-id Loopback0 force
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Ethernet0/0
ip address 10.1.12.2 255.255.255.0
mpls ip
!
interface Ethernet0/1
ip address 10.1.23.2 255.255.255.0
mpls ip
!
router ospf 110
router-id 2.2.2.2
network 2.2.2.2 0.0.0.0 area 0
network 10.1.12.0 0.0.0.255 area 0
network 10.1.23.0 0.0.0.255 area 0
!
router bgp 100
bgp router-id 2.2.2.2
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source Loopback0
neighbor 3.3.3.3 remote-as 100
neighbor 3.3.3.3 update-source Loopback0
!
address-family ipv4
exit-address-family
!
address-family ***v4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community extended
neighbor 1.1.1.1 route-reflector-client
neighbor 3.3.3.3 activate
neighbor 3.3.3.3 send-community extended
neighbor 3.3.3.3 route-reflector-client
exit-address-family
!
*****Y-ASBR1*
!
hostname Y-ASBR1
!
mpls label range 300 399
mpls ldp router-id Loopback0 force
!
ip vrf Yello-to-Blue
rd 100:100
route-target export 100:200
route-target import 200:100
route-target import 100:100
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Ethernet0/0
ip vrf forwarding Yello-to-Blue
ip address 10.1.34.3 255.255.255.0
!
interface Ethernet0/1
ip address 10.1.23.3 255.255.255.0
mpls ip
!
router ospf 110
router-id 3.3.3.3
network 3.3.3.3 0.0.0.0 area 0
network 10.1.23.0 0.0.0.255 area 0
!
router bgp 100
bgp router-id 3.3.3.3
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 2.2.2.2 remote-as 100
neighbor 2.2.2.2 update-source Loopback0
!
address-family ipv4
exit-address-family
!
address-family ***v4
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community extended
exit-address-family
!
address-family ipv4 vrf Yello-to-Blue
neighbor 10.1.34.4 remote-as 200
neighbor 10.1.34.4 activate
exit-address-family
!
*****B-ASBR1*
!
hostname B-ASBR1
!
mpls label range 400 499
mpls ldp router-id Loopback0 force
!
ip vrf Blue-to-Yello
rd 200:200
route-target export 200:100
route-target import 100:200
route-target import 200:200
!
interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface Ethernet0/0
ip vrf forwarding Blue-to-Yello
ip address 10.1.34.4 255.255.255.0
!
interface Ethernet0/1
ip address 10.1.45.4 255.255.255.0
mpls ip
!
router ospf 110
router-id 4.4.4.4
network 4.4.4.4 0.0.0.0 area 0
network 10.1.45.0 0.0.0.255 area 0
!
router bgp 200
bgp router-id 4.4.4.4
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 5.5.5.5 remote-as 200
neighbor 5.5.5.5 update-source Loopback0
!
address-family ipv4
exit-address-family
!
address-family ***v4
neighbor 5.5.5.5 activate
neighbor 5.5.5.5 send-community extended
exit-address-family
!
address-family ipv4 vrf Blue-to-Yello
neighbor 10.1.34.3 remote-as 100
neighbor 10.1.34.3 activate
exit-address-family
!
*****B-PE1*
!
hostname B-PE1
!
mpls label range 500 599
mpls ldp router-id Loopback0 force
!
ip vrf Cust-A
rd 200:6
route-target export 200:200
route-target import 200:200
route-target import 200:100
!
interface Loopback0
ip address 5.5.5.5 255.255.255.255
!
interface Ethernet0/0
ip vrf forwarding Cust-A
ip address 61.128.1.5 255.255.255.0
!
interface Ethernet0/1
ip address 10.1.45.5 255.255.255.0
mpls ip
!
router ospf 110
router-id 5.5.5.5
network 5.5.5.5 0.0.0.0 area 0
network 10.1.45.0 0.0.0.255 area 0
!
router rip
!
address-family ipv4 vrf Cust-A
redistribute bgp 200 metric transparent
network 61.0.0.0
no auto-summary
version 2
exit-address-family
!
router bgp 200
bgp router-id 5.5.5.5
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 4.4.4.4 remote-as 200
neighbor 4.4.4.4 update-source Loopback0
!
address-family ipv4
exit-address-family
!
address-family ***v4
neighbor 4.4.4.4 activate
neighbor 4.4.4.4 send-community extended
exit-address-family
!
address-family ipv4 vrf Cust-A
redistribute rip
exit-address-family
!
*****CE1*
!
hostname CE1
!
interface Loopback0
ip address 7.7.7.7 255.255.255.255
!
interface Ethernet0/1
ip address 202.100.1.7 255.255.255.0
!
router ospf 17
router-id 7.7.7.7
network 7.7.7.7 0.0.0.0 area 0
network 202.100.1.0 0.0.0.255 area 0
!
*****CE2*
!
hostname CE2
!
interface Loopback0
ip address 6.6.6.6 255.255.255.255
!
interface Ethernet0/0
ip address 61.128.1.6 255.255.255.0
!
router rip
version 2
network 6.0.0.0
network 61.0.0.0
no auto-summary
!
以上是关于Inter-Provider MPLS Solutions之option A的主要内容,如果未能解决你的问题,请参考以下文章