MPLS VPN-跨域MPLS OptionC1

拓扑图

配置

配置接口IP地址

配置VPN-Instance,RD,RT

配置ISIS

配置MPLS

配置BGP,建立MP-BGP的PE间学习到对方环回口路由

配置MP-BGP,环回口建立邻居,配置eBGP多跳,ASBR互联接口开启MPLS

BGP邻居间开启标签路由交换能力

配置路由策略,ASBR间传递BGP路由携带标签,ASBR与PE间携带BGP路由标签

查看标签交换ASBR间路径不显示*号,MPLS下配置undo ttl expiration pop

sysname AR1
#
ip vpn-instance BJ
 ipv4-family
  route-distinguisher 100:1
  vpn-target 100:1 export-extcommunity
  vpn-target 200:6 import-extcommunity
#
mpls lsr-id 1.1.1.1
mpls
#
mpls ldp
#
isis 1
 is-level level-2
 network-entity 49.0000.0000.0000.0001.00
#
interface GigabitEthernet0/0/0
 ip address 12.1.1.1 255.255.255.0 
 isis enable 1
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/1
 ip binding vpn-instance BJ
 ip address 10.0.1.254 255.255.255.0 
#
interface LoopBack0
 ip address 1.1.1.1 255.255.255.255 
 isis enable 1
#
bgp 100
 undo default ipv4-unicast
 peer 3.3.3.3 as-number 100 
 peer 3.3.3.3 connect-interface LoopBack0
 peer 6.6.6.6 as-number 200 
 peer 6.6.6.6 ebgp-max-hop 255 
 peer 6.6.6.6 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 3.3.3.3 enable
  peer 3.3.3.3 label-route-capability
  undo peer 6.6.6.6 enable
 # 
 ipv4-family vpnv4
  policy vpn-target
  peer 6.6.6.6 enable
 #
 ipv4-family vpn-instance BJ 
  network 10.0.1.0 255.255.255.0 
#
sysname AR2
#
mpls lsr-id 2.2.2.2
mpls
#
mpls ldp
#
isis 1
 is-level level-2
 network-entity 49.0000.0000.0000.0002.00
#
interface GigabitEthernet0/0/0
 ip address 12.1.1.2 255.255.255.0 
 isis enable 1
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/1
 ip address 23.1.1.2 255.255.255.0 
 isis enable 1
 mpls
 mpls ldp
#
interface LoopBack0
 ip address 2.2.2.2 255.255.255.255 
 isis enable 1
#
sysname AR3
#
mpls lsr-id 3.3.3.3
mpls
 undo ttl expiration pop
#
mpls ldp
#
isis 1
 is-level level-2
 network-entity 49.0000.0000.0000.0003.00
#
interface GigabitEthernet0/0/1
 ip address 34.1.1.3 255.255.255.0 
 mpls
#
interface LoopBack0
 ip address 3.3.3.3 255.255.255.255 
 isis enable 1
#
bgp 100
 peer 1.1.1.1 as-number 100 
 peer 1.1.1.1 connect-interface LoopBack0
 peer 34.1.1.4 as-number 200 
 #
 ipv4-family unicast
  undo synchronization
  import-route isis 1 route-policy I->B
  peer 1.1.1.1 enable
  peer 1.1.1.1 route-policy PE-Label export
  peer 1.1.1.1 next-hop-local 
  peer 1.1.1.1 label-route-capability
  peer 34.1.1.4 enable
  peer 34.1.1.4 route-policy ASBR-Label export
  peer 34.1.1.4 label-route-capability
#
route-policy I->B permit node 10 
 if-match ip-prefix AR1-L0 
#
route-policy ASBR-Label permit node 10 
 apply mpls-label
#
route-policy PE-Label permit node 10 
 if-match mpls-label 
 apply mpls-label
#
ip ip-prefix AR1-L0 index 10 permit 1.1.1.1 32
#
sysname AR4
#
mpls lsr-id 4.4.4.4
mpls
 undo ttl expiration pop
#
mpls ldp
#
isis 1
 is-level level-2
 network-entity 49.0000.0000.0000.0004.00
#
interface GigabitEthernet0/0/0
 ip address 34.1.1.4 255.255.255.0 
 mpls
#
interface GigabitEthernet0/0/1
 ip address 45.1.1.4 255.255.255.0 
 isis enable 1
 mpls
 mpls ldp
#
interface LoopBack0
 ip address 4.4.4.4 255.255.255.255 
 isis enable 1
