配置MPLS的几个步骤:

1、启用CEF

2、指定使用的标签分发协议    (可选)

3、MPLS LDP router-id lo0  fo强制更改 (可选)

4、MPLS label range 200 299  (可选)

5、运行LDP

6、修改MTU值   (可选)

查询命令:

show mpls interfaces       //查看启用MPLS的接口

show mpls ldp neighbor     //查看LDP的邻居表

show mpls ldp bindings     //查看LIB表

show mpls forwarding-table    //查看标签转发表LFIB

show mpls ip binding       //可以直接看到一条路由的入标签和出标签

show ip cef                //查看FIB表

show mpls ldp discovery detail      //可看到transport-address

基本命令:

rouer(config)#ip cef

rouer(config)#int s0/0

rouer(config-if)#mpls ip    //在接口下启用MPLS

可选命令:

rouer(config)#mpls label protocol ldp  //指定使用LDP

rouer(config)#mpls ldp router-id lo0   //指定lo0router-id

rouer(config)#mpls label range 200 299  //指定路由器分配标签的范围,需要重新建立TCP连接

rouer(config-if)#mpls ldp discovery transport-address interface //指定自已的transport-address