可以使用任意方式來跑跨域MPLS(A、B、C1、C2都可以),不過關于傳遞Vpnv4路由的配置此處不做介紹;此處只介紹關于PE和CE對接的配置和關于后門鏈路的配置
配置PE與CE設備對接命令(通過OSPF對接)
PE2與CE1對接
PE2
創建實例
ip vpn-instance CE1
ipv4-family
route-distinguisher 12:1 配置RD值
vpn-target 200:1 export-extcommunity 配置入RT值
vpn-target 100:1 import-extcommunity 配置出RT值
接口綁定實例
int g0/0/1
ip bind vpn-instance CE1
ip add 100.0.12.2 24
OSPF綁定實例
ospf 1 vpn-instance CE1
area 0
net 100.0.12.2 0.0.0.0
將CE路由重發布進BGP
bgp 100
ipv4-family vpn-instance CE1
import-route ospf 1
將BGP路由重發布到CE中
ospf 1
import-route bgp
CE1
int g0/0/0
ip add 100.0.12.1 24
int g0/0/1
ip add 172.16.1.254 24
ospf 1
area 0
net 100.0.12.1 0.0.0.0
net 172.16.1.0 0.0.0.255
PE7與CE8對接
PE7
創建實例
ip vpn-instance CE8
ipv4-family
route-distinguisher 78:1
vpn-target 100:1 export-extcommunity
vpn-target 200:1 import-extcommunity
接口綁定實例
int g0/0/1
ip bind vpn-instance CE8
ip add 100.0.78.7 24
OSPF綁定實例
ospf 1 vpn-instance CE8
area 0
net 100.0.78.7 0.0.0.0
將CE路由重發布進BGP
bgp 200
ipv4-family vpn-instance CE8
import-route ospf 1
將BGP路由重發布到CE中
ospf 1
import-route bgp
CE8
int g0/0/0
ip add 100.0.78.8 24
int g0/0/1
ip add 192.168.1.254 24
ospf 1
area 0
net 100.0.78.8 0.0.0.0
net 192.168.1.0 0.0.0.255
配置后門鏈路
在CE設備上將后門鏈路宣告進OSPF中
CE1
ospf 1
area 0.0.0.0
network 100.0.18.1 0.0.0.0
CE2
ospf 1
area 0.0.0.0
network 100.0.18.8 0.0.0.0
此時關于對端CE的鄰居會直接從此后門鏈路學習到,全部流量走后門鏈路(從CE1/CE2后門鏈路學到的路由類型為1/2類LSA,優于從PE1/PE2學到的3/5類LSA)
此時需要在PE上配置Sham-link來解決此問題(不會因為Domain ID將從PE學來的路由轉換為3類/5類LSA)
在PE上配置建立Sham-Link的地址并通過Vpnv4路由傳遞到對端
PE1
interface LoopBack1 配置建立后門鏈路的IP地址并綁定實例
ip binding vpn-instance CE1
ip address 22.22.22.22 255.255.255.255
ospf 1 vpn-instance CE1 建立后門鏈路
area 0.0.0.0
sham-link 22.22.22.22 77.77.77.77
bgp 100 通過引入直連的方式將本端的后門鏈路地址傳遞給對端(不要直接在OSPF實例中宣告后門鏈路地址,因為宣告從后門鏈路學到此地址為1類LSA,則不會從MPLS骨干網學習此地址,導致后門鏈路無法建立)
ipv4-family vpn-instance CE1
import-route direct
PE2
interface LoopBack1
ip binding vpn-instance CE8
ip address 77.77.77.77 255.255.255.255
ospf 1 vpn-instance CE1
area 0.0.0.0
sham-link 77.77.77.77 22.22.22.22
bgp 200
ipv4-family vpn-instance CE8
import-route direct
在CE上將后門鏈路的開銷增大
CE1
interface GigabitEthernet0/0/2
ospf cost 10
CE2
interface GigabitEthernet0/0/2
ospf cost 10
審核編輯:湯梓紅
-
華為
+關注
關注
216文章
34532瀏覽量
252999 -
路由
+關注
關注
0文章
278瀏覽量
41930 -
MPLS
+關注
關注
0文章
131瀏覽量
24192 -
命令
+關注
關注
5文章
696瀏覽量
22108
原文標題:華為MPLS跨域——后門鏈路實驗配置
文章出處:【微信號:網絡技術干貨圈,微信公眾號:網絡技術干貨圈】歡迎添加關注!文章轉載請注明出處。
發布評論請先 登錄
相關推薦
評論