请选择 进入手机版 | 继续访问电脑版

设为首页 收藏本站
思科社区 关注
思科社区

搜索
热搜: 邮件服务器
查看: 2798|回复: 10

【原创】Cisco IOS上Segment Routing TE的简单实验

[复制链接]
发表于 2019-10-18 16:55:26 | 显示全部楼层 |阅读模式
本帖最后由 wuhao0015 于 2019-10-21 08:47 编辑

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


如下是拓扑图:


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

相关配置:如下R1:
  1. version 16.6
  2. service timestamps debug datetime localtime
  3. service timestamps log datetime localtime
  4. !
  5. hostname R1
  6. !
  7. enable secret 5 $1$iHyN$7.g231aGWy4GvTqV5r8yL1
  8. !
  9. aaa new-model
  10. !
  11. clock timezone Beijing 8 0
  12. !
  13. !
  14. no ip domain lookup
  15. !
  16. mpls traffic-eng tunnels
  17. !#开启MPLS流量工程
  18. !
  19. segment-routing mpls
  20. !
  21. connected-prefix-sid-map
  22.   address-family ipv4
  23.    1.1.1.1/32 index 1 range 1
  24.   exit-address-family
  25. !#开启SR并映射1.1.1.1的SID为16001
  26. !
  27. username cisco privilege 15 secret 5 $1$4pA7$0P6EYBG0CR0gNFIRuNQ.5/
  28. !
  29. !
  30. interface Loopback0
  31. ip address 1.1.1.1 255.255.255.255
  32. ip ospf network point-to-point
  33. ip ospf 1 area 0
  34. !
  35. interface Tunnel17
  36. ip unnumbered Loopback0
  37. tunnel mode mpls traffic-eng
  38. tunnel destination 7.7.7.7
  39. tunnel mpls traffic-eng autoroute announce
  40. tunnel mpls traffic-eng path-option 1 explicit name 1-2-3-7 segment-routing
  41. tunnel mpls traffic-eng path-option 2 explicit name 1-5-6-7 segment-routing
  42. tunnel mpls traffic-eng path-option 3 explicit name 1-2-3-5-6-7 segment-routing
  43. tunnel mpls traffic-eng path-option 4 explicit name 1-2-3-5-2-6-7 segment-routing
  44. tunnel mpls traffic-eng path-selection metric igp
  45. tunnel mpls traffic-eng load-share 10
  46. !
  47. interface GigabitEthernet1
  48. ip address 192.168.12.1 255.255.255.0
  49. ip ospf network point-to-point
  50. ip ospf 1 area 0
  51. mpls traffic-eng tunnels
  52. !#接口下需要开启MPLS的流量工程不然tunnel接口无法激活,并提示去往下一跳的接口不可达
  53. interface GigabitEthernet2
  54. ip address 192.168.15.1 255.255.255.0
  55. ip ospf network point-to-point
  56. ip ospf 1 area 0
  57. mpls traffic-eng tunnels
  58. !
  59. !
  60. router ospf 1
  61. router-id 1.1.1.1
  62. segment-routing area 0 mpls
  63. segment-routing mpls
  64. mpls traffic-eng router-id Loopback0
  65. mpls traffic-eng area 0
  66. !
  67. ip explicit-path name 1-2-3-7 enable
  68. index 1 next-label 16002
  69. index 2 next-label 16003
  70. index 3 next-label 16007
  71. !
  72. ip explicit-path name 1-5-6-7 enable
  73. index 1 next-label 16005
  74. index 2 next-label 16006
  75. index 3 next-label 16007
  76. !
  77. ip explicit-path name 1-2-3-5-6-7 enable
  78. index 1 next-label 16002
  79. index 2 next-label 16003
  80. index 3 next-label 16005
  81. index 4 next-label 16006
  82. index 5 next-label 16007
  83. !
  84. ip explicit-path name 1-2-3-5-2-6-7 enable
  85. index 1 next-label 16002
  86. index 2 next-label 16003
  87. index 3 next-label 16005
  88. index 4 next-label 16002
  89. index 5 next-label 16006
  90. index 6 next-label 16007
  91. !#下一跳经过的标签设备,实际上控制流量的路径
