關於HUB-SPOKE模式的MPLSL3×××

HUB-SPOKE模式主要是讓SPOKECE的路由在HUBCE上進行交換,起到一箇中心多個分支的效果,具體的能夠百度。
其實HUBCE---HUBPE之間可使用其餘的路由協議,可是同樣要注意環路的保護。若是是OSPF,則須要更改OSPF的×××-TAG屬性,若是SPOKE-CE是LSA3進入的,則沒法實現HUBSPOKE。一般狀況下HUBCE--HUBPE之間是運行的EBGP。要注意全部的SPOKE-PE上必須配置容許環路1次,HUBPE上必須在某一邊出方向的×××中配置容許環回1次。不然路由沒法正常學習。另外全部PE上的RD最好都不同,不然會出現問題。
下面是此次試驗的配置。
<HUB-PE>
%Sep 29 09:15:00:780 2007 HUB-PE SHELL/5/LOGIN: Console login from con0
<HUB-PE>
<HUB-PE>
<HUB-PE>dis cur
#
sysname HUB-PE
#
cpu-usage cycle 1min
#
mpls lsr-id 11.11.11.1
#
radius scheme system
#
mpls
#
mpls ldp
#
ip ***-instance A
route-distinguisher 1:1
***-target 1:1 import-extcommunity
#
ip ***-instance B
route-distinguisher 1:3
***-target 1:2 export-extcommunity
#
domain system
#
local-user admin
password cipher .]@USE=B,53Q=^Q`MAF4<1!!
service-type telnet terminal
level 3
service-type ftp
#
interface Aux0
async mode flow
#
interface GigabitEthernet0/0/0
ip address 3.3.3.1 255.255.255.252
mpls
mpls ldp enable
#
interface GigabitEthernet0/0/1
ip address 4.4.4.1 255.255.255.252
mpls
mpls ldp enable
#
interface GigabitEthernet0/0/2
ip address dhcp-alloc
#
interface GigabitEthernet0/0/2.1
ip binding ***-instance A
ip address 1.1.1.2 255.255.255.252
vlan-type dot1q vid 1                    
#
interface GigabitEthernet0/0/2.2
ip binding ***-instance B
ip address 2.2.2.2 255.255.255.252
vlan-type dot1q vid 2
#
interface NULL0
#
interface LoopBack1
ip address 11.11.11.1 255.255.255.255
#
bgp 100
undo synchronization
group ibgpA internal
peer 11.11.11.2 group ibgpA
peer 11.11.11.2 connect-interface LoopBack1
group ibgpB internal
peer 11.11.11.3 group ibgpB
peer 11.11.11.3 connect-interface LoopBack1
#
ipv4-family ***-instance A
   undo synchronization
   group ebgpA external
   peer 1.1.1.1 group ebgpA as-number 200  
#
ipv4-family ***-instance B
   undo synchronization
   group ebgpB external
   peer 2.2.2.1 group ebgpB as-number 200
   peer 2.2.2.1 allow-as-loop 1
#
ipv4-family ***v4
   peer ibgpA enable
   peer 11.11.11.2 group ibgpA
   peer ibgpB enable
   peer 11.11.11.3 group ibgpB
#
ospf 1
area 0.0.0.0
   network 3.3.3.1 0.0.0.0
   network 4.4.4.1 0.0.0.0
   network 11.11.11.1 0.0.0.0
#
FTP server enable
#
user-interface con 0
user-interface aux 0
user-interface vty 0 4                    
authentication-mode scheme
#
return
<HUB-PE>      
-----------------------------------------------------
[HUB-ce]dis cur
   Now create configuration...
   Current configuration
   !
     version 1.74
     sysname HUB-ce
     firewall enable
     aaa-enable
     aaa accounting-scheme optional
   !
   interface Aux0
     async mode flow
     link-protocol ppp
   !
   interface Ethernet0
   !
   interface Ethernet0.1
     vlan-type dot1q vid 1
     ip address 1.1.1.1 255.255.255.252
   !
   interface Ethernet0.2
     vlan-type dot1q vid 2
     ip address 2.2.2.1 255.255.255.252
   !
   interface Serial0
     link-protocol ppp                     
   !
   quit
   bgp 200
     undo synchronization
     peer 2.2.2.2 as-number 100
     peer 1.1.1.2 as-number 100
   !
   quit
   !
   return
[HUB-ce]  
------------------------------------------------------------
<SPOKE-PEB>
<SPOKE-PEB>dis cur
#
sysname SPOKE-PEB
#
cpu-usage cycle 1min
#
mpls lsr-id 11.11.11.3
#
radius scheme system
#
mpls
#
mpls ldp
#
ip ***-instance B
route-distinguisher 1:2
***-target 1:1 export-extcommunity
***-target 1:2 import-extcommunity
#
domain system
#
local-user admin
password cipher .]@USE=B,53Q=^Q`MAF4<1!!
service-type telnet terminal
level 3
service-type ftp                         
#
interface Aux0
async mode flow
#
interface Ethernet0/0
ip address 4.4.4.2 255.255.255.252
mpls
mpls ldp enable
#
interface Ethernet0/1
ip address dhcp-alloc
#
interface Serial0/0
clock DTECLK1
link-protocol ppp
ip address dhcp-alloc
#
interface NULL0
#
interface LoopBack1
ip address 11.11.11.3 255.255.255.255
#
interface LoopBack2
ip binding ***-instance B                
ip address 222.222.222.222 255.255.255.0
#
bgp 100
undo synchronization
group ibgpB internal
peer 11.11.11.1 group ibgpB
peer 11.11.11.1 connect-interface LoopBack1
#
ipv4-family ***-instance B
   import-route direct
   undo synchronization
