全面详细的介绍MPLS&MPLS - VPN 下载本文

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。

6.查看LDP邻居相关信息

(1)在R1上查看LDP discovery情况: r1#sh mpls ldp discovery detail Local LDP Identifier: 1.1.1.1:0

Discovery Sources: Interfaces:

Serial1/1 (ldp): xmit/recv Enabled: Interface config

Hello interval: 5000 ms; Transport IP addr: 1.1.1.1 LDP Id: 2.2.2.2:0; no route to transport addr Src IP addr: 12.1.1.2; Transport IP addr: 2.2.2.2 Hold time: 15 sec; Proposed local/peer: 15/15 sec r1#

说明:Local LDP Identifier 是每台LSR都必须有的,这个ID用6个字节表示,前4个节字称为Rotuer-ID,先选loopback地址最大的,然后是物理接口,它的选举方法和OSPF Rotuer-ID相同,后面2个字节是表示标签空间的,也就是标签是基于设备还是基于接口,如果是基于设备,就是0,可以从上面看 出,1.1.1.1:0中,1.1.1.1表示R1的Rotuer-ID,而0表示标签是基于设备的。再看后面还有个Transport IP ,而这个IP默认是选用Rotuer-ID的地址,这个地址在建邻居时非常重要,是会话的源地址,如果这个地址对方没有路由可达,那么就不可能建起邻居。 所以一定要保证双方Transport IP 是路由相通的。从上面结果中还可以看出,R1已经收到了对方R2的hello,对方Transport IP是2.2.2.2,也就是对方的loopback0地址,而因为这个地址不在OSPF进程里,所以R1不能到达,也就不能建邻居,后面提示为“no route to transport addr”。

(2)在R2上查看LDP discovery情况: r2#sh mpls ldp discovery detail

Local LDP Identifier: 2.2.2.2:0

Discovery Sources: Interfaces:

Serial1/0 (ldp): xmit/recv Enabled: Interface config

Hello interval: 5000 ms; Transport IP addr: 2.2.2.2 LDP Id: 3.3.3.3:0; no route to transport addr Src IP addr: 23.1.1.3; Transport IP addr: 3.3.3.3 Hold time: 15 sec; Proposed local/peer: 15/15 sec Serial1/1 (ldp): xmit/recv Enabled: Interface config

Hello interval: 5000 ms; Transport IP addr: 2.2.2.2 LDP Id: 1.1.1.1:0; no route to transport addr Src IP addr: 12.1.1.1; Transport IP addr: 1.1.1.1 Hold time: 15 sec; Proposed local/peer: 15/15 sec r2#

说明:可 以看出,R2的Rotuer-ID是2.2.2.2,这个地址也就是Transport IP,而R1的Transport IP是1.1.1.1,从上面也看出这两个地址是路由上互不相通的,所以不可能建立LDP邻居。 (3)解决邻居建立问题:

说明:要 解决邻居建立问题,就要让双方的Transport IP能够相通,而Transport IP就是选用Rotuer-ID的IP地址,可以修改Rotuer-ID为可路由的接口,即可解决Transport IP互通。