R3(config-if)#exit R3(config)#int s1/1 R3(config-if)#mpls ip R4:
R4(config)#int s1/1
R4(config-if)#mpls label protocol ldp R4(config-if)#mpls ip
5.查看LDP简单信息
(1)可以查看哪些接口开启了mpls: r1#sh mpls interfaces
Interface IP Tunnel Operational Serial1/1 Yes (ldp) No Yes r1#
说明:可以看出,R1相关接口S1/1已经运行在LDP下。(其它设备接口状态略过!) (2)查看看LDP详情,包括包含hello时间,会话时间: r1#sh mpls ldp parameters Protocol version: 1
Downstream label generic region: min label: 16; max label: 100000 Session hold time: 180 sec; keep alive interval: 60 sec Discovery hello: holdtime: 15 sec; interval: 5 sec Discovery targeted hello: holdtime: 90 sec; interval: 10 sec
Downstream on Demand max hop count: 255 Downstream on Demand Path Vector Limit: 255 LDP for targeted sessions
LDP initial/maximum backoff: 15/120 sec LDP loop detection: off r1#
说明:可以看到,默认hello和hold分别是5s和15s,会话时间hello和hold分别是60s和180s。
(3)修改时间机制(并不建议修改):
注:两边保持时间不一样,选用小的一端,改了多个,也是用小的而不是最新的。 改hello:
r1(config)#mpls ldp discovery hello interval 3 r1(config)#exi
r1#sh mpls ldp parameters Protocol version: 1
Downstream label generic region: min label: 16; max label: 100000 Session hold time: 180 sec; keep alive interval: 60 sec Discovery hello: holdtime: 15 sec; interval: 3 sec Discovery targeted hello: holdtime: 90 sec; interval: 10 sec Downstream on Demand max hop count: 255 Downstream on Demand Path Vector Limit: 255 LDP for targeted sessions
LDP initial/maximum backoff: 15/120 sec LDP loop detection: off
说明:可以看到hello时间被改成了3s r1#sh mpls ldp discovery detail Local LDP Identifier: 12.1.1.1:0 Discovery Sources: Interfaces:
Serial1/1 (ldp): xmit/recv Enabled: Interface config
Hello interval: 3000 ms; Transport IP addr: 12.1.1.1 LDP Id: 2.2.2.2:0; no host route to transport addr Src IP addr: 12.1.1.2; Transport IP addr: 12.1.1.2 Hold time: 15 sec; Proposed local/peer: 15/15 sec Reachable via 12.1.1.0/24 r1#
说明:也 可以看到hello时间被改成了3s 再改:
r1(config)#mpls ldp discovery hello interval 8 r1#sh mpls ldp parameters Protocol version: 1
Downstream label generic region: min label: 16; max label: 100000 Session hold time: 180 sec; keep alive interval: 60 sec Discovery hello: holdtime: 15 sec; interval: 8 sec Discovery targeted hello: holdtime: 90 sec; interval: 10 sec Downstream on Demand max hop count: 255 Downstream on Demand Path Vector Limit: 255 LDP for targeted sessions
LDP initial/maximum backoff: 15/120 sec LDP loop detection: off r1#
说明:可 以看到hello时间被改成了8s r1#sh mpls ldp discovery detail Local LDP Identifier: 12.1.1.1:0 Discovery Sources: Interfaces:
Serial1/1 (ldp): xmit/recv Enabled: Interface config
Hello interval: 5000 ms; Transport IP addr: 12.1.1.1 LDP Id: 2.2.2.2:0; no host route to transport addr Src IP addr: 12.1.1.2; Transport IP addr: 12.1.1.2 Hold time: 15 sec; Proposed local/peer: 15/15 sec
Reachable via 12.1.1.0/24 r1#
说明:在 这可以看到hello时间还是选默认5s,因为这个小。 改会话时间(不建议): r1(config)#mpls ldp holdtime 150 r1#sh adjacency detail
*Mar 1 01:32:03.063: %SYS-5-CONFIG_I: Configured from console by console r1#sh mpls ldp parameters Protocol version: 1
Downstream label generic region: min label: 16; max label: 100000 Session hold time: 150 sec; keep alive interval: 50 sec Discovery hello: holdtime: 15 sec; interval: 8 sec Discovery targeted hello: holdtime: 90 sec; interval: 10 sec Downstream on Demand max hop count: 255 Downstream on Demand Path Vector Limit: 255 LDP for targeted sessions
LDP initial/maximum backoff: 15/120 sec LDP loop detection: off r1#
说明可以看到hold时间被改成了150s。