取消
显示结果 
搜索替代 
您的意思是: 
cancel
9694
查看次数
58
有帮助
13
评论
wuhao0015
Spotlight
Spotlight
本帖最后由 wuhao0015 于 2019-10-21 08:47 编辑

今年早些时候看了些Segment Routing的一些资料,想做些实验加强了解。官网找到的实验都是基于IOS-XR系统的,模拟资源消耗太大,于是自己查看相关资料试着做了个基于IOS简单SRTE实验测试下效果。实验其实早就做完,看到大家最近在讨论关于SR的内容,于是就发出来大家一起学习交流。实验目的是了解SR是什么,能干什么,怎么玩。。。


如下是拓扑图:
164741p1k616ksmhxas6kx.jpg

R1、R2、R3、R5、R6、R7之间运行OSPF和SR。
需要实现R1到R7的路径可以通过SRTE调控。

相关配置:如下R1:
version 16.6
service timestamps debug datetime localtime
service timestamps log datetime localtime
!
hostname R1
!
enable secret 5 $1$iHyN$7.g231aGWy4GvTqV5r8yL1
!
aaa new-model
!
clock timezone Beijing 8 0
!
!
no ip domain lookup
!
mpls traffic-eng tunnels
!#开启MPLS流量工程
!
segment-routing mpls
!
connected-prefix-sid-map
address-family ipv4
1.1.1.1/32 index 1 range 1
exit-address-family
!#开启SR并映射1.1.1.1的SID为16001
!
username cisco privilege 15 secret 5 $1$4pA7$0P6EYBG0CR0gNFIRuNQ.5/
!
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
ip ospf network point-to-point
ip ospf 1 area 0
!
interface Tunnel17
ip unnumbered Loopback0
tunnel mode mpls traffic-eng
tunnel destination 7.7.7.7
tunnel mpls traffic-eng autoroute announce
tunnel mpls traffic-eng path-option 1 explicit name 1-2-3-7 segment-routing
tunnel mpls traffic-eng path-option 2 explicit name 1-5-6-7 segment-routing
tunnel mpls traffic-eng path-option 3 explicit name 1-2-3-5-6-7 segment-routing
tunnel mpls traffic-eng path-option 4 explicit name 1-2-3-5-2-6-7 segment-routing
tunnel mpls traffic-eng path-selection metric igp
tunnel mpls traffic-eng load-share 10
!
interface GigabitEthernet1
ip address 192.168.12.1 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
mpls traffic-eng tunnels
!#接口下需要开启MPLS的流量工程不然tunnel接口无法激活,并提示去往下一跳的接口不可达
interface GigabitEthernet2
ip address 192.168.15.1 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
mpls traffic-eng tunnels
!
!
router ospf 1
router-id 1.1.1.1
segment-routing area 0 mpls
segment-routing mpls
mpls traffic-eng router-id Loopback0
mpls traffic-eng area 0
!
ip explicit-path name 1-2-3-7 enable
index 1 next-label 16002
index 2 next-label 16003
index 3 next-label 16007
!
ip explicit-path name 1-5-6-7 enable
index 1 next-label 16005
index 2 next-label 16006
index 3 next-label 16007
!
ip explicit-path name 1-2-3-5-6-7 enable
index 1 next-label 16002
index 2 next-label 16003
index 3 next-label 16005
index 4 next-label 16006
index 5 next-label 16007
!
ip explicit-path name 1-2-3-5-2-6-7 enable
index 1 next-label 16002
index 2 next-label 16003
index 3 next-label 16005
index 4 next-label 16002
index 5 next-label 16006
index 6 next-label 16007
!#下一跳经过的标签设备,实际上控制流量的路径
如下R2:
version 16.6
service timestamps debug datetime localtime
service timestamps log datetime localtime
!
hostname R2
!
!
enable secret 5 $1$u41o$kce3mcpuxRE8ReCghFulx0
!
aaa new-model
!
no ip domain lookup
!
mpls traffic-eng tunnels
!
segment-routing mpls
!
connected-prefix-sid-map
address-family ipv4
2.2.2.2/32 index 2 range 1
exit-address-family
!
!
username cisco privilege 15 secret 5 $1$hIlL$F6cSHbfm4Ww.n1tIFHarL1
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
ip ospf network point-to-point
ip ospf 1 area 0
!
interface GigabitEthernet1
ip address 192.168.12.2 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
mpls traffic-eng tunnels
!
interface GigabitEthernet2
ip address 192.168.23.2 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
mpls traffic-eng tunnels
!
interface GigabitEthernet3
ip address 192.168.25.2 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
mpls traffic-eng tunnels
!
interface GigabitEthernet4
ip address 192.168.26.2 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
mpls traffic-eng tunnels
!
router ospf 1
router-id 2.2.2.2
segment-routing area 0 mpls
segment-routing mpls
mpls traffic-eng router-id Loopback0
mpls traffic-eng area 0
!
如下R3:
version 16.6
service timestamps debug datetime localtime
service timestamps log datetime localtime
!
hostname R3
!
enable secret 5 $1$b1os$BJXuUtqgSB618QuaXRRMi/
!
aaa new-model
!
no ip domain lookup
!
mpls traffic-eng tunnels
!
!
segment-routing mpls
!
connected-prefix-sid-map
address-family ipv4
3.3.3.3/32 index 3 range 1
exit-address-family
!
username cisco privilege 15 secret 5 $1$MD6m$0XtlNNa5lqaMED7e.w6tL.
!
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
ip ospf network point-to-point
ip ospf 1 area 0
!
interface GigabitEthernet1
ip address 192.168.37.3 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
mpls traffic-eng tunnels
!
interface GigabitEthernet2
ip address 192.168.23.3 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
mpls traffic-eng tunnels
!
interface GigabitEthernet3
ip address 192.168.36.3 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
mpls traffic-eng tunnels
!
interface GigabitEthernet4
ip address 192.168.35.3 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
mpls traffic-eng tunnels
!
router ospf 1
segment-routing area 0 mpls
segment-routing mpls
mpls traffic-eng router-id Loopback0
mpls traffic-eng area 0
!
如下R5:
version 16.6
service timestamps debug datetime localtime
service timestamps log datetime localtime
!
hostname R5
!
enable secret 5 $1$oFyQ$Ut2gzGdZLHGqKLvECqeTP0
!
aaa new-model
!
!
no ip domain lookup
!
mpls traffic-eng tunnels
!
segment-routing mpls
!
connected-prefix-sid-map
address-family ipv4
5.5.5.5/32 index 5 range 1
exit-address-family
!
username cisco privilege 15 secret 5 $1$niXI$PCbPObKVCf/PdsOcYosq..
!
interface Loopback0
ip address 5.5.5.5 255.255.255.255
ip ospf network point-to-point
ip ospf 1 area 0
!
interface GigabitEthernet1
ip address 192.168.15.5 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
mpls traffic-eng tunnels
!
interface GigabitEthernet2
ip address 192.168.56.5 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
mpls traffic-eng tunnels
!
interface GigabitEthernet3
ip address 192.168.25.5 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
mpls traffic-eng tunnels
!
interface GigabitEthernet4
ip address 192.168.35.5 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
mpls traffic-eng tunnels
!
router ospf 1
router-id 5.5.5.5
segment-routing area 0 mpls
segment-routing mpls
mpls traffic-eng router-id Loopback0
mpls traffic-eng area 0
!
如下R6:
version 16.6
service timestamps debug datetime localtime
service timestamps log datetime localtime
!
hostname R6
!
enable secret 5 $1$Po5z$6s71Kv37hrd15UHpSDS3v0
!
aaa new-model
!
no ip domain lookup
!
!
mpls traffic-eng tunnels
!
!
segment-routing mpls
!
connected-prefix-sid-map
address-family ipv4
6.6.6.6/32 index 6 range 1
exit-address-family
!
username cisco privilege 15 secret 5 $1$xdXH$tg7sf/WsTLO9Q8l.26weM.
!
interface Loopback0
ip address 6.6.6.6 255.255.255.255
ip ospf network point-to-point
ip ospf 1 area 0
!
interface GigabitEthernet1
ip address 192.168.67.6 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
mpls traffic-eng tunnels
!
interface GigabitEthernet2
ip address 192.168.56.6 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
mpls traffic-eng tunnels
!
interface GigabitEthernet3
ip address 192.168.36.6 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
mpls traffic-eng tunnels
!
interface GigabitEthernet4
ip address 192.168.26.6 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
mpls traffic-eng tunnels
!
router ospf 1
router-id 6.6.6.6
segment-routing area 0 mpls
segment-routing mpls
mpls traffic-eng router-id Loopback0
mpls traffic-eng area 0
!
如下R7:
version 16.6
service timestamps debug datetime localtime
service timestamps log datetime localtime
!
hostname R7
!
enable secret 5 $1$wF9L$is9ZSr7ekX/OMFQ2ZElaj1
!
aaa new-model
!
!
no ip domain lookup
!
mpls traffic-eng tunnels
!
segment-routing mpls
!
connected-prefix-sid-map
address-family ipv4
7.7.7.7/32 index 7 range 1
exit-address-family
!
!
username cisco privilege 15 secret 5 $1$SHrU$gaLUTcd5xo6T2GS0jCZRs/
!
interface Loopback0
ip address 7.7.7.7 255.255.255.255
ip ospf network point-to-point
ip ospf 1 area 0
!
interface GigabitEthernet1
ip address 192.168.37.7 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
mpls traffic-eng tunnels
!
interface GigabitEthernet2
ip address 192.168.67.7 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
mpls traffic-eng tunnels
!
router ospf 1
router-id 7.7.7.7
segment-routing area 0 mpls
segment-routing mpls
mpls traffic-eng router-id Loopback0
mpls traffic-eng area 0
!
如下查看状态R1:
R1#show version 
Cisco IOS XE Software, Version 16.06.05
Cisco IOS Software [Everest], Virtual XE Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.6.5, RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2018 by Cisco Systems, Inc.
Compiled Mon 10-Dec-18 13:07 by mcpre
Cisco IOS-XE software, Copyright (c) 2005-2018 by cisco Systems, Inc.
All rights reserved. Certain components of Cisco IOS-XE software are
licensed under the GNU General Public License ("GPL") Version 2.0. The
software code licensed under GPL Version 2.0 is free software that comes
with ABSOLUTELY NO WARRANTY. You can redistribute and/or modify such
GPL code under the terms of GPL Version 2.0. For more details, see the
documentation or "License Notice" file accompanying the IOS-XE software,
or the applicable URL provided on the flyer accompanying the IOS-XE
software.
ROM: IOS-XE ROMMON
R1 uptime is 2 hours, 39 minutes
Uptime for this control processor is 2 hours, 42 minutes
System returned to ROM by reload
System image file is "bootflash:packages.conf"
Last reload reason: reload
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
export@cisco.com.
License Level: ax
License Type: Default. No valid license found.
Next reload license Level: ax
cisco CSR1000V (VXE) processor (revision VXE) with 2190079K/3075K bytes of memory.
Processor board ID 9O8KIKS1UXW
4 Gigabit Ethernet interfaces
32768K bytes of non-volatile configuration memory.
3984864K bytes of physical memory.
7774207K bytes of virtual hard disk at bootflash:.
0K bytes of WebUI ODM Files at webui:.
Configuration register is 0x2102
R1#show ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is not set
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/2] via 192.168.12.2, 02:25:05, GigabitEthernet1
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/3] via 192.168.15.5, 02:25:00, GigabitEthernet2
[110/3] via 192.168.12.2, 02:25:05, GigabitEthernet1
5.0.0.0/32 is subnetted, 1 subnets
O 5.5.5.5 [110/2] via 192.168.15.5, 02:25:05, GigabitEthernet2
6.0.0.0/32 is subnetted, 1 subnets
O 6.6.6.6 [110/3] via 192.168.15.5, 02:25:05, GigabitEthernet2
[110/3] via 192.168.12.2, 02:25:05, GigabitEthernet1
7.0.0.0/32 is subnetted, 1 subnets
O 7.7.7.7 [110/4] via 7.7.7.7, 02:25:05, Tunnel17
O 192.168.23.0/24 [110/2] via 192.168.12.2, 02:25:05, GigabitEthernet1
O 192.168.25.0/24 [110/2] via 192.168.15.5, 02:25:05, GigabitEthernet2
[110/2] via 192.168.12.2, 02:25:05, GigabitEthernet1
O 192.168.26.0/24 [110/2] via 192.168.12.2, 02:25:05, GigabitEthernet1
O 192.168.35.0/24 [110/2] via 192.168.15.5, 02:25:05, GigabitEthernet2
O 192.168.36.0/24 [110/3] via 192.168.15.5, 02:25:00, GigabitEthernet2
[110/3] via 192.168.12.2, 02:25:05, GigabitEthernet1
O 192.168.37.0/24 [110/3] via 192.168.15.5, 02:25:00, GigabitEthernet2
[110/3] via 192.168.12.2, 02:25:05, GigabitEthernet1
O 192.168.56.0/24 [110/2] via 192.168.15.5, 02:25:05, GigabitEthernet2
O 192.168.67.0/24 [110/3] via 192.168.15.5, 02:25:05, GigabitEthernet2
[110/3] via 192.168.12.2, 02:25:05, GigabitEthernet1
R1#
R1#show ip ospf segment-routing sid-database
OSPF Router with ID (1.1.1.1) (Process ID 1)
OSPF Segment Routing SIDs
Codes: L - local, N - label not programmed,
M - mapping-server
SID Prefix Adv-Rtr-Id Area-Id Type
-------------- ------------------ --------------- --------------- ----------
1 (L) 1.1.1.1/32 1.1.1.1 0 Intra
2 2.2.2.2/32 2.2.2.2 0 Intra
3 3.3.3.3/32 3.3.3.3 0 Intra
5 5.5.5.5/32 5.5.5.5 0 Intra
6 6.6.6.6/32 6.6.6.6 0 Intra
7 7.7.7.7/32 7.7.7.7 0 Intra
R1#
R1#show mpls forwarding-table table 0
Local Outgoing Prefix Bytes Label Outgoing Next Hop
Label Label or Tunnel Id Switched interface
16 Pop Label 17/1[TE-Bind] 0 Tu17 point2point
17 Pop Label 192.168.15.5-A 0 Gi2 192.168.15.5
18 Pop Label 192.168.12.2-A 0 Gi1 192.168.12.2
16002 Pop Label 2.2.2.2/32 0 Gi1 192.168.12.2
16003 16003 3.3.3.3/32 0 Gi1 192.168.12.2
16003 3.3.3.3/32 0 Gi2 192.168.15.5
16005 Pop Label 5.5.5.5/32 0 Gi2 192.168.15.5
16006 16006 6.6.6.6/32 0 Gi1 192.168.12.2
16006 6.6.6.6/32 0 Gi2 192.168.15.5
16007 16007 0-7.7.7.7/32-0 0 Gi1 192.168.12.2
16007 0-7.7.7.7/32-0 0 Gi2 192.168.15.5
Forwarding through a LSP tunnel.
View additional labelling info with the 'detail' option
A - Adjacency SID
R1#show ip inte brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet1 192.168.12.1 YES NVRAM up up
GigabitEthernet2 192.168.15.1 YES NVRAM up up
GigabitEthernet3 unassigned YES NVRAM administratively down down
GigabitEthernet4 unassigned YES NVRAM administratively down down
Loopback0 1.1.1.1 YES NVRAM up up
Tunnel17 1.1.1.1 YES TFTP up up
R1#show mpls traffic-eng tunnels segment-routing
P2P TUNNELS/LSPs:
Name: R1_t17 (Tunnel17) Destination: 7.7.7.7
Status:
Admin: up Oper: up Path: valid Signalling: connected
path option 1, (SEGMENT-ROUTING) type explicit 1-2-3-7 (Basis for Setup)
path option 2, (SEGMENT-ROUTING) type explicit 1-5-6-7
path option 3, (SEGMENT-ROUTING) type explicit 1-2-3-5-6-7
path option 4, (SEGMENT-ROUTING) type explicit 1-2-3-5-2-6-7
Config Parameters:
Bandwidth: 0 kbps (Global) Priority: 7 7 Affinity: 0x0/0xFFFF
Metric Type: IGP (interface)
Path Selection:
Protection: any (default)
Path-selection Tiebreaker:
Global: not set Tunnel Specific: not set Effective: min-fill (default)
Hop Limit: disabled [ignore: Explicit Path Option with all Strict Hops]
Cost Limit: disabled
Path-invalidation timeout: 10000 msec (default), Action: Tear
AutoRoute: enabled LockDown: disabled Loadshare: 10 [200000000]
auto-bw: disabled
Fault-OAM: disabled, Wrap-Protection: disabled, Wrap-Capable: No
Active Path Option Parameters:
State: explicit path option 1 is active
BandwidthOverride: disabled LockDown: disabled Verbatim: disabled
History:
Tunnel:
Time since created: 2 hours, 28 minutes
Time since path change: 2 hours, 26 minutes
Number of LSP IDs (Tun_Instances) used: 81
Current LSP: [ID: 81]
Uptime: 2 hours, 26 minutes
Tun_Instance: 81
Segment-Routing Path Info (ospf 1 area 0)
Segment0[Node]: 2.2.2.2, Label: 16002
Segment1[ - ]: Label: 16003
Segment2[ - ]: Label: 16007
P2MP TUNNELS:
P2MP SUB-LSPS:
如下路径测试
R1#traceroute 7.7.7.7 source lo0
Type escape sequence to abort.
Tracing the route to 7.7.7.7
VRF info: (vrf in name/id, vrf out name/id)
1 192.168.12.2 [MPLS: Labels 16003/16007 Exp 0] 641 msec 606 msec 434 msec
2 192.168.23.3 [MPLS: Label 16007 Exp 0] 543 msec 206 msec 2 msec
3 192.168.37.7 1040 msec 670 msec 1038 msec