#
ipv4-family ***v4
   peer ibgpB enable
   peer ibgpB allow-as-loop
   peer 11.11.11.1 group ibgpB
#
ospf 1
area 0.0.0.0
   network 4.4.4.2 0.0.0.0
   network 11.11.11.3 0.0.0.0
#
FTP server enable
#                                         
user-interface con 0
user-interface aux 0
user-interface vty 0 4
authentication-mode scheme
#
return
---------------------------------------------------------------
<SPOKE-PEA>dis cur
#
sysname SPOKE-PEA
#
cpu-usage cycle 1min
#
mpls lsr-id 11.11.11.2
#
radius scheme system
#
mpls
#
mpls ldp
#
ip ***-instance A
route-distinguisher 1:1
***-target 1:1 export-extcommunity
***-target 1:2 import-extcommunity
#
domain system
#
local-user admin
password cipher .]@USE=B,53Q=^Q`MAF4<1!!
service-type telnet terminal
level 3
service-type ftp                         
#
interface Aux0
async mode flow
#
interface Ethernet0/0
ip address 3.3.3.2 255.255.255.252
mpls
mpls ldp enable
#
interface Ethernet0/1
ip address dhcp-alloc
#
interface Serial0/0
link-protocol ppp
ip address dhcp-alloc
#
interface NULL0
#
interface LoopBack1
ip address 11.11.11.2 255.255.255.255
#
interface LoopBack2
ip binding ***-instance A
ip address 111.111.111.111 255.255.255.0
#
bgp 100
undo synchronization
group ibgpA internal
peer 11.11.11.1 group ibgpA
peer 11.11.11.1 connect-interface LoopBack1
#
ipv4-family ***-instance A
   import-route direct
   undo synchronization
#
ipv4-family ***v4
   peer ibgpA enable
   peer 11.11.11.1 group ibgpA
   peer 11.11.11.1 allow-as-loop
#
ospf 1
area 0.0.0.0
   network 3.3.3.2 0.0.0.0
   network 11.11.11.2 0.0.0.0
#
FTP server enable
#
user-interface con 0                      
user-interface aux 0
user-interface vty 0 4
authentication-mode scheme
#
return
-----------------------------------------------------------------------
另外要注意一個重要的關於RD的問題。
當2個×××,在某×××沒有RT入策略,會存在的問題。
同一個×××若是RT相同,可是2個RD不一樣的路由都會存放到這個×××中。不過若是另一個×××在沒有設置入方向的RT策略的時候,若是RD與某條×××1中的路由RD同樣,則會接收×××1中的路由,這充分證實了,RD某些時候也是逼不得已的爲路由存放作出貢獻。固然若是×××2有RT列表,則在以前久會被RT過濾掉,不會存在這樣的狀況。
   所以這樣的狀況會形成HUBSPOKE模型中,HUBPE,接收來自×××1的IBGP路由由於是帶LABLE的必須優選,而從HUBCE來的EBGP路由沒有被優選,最後由於IBGP的水平分割致使下方的SPOKEPE沒法學習路由。
因此要記住,若是HUBSPOKE模式,那SPOKEPE和HUBPE的×××中RD最好全都不同不然會出現該問題。
相關文章
相關標籤/搜索