#
bgp 200
 peer 6.6.6.6 as-number 200 
 peer 6.6.6.6 connect-interface LoopBack0
 peer 34.1.1.3 as-number 100 
 #
 ipv4-family unicast
  undo synchronization
  import-route isis 1 route-policy I->B
  peer 6.6.6.6 enable
  peer 6.6.6.6 route-policy PE-Label export
  peer 6.6.6.6 next-hop-local 
  peer 6.6.6.6 label-route-capability
  peer 34.1.1.3 enable
  peer 34.1.1.3 route-policy ASBR-Label export
  peer 34.1.1.3 label-route-capability
#
route-policy I->B permit node 10 
 if-match ip-prefix AR6-L0 
#
route-policy ASBR-Label permit node 10 
 apply mpls-label
#
route-policy PE-Label permit node 10 
 if-match mpls-label 
 apply mpls-label
#
ip ip-prefix AR6-L0 index 10 permit 6.6.6.6 32
#
sysname AR5
#
mpls lsr-id 5.5.5.5
mpls
#
mpls ldp
#
isis 1
 is-level level-2
 network-entity 49.0000.0000.0000.0005.00
#
interface GigabitEthernet0/0/0
 ip address 45.1.1.5 255.255.255.0 
 isis enable 1
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/1
 ip address 56.1.1.5 255.255.255.0 
 isis enable 1
 mpls
 mpls ldp
#
interface LoopBack0
 ip address 5.5.5.5 255.255.255.255 
 isis enable 1
#
sysname AR6
#
ip vpn-instance SH
 ipv4-family
  route-distinguisher 200:6
  vpn-target 200:6 export-extcommunity
  vpn-target 100:1 import-extcommunity
#
mpls lsr-id 6.6.6.6
mpls
#
mpls ldp
#
interface GigabitEthernet0/0/0
 ip address 56.1.1.6 255.255.255.0 
 isis enable 1
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/1
 ip binding vpn-instance SH
 ip address 10.0.2.254 255.255.255.0 
#
interface LoopBack0
 ip address 6.6.6.6 255.255.255.255 
 isis enable 1
#
bgp 200
 undo default ipv4-unicast
 peer 1.1.1.1 as-number 100 
 peer 1.1.1.1 ebgp-max-hop 255 
 peer 1.1.1.1 connect-interface LoopBack0
 peer 4.4.4.4 as-number 200 
 peer 4.4.4.4 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  undo peer 1.1.1.1 enable
  peer 4.4.4.4 enable
  peer 4.4.4.4 label-route-capability
 # 
 ipv4-family vpnv4
  policy vpn-target
  peer 1.1.1.1 enable
 #
 ipv4-family vpn-instance SH 
  network 10.0.2.0 255.255.255.0 
#

查看MP-BGP邻居

查看BGP路由

PC1访问PC2,查看路径

AR1上查看标签交换路径

查看VPNv4标签

查看BGP的路由标签

查看MPLS标签

对于H3C模拟器的BGP-MPLS跨域配置,您可以按照以下步骤进行设置: 1. 首先,确保所有相关设备(PE、P、ASBR)上都已经开启了MPLS与LDP功能。 2. 在配置路由协议方面,您需要在设备上配置OSPF,指定一个Router ID,并将其归属于区域0.0.0.0(如果尚未配置)。请确保网络配置中包含正确的网络地址和掩码。 3. 接下来,您需要配置设备的接口。在Loopback接口上配置一个IP地址,例如3.3.3.3,同时指定正确的掩码。对于与其他设备连接的接口,例如GigabitEthernet0/0和GigabitEthernet0/1,需要配置IP地址,启用MPLS和LDP功能。 4. 最后,您还需要配置BGP-MPLS跨域。这可以通过在设备上配置BGP并启用MPLS标签分发来实现。您可以使用命令`bgp`进入BGP配置模式,然后使用相应的命令配置BGP邻居和路由策略。 请注意,这些步骤只是一个大致的指南,具体的配置可能因您的网络拓扑和需求而有所不同。建议您参考H3C模拟器的官方文档或咨询网络专家以获取更详细和准确的配置指导。 interface GigabitEthernet0/1 #PE、P、ASBR设备之间都需要开启mpls与ldp功能。 ospf 1 router-id 3.3.3.3 area 0.0.0.0 network 3.3.3.3 0.0.0.0 network 23.23.23.0 0.0.0.3 # mpls lsr-id 3.3.3.3。 interface LoopBack0 ip address 3.3.3.3 255.255.255.255 # interface GigabitEthernet0/0 ip address 34.34.34.1 255.255.255.252 mpls enable mpls ldp enable # interface GigabitEthernet0/1 ip address 23.23.23.2 255.255.255.252 mpls enable mpls ldp enable。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值