华为数通笔记-MPLS BGP跨域optionA

1.实验拓扑

2.配置思路

各AS内的MPLS骨干网上分别配置IGP协议,实现各自骨干网ASBR和PE之间的互通。

各AS内的MPLS骨干网上分别配置MPLS基本能力和MPLS LDP,建立LDP LSP。

各AS内,PE与ASBR(或PE、ASBR与RR)之间建立MP-IBGP对等体关系,交换VPN路由信息。

各AS内,与CE相连的PE上需配置VPN实例,并把与CE相连的接口和相应的VPN实例绑定。

各AS内,PE与CE之间建立EBGP、OSPF对等体关系,交换VPN路由信息。

在两个ASBR上创建VPN实例,设置和对端匹配的RT值,并将此实例绑定到连接另一个ASBR的接口(把一个ASBR当成是自己的CE),并在ASBR之间建立EBGP对等体关系传递VPN路由信息
 

3.实验目的

1.采用optionA跨域的方式,使其siteA与siteB通信(用7.7.7.7与8.8.8.8通信模拟)
2.siteA采用BGP与PE的交互,siteB采用ospf与PE交互
3.AS域内IGP协议采用OSPF

4.实验步骤

1.配置ip地址,AS域内配置IGP协议、配置mpls LDP协议。

PE-R1配置:

sysname PE-R1
#
mpls lsr-id 1.1.1.1
mpls
#
mpls ldp
#
interface Ethernet0/0/0
 ip address 192.168.17.1 255.255.255.0
#
interface Ethernet0/0/1
 ip address 192.168.13.1 255.255.255.0
 mpls
 mpls ldp
#
interface LoopBack0
 ip address 1.1.1.1 255.255.255.255
#
ospf 1
 area 0.0.0.0
  network 192.168.13.0 0.0.0.255
  network 1.1.1.1 0.0.0.0
#
return

RR-R3配置:

sysname RR-R3
#
mpls lsr-id 3.3.3.3
mpls
#
mpls ldp
#
interface Ethernet0/0/0
 ip address 192.168.13.2 255.255.255.0
 mpls
 mpls ldp
#
interface Ethernet0/0/1
 ip address 192.168.32.1 255.255.255.0
 mpls
 mpls ldp
#
interface LoopBack0
 ip address 3.3.3.3 255.255.255.255
#
ospf 1
 area 0.0.0.0
  network 192.168.13.0 0.0.0.255
  network 192.168.32.0 0.0.0.255
  network 3.3.3.3 0.0.0.0
#
return

ASBR-R2配置:

sysname ASBR-R2
#
mpls lsr-id 2.2.2.2
mpls
#
mpls ldp
#
interface Ethernet0/0/0
 ip address 192.168.32.2 255.255.255.0
 mpls
 mpls ldp
#
interface Ethernet0/0/1
 ip address 192.168.25.1 255.255.255.0
#
interface LoopBack0
 ip address 2.2.2.2 255.255.255.255
#
ospf 1
 area 0.0.0.0
  network 192.168.32.0 0.0.0.255
  network 2.2.2.2 0.0.0.0
#
return

CE-R7配置:

sysname CE-R7
#
interface Ethernet0/0/0
 ip address 192.168.17.2 255.255.255.0
#
interface LoopBack0
 ip address 7.7.7.7 255.255.255.255
#
return

PE-R6、RR-R4、ASBR-R5、CE-R8配置与上述配置类似,这里不再赘述。

2.PE、ASBR分别与RR建立MP-IBGP邻居关系。ASBR与ASBR建立EBGP邻居关系。

RR-R3配置:

bgp 100
 peer 1.1.1.1 as-number 100
 peer 1.1.1.1 connect-interface LoopBack0
 peer 2.2.2.2 as-number 100
 peer 2.2.2.2 connect-interface LoopBack0
 #
 ipv4-family vpnv4
undo policy vpn-target 
  peer 1.1.1.1 enable
  peer 1.1.1.1 reflect-client
  peer 2.2.2.2 enable
  peer 2.2.2.2 reflect-client
#

PE-R1配置:

bgp 100
 peer 3.3.3.3 as-number 100
 peer 3.3.3.3 connect-interface LoopBack0
ipv4-family vpnv4
  peer 3.3.3.3 enable

ASBR-R2配置:

bgp 100
 peer 3.3.3.3 as-number 100
 peer 3.3.3.3 connect-interface LoopBack0
 peer 192.168.25.2 as-number 200
ipv4-family vpnv4
  
  peer 3.3.3.3 enable

PE-R6、RR-R4、ASBR-R5配置与上述配置类似,这里不再赘述。

3.各AS内,与CE相连的PE上需配置VPN实例,并把与CE相连的接口和相应的VPN实例绑定。

PE-R1配置:

ip vpn-instance vpn1
  route-distinguisher 100:100
  vpn-target 100:1 export-extcommunity
  vpn-target 200:1 import-extcommunity

interface Ethernet0/0/0
 ip binding vpn-instance vpn1
 ip address 192.168.17.1 255.255.255.0

PE-R6配置:

ip vpn-instance vpn1
  route-distinguisher 200:200
  vpn-target 200:1 export-extcommunity
  vpn-target 100:1 import-extcommunity

interface Ethernet0/0/1
 ip binding vpn-instance vpn1
 ip address 192.168.68.1 255.255.255.0

4.CE-R7与PE-R1采用BGP进行路由交换,CE-R8与PE-R6采用OSPF进行路由交换。

CE-R7配置:

bgp 65000
 peer 192.168.17.1 as-number 100
network 7.7.7.7 32
 #

PE-R1配置:

bgp 100
ipv4-family vpn-instance vpn1
  peer 192.168.17.2 as-number 65000

CE-R8配置:

ospf 2
 area 0.0.0.0
  network 192.168.68.0 0.0.0.255
  network 8.8.8.8 0.0.0.0
#

PE-R6配置:

ospf 2 vpn-instance vpn1
import-route bgp 
 area 0.0.0.0
  network 192.168.68.0 0.0.0.255


bgp 200
 ipv4-family vpn-instance vpn1
  import-route ospf 2

5.在两个ASBR上创建VPN实例,设置和对端匹配的RT值,并将此实例绑定到连接另一个ASBR的接口

ASBR-R2配置:

ip vpn-instance vpn1
  route-distinguisher 100:100
  vpn-target 200:1 export-extcommunity
  vpn-target 100:1 import-extcommunity
interface Ethernet0/0/1
 ip binding vpn-instance vpn1
 ip address 192.168.25.1 255.255.255.0
bgp 100
 #
 ipv4-family vpn-instance vpn1
  peer 192.168.25.2 as-number 200

ASBR-R5配置:

ip vpn-instance vpn1
  route-distinguisher 200:200
  vpn-target 100:1 export-extcommunity
  vpn-target 200:1 import-extcommunity
interface Ethernet0/0/0
 ip binding vpn-instance vpn1
 ip address 192.168.25.2 255.255.255.0
bgp 200
 #
 ipv4-family vpn-instance vpn1
  peer 192.168.25.1 as-number 100

5.验证

CE-R7有对方站点的路由,且能ping通。 

  • 2
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值