OptionA又稱做VRF-to-VRF方式,ASBR和ASBR經過背靠背的方式互連,ASBR同時也是各自所在AS的PE 。兩個ASBR都把對端ASBR看做本身的CE設備,將會爲每個***建立***實例,經過劃分子接口的方式,每一個子接口分別綁定一個*** 實例。由於OptionA的ASBR之間互爲CE的關係,因此ASBR之間不須要任何標籤(也能夠理解爲斷裂的標籤),不用運行LDP。ASBR之間能夠運行多種路由協議,包括BGP , OSPF、靜態等。目前,在實際網絡中,使用靜態路由配置居多。從轉發層來看,針對某個***的數據包在ASBR之間是純IP轉發,不帶任何標籤,就像在CE和PE之間轉發的同樣。redis
優勢:簡單也是實用的,由於在ASBR之間不須要運行MPLS ,因此不要擴展協議和作特殊的配置,屬於自然支持。在須要跨域的***數量比較少的狀況下能夠考慮使用。
缺點: ASBR須要爲每一個*** 建立一個***實例,須要管理和維護全部***路由,若是***數量衆多,將致使ASBR的***v4路由表空間過於龐大,資源開銷大。若是跨多個域,配置的工做量很大,擴展性太差。跨域
實驗拓撲網絡
需求
1)網段以及IP地址如拓撲所示
2)運行各類協議如拓撲所示
3)實施VRF-to-VRF的***ide
***配置
*****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
!oop
*****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
!spa
*****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
!3d
*****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
!router
*****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
!blog
*****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
!