Inter-Provider MPLS Solutions之option B(1)

OptionB叫做單跳MP-eBGP方案,也叫做eBGP再分配方式。在該方案中,ASBR不須要爲每一個***建立***實例,ASBR和AS內的iBGP會話學習到PE上的***v4路由,再經過eBGP會話將這些路由再發布到其餘AS的ASBR。但在MPLS ***的基本實現中,PE上只保存與本地*** 實例的RT值相匹配的***路由。經過對標籤***v4路由進行特殊處理,讓ASBR不進行RT值匹配,這樣就能夠把收到的***v4 路由所有保存下來,而無論本地是否有和它匹配的***實例。redis

Inter-Provider MPLS Solutions之option B(1)

Note that label allocation on ASBR2 is optional based on whether next-hop-self is configured toward the SP2 backbone for routes received via the Gateway PE-ASBR link.跨域

Note that the PE-ASBR to PE-ASBR link must be directly connected. It can also be via a GRE tunnel as this is seen as a directly connected interface between the two routers.
Note that /32 host route is created regardless of whether nhs is set or not on the receiving PE-ASBR. This is because we need an implicit-null entry within the LFIB for the originating PE-ASBR (implementation specific), even though we do not use the entry within the LFIB.
請注意,PE-ASBR與PE-ASBR連接必須直接鏈接.它也能夠經過GRE隧道,由於這被視爲兩個路由器之間直接鏈接的接口。請注意,不管NHS是否在接收的PE-ASBR上設置,都會建立/32主機路由。這是由於咱們須要在LFIB中爲原始的PE-ASBR(實現特定的)提供一個隱式-空條目(標籤),即便咱們沒有在LFIB中使用這個條目。less

Inter-Provider MPLS Solutions之option B(1)

實驗拓撲(一)ide

Inter-Provider MPLS Solutions之option B(1)

需求
1)網段以及IP地址如拓撲所示
2)各AS執行的協議如拓撲所示
3)ASBR之間運行MP-eBGP的***v4
4)CE端能夠互相訪問(7.7.7.7/32和6.6.6.6/32)oop

配置
**Y-PE1****
!
hostname Y-PE1
!
mpls label range 100 199
mpls label protocol ldp
mpls ldp router-id Loopback0 force
!
ip vrf A
rd 100:7
route-target export 7:6
route-target import 7:6
route-target import 6:6
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface GigabitEthernet1
ip address 10.1.12.1 255.255.255.0
mpls ip
!
interface GigabitEthernet2
ip vrf forwarding A
ip address 202.100.1.1 255.255.255.0
!
router ospf 17 vrf 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 A
redistribute ospf 17 match internal external 1 external 2
exit-address-family
!學習

**Y-RR1****
!
hostname Y-RR1
!
mpls label range 200 299
mpls label protocol ldp
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 iBGP peer-group
neighbor iBGP remote-as 100
neighbor iBGP update-source Loopback0
neighbor 1.1.1.1 peer-group iBGP
neighbor 3.3.3.3 peer-group iBGP
!
address-family ipv4
exit-address-family
!
address-family ***v4
neighbor iBGP send-community extended
neighbor iBGP route-reflector-client
neighbor 1.1.1.1 activate
neighbor 3.3.3.3 activate
exit-address-family
!this

**Y-ASBR1(XR設備)****
!
hostname Y-ASBR1
!
mpls ldp ---執行LDP協議
router-id 3.3.3.3 --定義LDP的R-ID
interface GigabitEthernet0/0/0/0 ---關聯運行MPLS的接口
!
!
mpls label range table 0 16300 16399 ---定義標籤範圍
!
route-policy iBGP ---定義BGP訪問策略(XR在創建eBGP時,默認drop)
pass
end-policy
!
router static ---配置靜態路由(XR的eBGP對等體直鏈接口,必定要配置出接口,使其產生32位主機路由)
address-family ipv4 unicast
10.1.34.4/32 GigabitEthernet0/0/0/1
!
!
interface Loopback0
ipv4 address 3.3.3.3 255.255.255.255
!
interface GigabitEthernet0/0/0/0
ipv4 address 10.1.23.3 255.255.255.0
!
interface GigabitEthernet0/0/0/1
ipv4 address 10.1.34.3 255.255.255.0
!
!
router ospf 110
router-id 3.3.3.3
address-family ipv4 unicast --激活IPv4單播地址簇
area 0 --定義區域ID並關聯運行OSPF的接口
interface Loopback0
!
interface GigabitEthernet0/0/0/0
!
!
!
router bgp 100
bgp router-id 3.3.3.3
address-family ipv4 unicast
allocate-label all ---IPv4單播地址簇中開啓標籤分發功能(默認關閉)
!
address-family ***v4 unicast
retain route-target all ---接收/拒絕攜帶RT擴展屬性的前綴
!
neighbor 2.2.2.2 --先定義對等體(全部的條件在此配置)
remote-as 100
update-source Loopback0
address-family ***v4 unicast
next-hop-self
!
!
neighbor 10.1.34.4 --eBGP鄰居
remote-as 200
address-family ***v4 unicast ---創建***v4的鄰居關係
route-policy iBGP in
route-policy iBGP out
!
!
!spa