测试结果如上所示流量是R1-R2-R3-R7。

更换流量路径:

R1#mpls traffic-eng reoptimize tunnel 17 path-option 3
The targeted path-option is not in lock down mode. Continue? [no]: yes
R1#
R1#traceroute 7.7.7.7 source lo0
Type escape sequence to abort.
Tracing the route to 7.7.7.7
VRF info: (vrf in name/id, vrf out name/id)
1 192.168.12.2 [MPLS: Labels 16003/16005/16006/16007 Exp 0] 1654 msec 1009 msec 1078 msec
2 192.168.23.3 [MPLS: Labels 16005/16006/16007 Exp 0] 63 msec 1021 msec 1296 msec
3 192.168.35.5 [MPLS: Labels 16006/16007 Exp 0] 613 msec 1016 msec 1013 msec
4 192.168.56.6 [MPLS: Label 16007 Exp 0] 120 msec 2 msec 3 msec
5 192.168.67.7 9 msec * 297 msec

现在的流量路径为R1-R2-R3-R5-R6-R7

R1#show mpls traffic-eng tunnels segment-routing 
P2P TUNNELS/LSPs:
Name: R1_t17 (Tunnel17) Destination: 7.7.7.7
Status:
Admin: up Oper: up Path: valid Signalling: connected
path option 3, (SEGMENT-ROUTING) type explicit 1-2-3-5-6-7 (Basis for Setup)
path option 1, (SEGMENT-ROUTING) type explicit 1-2-3-7
path option 2, (SEGMENT-ROUTING) type explicit 1-5-6-7
path option 4, (SEGMENT-ROUTING) type explicit 1-2-3-5-2-6-7
Config Parameters:
Bandwidth: 0 kbps (Global) Priority: 7 7 Affinity: 0x0/0xFFFF
Metric Type: IGP (interface)
Path Selection:
Protection: any (default)
Path-selection Tiebreaker:
Global: not set Tunnel Specific: not set Effective: min-fill (default)
Hop Limit: disabled [ignore: Explicit Path Option with all Strict Hops]
Cost Limit: disabled
Path-invalidation timeout: 10000 msec (default), Action: Tear
AutoRoute: enabled LockDown: disabled Loadshare: 10 [200000000]
auto-bw: disabled
Fault-OAM: disabled, Wrap-Protection: disabled, Wrap-Capable: No
Active Path Option Parameters:
State: explicit path option 3 is active
BandwidthOverride: disabled LockDown: disabled Verbatim: disabled
History:
Tunnel:
Time since created: 2 hours, 32 minutes
Time since path change: 29 seconds
Number of LSP IDs (Tun_Instances) used: 82
Current LSP: [ID: 82]
Uptime: 32 seconds
Selection: reoptimization
Prior LSP: [ID: 81]
ID: path option unknown
Removal Trigger: reoptimization completed
Tun_Instance: 82
Segment-Routing Path Info (ospf 1 area 0)
Segment0[Node]: 2.2.2.2, Label: 16002
Segment1[Node]: 3.3.3.3, Label: 16003
Segment2[Node]: 5.5.5.5, Label: 16005
Segment3[Node]: 6.6.6.6, Label: 16006
Segment4[Node]: 7.7.7.7, Label: 16007

