32-MSR係列路由器MPLS L3VPN CE-nPE功能的典型配置舉例
本章節下載: 32-MSR係列路由器MPLS L3VPN CE-nPE功能的典型配置舉例 (155.1 KB)
MSR係列路由器MPLS L3VPN CE-nPE功能的典型配置舉例
|
Copyright © 2014 杭州華三通信技術有限公司 版權所有,保留一切權利。 非經本公司書麵許可,任何單位和個人不得擅自摘抄、複製本文檔內容的部分或全部, 並不得以任何形式傳播。本文檔中的信息可能變動,恕不另行通知。 |
|
目 錄
本文檔介紹使用CE連接多個PE進行MPLS-VPN站點間冗餘多鏈路訪問的典型案例。
本文檔不嚴格與具體軟、硬件版本對應,如果使用過程中與產品實際情況有差異,請參考相關產品手冊,或以設備實際情況為準。
本文檔中的配置均是在實驗室環境下進行的配置和驗證,配置前設備的所有參數均采用出廠時的缺省配置。如果您已經對設備進行了配置,為了保證配置效果,請確認現有配置和以下舉例中的配置不衝突。
本文檔假設您已了解MPLS-VPN冗餘多鏈路的特性。
如圖1所示,PE A和PE B是VPN站點接入路由器,CE與PE A和PE B為MP-EBGP連接,PE A和PE B為MP-IBGP連接;從Site 1到Site 2有CE-PE B和CE-PE A-PE B兩條路徑。現要求:
· 從Site 1到Site 2的報文優先通過CE-PE B路徑進行轉發。
· 當CE-PE B路徑出現故障時,報文轉發路徑能快速切換到CE-PE A-PE B路徑上去。
圖1 MSR係列路由器MPLS L3VPN CE-nPE功能的典型配置舉例