复制代码
如下R2:
  1. version 16.6
  2. service timestamps debug datetime localtime
  3. service timestamps log datetime localtime
  4. !
  5. hostname R2
  6. !
  7. !
  8. enable secret 5 $1$u41o$kce3mcpuxRE8ReCghFulx0
  9. !
  10. aaa new-model
  11. !
  12. no ip domain lookup
  13. !
  14. mpls traffic-eng tunnels
  15. !
  16. segment-routing mpls
  17. !
  18. connected-prefix-sid-map
  19.   address-family ipv4
  20.    2.2.2.2/32 index 2 range 1
  21.   exit-address-family
  22. !
  23. !
  24. username cisco privilege 15 secret 5 $1$hIlL$F6cSHbfm4Ww.n1tIFHarL1
  25. !
  26. interface Loopback0
  27. ip address 2.2.2.2 255.255.255.255
  28. ip ospf network point-to-point
  29. ip ospf 1 area 0
  30. !
  31. interface GigabitEthernet1
  32. ip address 192.168.12.2 255.255.255.0
  33. ip ospf network point-to-point
  34. ip ospf 1 area 0
  35. mpls traffic-eng tunnels
  36. !
  37. interface GigabitEthernet2
  38. ip address 192.168.23.2 255.255.255.0
  39. ip ospf network point-to-point
  40. ip ospf 1 area 0
  41. mpls traffic-eng tunnels
  42. !
  43. interface GigabitEthernet3
  44. ip address 192.168.25.2 255.255.255.0
  45. ip ospf network point-to-point
  46. ip ospf 1 area 0
  47. mpls traffic-eng tunnels
  48. !
  49. interface GigabitEthernet4
  50. ip address 192.168.26.2 255.255.255.0
  51. ip ospf network point-to-point
  52. ip ospf 1 area 0
  53. mpls traffic-eng tunnels
  54. !
  55. router ospf 1
  56. router-id 2.2.2.2
  57. segment-routing area 0 mpls
  58. segment-routing mpls
  59. mpls traffic-eng router-id Loopback0
  60. mpls traffic-eng area 0
  61. !
复制代码
如下R3:
  1. version 16.6
  2. service timestamps debug datetime localtime
  3. service timestamps log datetime localtime
  4. !
  5. hostname R3
  6. !
  7. enable secret 5 $1$b1os$BJXuUtqgSB618QuaXRRMi/
  8. !
  9. aaa new-model
  10. !
  11. no ip domain lookup
  12. !
  13. mpls traffic-eng tunnels
  14. !
  15. !
  16. segment-routing mpls
  17. !
  18. connected-prefix-sid-map
  19.   address-family ipv4
  20.    3.3.3.3/32 index 3 range 1
  21.   exit-address-family
  22. !
  23. username cisco privilege 15 secret 5 $1$MD6m$0XtlNNa5lqaMED7e.w6tL.
  24. !
  25. !
  26. interface Loopback0
  27. ip address 3.3.3.3 255.255.255.255
  28. ip ospf network point-to-point
  29. ip ospf 1 area 0
  30. !
  31. interface GigabitEthernet1
  32. ip address 192.168.37.3 255.255.255.0
  33. ip ospf network point-to-point
  34. ip ospf 1 area 0
  35. mpls traffic-eng tunnels
  36. !
  37. interface GigabitEthernet2
  38. ip address 192.168.23.3 255.255.255.0
  39. ip ospf network point-to-point
  40. ip ospf 1 area 0
  41. mpls traffic-eng tunnels
  42. !
  43. interface GigabitEthernet3
  44. ip address 192.168.36.3 255.255.255.0
  45. ip ospf network point-to-point
  46. ip ospf 1 area 0
  47. mpls traffic-eng tunnels
  48. !
  49. interface GigabitEthernet4
  50. ip address 192.168.35.3 255.255.255.0
  51. ip ospf network point-to-point
  52. ip ospf 1 area 0
  53. mpls traffic-eng tunnels
  54. !
  55. router ospf 1
  56. segment-routing area 0 mpls
  57. segment-routing mpls
  58. mpls traffic-eng router-id Loopback0
  59. mpls traffic-eng area 0
  60. !
