天天看点

华为数通笔记-MPLS BGP跨域optionB1.实验拓扑2.配置思路3.实验目的4.实验步骤5.验证

1.实验拓扑

华为数通笔记-MPLS BGP跨域optionB1.实验拓扑2.配置思路3.实验目的4.实验步骤5.验证

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上与另一ASBR相连接口上分别使能MPLS,且ASBR之间建立MP-EBGP对等体关系,并且不对接收的VPNv4路由进行VPN-target过滤。

3.实验目的

1.采用optionB跨域的方式,使其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邻居关系。

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
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上与另一ASBR相连接口上分别使能MPLS,且ASBR之间建立MP-EBGP对等体关系,并且不对接收的VPNv4路由进行VPN-target过滤。

ASBR-R2配置:

bgp 100
 peer 192.168.25.2 as-number 200
 ipv4-family vpnv4
  undo policy vpn-target
  peer 192.168.25.2 enable
#
int eth 0/0/1
mpls
#
           

ASBR-R5配置:

bgp 200
 peer 192.168.25.1 as-number 100
 ipv4-family vpnv4
  undo policy vpn-target
  peer 192.168.25.1 enable
#
int eth 0/0/0
mpls
#
           

5.验证

华为数通笔记-MPLS BGP跨域optionB1.实验拓扑2.配置思路3.实验目的4.实验步骤5.验证

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

继续阅读