华为mpls ***

拓扑:

 

AR1配置:

#
sysname R1
#
undo info-center enable
#
router id 1.1.1.1
#
ip ***-instance r1
ipv4-family
route-distinguisher 100:1
***-target 100:1 export-extcommunity
***-target 100:1 100:3 import-extcommunity
#
mpls lsr-id 1.1.1.1
mpls
#
mpls ldp
#
interface Ethernet0/0/0
ip binding ***-instance r1
ip address 14.1.1.1 255.255.255.0
#
interface Serial0/0/0
link-protocol ppp
ip address 10.0.12.1 255.255.255.0
mpls
mpls ldp
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
bgp 100
undo default ipv4-unicast
peer 3.3.3.3 as-number 100
peer 3.3.3.3 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 3.3.3.3 enable
#
ipv4-family ***v4
policy ***-target
peer 3.3.3.3 enable
#
ipv4-family ***-instance r1
import-route ospf 1
#
ospf 1 router-id 14.1.1.1 ***-instance r1
import-route bgp tag 100
area 0.0.0.0
network 14.1.1.0 0.0.0.255
#
ospf 100 router-id 1.1.1.1
area 0.0.0.0
network 10.0.12.0 0.0.0.255
network 1.1.1.1 0.0.0.0
#
AR2配置:

#
sysname R2
#
undo info-center enable
#
router id 2.2.2.2
#
mpls lsr-id 2.2.2.2
mpls
#
mpls ldp
#
interface Serial0/0/0
link-protocol ppp
ip address 10.0.12.2 255.255.255.0
mpls
mpls ldp
#
interface Serial0/0/1
link-protocol ppp
ip address 10.0.23.2 255.255.255.0
mpls
mpls ldp
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
ospf 100 router-id 2.2.2.2
area 0.0.0.0
network 10.0.12.0 0.0.0.255
network 10.0.23.0 0.0.0.255
network 2.2.2.2 0.0.0.0
#

AR3配置:

#
sysname R3
#
undo info-center enable
#
router id 3.3.3.3
#
ip ***-instance r3
ipv4-family
route-distinguisher 100:3
***-target 100:1 export-extcommunity
***-target 100:1 100:3 import-extcommunity
#
mpls lsr-id 3.3.3.3
mpls
#
mpls ldp
#
interface Ethernet0/0/0
ip binding ***-instance r3
ip address 35.1.1.3 255.255.255.0
#
interface Serial0/0/1
link-protocol ppp
ip address 10.0.23.3 255.255.255.0
mpls
mpls ldp
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
bgp 100
undo default ipv4-unicast
peer 1.1.1.1 as-number 100
peer 1.1.1.1 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 1.1.1.1 enable
#
ipv4-family ***v4
policy ***-target
peer 1.1.1.1 enable
#
ipv4-family ***-instance r3
import-route ospf 2
#
ospf 2 router-id 35.1.1.3 ***-instance r3
import-route bgp tag 100
area 0.0.0.0
network 35.1.1.0 0.0.0.255
#
ospf 100 router-id 3.3.3.3
area 0.0.0.0
network 10.0.23.0 0.0.0.255
network 3.3.3.3 0.0.0.0
#

AR4配置:

#
sysname r4
#
undo info-center enable
#
interface Ethernet0/0/0
ip address 14.1.1.4 255.255.255.0
#
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
#
ospf 1 router-id 14.1.1.4
area 0.0.0.0
network 14.1.1.0 0.0.0.255
network 4.4.4.4 0.0.0.0

AR5配置:

#
sysname r5
#
undo info-center enable
#
interface Ethernet0/0/0
ip address 35.1.1.5 255.255.255.0
interface LoopBack0
ip address 5.5.5.5 255.255.255.255
#
ospf 2 router-id 35.1.1.5
area 0.0.0.0
network 35.1.1.0 0.0.0.255
network 5.5.5.5 0.0.0.0
#
user-interface con 0
user-interface vty 0 4
user-interface vty 16 20
#
验证:

 

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值