复制代码
如下R5:
  1. version 16.6
  2. service timestamps debug datetime localtime
  3. service timestamps log datetime localtime
  4. !
  5. hostname R5
  6. !
  7. enable secret 5 $1$oFyQ$Ut2gzGdZLHGqKLvECqeTP0
  8. !
  9. aaa new-model
  10. !
  11. !
  12. no ip domain lookup
  13. !
  14. mpls traffic-eng tunnels
  15. !
  16. segment-routing mpls
  17. !
  18. connected-prefix-sid-map
  19.   address-family ipv4
  20.    5.5.5.5/32 index 5 range 1
  21.   exit-address-family
  22. !
  23. username cisco privilege 15 secret 5 $1$niXI$PCbPObKVCf/PdsOcYosq..
  24. !
  25. interface Loopback0
  26. ip address 5.5.5.5 255.255.255.255
  27. ip ospf network point-to-point
  28. ip ospf 1 area 0
  29. !
  30. interface GigabitEthernet1
  31. ip address 192.168.15.5 255.255.255.0
  32. ip ospf network point-to-point
  33. ip ospf 1 area 0
  34. mpls traffic-eng tunnels
  35. !
  36. interface GigabitEthernet2
  37. ip address 192.168.56.5 255.255.255.0
  38. ip ospf network point-to-point
  39. ip ospf 1 area 0
  40. mpls traffic-eng tunnels
  41. !
  42. interface GigabitEthernet3
  43. ip address 192.168.25.5 255.255.255.0
  44. ip ospf network point-to-point
  45. ip ospf 1 area 0
  46. mpls traffic-eng tunnels
  47. !
  48. interface GigabitEthernet4
  49. ip address 192.168.35.5 255.255.255.0
  50. ip ospf network point-to-point
  51. ip ospf 1 area 0
  52. mpls traffic-eng tunnels
  53. !
  54. router ospf 1
  55. router-id 5.5.5.5
  56. segment-routing area 0 mpls
  57. segment-routing mpls
  58. mpls traffic-eng router-id Loopback0
  59. mpls traffic-eng area 0
  60. !
复制代码
如下R6:
  1. version 16.6
  2. service timestamps debug datetime localtime
  3. service timestamps log datetime localtime
  4. !
  5. hostname R6
  6. !
  7. enable secret 5 $1$Po5z$6s71Kv37hrd15UHpSDS3v0
  8. !
  9. aaa new-model
  10. !
  11. no ip domain lookup
  12. !
  13. !
  14. mpls traffic-eng tunnels
  15. !
  16. !
  17. segment-routing mpls
  18. !
  19. connected-prefix-sid-map
  20.   address-family ipv4
  21.    6.6.6.6/32 index 6 range 1
  22.   exit-address-family
  23. !
  24. username cisco privilege 15 secret 5 $1$xdXH$tg7sf/WsTLO9Q8l.26weM.
  25. !
  26. interface Loopback0
  27. ip address 6.6.6.6 255.255.255.255
  28. ip ospf network point-to-point
  29. ip ospf 1 area 0
  30. !
  31. interface GigabitEthernet1
  32. ip address 192.168.67.6 255.255.255.0
  33. ip ospf network point-to-point
  34. ip ospf 1 area 0
  35. mpls traffic-eng tunnels
  36. !
  37. interface GigabitEthernet2
  38. ip address 192.168.56.6 255.255.255.0
  39. ip ospf network point-to-point
  40. ip ospf 1 area 0
  41. mpls traffic-eng tunnels
  42. !
  43. interface GigabitEthernet3
  44. ip address 192.168.36.6 255.255.255.0
  45. ip ospf network point-to-point
  46. ip ospf 1 area 0
  47. mpls traffic-eng tunnels
  48. !
  49. interface GigabitEthernet4
  50. ip address 192.168.26.6 255.255.255.0
  51. ip ospf network point-to-point
  52. ip ospf 1 area 0
  53. mpls traffic-eng tunnels
  54. !
  55. router ospf 1
  56. router-id 6.6.6.6
  57. segment-routing area 0 mpls
  58. segment-routing mpls
  59. mpls traffic-eng router-id Loopback0
  60. mpls traffic-eng area 0
  61. !