P2MP TUNNELS:
P2MP SUB-LSPS:
R1#

再次切换路径测试:

R1#mpls traffic-eng reoptimize tunnel 17 path-option 4
The targeted path-option is not in lock down mode. Continue? [no]: yes
R1#
R1#
R1#traceroute 7.7.7.7 source lo0
Type escape sequence to abort.
Tracing the route to 7.7.7.7
VRF info: (vrf in name/id, vrf out name/id)
1 192.168.12.2 [MPLS: Labels 16003/16005/16002/16006/16007 Exp 0] 700 msec 111 msec 984 msec
2 192.168.23.3 [MPLS: Labels 16005/16002/16006/16007 Exp 0] 97 msec 1000 msec 1098 msec
3 192.168.35.5 [MPLS: Labels 16002/16006/16007 Exp 0] 652 msec 439 msec 652 msec
4 192.168.25.2 [MPLS: Labels 16006/16007 Exp 0] 445 msec 91 msec 2 msec
5 192.168.26.6 [MPLS: Label 16007 Exp 0] 2 msec 2 msec 2 msec
6 192.168.67.7 4 msec * 4 msec

现在的流量路径为R1-R2-R3-R5-R2-R6-R7
查看状态也确实如此:

R1#show mpls traffic-eng tunnels segment-routing      
P2P TUNNELS/LSPs:
Name: R1_t17 (Tunnel17) Destination: 7.7.7.7
Status:
Admin: up Oper: up Path: valid Signalling: connected
path option 4, (SEGMENT-ROUTING) type explicit 1-2-3-5-2-6-7 (Basis for Setup)
path option 1, (SEGMENT-ROUTING) type explicit 1-2-3-7
path option 2, (SEGMENT-ROUTING) type explicit 1-5-6-7
path option 3, (SEGMENT-ROUTING) type explicit 1-2-3-5-6-7
Config Parameters:
Bandwidth: 0 kbps (Global) Priority: 7 7 Affinity: 0x0/0xFFFF
Metric Type: IGP (interface)
Path Selection:
Protection: any (default)
Path-selection Tiebreaker:
Global: not set Tunnel Specific: not set Effective: min-fill (default)
Hop Limit: disabled [ignore: Explicit Path Option with all Strict Hops]
Cost Limit: disabled
Path-invalidation timeout: 10000 msec (default), Action: Tear
AutoRoute: enabled LockDown: disabled Loadshare: 10 [200000000]
auto-bw: disabled
Fault-OAM: disabled, Wrap-Protection: disabled, Wrap-Capable: No
Active Path Option Parameters:
State: explicit path option 4 is active
BandwidthOverride: disabled LockDown: disabled Verbatim: disabled
History:
Tunnel:
Time since created: 2 hours, 34 minutes
Time since path change: 17 seconds
Number of LSP IDs (Tun_Instances) used: 83
Current LSP: [ID: 83]
Uptime: 20 seconds
Selection: reoptimization
Prior LSP: [ID: 82]
ID: path option unknown
Removal Trigger: reoptimization completed
Tun_Instance: 83
Segment-Routing Path Info (ospf 1 area 0)
Segment0[Node]: 2.2.2.2, Label: 16002
Segment1[Node]: 3.3.3.3, Label: 16003
Segment2[Node]: 5.5.5.5, Label: 16005
Segment3[Node]: 2.2.2.2, Label: 16002
Segment4[Node]: 6.6.6.6, Label: 16006
Segment5[Node]: 7.7.7.7, Label: 16007
P2MP TUNNELS:
P2MP SUB-LSPS:
R1#

