- 配置IP地址
[LSR1-GigabitEthernet0/0/0]ip add 10.1.1.1 24
[LSR1-LoopBack0]ip add 1.1.1.1 32
[LSR2-GigabitEthernet0/0/0]ip add 10.1.1.2 24
[LSR2-GigabitEthernet0/0/1]ip add 10.1.2.2 24
[LSR2-LoopBack0]ip add 2.2.2.2 32
[LSR3-GigabitEthernet0/0/0]ip add 10.1.2.3 24
[LSR3-LoopBack0]ip add 3.3.3.3 32 - 配置路由协议-OSPF
[LSR1]ospf 1
[LSR1-ospf-1]area 0
[LSR1-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
[LSR1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[LSR2]ospf 1
[LSR2-ospf-1]area 0
[LSR2-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
[LSR2-ospf-1-area-0.0.0.0]network 10.1.2.0 0.0.0.255
[LSR2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[LSR3]ospf 1
[LSR3-ospf-1]area 0
[LSR3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[LSR3-ospf-1-area-0.0.0.0]network 10.1.2.0 0.0.0.255 - 配置MPLS基本能力,使能MPLS TE
[LSR1]mpls lsr-id 1.1.1.1
[LSR1]mpls
[LSR1-mpls]mpls te
[LSR1-GigabitEthernet0/0/0]mpls
[LSR1-GigabitEthernet0/0/0]mpls te
[LSR2]mpls lsr-id 2.2.2.2
[LSR2]mpls
[LSR2-mpls]mpls te
[LSR2-GigabitEthernet0/0/0]mpls
[LSR2-GigabitEthernet0/0/0]mpls te
[LSR2-GigabitEthernet0/0/1]mpls
[LSR2-GigabitEthernet0/0/1]mpls te
[LSR3]mpls lsr-id 3.3.3.3
[LSR3]mpls
[LSR3-mpls]mpls te
[LSR3-GigabitEthernet0/0/0]mpls
[LSR3-GigabitEthernet0/0/0]mpls te - 配置MPLS TE隧道接口
[LSR1]int Tunnel 0/0/1
[LSR1-Tunnel0/0/1]ip add unnumbered interface LoopBack 0
[LSR1-Tunnel0/0/1]tunnel-protocol mpls te
[LSR1-Tunnel0/0/1]destination 3.3.3.3
[LSR1-Tunnel0/0/1]mpls te tunnel-id 10
[LSR1-Tunnel0/0/1]mpls te signal-protocol cr-static
[LSR1-Tunnel0/0/1]mpls te commit
[LSR3]mpls lsr-id 3.3.3.3
[LSR3]int Tunnel 0/0/1
[LSR3-Tunnel0/0/1]ip add unnumbered interface LoopBack 0
[LSR3-Tunnel0/0/1]tunnel-protocol mpls te
[LSR3-Tunnel0/0/1]destination 1.1.1.1
[LSR3-Tunnel0/0/1]mpls te tunnel-id 20
[LSR3-Tunnel0/0/1]mpls te signal-protocol cr-static
[LSR3-Tunnel0/0/1]mpls te commit - 创建LSR1至LSR3的静态CR-LSP
[LSR1]static-cr-lsp ingress tunnel-interface Tunnel 0/0/1 destination 3.3.3.3 nexthop 10.1.1.2 out-label 20
[LSR2]static-cr-lsp transit 2to3 incoming-interface g0/0/0 in-label 20 nexthop 10.1.2.3 out-label 30
[LSR3]static-cr-lsp egress 2to3 incoming-interface g0/0/0 in-label 30 - 创建LSR3至LSR1的静态CR-LSP
[LSR3]static-cr-lsp ingress tunnel-interface Tunnel 0/0/1 destination 1.1.1.1 nexthop 10.1.2.2 out-label 40
[LSR2]static-cr-lsp transit 2to1 incoming-interface g0/0/1 in-label 40 nexthop 10.1.1.1 out-label 50
[LSR1]static-cr-lsp egress 2to1 incoming-interface g0/0/0 in-label 50 - 检查配置
华为设备配置静态MPLS TE隧道
最新推荐文章于 2024-02-23 15:22:36 发布