复制代码
如下R7:
  1. version 16.6
  2. service timestamps debug datetime localtime
  3. service timestamps log datetime localtime
  4. !
  5. hostname R7
  6. !
  7. enable secret 5 $1$wF9L$is9ZSr7ekX/OMFQ2ZElaj1
  8. !
  9. aaa new-model
  10. !
  11. !
  12. no ip domain lookup
  13. !
  14. mpls traffic-eng tunnels
  15. !
  16. segment-routing mpls
  17. !
  18. connected-prefix-sid-map
  19.   address-family ipv4
  20.    7.7.7.7/32 index 7 range 1
  21.   exit-address-family
  22. !
  23. !
  24. username cisco privilege 15 secret 5 $1$SHrU$gaLUTcd5xo6T2GS0jCZRs/
  25. !
  26. interface Loopback0
  27. ip address 7.7.7.7 255.255.255.255
  28. ip ospf network point-to-point
  29. ip ospf 1 area 0
  30. !
  31. interface GigabitEthernet1
  32. ip address 192.168.37.7 255.255.255.0
  33. ip ospf network point-to-point
  34. ip ospf 1 area 0
  35. mpls traffic-eng tunnels
  36. !
  37. interface GigabitEthernet2
  38. ip address 192.168.67.7 255.255.255.0
  39. ip ospf network point-to-point
  40. ip ospf 1 area 0
  41. mpls traffic-eng tunnels
  42. !
  43. router ospf 1
  44. router-id 7.7.7.7
  45. segment-routing area 0 mpls
  46. segment-routing mpls
  47. mpls traffic-eng router-id Loopback0
  48. mpls traffic-eng area 0
  49. !
