![图片[1]-第15章 MPLS VPN-大赛人网](https://www.dsrw.com/wp-content/uploads/2023/03/图片60-1-1024x307.png)
15.1 MPLS 静态LSP
1.静态LSP配置
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
[R1]mpls lsr-id 1.1.1.1
[R1]mpls
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]mpls
5)R2及接口使能MPLS
[R2]mpls lsr-id 2.2.2.2
[R2]mpls
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]mpls
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]mpls
6)R3及接口使能MPLS
[R3]mpls lsr-id 3.3.3.3
[R3]mpls
[R3]interface GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1]mpls
7)创建从R1到R3的静态LSP
[R1]static-lsp ingress lsp1 destination 3.3.3.3 32 nexthop 12.1.1.2 out-label 20
[R2]static-lsp transit lsp1 incoming-interface GigabitEthernet 0/0/0 in-label 20 nexthop 23.1.1.3 out-label 40
[R3]static-lsp egress lsp1 incoming-interface GigabitEthernet 0/0/1 in-label 40
8)创建从R3到R1的静态LSP
[R3]static-lsp ingress lsp2 destination 1.1.1.1 32 nexthop 23.1.1.2 out-label 30
[R2]static-lsp transit lsp2 incoming-interface GigabitEthernet 0/0/1 in-label 30 nexthop 12.1.1.1 out-label 60
[R1]static-lsp egress lsp2 incoming-interface GigabitEthernet 0/0/0 in-label 60
9)在R1执行命令ping lsp ip 3.3.3.3 32
[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=50 ms
Reply from 3.3.3.3: bytes=100 Sequence=2 time=30 ms
Reply from 3.3.3.3: bytes=100 Sequence=3 time=40 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
10)在R3执行命令ping lsp ip 1.1.1.1 32
[R3]ping lsp ip 1.1.1.1 32
LSP PING FEC: IPV4 PREFIX 1.1.1.1/32/ : 100 data bytes, press CTRL_C to break
Reply from 1.1.1.1: bytes=100 Sequence=1 time=40 ms
Reply from 1.1.1.1: bytes=100 Sequence=2 time=40 ms
Reply from 1.1.1.1: bytes=100 Sequence=3 time=20 ms
Reply from 1.1.1.1: bytes=100 Sequence=4 time=30 ms
Reply from 1.1.1.1: bytes=100 Sequence=5 time=40 ms
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
请登录后查看评论内容