MSR系列路由器MPLS L3VPN + BGP配置
关键词:MSR;MPLS;BGP;VPN
一、组网需求:
2台PE各接着一个vpna的站点,PEA连接vpna站点1出口CEA,PEA与CEA通过BGP扩散vpna路由
设备清单:MSR系列路由器3台
二、组网图:
三、配置步骤:
CEA配置:
interface Ethernet0/0
port link-mode route
ip address 192.168.0.2
255.255.255.0
#
interface Ethernet0/1
port link-mode route
ip address
192.168.1.1 255.255.255.0
#
bgp 3
//将私网路由通过BGP发布给邻居
network 192.168.1.0
undo
synchronization
//和PEA建立邻居关系
peer 192.168.0.1
as-number 1
#
PEA配置:
router id
#
//建立VPN实例
ip vpn-instance vpna
route-distinguisher
1:1
vpn-target 1:1 export-extcommunity
vpn-target 1:1 import-extcommunity
#
//指定MPLS LSR-ID,这是启动MPLS的前提
mpls lsr-id
#
//使能MPLS
mpls
#
//使能MPLS LDP
mpls ldp
#
//连接PEB的接口,要使能MPLS和LDP
interface Ethernet0/0
port link-mode route
ip address
mpls
mpls
ldp
#
//连接CEA的接口,要绑定VPN实例vpna
interface Ethernet0/1
port
link-mode route
ip binding vpn-instance
vpna
ip
address 192.168.0.1 255.255.255.0
#
//用于建立BGP连接的环回接口,也是router id/LSR-ID所使用的地址
interface LoopBack0
ip
address
#
//使能BGP,AS号为1
bgp 1
undo
synchronization
//建立一个IGP组1
group 1 internal
//组1的邻居都是用环回接口0建立连接
peer 1
connect-interface LoopBack0
//邻居
peer
#
//使能
ipv4-family
vpnv4
peer 1 enable
peer
peer
#
//和CEA建立VPN的BGP连接
ipv4-family vpn-instance vpna
peer 192.168.0.2 as-number 3
network 192.168.0.0
#
//OSPF部分配置,保证公网路由可达
ospf 1
are
network
network
#
PEB配置:
#
router id
#
ip vpn-instance vpna
route-distinguisher 2:1
vpn-target 1:1
export-extcommunity
vpn-target 1:1
import-extcommunity
#
mpls lsr-id
#
mpls
#
mpls ldp
#
interface Ethernet0/0
port link-mode route
ip address
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 LoopBack0
ip
address
#
bgp 1
undo
synchronization
peer
peer
#
ipv4-family
vpnv4
peer
#
ipv4-family vpn-instance vpna
import-route
direct
#
ospf 1
are
network
network
#
四、配置关键点:
1. CEA上需要配置BGP;
2. PEA上需要配置CEA的EBGP连接,注意配置到bgp的vpn实例视图下。