实验一:TDP邻居发现(3725实验台)
<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
首先完成基本的三层配置:OSPF 110
在R1上的配置:
R1(config)#ip cef
R1(config)#mpls ip
R1(config)#mpls label protocol tdp
R1(config)#int s1/0
R1(config-if)#mpls ip
R1(config-if)#mpls label protocol tdp
R1(config-if)#exit
R1(config)#int s1/1
R1(config-if)#mpls ip
R1(config-if)#mpls label protocol tdp
R1(config-if)#
|
在R2上的配置:
R2(config)#ip cef
R2(config)#mpls ip
R2(config)#mpls label protocol tdp
R2(config)#int s1/0
R2(config-if)#mpls ip
R2(config-if)#mpls label protoc
*Mar 1 00:12:42.283: %LDP-5-NBRCHG: TDP Neighbor <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />13.0.0.1:0 (1) is UP
R2(config-if)#mpls label protocol tdp
R2(config-if)#exit
R2(config)#
|
在R3上的配置:
R3(config)#ip cef
R3(config)#mpls ip
R3(config)#mpls label protocol tdp
R3(config)#int s1/0
R3(config-if)#mpls ip
R3(config-if)#mpls label pr
*Mar 1 00:15:30.163: %LDP-5-NBRCHG: TDP Neighbor 13.0.0.1:0 (1) is UP
R3(config-if)#mpls label protocol tdp
R3(config-if)#exit
R3(config)#
|
在R1上面查看TDP的邻居关系:
R1#sh tag-switching tdp neighbor
State: Oper; PIEs sent/rcvd: 0/7; Downstream
Up time: 00:02:44
[刘廷友3]
TDP discovery sources:
Addresses bound to peer TDP Ident:
Peer TDP Ident: 3.3.3.3:0; Local TDP Ident 13.0.0.1:0
[刘廷友7]
TCP connection: 3.3.3.3.711 - 13.0.0.1.21427
State: Oper; PIEs sent/rcvd: 0/4; Downstream
Up time: 00:00:40
TDP discovery sources:
Serial1/1, Src IP addr: 13.0.0.3
R1#
|
R1#show tag-switching tdp bindings
[刘廷友10]
tib entry: 3.3.3.0/24, rev 2
local binding: tag: 16
[刘廷友11]
remote binding: tsr: 3.3.3.3:0, tag: imp-null
[刘廷友15]
tib entry: 12.0.0.0/24, rev 4
local binding: tag: imp-null
remote binding: tsr: 12.0.0.2:0, tag: imp-null
remote binding: tsr: 3.3.3.3:0, tag: 16
local binding: tag: imp-null
remote binding: tsr: 12.0.0.2:0, tag: 17
remote binding: tsr: 3.3.3.3:0, tag: imp-null
R1#
|
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
R1#
|
在所有骨干路由器上面都关闭TTL传播IP包头和MPLS标签头之间的映射
No tag-switching ip propagate-ttl
如果没有启动这条命令,使用trace的时候会将所有经过的路由条目都会显示出来。如果启用以后只会显示进站路由的IP与出站路由器的IP
转载于:https://blog.51cto.com/ltyluck/207230