26.1. 配置基本的MPLS P路由器
le="FONT-FAMILY: 宋体">提问 配置MPLS核心网络里面的P路由器
回答
Router-P1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router-P1(config)#ip cef
Router-P1(config)#mpls ip
Router-P1(config)#interface FastEthernet0/0
Router-P1(config-if)#description connection to Router-PE2
Router-P1(config-if)#ip address 10.1.2.11 255.255.255.0
Router-P1(config-if)#mpls ip
Router-P1(config-if)#exit
Router-P1(config)#interface Serial0/0
Router-P1(config-if)#description connection to Router-PE1
Router-P1(config-if)#ip address 10.1.1.14 255.255.255.252
Router-P1(config-if)#mpls ip
Router-P1(config-if)#exit
Router-P1(config)#interface Serial0/1
Router-P1(config-if)#description connection to Router-PE3
Router-P1(config-if)#ip address 10.1.1.10 255.255.255.252
Router-P1(config-if)#mpls ip
Router-P1(config-if)#exit
Router-P1(config)#interface Loopback0
Router-P1(config-if)#ip address 10.0.0.11 255.255.255.255
Router-P1(config-if)#exit
Router-P1(config)#router ospf 99
Router-P1(config-router)#router-id 10.0.0.11
Router-P1(config-router)#network 10.0.0.0 0.255.255.255 area 0
Router-P1(config-router)#exit
Router-P1(config)#end
Router-P1#
注释 对于P路由器就是启用CEF和在端口启用MPLS,对于tag-switching ip instead 和mpls ip两个命令都基本一致,对于是否配置ldp或者tdp也不是必要的,路由器会自动适应。有三个验证命令:
Router-P1#show mpls interfaces
Interface IP Tunnel Operational
FastEthernet0/0 Yes (tdp) No Yes
Serial0/0 Yes (tdp) No Yes
Serial0/1 Yes (tdp) No Yes
Router-P1#show mpls ldp neighbor
Peer TDP Ident: 10.0.0.2:0; Local TDP Ident 10.0.0.11:0
TCP connection: 10.0.0.2.711 - 10.0.0.11.28185
State: Oper; PIEs sent/rcvd: 0/82; Downstream
Up time: 01:04:45
TDP discovery sources:
Serial0/0, Src IP addr: 10.1.1.13
Addresses bound to peer TDP Ident:
10.0.0.2 10.1.1.2 10.1.1.13
Router-P1#show mpls forwarding-table
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 Pop tag 10.0.0.2/32 7697 Se0/0 point2point
17 Pop tag 10.1.1.0/30 0 Se0/0 point2point
18 Pop tag 10.0.0.3/32 6685 Se0/1 point2point
转载地址:http://www.net130.com/MS/Pub/Tech/tech_zh/2007_04_09_13769.htm