**B-ASBR1****
!
hostname B-ASBR1
!
!
mpls ldp
router-id 4.4.4.4
interface GigabitEthernet0/0/0/0
!
!
mpls label range table 0 16400 16499
!
route-policy iBGP
pass
end-policy
!
router static
address-family ipv4 unicast
10.1.34.3/32 GigabitEthernet0/0/0/1
!
!
interface Loopback0
ipv4 address 4.4.4.4 255.255.255.255
!
interface GigabitEthernet0/0/0/0
ipv4 address 10.1.45.4 255.255.255.0
!
interface GigabitEthernet0/0/0/1
ipv4 address 10.1.34.4 255.255.255.0
!
!
router ospf 110
router-id 4.4.4.4
address-family ipv4 unicast
area 0
interface Loopback0
!
interface GigabitEthernet0/0/0/0
!
!
!
router bgp 200
bgp router-id 4.4.4.4
address-family ipv4 unicast
allocate-label all
!
address-family ***v4 unicast
retain route-target all
!
neighbor 5.5.5.5
remote-as 200
update-source Loopback0
address-family ***v4 unicast
next-hop-self
!
!
neighbor 10.1.34.3
remote-as 100
address-family ***v4 unicast
route-policy iBGP in
route-policy iBGP out
!
!
!router

**B-PE1****
!
hostname B-PE1
!
mpls label range 500 599
mpls label protocol ldp
mpls ldp router-id Loopback0 force
!
ip vrf A
rd 200:6
route-target export 6:6
route-target import 6:6
route-target import 7:6
!
interface Loopback0
ip address 5.5.5.5 255.255.255.255
!
interface Ethernet0/0
ip address 10.1.45.5 255.255.255.0
mpls ip
!
interface Ethernet0/1
ip vrf forwarding A
ip address 61.128.1.5 255.255.255.0
!
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 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 A
redistribute rip
exit-address-family
!接口

**CE1****
!
hostname CE1
!
interface Loopback0
ip address 7.7.7.7 255.255.255.255
!
interface Ethernet0/0
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/1
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 B(1)

實驗拓撲(二)

Inter-Provider MPLS Solutions之option B(1)

需求
1)網段以及IP地址如拓撲所示
2)各AS執行的協議如拓撲所示
3)ASBR之間運行Multihop MP-eBGP的***v4(使用loopback0接口創建BGP鄰居)
4)CE端能夠互相訪問(7.7.7.7/32和6.6.6.6/32)
注意:B-ASBR1將再也不對B-PE1設備執行「next-hop-self」命令,而是在IGP中重分發靜態

配置:
**Y-PE1****
!
hostname Y-PE1
!
mpls label range 100 199
mpls label protocol ldp
mpls ldp router-id Loopback0 force
!
ip vrf A
rd 100:7
route-target export 7:6
route-target import 7:6
route-target import 6:6
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface GigabitEthernet1
ip address 10.1.12.1 255.255.255.0
mpls ip
!
interface GigabitEthernet2
ip vrf forwarding A
ip address 202.100.1.1 255.255.255.0
!
router ospf 17 vrf 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 A
redistribute ospf 17 match internal external 1 external 2
exit-address-family
!

**Y-RR1****
!
hostname Y-RR1
!
mpls label range 200 299
mpls label protocol ldp
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 iBGP peer-group
neighbor iBGP remote-as 100
neighbor iBGP update-source Loopback0
neighbor 1.1.1.1 peer-group iBGP
neighbor 3.3.3.3 peer-group iBGP
!
address-family ipv4
exit-address-family
!
address-family ***v4
neighbor iBGP send-community extended
neighbor iBGP route-reflector-client
neighbor 1.1.1.1 activate
neighbor 3.3.3.3 activate
exit-address-family
!

