MPLS-静态标签-配置小例子

一、拓扑图:

二、路由器之间运行isis宣告各个接口配置如下

  R1配置:

sys
#
sysname R1
#
mpls lsr-id 10.10.1.1
mpls
isis 
net 49.0001.0000.0000.0001.00
#
interface GigabitEthernet0/0/0
ip address 10.12.1.1 24
isis en
mpls
#
interface LoopBack0
ip address 10.10.1.1 255.255.255.255
isis en
#
static-lsp ingress R3 destination 10.10.1.3 32 nexthop 10.12.1.2 out-label 20 
static-lsp egress R1 incoming-interface GigabitEthernet0/0/0 in-label 60
#
return
#

R2配置:

sys
#
sysname R2
#
mpls lsr-id 10.10.1.2
mpls
isis
net 49.0001.0000.0000.0002.00
#
interface GigabitEthernet0/0/0
ip address 10.12.1.2 24
isis en
mpls
#
interface GigabitEthernet0/0/1
ip address 10.23.1.2 24 
mpls
isis en 
#
interface LoopBack0
ip address 10.10.1.2 255.255.255.255
isis en
#
static-lsp transit R3 incoming-interface GigabitEthernet0/0/0 in-label 20 nexthop 10.23.1.3 out-label 40 
static-lsp transit R1 incoming-interface GigabitEthernet0/0/1 in-label 30 nexthop 10.12.1.1 out-label 60
#
return
#

R3配置:

sys
sysname R3
#
mpls lsr-id 10.10.1.3
mpls
isis 
net 49.0001.0000.0000.0003.00
#
interface GigabitEthernet0/0/0
ip address 10.23.1.3 24
isis en
mpls
#
interface LoopBack0
ip address 10.10.1.3 255.255.255.255
isis en 
#
#
static-lsp egress R3 incoming-interface GigabitEthernet0/0/0 in-label 40
static-lsp ingress R1 destination 10.10.1.1 32 nexthop 10.23.1.2 out-label 30
#
return
#

注意:静态LSP与静态CR-LSP使用相同的标签空间(16~1023)。配置静态LSP时需要遵循的原则是:前一节点出标签的值等于下一个节点入标签的值。

static-lsp egress 和  static-lsp transit  的in-label  整数形式,取值范围是16~1023 

static-lsp ingress 和 static-lsp transit  的out-label  整数形式,取值范围是16~1048575

三、各个路由器之间不运行动态路由协议,在R1和R3上配置去往mpls标签转发目标的明细路由。

R1配置:

sys
#
sysname R1
#
mpls lsr-id 10.10.1.1
mpls
#
interface GigabitEthernet0/0/0
ip address 10.12.1.1 24
mpls
#
interface LoopBack0
ip address 10.10.1.1 255.255.255.255
#
static-lsp ingress R3 destination 10.10.1.3 32 nexthop 10.12.1.2 out-label 20 
static-lsp egress R1 incoming-interface GigabitEthernet0/0/0 in-label 60
#
ip route-static 10.10.1.3 255.255.255.255 10.12.1.2
#
return
#

R2配置:

sys
#
sysname R2
#
mpls lsr-id 10.10.1.2
mpls
#
interface GigabitEthernet0/0/0
ip address 10.12.1.2 24
 mpls
#
interface GigabitEthernet0/0/1
ip address 10.23.1.2 24 
mpls
#
interface LoopBack0
ip address 10.10.1.2 255.255.255.255
#
static-lsp transit R3 incoming-interface GigabitEthernet0/0/0 in-label 20 nexthop 10.23.1.3 out-label 40 
static-lsp transit R1 incoming-interface GigabitEthernet0/0/1 in-label 30 nexthop 10.12.1.1 out-label 60
#
return
#

R3配置:


sys
sysname R3
#
mpls lsr-id 10.10.1.3
mpls
#
interface GigabitEthernet0/0/0
ip address 10.23.1.3 24
mpls
#
interface LoopBack0
ip address 10.10.1.3 255.255.255.255
#
static-lsp egress R3 incoming-interface GigabitEthernet0/0/0 in-label 40
static-lsp ingress R1 destination 10.10.1.1 32 nexthop 10.23.1.2 out-label 30
#
ip route-static 10.10.1.1 255.255.255.255 10.23.1.2
#
return
#

检测能不能通:用ping ping -a 10.10.1.1 10.10.1.3  注意一定要加上-a制定源地址 这样才能保证回程也能出发mpls转发。

 

 

静态mpls中的除了ingress 要有去往目标的明细路由 ,中间transit 设备不需要有明细路由即可根据设置的标签转发。

-------------------------对网络感兴趣的朋友可以加我微信:【piaofeng0129】一起交流讨论。

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

guofeng80

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

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

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

打赏作者

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

抵扣说明:

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

余额充值