本次实验测试完毕,本人原创,大家一起学习。


评论
suzhouxiaoniu
Spotlight
Spotlight
目前这样的实验资料很少,感谢原创分享
one-time
Level 13
Level 13
感谢楼主分享,谢谢~
904897560
Community Member
本帖最后由 904897560 于 2019-10-22 14:59 编辑
感谢原创分享, 看看自己能不能测试下.:)
敢问下楼主, 是用的什么模拟实验的?
是IOL/IOU还是说CSR1000v?
wuhao0015
Spotlight
Spotlight
904897560 发表于 2019-10-22 14:57
感谢原创分享, 看看自己能不能测试下.
敢问下楼主, 是用的什么模拟实验的?

我在show version里面都有显示,用的是CSR1Kv,版本也有。
904897560
Community Member
wuhao0015 发表于 2019-10-22 16:18
我在show version里面都有显示,用的是CSR1Kv,版本也有。

看到了, 感谢:)
fortune
VIP Alumni
VIP Alumni
谢谢分享,好帖好帖
xxmyj2326
Community Member
学习了,点个赞
likuo
Spotlight
Spotlight
确实是技术大牛。
Qing Yang
Cisco Employee
Cisco Employee
谢谢分享,好帖
liushuailiu6748
Community Member
好帖,顶一个
tingh
Cisco Employee
Cisco Employee

请问一下数据包回包的时候也是按照TE设定的路径反方向回复的吗?还是按照IGP路由去走?会不会来回路径不一致?

shaojia.chen
Level 1
Level 1

@tingh 参考楼主的配置做了一下实验。

如果是从R1路由器回环口发起的到7.7.7.7的包,回包的时候也是按照TE设定的路径回来 (都是走Tunnel) ,不会来回路径不一致。

但如果是从R7路由器回环口发起的到1.1.1.1的包,就是按照IGP路由来走。(负载均衡 :R7-R3-R2-R1 或 R7-R6-R5-R1)

hong-yh
Level 1
Level 1

好帖,感谢分享

入门指南

使用上面的搜索栏输入关键字、短语或问题,搜索问题的答案。

我们希望您在这里的旅程尽可能顺利,因此这里有一些链接可以帮助您快速熟悉思科社区:









快捷链接