实验需求:
1.AS100内部署OSPF+SR-MPLS
2.AS100内部署mpls-te功能
mpls
mpls te
#
ospf 1
area 0.0.0.0
mpls-te enable
3.配置SR-MPLS TE显示路径策略
PE1:
explicit-path te1
next sid label 160002 type prefix
next sid label 160003 type prefix
#路径经过160002(P)-> 160003(PE2),PE2配置类似
4.配置SR-MPLS TE隧道接口
interface tunnel1
ip address unnumbered interface LoopBack0
#借用环回口地址
tunnel-protocol mpls te
#隧道协议mpls-te
destination 150.1.3.3
#隧道对端地址
mpls te signal-protocol segment-routing
#仅使用sr作为标签协议
mpls te tunnel-id 1
#配置隧道ID
mpls te path explicit-path te1
#调用显示路径策略
5.PE配置隧道策略,优选SR-TE路径
tunnel-policy p2
tunnel select-seq sr-te load-balance-number 1
#sr-te配置唯一的路径所以不做负载
ip vpn-instance A
ipv4-family
tnl-policy p2
#VRF调用速调策略
5.查看
display tunnel-info all
#查看SR-TE隧道
<PE1>display tunnel-info all
Tunnel ID Type Destination Status
----------------------------------------------------------------------------------------
0x000000000300000001 sr-te 150.1.3.3 UP
0x000000002900000003 srbe-lsp 150.1.3.3 UP
0x000000002900000005 srbe-lsp 150.1.2.2 UP
display ip routing-table vpn-instance A 10.1.20.0 verbose
#查看vpnv4路由信息
私网标签配合SR-TE LSP指导数据包转发
<PE1>display ip routing-table vpn-instance A 10.1.20.0 verbose
Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : A
Summary Count : 1
Destination: 10.1.20.0/24
Protocol: IBGP Process ID: 0
Preference: 255 Cost: 0
NextHop: 150.1.3.3 Neighbour: 150.1.3.3
State: Active Adv Relied Age: 00h36m20s
Tag: 0 Priority: low
Label: 48060 QoSInfo: 0x0
IndirectID: 0x100006C Instance:
RelayNextHop: 0.0.0.0 Interface: Tunnel1
TunnelID: 0x000000000300000001 Flags: RD
tracert lsp segment-routing te Tunnel 1
#测试隧道转发路径
思考:能否实现路径为PE1-P-PE2-PE1-P-PE2?
<PE1>tracert lsp segment-routing te Tunnel 1
LSP Trace Route FEC: SEGMENT ROUTING TE TUNNEL IPV4 SESSION QUERY Tunnel1 , press CTRL_C to break.
TTL Replier Time Type Downstream
0 Ingress 155.1.12.2/[16003 16002 16003 16001 16002 16003 ]
1 155.1.12.2 6 ms Transit 155.1.23.3/[3 ]
2 155.1.23.3 9 ms Transit 155.1.23.2/[3 ]
3 155.1.23.2 11 ms Transit 155.1.23.3/[3 ]
4 155.1.23.3 11 ms Transit 155.1.13.1/[3 ]
5 155.1.13.1 10 ms Transit 155.1.12.2/[3 ]
6 155.1.12.2 12 ms Transit 155.1.23.3/[3 ]
7 150.1.3.3 13 ms Egress
Frame 26: 102 bytes on wire (816 bits), 102 bytes captured (816 bits) on interface 0
Ethernet II, Src: 38:13:ea:02:01:01 (38:13:ea:02:01:01), Dst: 38:13:ea:01:01:00 (38:13:ea:01:01:00)
MultiProtocol Label Switching Header, Label: 16003, Exp: 0, S: 0, TTL: 125
MultiProtocol Label Switching Header, Label: 16002, Exp: 0, S: 0, TTL: 126
MultiProtocol Label Switching Header, Label: 16003, Exp: 0, S: 0, TTL: 126
MultiProtocol Label Switching Header, Label: 16001, Exp: 0, S: 0, TTL: 126
MultiProtocol Label Switching Header, Label: 16002, Exp: 0, S: 0, TTL: 126
MultiProtocol Label Switching Header, Label: 16003, Exp: 0, S: 0, TTL: 126
MultiProtocol Label Switching Header, Label: 48060, Exp: 0, S: 1, TTL: 126
Internet Protocol Version 4, Src: 10.1.10.10, Dst: 10.1.20.10
Internet Control Message Protocol