复制代码
如下查看状态R1:
  1. R1#show version
  2. Cisco IOS XE Software, Version 16.06.05
  3. Cisco IOS Software [Everest], Virtual XE Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.6.5, RELEASE SOFTWARE (fc3)
  4. Technical Support: http://www.cisco.com/techsupport
  5. Copyright (c) 1986-2018 by Cisco Systems, Inc.
  6. Compiled Mon 10-Dec-18 13:07 by mcpre


  7. Cisco IOS-XE software, Copyright (c) 2005-2018 by cisco Systems, Inc.
  8. All rights reserved.  Certain components of Cisco IOS-XE software are
  9. licensed under the GNU General Public License ("GPL") Version 2.0.  The
  10. software code licensed under GPL Version 2.0 is free software that comes
  11. with ABSOLUTELY NO WARRANTY.  You can redistribute and/or modify such
  12. GPL code under the terms of GPL Version 2.0.  For more details, see the
  13. documentation or "License Notice" file accompanying the IOS-XE software,
  14. or the applicable URL provided on the flyer accompanying the IOS-XE
  15. software.


  16. ROM: IOS-XE ROMMON

  17. R1 uptime is 2 hours, 39 minutes
  18. Uptime for this control processor is 2 hours, 42 minutes
  19. System returned to ROM by reload
  20. System image file is "bootflash:packages.conf"
  21. Last reload reason: reload



  22. This product contains cryptographic features and is subject to United
  23. States and local country laws governing import, export, transfer and
  24. use. Delivery of Cisco cryptographic products does not imply
  25. third-party authority to import, export, distribute or use encryption.
  26. Importers, exporters, distributors and users are responsible for
  27. compliance with U.S. and local country laws. By using this product you
  28. agree to comply with applicable laws and regulations. If you are unable
  29. to comply with U.S. and local laws, return this product immediately.

  30. A summary of U.S. laws governing Cisco cryptographic products may be found at:
  31. http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

  32. If you require further assistance please contact us by sending email to
  33. export@cisco.com.

  34. License Level: ax
  35. License Type: Default. No valid license found.
  36. Next reload license Level: ax

  37. cisco CSR1000V (VXE) processor (revision VXE) with 2190079K/3075K bytes of memory.
  38. Processor board ID 9O8KIKS1UXW
  39. 4 Gigabit Ethernet interfaces
  40. 32768K bytes of non-volatile configuration memory.
  41. 3984864K bytes of physical memory.
  42. 7774207K bytes of virtual hard disk at bootflash:.
  43. 0K bytes of WebUI ODM Files at webui:.

  44. Configuration register is 0x2102

  45. R1#show ip route ospf
  46. Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
  47.        D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
  48.        N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
  49.        E1 - OSPF external type 1, E2 - OSPF external type 2
  50.        i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
  51.        ia - IS-IS inter area, * - candidate default, U - per-user static route
  52.        o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
  53.        a - application route
  54.        + - replicated route, % - next hop override, p - overrides from PfR

  55. Gateway of last resort is not set

  56.       2.0.0.0/32 is subnetted, 1 subnets
  57. O        2.2.2.2 [110/2] via 192.168.12.2, 02:25:05, GigabitEthernet1
  58.       3.0.0.0/32 is subnetted, 1 subnets
  59. O        3.3.3.3 [110/3] via 192.168.15.5, 02:25:00, GigabitEthernet2
  60.                  [110/3] via 192.168.12.2, 02:25:05, GigabitEthernet1
  61.       5.0.0.0/32 is subnetted, 1 subnets
  62. O        5.5.5.5 [110/2] via 192.168.15.5, 02:25:05, GigabitEthernet2
  63.       6.0.0.0/32 is subnetted, 1 subnets
  64. O        6.6.6.6 [110/3] via 192.168.15.5, 02:25:05, GigabitEthernet2
  65.                  [110/3] via 192.168.12.2, 02:25:05, GigabitEthernet1
  66.       7.0.0.0/32 is subnetted, 1 subnets
  67. O        7.7.7.7 [110/4] via 7.7.7.7, 02:25:05, Tunnel17
  68. O     192.168.23.0/24 [110/2] via 192.168.12.2, 02:25:05, GigabitEthernet1
  69. O     192.168.25.0/24 [110/2] via 192.168.15.5, 02:25:05, GigabitEthernet2
  70.                       [110/2] via 192.168.12.2, 02:25:05, GigabitEthernet1
  71. O     192.168.26.0/24 [110/2] via 192.168.12.2, 02:25:05, GigabitEthernet1
  72. O     192.168.35.0/24 [110/2] via 192.168.15.5, 02:25:05, GigabitEthernet2
  73. O     192.168.36.0/24 [110/3] via 192.168.15.5, 02:25:00, GigabitEthernet2
  74.                       [110/3] via 192.168.12.2, 02:25:05, GigabitEthernet1
  75. O     192.168.37.0/24 [110/3] via 192.168.15.5, 02:25:00, GigabitEthernet2
  76.                       [110/3] via 192.168.12.2, 02:25:05, GigabitEthernet1
  77. O     192.168.56.0/24 [110/2] via 192.168.15.5, 02:25:05, GigabitEthernet2
  78. O     192.168.67.0/24 [110/3] via 192.168.15.5, 02:25:05, GigabitEthernet2
  79.                       [110/3] via 192.168.12.2, 02:25:05, GigabitEthernet1

  80. R1#
  81. R1#show ip ospf segment-routing sid-database

  82.             OSPF Router with ID (1.1.1.1) (Process ID 1)

  83. OSPF Segment Routing SIDs

  84. Codes: L - local, N - label not programmed,
  85.        M - mapping-server

  86. SID             Prefix              Adv-Rtr-Id       Area-Id          Type      
  87. --------------  ------------------  ---------------  ---------------  ----------
  88. 1       (L)     1.1.1.1/32          1.1.1.1          0                Intra
  89. 2               2.2.2.2/32          2.2.2.2          0                Intra
  90. 3               3.3.3.3/32          3.3.3.3          0                Intra
  91. 5               5.5.5.5/32          5.5.5.5          0                Intra
  92. 6               6.6.6.6/32          6.6.6.6          0                Intra
  93. 7               7.7.7.7/32          7.7.7.7          0                Intra

  94. R1#
  95. R1#show mpls forwarding-table table 0
  96. Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop   
  97. Label      Label      or Tunnel Id     Switched      interface              
  98. 16    [T]  Pop Label  17/1[TE-Bind]    0             Tu17       point2point
  99. 17         Pop Label  192.168.15.5-A   0             Gi2        192.168.15.5
  100. 18         Pop Label  192.168.12.2-A   0             Gi1        192.168.12.2
  101. 16002      Pop Label  2.2.2.2/32       0             Gi1        192.168.12.2
  102. 16003      16003      3.3.3.3/32       0             Gi1        192.168.12.2
  103.            16003      3.3.3.3/32       0             Gi2        192.168.15.5
  104. 16005      Pop Label  5.5.5.5/32       0             Gi2        192.168.15.5
  105. 16006      16006      6.6.6.6/32       0             Gi1        192.168.12.2
  106.            16006      6.6.6.6/32       0             Gi2        192.168.15.5
  107. 16007      16007      0-7.7.7.7/32-0   0             Gi1        192.168.12.2
  108.            16007      0-7.7.7.7/32-0   0             Gi2        192.168.15.5

  109. [T]     Forwarding through a LSP tunnel.
  110.         View additional labelling info with the 'detail' option

  111. A  - Adjacency SID

  112. R1#show ip inte brief
  113. Interface              IP-Address      OK? Method Status                Protocol
  114. GigabitEthernet1       192.168.12.1    YES NVRAM  up                    up      
  115. GigabitEthernet2       192.168.15.1    YES NVRAM  up                    up      
  116. GigabitEthernet3       unassigned      YES NVRAM  administratively down down   
  117. GigabitEthernet4       unassigned      YES NVRAM  administratively down down   
  118. Loopback0              1.1.1.1         YES NVRAM  up                    up      
  119. Tunnel17               1.1.1.1         YES TFTP   up                    up      

  120. R1#show mpls traffic-eng tunnels segment-routing

  121. P2P TUNNELS/LSPs:

  122. Name: R1_t17                              (Tunnel17) Destination: 7.7.7.7
  123.   Status:
  124.     Admin: up         Oper: up     Path: valid       Signalling: connected
  125.     path option 1, (SEGMENT-ROUTING) type explicit 1-2-3-7 (Basis for Setup)
  126.     path option 2, (SEGMENT-ROUTING) type explicit 1-5-6-7
  127.     path option 3, (SEGMENT-ROUTING) type explicit 1-2-3-5-6-7
  128.     path option 4, (SEGMENT-ROUTING) type explicit 1-2-3-5-2-6-7

  129.   Config Parameters:
  130.     Bandwidth: 0        kbps (Global)  Priority: 7  7   Affinity: 0x0/0xFFFF
  131.     Metric Type: IGP (interface)
  132.     Path Selection:
  133.      Protection: any (default)
  134.     Path-selection Tiebreaker:
  135.       Global: not set   Tunnel Specific: not set   Effective: min-fill (default)
  136.     Hop Limit: disabled [ignore: Explicit Path Option with all Strict Hops]
  137.     Cost Limit: disabled
  138.     Path-invalidation timeout: 10000 msec (default), Action: Tear
  139.     AutoRoute: enabled  LockDown: disabled Loadshare: 10 [200000000]
  140.     auto-bw: disabled
  141.     Fault-OAM: disabled, Wrap-Protection: disabled, Wrap-Capable: No
  142.   Active Path Option Parameters:
  143.     State: explicit path option 1 is active
  144.     BandwidthOverride: disabled  LockDown: disabled  Verbatim: disabled

  145.   History:
  146.     Tunnel:
  147.       Time since created: 2 hours, 28 minutes
  148.       Time since path change: 2 hours, 26 minutes
  149.       Number of LSP IDs (Tun_Instances) used: 81
  150.     Current LSP: [ID: 81]
  151.       Uptime: 2 hours, 26 minutes
  152.   Tun_Instance: 81
  153.   Segment-Routing Path Info (ospf 1  area 0)
  154.     Segment0[Node]: 2.2.2.2, Label: 16002
  155.     Segment1[ - ]: Label: 16003
  156.     Segment2[ - ]: Label: 16007
  157. P2MP TUNNELS:

  158. P2MP SUB-LSPS:
复制代码
如下路径测试
  1. R1#traceroute 7.7.7.7 source lo0
  2. Type escape sequence to abort.
  3. Tracing the route to 7.7.7.7
  4. VRF info: (vrf in name/id, vrf out name/id)
  5.   1 192.168.12.2 [MPLS: Labels 16003/16007 Exp 0] 641 msec 606 msec 434 msec
  6.   2 192.168.23.3 [MPLS: Label 16007 Exp 0] 543 msec 206 msec 2 msec
  7.   3 192.168.37.7 1040 msec 670 msec 1038 msec
复制代码

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

更换流量路径:

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

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

  1. R1#show mpls traffic-eng tunnels segment-routing

  2. P2P TUNNELS/LSPs:

  3. Name: R1_t17                              (Tunnel17) Destination: 7.7.7.7
  4.   Status:
  5.     Admin: up         Oper: up     Path: valid       Signalling: connected
  6.     path option 3, (SEGMENT-ROUTING) type explicit 1-2-3-5-6-7 (Basis for Setup)
  7.     path option 1, (SEGMENT-ROUTING) type explicit 1-2-3-7
  8.     path option 2, (SEGMENT-ROUTING) type explicit 1-5-6-7
  9.     path option 4, (SEGMENT-ROUTING) type explicit 1-2-3-5-2-6-7

  10.   Config Parameters:
  11.     Bandwidth: 0        kbps (Global)  Priority: 7  7   Affinity: 0x0/0xFFFF
  12.     Metric Type: IGP (interface)
  13.     Path Selection:
  14.      Protection: any (default)
  15.     Path-selection Tiebreaker:
  16.       Global: not set   Tunnel Specific: not set   Effective: min-fill (default)
  17.     Hop Limit: disabled [ignore: Explicit Path Option with all Strict Hops]
  18.     Cost Limit: disabled
  19.     Path-invalidation timeout: 10000 msec (default), Action: Tear
  20.     AutoRoute: enabled  LockDown: disabled Loadshare: 10 [200000000]
  21.     auto-bw: disabled
  22.     Fault-OAM: disabled, Wrap-Protection: disabled, Wrap-Capable: No
  23.   Active Path Option Parameters:
  24.     State: explicit path option 3 is active
  25.     BandwidthOverride: disabled  LockDown: disabled  Verbatim: disabled

  26.   History:
  27.     Tunnel:
  28.       Time since created: 2 hours, 32 minutes
  29.       Time since path change: 29 seconds
  30.       Number of LSP IDs (Tun_Instances) used: 82
  31.     Current LSP: [ID: 82]
  32.       Uptime: 32 seconds
  33.       Selection: reoptimization
  34.     Prior LSP: [ID: 81]
  35.       ID: path option unknown
  36.       Removal Trigger: reoptimization completed
  37.   Tun_Instance: 82
  38.   Segment-Routing Path Info (ospf 1  area 0)
  39.     Segment0[Node]: 2.2.2.2, Label: 16002
  40.     Segment1[Node]: 3.3.3.3, Label: 16003
  41.     Segment2[Node]: 5.5.5.5, Label: 16005
  42.     Segment3[Node]: 6.6.6.6, Label: 16006
  43.     Segment4[Node]: 7.7.7.7, Label: 16007
  44.          
  45. P2MP TUNNELS:

  46. P2MP SUB-LSPS:
  47. R1#
