![图片[1]-第30章LDP协议-大赛人网](https://www.dsrw.com/wp-content/uploads/2023/03/图片9-18-1024x513.png)
1.R1配置OSPF
[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[R1-ospf-1-area-0.0.0.0]network 12.1.1.0 0.255.255.255
2.R2配置OSPF
[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[R2-ospf-1-area-0.0.0.0]network 12.1.1.0 0.255.255.255
[R2-ospf-1-area-0.0.0.0]network 23.1.1.0 0.255.255.255
3.R3配置OSPF
[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[R3-ospf-1-area-0.0.0.0]network 23.1.1.0 0.255.255.255
4.R1配置MPLS和MPLS LDP
[R1]mpls lsr-id 1.1.1.1
[R1]mpls
[R1]mpls ldp
5.R2配置MPLS和MPLS LDP
[R2]mpls lsr-id 2.2.2.2
[R2]mpls
[R2]mpls ldp
6.R3配置MPLS和MPLS LDP
[R3]mpls lsr-id 3.3.3.3
[R3]mpls
[R3]mpls ldp
7.R1接口上使能MPLS和MPLS LDP
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]mpls
[R1-GigabitEthernet0/0/0]mpls ldp
8.R2接口上使能MPLS和MPLS LDP
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]mpls
[R2-GigabitEthernet0/0/0]mpls ldp
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]mpls
[R2-GigabitEthernet0/0/1]mpls ldp
9.R3接口上使能MPLS和MPLS LDP
[R3]interface GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1]mpls
[R3-GigabitEthernet0/0/1]mpls ldp
10.R1查看LDP全局信息
[R1]display mpls ldp
LDP Global Information
Protocol Version : V1 Neighbor Liveness : 600 Sec
Graceful Restart : Off FT Reconnect Timer : 0 Sec
MTU Signaling : On Recovery Timer : 300 Sec
Capability-Announcement : Off Longest-match : Off
P2MP Capability : Off
LDP Instance Information
Instance ID : 0 VPN-Instance :
Instance Status : Active LSR ID : 1.1.1.1
Loop Detection : Off Path Vector Limit : 32
Label Distribution Mode : Ordered Label Retention Mode : Liberal
Instance Deleting State : No Instance Reseting State : No
Graceful-Delete : Off Graceful-Delete Timer : 5 Sec
11.R1查看接口LDP信息
[R1]display mpls ldp interface
IFName Status LAM TransportAddress HelloSent/Rcv
GE0/0/0 Active DU 1.1.1.1 53/43
12.R1查看LDP会话信息
[R1]display mpls ldp session
2.2.2.2:0 Operational DU Passive 0000:00:06 26/26
13.R2查看LDP邻居表
<R2>display mpls ldp peer
1.1.1.1:0 1.1.1.1 GigabitEthernet0/0/0
3.3.3.3:0 3.3.3.3 GigabitEthernet0/0/1
14.R1连通性测试LSP
[R1]ping lsp ip 3.3.3.3 32
LSP PING FEC: IPV4 PREFIX 3.3.3.3/32/ : 100 data bytes, press CTRL_C to break
Reply from 3.3.3.3: bytes=100 Sequence=1 time=30 ms
Reply from 3.3.3.3: bytes=100 Sequence=2 time=20 ms
Reply from 3.3.3.3: bytes=100 Sequence=3 time=30 ms
Reply from 3.3.3.3: bytes=100 Sequence=4 time=30 ms
Reply from 3.3.3.3: bytes=100 Sequence=5 time=30 ms
14.R1跟踪测试LSP
[R1]tracert lsp ip 3.3.3.3 32
LSP Trace Route FEC: IPV4 PREFIX 3.3.3.3/32 , press CTRL_C to break.
TTL Replier Time Type Downstream
0 Ingress 12.1.1.2/[1025 ]
1 12.1.1.2 20 ms Transit 23.1.1.3/[3 ]
2 3.3.3.3 30 ms Egress
15.R1查看标签转发表
[R1]display mpls lsp include 3.3.3.3 32
FEC In/Out Label In/Out IF Vrf Name
3.3.3.3/32 NULL/1025 -/GE0/0/0
3.3.3.3/32 1025/1025 -/GE0/0/0
16.R3配置邻居认证,查看LDP会话信息
[R3]mpls ldp
[R3-mpls-ldp]md5-password cipher 2.2.2.2 dsrw
[R3]display mpls ldp session
2.2.2.2:0 NonExistent Active 0/0
//状态为 NonExistent
17.R2配置邻居认证,R3查看LDP会话信息
[R2]mpls ldp
[R2-mpls-ldp]md5-password cipher 3.3.3.3 dsrw
[R3]display mpls ldp session
2.2.2.2:0 Operational DU Active 0000:00:00 1/1
//状态恢复为 Operational
18.R3配置LoopBack 1,并宣告到OSPF
[R3]interface LoopBack 1
[R3-LoopBack1]ip address 33.33.33.33 32
[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 33.33.33.33 0.0.0.0
19.R1查看MPLS LSP
<R1>display mpls lsp
1.1.1.1/32 3/NULL -/-
2.2.2.2/32 NULL/3 -/GE0/0/0
2.2.2.2/32 1024/3 -/GE0/0/0
3.3.3.3/32 NULL/1026 -/GE0/0/0
3.3.3.3/32 1026/1026 -/GE0/0/0
33.33.33.33/32 NULL/1027 -/GE0/0/0
33.33.33.33/32 1027/1027 -/GE0/0/0
20.R3配置ip-prefix策略,仅转发3.3.3.3/32路由的标签
[R3]ip ip-prefix dsrw permit 3.3.3.3 32
[R3]mpls ldp
[R3-mpls-ldp]outbound peer 2.2.2.2 fec ip-prefix dsrw
21.R2查看标签转发表
[R2]display mpls lsp
1.1.1.1/32 NULL/3 -/GE0/0/0
1.1.1.1/32 1024/3 -/GE0/0/0
2.2.2.2/32 3/NULL -/-
3.3.3.3/32 NULL/3 -/GE0/0/1
3.3.3.3/32 1026/3 -/GE0/0/1
22.R2配置ip-prefix策略,拒绝3.3.3.3/32路由的标签
[R2]ip ip-prefix dsrw deny 3.3.3.3 32
[R2]mpls ldp
[R2-mpls-ldp]inbound peer 3.3.3.3 fec ip-prefix dsrw
23.R2查看标签转发表
[R2]display mpls lsp
1.1.1.1/32 NULL/3 -/GE0/0/0
1.1.1.1/32 1024/3 -/GE0/0/0
2.2.2.2/32 3/NULL -/-
24.R1查看接口的MTU和MPLS MTU
<R1>display interface GigabitEthernet 0/0/0
Route Port,The Maximum Transmit Unit is 1500
<R1>display mpls interface GigabitEthernet 0/0/0
Interface Status TE Attr LSP Count CRLSP Count Effective MTU
GE0/0/0 Up Dis 2 0 1500
25.R1连通性测试R3,转包查看MTU
<R1>ping -s 1800 3.3.3.3
PING 3.3.3.3: 1800 data bytes, press CTRL_C to break
Reply from 3.3.3.3: bytes=1800 Sequence=1 ttl=254 time=30 ms
Reply from 3.3.3.3: bytes=1800 Sequence=2 ttl=254 time=40 ms
Reply from 3.3.3.3: bytes=1800 Sequence=3 ttl=254 time=40 ms
Reply from 3.3.3.3: bytes=1800 Sequence=4 ttl=254 time=50 ms
Reply from 3.3.3.3: bytes=1800 Sequence=5 ttl=254 time=40 ms
![图片[2]-第30章LDP协议-大赛人网](https://www.dsrw.com/wp-content/uploads/2023/03/图片10-16-1024x106.png)
![图片[3]-第30章LDP协议-大赛人网](https://www.dsrw.com/wp-content/uploads/2023/03/图片11-18-1024x218.png)
![图片[4]-第30章LDP协议-大赛人网](https://www.dsrw.com/wp-content/uploads/2023/03/图片12-16-1024x230.png)
26.R1连通性测试R3,设置Fbit不允许分片,包大小为1472
<R1>ping -f -s 1472 3.3.3.3
PING 3.3.3.3: 1472 data bytes, press CTRL_C to break
Reply from 3.3.3.3: bytes=1472 Sequence=1 ttl=254 time=20 ms
Reply from 3.3.3.3: bytes=1472 Sequence=2 ttl=254 time=30 ms
Reply from 3.3.3.3: bytes=1472 Sequence=3 ttl=254 time=20 ms
Reply from 3.3.3.3: bytes=1472 Sequence=4 ttl=254 time=30 ms
Reply from 3.3.3.3: bytes=1472 Sequence=5 ttl=254 time=30 ms
27.R1连通性测试R3,设置Fbit不允许分片,包大小为1473
<R1>ping -f -s 1473 3.3.3.3
PING 3.3.3.3: 1473 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
请登录后查看评论内容