**Y-ASBR1(XR設備)****
!
hostname Y-ASBR1
!
mpls ldp ---執行LDP協議
router-id 3.3.3.3 --定義LDP的R-ID
interface GigabitEthernet0/0/0/0 ---管理運行MPLS的接口
!
!
mpls label range table 0 16300 16399 ---定義標籤範圍
!
route-policy iBGP ---定義BGP訪問策略(XR在創建eBGP時,默認drop)
pass
end-policy
!
router static ---配置靜態路由(XR的eBGP對等體直鏈接口,必定要配置出接口,使其產生32位主機路由)
address-family ipv4 unicast
10.1.34.4/32 GigabitEthernet0/0/0/1
4.4.4.4/32 10.1.34.4 ---和B-ASBR1之間創建Multihop eBGP
!
!
interface Loopback0
ipv4 address 3.3.3.3 255.255.255.255
!
interface GigabitEthernet0/0/0/0
ipv4 address 10.1.23.3 255.255.255.0
!
interface GigabitEthernet0/0/0/1
ipv4 address 10.1.34.3 255.255.255.0
!
!
router ospf 110
router-id 3.3.3.3
address-family ipv4 unicast --激活IPv4單播地址簇
area 0 --定義區域ID並關聯運行OSPF的接口
interface Loopback0
!
interface GigabitEthernet0/0/0/0
!
!
!
router bgp 100
bgp router-id 3.3.3.3
address-family ipv4 unicast
allocate-label all ---IPv4單播地址簇中開啓標籤分發功能(默認關閉)
!
address-family ***v4 unicast
retain route-target all ---接收/拒絕攜帶RT擴展屬性的前綴
!
neighbor 2.2.2.2 --先定義對等體(全部的條件在此配置)
remote-as 100
update-source Loopback0
address-family ***v4 unicast
next-hop-self
!
!
neighbor 4.4.4.4
remote-as 200
ebgp-multihop 255
update-source Loopback0
address-family ***v4 unicast
route-policy iBGP in
route-policy iBGP out
!
!
!

**B-ASBR1****
!
hostname B-ASBR1
!
!
mpls ldp
router-id 4.4.4.4
interface GigabitEthernet0/0/0/0
!
!
mpls label range table 0 16400 16499
!
route-policy iBGP
pass
end-policy
!
router static
address-family ipv4 unicast
3.3.3.3/32 10.1.34.3
10.1.34.3/32 GigabitEthernet0/0/0/1
!
!
interface Loopback0
ipv4 address 4.4.4.4 255.255.255.255
!
interface GigabitEthernet0/0/0/0
ipv4 address 10.1.45.4 255.255.255.0
!
interface GigabitEthernet0/0/0/1
ipv4 address 10.1.34.4 255.255.255.0
!
!
router ospf 110
router-id 4.4.4.4
redistribute static
address-family ipv4 unicast
area 0
interface Loopback0
!
interface GigabitEthernet0/0/0/0
!
!
!
router bgp 200
bgp router-id 4.4.4.4
address-family ipv4 unicast
allocate-label all
!
address-family ***v4 unicast
retain route-target all
!
neighbor 5.5.5.5
remote-as 200
update-source Loopback0
address-family ***v4 unicast
!
!
neighbor 3.3.3.3
remote-as 100
ebgp-multihop 255
update-source Loopback0
address-family ***v4 unicast
route-policy iBGP in
route-policy iBGP out
!
!
!

**B-PE1****
!
hostname B-PE1
!
mpls label range 500 599
mpls label protocol ldp
mpls ldp router-id Loopback0 force
!
ip vrf A
rd 200:6
route-target export 6:6
route-target import 6:6
route-target import 7:6
!
interface Loopback0
ip address 5.5.5.5 255.255.255.255
!
interface Ethernet0/0
ip address 10.1.45.5 255.255.255.0
mpls ip
!
interface Ethernet0/1
ip vrf forwarding A
ip address 61.128.1.5 255.255.255.0
!
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 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 A
redistribute rip
exit-address-family
!

**CE1****
!
hostname CE1
!
interface Loopback0
ip address 7.7.7.7 255.255.255.255
!
interface Ethernet0/0
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/1
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 B(1)

Inter-Provider MPLS Solutions之option B(1)

優勢:不須要在ASBR上爲每一個***建立***實例,不須要跨域擴展協議,容易管理和配置。缺點:***的路由信息是經過AS之間的ASBR來保存和擴散的,當***路由較多時,ASBR負擔重,容易成爲故障點(能夠重分發直連進IGP)。所以,在MP-eBGP方案中須要維護***路由信息的ASBR通常再也不負責公網IP轉發。

相關文章
相關標籤/搜索