复制代码

再次切换路径测试:

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

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

  1. R1#show mpls traffic-eng tunnels segment-routing      

  2. P2P TUNNELS/LSPs:

  3. Name: R1_t17                              (Tunnel17) Destination: 7.7.7.7
  4.   Status:
  5.     Admin: up         Oper: up     Path: valid       Signalling: connected
  6.     path option 4, (SEGMENT-ROUTING) type explicit 1-2-3-5-2-6-7 (Basis for Setup)
  7.     path option 1, (SEGMENT-ROUTING) type explicit 1-2-3-7
  8.     path option 2, (SEGMENT-ROUTING) type explicit 1-5-6-7
  9.     path option 3, (SEGMENT-ROUTING) type explicit 1-2-3-5-6-7

  10.   Config Parameters:
  11.     Bandwidth: 0        kbps (Global)  Priority: 7  7   Affinity: 0x0/0xFFFF
  12.     Metric Type: IGP (interface)
  13.     Path Selection:
  14.      Protection: any (default)
  15.     Path-selection Tiebreaker:
  16.       Global: not set   Tunnel Specific: not set   Effective: min-fill (default)
  17.     Hop Limit: disabled [ignore: Explicit Path Option with all Strict Hops]
  18.     Cost Limit: disabled
  19.     Path-invalidation timeout: 10000 msec (default), Action: Tear
  20.     AutoRoute: enabled  LockDown: disabled Loadshare: 10 [200000000]
  21.     auto-bw: disabled
  22.     Fault-OAM: disabled, Wrap-Protection: disabled, Wrap-Capable: No
  23.   Active Path Option Parameters:
  24.     State: explicit path option 4 is active
  25.     BandwidthOverride: disabled  LockDown: disabled  Verbatim: disabled

  26.   History:
  27.     Tunnel:
  28.       Time since created: 2 hours, 34 minutes
  29.       Time since path change: 17 seconds
  30.       Number of LSP IDs (Tun_Instances) used: 83
  31.     Current LSP: [ID: 83]
  32.       Uptime: 20 seconds
  33.       Selection: reoptimization
  34.     Prior LSP: [ID: 82]
  35.       ID: path option unknown
  36.       Removal Trigger: reoptimization completed
  37.   Tun_Instance: 83
  38.   Segment-Routing Path Info (ospf 1  area 0)
  39.     Segment0[Node]: 2.2.2.2, Label: 16002
  40.     Segment1[Node]: 3.3.3.3, Label: 16003
  41.     Segment2[Node]: 5.5.5.5, Label: 16005
  42.     Segment3[Node]: 2.2.2.2, Label: 16002
  43.     Segment4[Node]: 6.6.6.6, Label: 16006
  44.     Segment5[Node]: 7.7.7.7, Label: 16007

  45. P2MP TUNNELS:

  46. P2MP SUB-LSPS:
  47. R1#
