天天看點

MPLS 虛拟專線 實驗

目錄

1.拓撲圖

2.實驗思路

3.主要配置

4.測試

5.實驗總結

1.拓撲圖

MPLS 虛拟專線 實驗

2.實驗思路

  • IGP路由
  • MPLS Domain
  • 配置MPLS VPN
  • PE之間的MP-BGP鄰居關系
  • CE端與PE端的路由交換
  • 雙向重釋出,實作路由共享

3.主要配置

R6:

*公網環境:

[r6]ospf 1 router-id 6.6.6.6

[r6-ospf-1]area 0

[r6-ospf-1-area-0.0.0.0]network 6.6.6.6 0.0.0.0

[r6-ospf-1-area-0.0.0.0]network 46.1.1.2 0.0.0.0

[r6-ospf-1-area-0.0.0.0]network 36.1.1.2 0.0.0.0

*MPLS Domain:

[r6]mpls lsr-id 6.6.6.6

[r6]mpls

[r6]mpls ldp

[r6]int GigabitEthernet 0/0/0

[r6-GigabitEthernet0/0/0]mpls

[r6-GigabitEthernet0/0/0] mpls ldp

*MPLS VPN:

[r6]ip vpn-instance a3

[r6-vpn-instance-a3]ipv4-family

[r6-vpn-instance-a3-af-ipv4]route-distinguisher 1:1

[r6-vpn-instance-a3-af-ipv4]vpn-target 1:1

[r6]int GigabitEthernet 0/0/2

[r6-GigabitEthernet0/0/2]ip binding vpn-instance a3

[r6-GigabitEthernet0/0/2]ip address 192.168.6.2 24

*MP-BGP:

[r6]bgp 2

[r6-bgp]router-id 6.6.6.6

[r6-bgp]peer 2.2.2.2 as-number 2

[r6-bgp]peer 2.2.2.2 connect-interface LoopBack 0

[r6-bgp]peer 2.2.2.2 next-hop-local

[r6-bgp]peer 5.5.5.5 as-number 2

[r6-bgp]peer 5.5.5.5 connect-interface LoopBack 0

[r6-bgp]peer 5.5.5.5 next-hop-local

[r6-bgp]ipv4-family vpnv4

[r6-bgp-af-vpnv4]peer 2.2.2.2 enable

[r6-bgp-af-vpnv4]peer 5.5.5.5 enable

CE端與PE端的路由交換:

[r6]ospf 2 vpn-instance a3

[r6-ospf-2]area 0

[r6-ospf-2-area-0.0.0.0]network 192.168.6.0 0.0.0.255

[r6-ospf-2-area-0.0.0.0]network 192.168.5.0 0.0.0.255

[r6]bgp 2

[r6-bgp]ipv4 vpn-instance a3

[r6-bgp-a3]import-route ospf 2

[r6]ospf 2 vpn-instance a3

[r6-ospf-2]import-route bgp

4.測試

MPLS 虛拟專線 實驗

R6的LIB表

MPLS 虛拟專線 實驗

R6的FIB表

MPLS 虛拟專線 實驗

R6的LFIB表

MPLS 虛拟專線 實驗

R6的a3空間的私有路由表

MPLS 虛拟專線 實驗

基于a3的私有路由表轉發

MPLS 虛拟專線 實驗

追蹤192.168.5.1到192.168.1.1所經過的裝置

MPLS 虛拟專線 實驗

從抓包資訊中可以看到在2層和3層之間壓入兩層标簽

5.實驗總結

根據實驗配置思路完成實驗配置,首先公網環境全網可達(ISP,MPLS Domain),然後在Edge LSR裝置上配置MPLS VPN并且與私網之間的路由共享;需要注意的是MPLS VPN隻能讓所有公網之間完成通信,如果想要通路網際網路,就必須重新有一條線路指向ISP。

繼續閱讀