|
設備 |
接口 |
IP地址 |
設備 |
接口 |
IP地址 |
|
PE A |
Loop0 |
1.1.1.1/32 |
PE B |
Loop0 |
2.2.2.2/32 |
|
|
Eth0/0 |
1.2.0.1/24 |
|
Eth0/0 |
1.2.0.2/24 |
|
|
Eth0/1 |
192.168.0.1/24 |
|
Eth0/1 |
172.32.0.1/24 |
|
CE |
Eth0/0 |
192.168.0.2/24 |
|
Eth1/0 |
192.168.1.2/24 |
|
|
Eth0/1 |
192.168.2.1/24 |
Site 1 |
- |
192.168.2.2/24 |
|
|
Eth1/0 |
192.168.1.2/24 |
Site 2 |
- |
172.32.0.2/24 |
由於PE B和CE沒有EBGP鄰接關係,為了讓報文通過CE-PE B路徑,需要在PE B上啟動OSPF多實例,將OSPF多實例路由引入到VPN實例的路由表中,實現與CE正常訪問。
本舉例是在Release 2311版本上進行配置和驗證的。
# 配置接口IP地址。
<PEA> system-view
[PEA] interface loopback 0
[PEA-LoopBack0] ip address 1.1.1.1 255.255.255.255
[PEA-LoopBack0] quit
[PEA] interface ethernet 0/0
[PEA-Ethernet0/0] ip address 1.2.0.1 255.255.255.0
[PEA-Ethernet0/0] quit
[PEA] interface ethernet 0/1
[PEA-Ethernet0/1] ip address 192.168.0.1 255.255.255.0
[PEA-Ethernet0/1] quit
# 配置OSPF協議使網絡互通。
[PEA] ospf 1
[PEA-ospf-1] area 0.0.0.0
[PEA-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[PEA-ospf-1-area-0.0.0.0] network 1.2.0.0 0.0.0.255
[PEA-ospf-1-area-0.0.0.0] quit
[PEA-ospf-1] quit
# 配置PE A的Router ID。
[PEA] router id 1.1.1.1
# 在PE A上開啟ICMP超時報文發送功能和ICMP攜帶擴展信息功能,使能進行tracert配置。
[PEA] ip ttl-expires enable
[PEA] ip icmp-extensions compliant
# 在PE A配置MPLS和MPLS LDP功能。
[PEA] mpls lsr-id 1.1.1.1
[PEA] mpls
[PEA-mpls] quit
[PEA] mpls ldp
[PEA-mpls-ldp] quit
# 在接口Ethernet0/0配置MPLS和MPLS LDP功能。
[PEA] interface ethernet 0/0
[PEA-Ethernet0/0] mpls
[PEA-Ethernet0/0] mpls ldp
[PEA-Ethernet0/0] quit
# 在PE A上創建VPN實例vpna,並配置RD和VPN Target屬性。
[PEA] ip vpn-instance vpna
[PEA-vpn-instance-vpna] route-distinguisher 1:1
[PEA-vpn-instance-vpna] vpn-target 1:1 export-extcommunity
[PEA-vpn-instance-vpna] vpn-target 1:1 import-extcommunity
[PEA-vpn-instance-vpna] quit
# 將接口Ethernet0/1綁定到vpna上。
[PEA] interface ethernet 0/1
[PEA-Ethernet0/1] ip binding vpn-instance vpna
[PEA-Ethernet0/1] ip address 192.168.0.1 255.255.255.0
[PEA-Ethernet0/1] quit
# 進入BGP視圖,在PE間建立MP-BGP對等體。
[PEA] bgp 1
[PEA-bgp] undo synchronization
[PEA-bgp] peer 2.2.2.2 as-number 1
[PEA-bgp] peer 2.2.2.2 connect-interface loopback 0
# 進入BGP-VPNv4子地址族視圖,配置VPNv4對等體2.2.2.2。
[PEA-bgp] ipv4-family vpnv4
[PEA-bgp-af-vpnv4] peer 2.2.2.2 enable
[PEA-bgp-af-vpnv4] quit
# 進入BGP-VPN實例視圖,建立與CE的EBGP連接。
[PEA-bgp] ipv4-family vpn-instance vpna
[PEA-bgp-ipv4-vpna] peer 192.168.0.2 as-number 3
[PEA-bgp-ipv4-vpna] network 192.168.0.0
[PEA-bgp-ipv4-vpna] quit
[PEA-bgp] quit
# 配置接口IP地址。
<PEB> system-view
[PEB] interface loopback 0
[PEB-LoopBack0] ip address 2.2.2.2 255.255.255.255
[PEB-LoopBack0] quit
[PEB] interface ethernet 0/0
[PEB-Ethernet0/0] port link-mode route
[PEB-Ethernet0/0] ip address 1.2.0.2 255.255.255.0
[PEB-Ethernet0/0] quit
[PEB] interface ethernet 0/1
[PEB-Ethernet0/1] port link-mode route
[PEB-Ethernet0/1] ip address 192.168.1.1 255.255.255.0
[PEB-Ethernet0/1] quit
[PEB] interface ethernet 1/0
[PEB-Ethernet1/0] port link-mode route
[PEB-Ethernet1/0] ip address 192.168.1.1 255.255.255.0
[PEB-Ethernet1/0] quit
# 啟動OSPF協議使網絡互通。
[PEB] ospf 1
[PEB-ospf-1] area 0.0.0.0
[PEB-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[PEB-ospf-1-area-0.0.0.0] network 1.2.0.0 0.0.0.255
[PEB-ospf-1-area-0.0.0.0] quit
# 配置PE B的Router ID。
[PEB] router id 2.2.2.2
# 在PE B上開啟ICMP超時報文發送功能和ICMP攜帶擴展信息功能,使能進行tracert配置。
[PEB] ip ttl-expires enable
[PEB] ip icmp-extensions compliant
# 在PE B配置MPLS和MPLS LDP功能。
[PEB] mpls lsr-id 2.2.2.2
[PEB] mpls
[PEB-mpls] quit
[PEB] mpls ldp
[PEB-mpls-ldp] quit
# 在接口Ethernet0/0配置MPLS和MPLS LDP功能。
[PEB] interface ethernet0/0
[PEB-Ethernet0/0] mpls
[PEB-Ethernet0/0] mpls ldp
[PEB-Ethernet0/0] quit
# 在PE B上創建VPN實例vpna,並配置RD和VPN Target屬性。
[PEB] ip vpn-instance vpna
[PEB-vpn-instance-vpna] route-distinguisher 2:1
[PEB-vpn-instance-vpna] vpn-target 1:1 export-extcommunity
[PEB-vpn-instance-vpna] vpn-target 1:1 import-extcommunity
[PEB-vpn-instance-vpna] quit
# 將接口Ethernet0/1和Ethernet1/0綁定到vpna上
[PEB] interface ethernet 0/1
[PEB-Ethernet0/1] ip binding vpn-instance vpna
[PEB-Ethernet0/1] ip address 192.168.1.1 255.255.255.0
[PEB-Ethernet0/1] quit
[PEB] interface ethernet 1/0
[PEB-Ethernet1/0] ip binding vpn-instance vpna
[PEB-Ethernet1/0] ip address 192.168.1.1 255.255.255.0
[PEB-Ethernet1/0] quit
# 啟動PE B的OSPF進程2,實例vpna的Router ID為192.168.1.1。
[PEB] ospf 2 router-id 192.168.1.1 vpn-instance vpna
[PEB-ospf-2] import-route bgp
[PEB-ospf-2] area 0.0.0.0
[PEB-ospf-2-area-0.0.0.0] network 172.32.0.0 0.0.0.255
[PEB-ospf-2-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[PEB-ospf-2-area-0.0.0.0] quit
[PEB-ospf-2] quit
# 進入BGP視圖,在PE間建立MP-BGP對等體。
[PEB] bgp 1
[PEB-bgp] undo synchronization
[PEB-bgp] peer 1.1.1.1 as-number 1
[PEB-bgp] peer 1.1.1.1 connect-interface loopback0
[PEB-bgp] quit
# 進入BGP-VPNv4子地址族視圖,配置VPNv4對等體1.1.1.1。
[PEB] bgp 1
[PEB-bgp] ipv4-family vpnv4
[PEB-bgp-af-vpnv4] peer 1.1.1.1 enable
[PEB-bgp-af-vpnv4] quit
# 進入BGP-VPN實例視圖,將直連路由和OSPF 2路由引入到vpna的路由表。
[PEB] bgp 1
[PEB-bgp] ipv4-family vpn-instance vpna
[PEB-bgp-ipv4-vpna] import-route direct
[PEB-bgp-ipv4-vpna] import-route ospf 2
[PEB-bgp-ipv4-vpna] quit
[PEB-bgp] quit
# 配置接口IP地址。
<CE> system-view
[CE] interface ethernet 0/0
[CE-Ethernet0/0] ip address 192.168.0.2 255.255.255.0
[CE-Ethernet0/0] quit
[CE] interface ethernet 0/1
[CE-Ethernet0/1] ip address 192.168.2.1 255.255.255.0
[CE-Ethernet0/1] quit
[CE] interface ethernet 1/0
[CE-Ethernet1/0] ip address 192.168.1.2 255.255.255.0
[CE-Ethernet1/0] quit
# 啟動OSPF協議使網絡互通。
[CE] ospf 1
[CE-ospf-1] area 0.0.0.0
[CE-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[CE-ospf-1-area-0.0.0.0] network 192.168.2.0 0.0.0.255
[CE-ospf-1-area-0.0.0.0] quit
[CE-ospf-1] quit
# 在CE上開啟ICMP超時報文發送功能和ICMP攜帶擴展信息功能,使能進行tracert配置。
[CE] ip ttl-expires enable
[CE] ip icmp-extensions compliant
# 配置BGP協議,與PE A建立EBGP連接。
[CE] bgp 3
[CE-bgp] undo synchronization
[CE-bgp] network 192.168.2.0
[CE-bgp] peer 192.168.0.1 as-number 1
[CE-bgp] quit
(1) 設備和鏈路都正常工作時,驗證從Site 1到Site 2的報文傳播路徑。
# 在Site 1主機ping Site 2主機IP地址172.32.0.2/24,能夠ping通。
C:\Documents and Settings\Administrator> ping 172.32.0.2
Pinging 172.32.0.2 with 32 bytes of data:
Reply from 172.32.0.2: bytes=32 time=7 ms ttl=126
Reply from 172.32.0.2: bytes=32 time=1 ms ttl=126
Reply from 172.32.0.2: bytes=32 time=1 ms ttl=126
Reply from 172.32.0.2: bytes=32 time=1 ms ttl=126
Ping statistics for 172.32.0.2:
Packets: Sent =4, Received = 4,Lost = 0 (0% loss)
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 7ms, Average = 1ms
# 在Site 1主機tracert Site 2主機IP地址172.32.0.2/24,可以看出,報文經過CE-PE B路徑。
C:\Documents and Settings\Administrator> tracert 172.32.0.2
Tracing route to 172.32.0.2 over a maximum of 30 hops
1 7 ms <1 ms <1 ms 192.168.2.1
2 <1 ms <1 ms <1 ms 192.168.1.1
3 <1 ms <1 ms <1 ms 172.32.0.2
Trace complete.
(2) 當CE到PE B的鏈路斷開後,驗證從Site 1到Site 2的報文傳播路徑。
# 在Site 1主機tracert Site 2主機IP地址172.32.0.2/24,可以看出,報文經過CE-PE A-PE B路徑。
C:\Documents and Settings\Administrator> tracert 172.32.0.2
Tracing route to 172.32.0.2 over a maximum of 30 hops
1 8 ms <1 ms <1 ms 192.168.2.1
2 <1 ms <1 ms <1 ms 192.168.0.1
3 <1 ms <1 ms 1 ms 172.32.0.1
4 <1 ms <1 ms <1 ms 172.32.0.2
Trace complete.
(3) 當CE到PE B的鏈路恢複後,在路由收斂完畢後,驗證從Site 1到Site 2的報文傳播路徑。
# 在Site 1主機tracert Site 2主機IP地址172.32.0.2/24,可以看到,報文又恢複到CE-PE B路徑。
C:\Documents and Settings\Administrator> tracert 172.32.0.2
Tracing route to 172.32.0.2 over a maximum of 30 hops
1 8 ms <1 ms <1 ms 192.168.2.1
2 <1 ms <1 ms <1 ms 192.168.1.1
3 <1 ms <1 ms <1 ms 172.32.0.2
Trace complete.
· PE A配置:
#
router id 1.1.1.1
#
ip ttl-expires enable
ip icmp-extensions compliant
#
mpls lsr-id 1.1.1.1
#
ip vpn-instance vpna
route-distinguisher 1:1
vpn-target 1:1 export-extcommunity
vpn-target 1:1 import-extcommunity
#
mpls
#
mpls ldp
#
interface Ethernet0/0
port link-mode route
ip address 1.2.0.1 255.255.255.0
mpls
mpls ldp
#
interface Ethernet0/1
port link-mode route
ip binding vpn-instance vpna
ip address 192.168.0.1 255.255.255.0
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
bgp 1
undo synchronization
peer 2.2.2.2 as-number 1
peer 2.2.2.2 connect-interface LoopBack0
#
ipv4-family vpn-instance vpna
peer 192.168.0.2 as-number 3
network 192.168.0.0
#
ipv4-family vpnv4
peer 2.2.2.2 enable
#
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 1.2.0.0 0.0.0.255
#
· PE B配置:
#
router id 2.2.2.2
#
ip ttl-expires enable
ip icmp-extensions compliant
#
mpls lsr-id 2.2.2.2
#
ip vpn-instance vpna
route-distinguisher 2:1
vpn-target 1:1 export-extcommunity
vpn-target 1:1 import-extcommunity
#
mpls
#
mpls ldp
#
interface Ethernet0/0
port link-mode route
ip address 1.2.0.2 255.255.255.0
mpls
mpls ldp
#
interface Ethernet0/1
port link-mode route
ip binding vpn-instance vpna
ip address 172.32.0.1 255.255.255.0
#
interface Ethernet1/0
port link-mode route
ip binding vpn-instance vpna
ip address 192.168.1.1 255.255.255.0
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#
bgp 1
undo synchronization
peer 1.1.1.1 as-number 1
peer 1.1.1.1 connect-interface LoopBack0
#
ipv4-family vpn-instance vpna
import-route direct
import-route ospf 2
#
ipv4-family vpnv4
peer 1.1.1.1 enable
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 1.2.0.0 0.0.0.255
#
ospf 2 router-id 192.168.1.1 vpn-instance vpna
import-route bgp
area 0.0.0.0
network 172.32.0.0 0.0.0.255
network 192.168.1.0 0.0.0.255
#
· CE配置:
#
ip ttl-expires enable
ip icmp-extensions compliant
#
interface GigabitEthernet0/1
ip address 192.168.2.1 255.255.255.0
#
interface GigabitEthernet1/0
ip address 192.168.1.2 255.255.255.0
#
interface GigabitEthernet0/0
ip address 192.168.0.2 255.255.255.0
#
bgp 3
network 192.168.2.0
undo synchronization
peer 192.168.0.1 as-number 1
#
ospf 1
area 0.0.0.0
network 192.168.1.0 0.0.0.255
network 192.168.2.0 0.0.0.255
#
· H3C MSR 係列路由器 命令參考(V5)-R2311
· H3C MSR 係列路由器 配置指導(V5)-R2311
不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!
