华为环境如何搭建MPLS的专网

之前有人说思科的没接触过,现在发布一套华为的,便于理解
工程利用ensp作为搭建环境(华为)
在这里插入图片描述

R7,R12作为CE端
R8,R11作为PE端
R9,R10作为运营商P设备

CE:


interface Ethernet0/0/0
 ip address 12.1.1.2 255.255.255.252
 ospf timer hello 5
 ospf ldp-sync
 ospf enable 1 area 0.0.0.0
 interface LoopBack0
 ip address 1.1.1.1 255.255.255.255
 ospf enable 1 area 0.0.0.0
#
interface LoopBack1
 ip address 172.16.1.1 255.255.255.255
 ospf enable 1 area 0.0.0.0
#
ospf 1 router-id 1.1.1.1
 area 0.0.0.0


PE:

ip vir pri net-instance vir pri net
 ipv4-family
  route-distinguisher 1:1
  vir pri net-target 1:1 export-extcommunity
  vir pri net-target 1:1 import-extcommunity
 ipv6-family
  route-distinguisher 1:1
  
mpls lsr-id 2.2.2.2
mpls
#
mpls ldp
#
isis 100
 graceful-restart
 is-level level-2
 cost-style wide
 flash-flood level-2
 network-entity 86.0029.0000.0000.2222.00
 is-name 2.2.2.2
 set-overload on-startup wait-for-bgp
#
interface Ethernet0/0/0
 ip binding vir pri net-instance vir pri net
 ip address 12.1.1.1 255.255.255.252
 ospf timer hello 5
 ospf ldp-sync
 ospf enable 1 area 0.0.0.0
#
interface Ethernet0/0/1
 ip address 10.1.23.1 255.255.255.252
 isis enable 100
 isis circuit-level level-2
 isis cost 100 level-2
 isis timer hello 5 level-2
 isis small-hello
 isis ldp-sync
 mpls
 mpls ldp
#
interface LoopBack0
 ip address 2.2.2.2 255.255.255.255
 isis enable 100
 isis circuit-level level-2
#
interface LoopBack1
 ip address 192.168.1.1 255.255.255.0
#
bgp 100
 router-id 2.2.2.2
 peer 5.5.5.5 as-number 100
 peer 5.5.5.5 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  undo peer 5.5.5.5 enable
 #
 ipv4-family vir pri netv4
  policy vir pri net-target
  peer 5.5.5.5 enable
 #
 ipv4-family vir pri net-instance vir pri net
  import-route ospf 1 
#
ospf 1 router-id 2.2.2.2 vir pri net-instance vir pri net
 default-route-advertise always
 area 0.0.0.0
#



P:

mpls lsr-id 3.3.3.3
mpls
#
mpls ldp
#
isis 100
 graceful-restart
 is-level level-2
 cost-style wide
 flash-flood level-2
 network-entity 86.0029.0000.0000.3333.00
 is-name 3.3.3.3
 set-overload on-startup wait-for-bgp
#
firewall zone Local
 priority 16
#
interface Ethernet0/0/0
 ip address 10.1.23.2 255.255.255.252
 isis enable 100
 isis circuit-level level-2
 isis cost 100 level-2
 isis timer hello 5 level-2
 isis small-hello
 isis ldp-sync
 mpls
 mpls ldp
#
interface Ethernet0/0/1
 ip address 10.1.34.1 255.255.255.252
 isis enable 100
 isis circuit-level level-2
 isis cost 100 level-2
 isis timer hello 5 level-2
 isis small-hello
 isis ldp-sync
 mpls
 mpls ldp
#
interface LoopBack0
 ip address 3.3.3.3 255.255.255.255
 isis enable 100
 isis circuit-level level-2
#

P端作为整个工程的核心节点,同时在面向客户端CE启用vir pri net zone下的IGP协议,还要在面向运营商公网P及其他站点PE上运行IGP、MBGP、MPLS、LDP等协议。

在这里插入图片描述

PE上面普通v4路由表下路由,保证PE-P-PE间路由可达。
在这里插入图片描述

查看bgp vir pri netv4路由表,因为之前将ospf路由导入到bgp下面,此时R7上面两条路由import进入bgp vir pri netv4路由传递到对端PE设备vir pri net-instance路由表中。

在这里插入图片描述

客户端CE1 → 客户端CE2 可正常通过mplsvir pri net互相访问。
在这里插入图片描述

通过抓包看到数据包打了两层标签,因为存在次末跳POP的机制,在R10处收到R9的数据包后弹出标签直接寻址普通数据包访问目标地址。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

kate zhu

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值