复制代码

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



本帖子中包含更多资源

您需要 思科 CCO 登录 才可以下载或查看,没有帐号?思科 CCO 注册   

x
  • 1
  • 2
  • 3
  • 4
  • 5
  • 1
  • 2
  • 3
  • 4
  • 5
平均得分4 (5 评价)
发表于 2019-10-18 18:10:40 | 显示全部楼层
目前这样的实验资料很少,感谢原创分享
  • 1
  • 2
  • 3
  • 4
  • 5
  • 1
  • 2
  • 3
  • 4
  • 5
平均得分2 (1 评价)
发表于 2019-10-21 10:36:19 | 显示全部楼层
感谢楼主分享,谢谢~
  • 1
  • 2
  • 3
  • 4
  • 5
  • 1
  • 2
  • 3
  • 4
  • 5
平均得分3 (1 评价)
发表于 2019-10-22 14:57:00 | 显示全部楼层
本帖最后由 904897560 于 2019-10-22 14:59 编辑

感谢原创分享, 看看自己能不能测试下.
敢问下楼主, 是用的什么模拟实验的?

是IOL/IOU还是说CSR1000v?

  • 1
  • 2
  • 3
  • 4
  • 5
  • 1
  • 2
  • 3
  • 4
  • 5
平均得分2 (1 评价)
 楼主| 发表于 2019-10-22 16:18:31 | 显示全部楼层
904897560 发表于 2019-10-22 14:57
感谢原创分享, 看看自己能不能测试下.
敢问下楼主, 是用的什么模拟实验的?

我在show version里面都有显示,用的是CSR1Kv,版本也有。
  • 1
  • 2
  • 3
  • 4
  • 5
  • 1
  • 2
  • 3
  • 4
  • 5
平均得分2 (1 评价)
发表于 2019-10-23 09:45:08 | 显示全部楼层
wuhao0015 发表于 2019-10-22 16:18
我在show version里面都有显示,用的是CSR1Kv,版本也有。

看到了, 感谢
  • 1
  • 2
  • 3
  • 4
  • 5
  • 1
  • 2
  • 3
  • 4
  • 5
平均得分0 (0 评价)
发表于 2019-10-23 14:23:42 | 显示全部楼层
谢谢分享,好帖好帖
  • 1
  • 2
  • 3
  • 4
  • 5
  • 1
  • 2
  • 3
  • 4
  • 5
平均得分0 (0 评价)
发表于 2019-10-24 16:33:13 | 显示全部楼层
学习了,点个赞
  • 1
  • 2
  • 3
  • 4
  • 5
  • 1
  • 2
  • 3
  • 4
  • 5
平均得分0 (0 评价)
发表于 2019-11-11 10:36:20 | 显示全部楼层
确实是技术大牛。
  • 1
  • 2
  • 3
  • 4
  • 5
  • 1
  • 2
  • 3
  • 4
  • 5
平均得分0 (0 评价)
发表于 2019-12-4 10:48:28 | 显示全部楼层
谢谢分享,好帖
  • 1
  • 2
  • 3
  • 4
  • 5
  • 1
  • 2
  • 3
  • 4
  • 5
平均得分0 (0 评价)
您需要登录后才可以回帖 思科 CCO 登录 | 思科 CCO 注册   

本版积分规则

Archiver | 思科社区  

GMT+8, 2020-7-12 01:39 , Processed in 0.158922 second(s), 57 queries .

京ICP备11014401号-17

© 2020 思科系统.版权所有 重要声明 | 保密声明 | 隐私权政策 | 商标 |

快速回复 返回顶部 返回列表