私網到公網MPLS VPN的關鍵配置,王海軍老師告訴你

1,問題描述

某國某公司大樓網絡部署OSPF網絡,AS號為65440,使用MPLS VPN與總部網絡AS為65420進行對接,中間通過骨幹網AS為100,其客戶需要保證總部和分部的網絡互通。

設計網絡拓撲圖如下:

私網到公網MPLS VPN的關鍵配置,王海軍老師告訴你

CE端的配置:

1. 配置端口地址;

2. bgp 配置;

3. 詳細配置

bgp 65440

peer 10.4.1.2 as-number 100

#

ipv4-family unicast

undo synchronization

peer 10.4.1.2 enable

#

ospf 1

area 0.0.0.0

network 10.4.1.0 0.0.0.255

network 10.5.1.0 0.0.0.255

#

PE端配置:

1. BGP配置

2. MPLS配置

3. VPN實例配置

4. 具體配置

ip vpn-instance vpnb

ipv4-family

route-distinguisher 200:2

vpn-target 222:2 export-extcommunity

vpn-target 222:2 import-extcommunity

#

mpls lsr-id 3.3.3.9

mpls

#

mpls ldp

#

interface GigabitEthernet2/0/0

ip binding vpn-instance vpnb

ip address 10.4.1.2 255.255.255.0

#

interface GigabitEthernet3/0/0

ip address 172.2.1.2 255.255.255.0

mpls

mpls ldp

#

bgp 100

peer 1.1.1.9 as-number 100

peer 1.1.1.9 connect-interface LoopBack0

#

ipv4-family unicast

undo synchronization

peer 1.1.1.9 enable

#

ipv4-family vpnv4

policy vpn-target

peer 1.1.1.9 enable

#

ipv4-family vpn-instance vpnb

ipv4-family vpnv4

policy vpn-target

peer 1.1.1.9 enable

#

ipv4-family vpn-instance vpnb

import-route direct

peer 10.4.1.1 as-number 65440

經過配置之後,雖然完成了MPLS VPN的配置,但是,網絡仍然是不通的。

2,處理過程

經過MPLS VPN配置之後,雖然完成了MPLS VPN的配置,但是,網絡仍然是不通的,需要將路由導入,路由導入配置主要在CE端完成

具體配置如下:

bgp 65440

peer 10.4.1.2 as-number 100

#

ipv4-family unicast

undo synchronization

import-route direct

import-route ospf 1

peer 10.4.1.2 enable

#

ospf 1

import-route bgp

3,建議與總結

路由導入是完成MPLS VPN 配置的關鍵步驟,可以使EBGP和IBGP相互學習路由保證網絡互通。根據客戶的要求也可以將import-route命令改為network 進行控制性發佈路由。


分享到:


相關文章: