「2024-11-03 Cat9000V GIR 機能検証」の版間の差分

提供:hkatou_Lab
ナビゲーションに移動 検索に移動
ページの作成:「Nexus で採用され Catalyst 9000 から実装された GIR について、機能検証を実施しました。 このページにラボシナリオとして、コンフィグや確認コマンド、疎通確認のポイントなどをまとめています。 検証対象として Catalyst 9000V Q200 を使用していますが、実機の Catalyst 9000 シリーズでも同様の動作をするはずです。 == 目的 == GIR の動作について理解を深…」
 
編集の要約なし
23行目: 23行目:


PE01 を WAN の機器、CE01 , CE02 , CORE01 , CORE02 , CPE を LAN の機器とする。
PE01 を WAN の機器、CE01 , CE02 , CORE01 , CORE02 , CPE を LAN の機器とする。
[[ファイル:Catalyst_PBR_01.png|代替文=Catalyst PBR Network Diagram|なし|フレーム|Catalyst PBR Feature Test Network Diagram]]
[[ファイル:20241103 GIR Diagram.png|代替文=20241103 GIR Diagram|フレーム|20241103 GIR Diagram]]
 
== IP アドレッシング ==
== IP アドレッシング ==
{| class="wikitable"
{| class="wikitable"
387行目: 386行目:
   router ospf 1
   router ospf 1
  system mode maintenance
  system mode maintenance
  timeout 15
   template BGP_OSPF
   template BGP_OSPF
  failsafe 5
|
|
  CE02#show run | s mainte
  CE02#show run | s mainte
394行目: 395行目:
   router ospf 1
   router ospf 1
  system mode maintenance
  system mode maintenance
  timeout 15
   template BGP_OSPF
   template BGP_OSPF
  failsafe 5
|
|
|}
|}
510行目: 513行目:
   
   
  system mode maintenance
  system mode maintenance
  timeout 15
   template OSPF_HSRP
   template OSPF_HSRP
  failsafe 5
|
|
  CORE02#show run | s mainte
  CORE02#show run | s mainte
518行目: 523行目:
   
   
  system mode maintenance
  system mode maintenance
  timeout 15
   template OSPF_HSRP
   template OSPF_HSRP
  failsafe 5
|
|
|}
|}
570行目: 577行目:
   2 203.0.113.142 81 msec 54 msec 61 msec
   2 203.0.113.142 81 msec 54 msec 61 msec
   3 203.0.113.101 [AS 64512] 103 msec *  105 msec
   3 203.0.113.101 [AS 64512] 103 msec *  105 msec
通常時は CE01 -> CORE01 -> CPE01 を経由する。
通常時は CE01 -> CORE01 -> CPE01 を経由します。
  show ip bgp
  PE01#show ip bgp
BGP table version is 11, local router ID is 198.51.100.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
              t secondary path, L long-lived-stale,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
      Network          Next Hop            Metric LocPrf Weight Path
      0.0.0.0          0.0.0.0                                0 i
  *>  203.0.113.0/25  203.0.113.130          100            0 64512 i
  *                    203.0.113.134          300            0 64512 i
CE01 宛を優先させています。
 
==== CORE01 ====
CORE01#show ip route 0.0.0.0
Routing entry for 0.0.0.0/0, supernet
  Known via "ospf 1", distance 110, metric 2, candidate default path
  Tag 1, type extern 1
  Last update from 203.0.113.141 on GigabitEthernet1/0/23, 00:01:20 ago
  Routing Descriptor Blocks:
  * 203.0.113.141, from 198.51.100.11, 00:01:20 ago, via GigabitEthernet1/0/23
      Route metric is 2, traffic share count is 1
      Route tag 1
CORE01#
CORE01#show standby brief
                      P indicates configured to preempt.
                      |
Interface  Grp  Pri P State  Active          Standby        Virtual IP
Vl1        1    110 P Active  local          203.0.113.3    203.0.113.1
OSPF メトリック 1 と HSRP Priority 110 で優先させています。


==== CPE01 ====
==== CPE01 ====
587行目: 625行目:
   2 203.0.113.141 63 msec 66 msec 69 msec
   2 203.0.113.141 63 msec 66 msec 69 msec
   3 203.0.113.129 89 msec *  84 msec
   3 203.0.113.129 89 msec *  84 msec
通常時は CORE01 -> CE01 -> PE01 を経由する。
通常時は CORE01 -> CE01 -> PE01 を経由します。


== CE01 GIR BGP + OSPF 動作確認 ==
== CE01 GIR BGP + OSPF 動作確認 ==
start maintenance でホストを Remove します。
  CE01#start maintenance
  CE01#start maintenance
  Template BGP_OSPF will be applied. Do you want to continue?[confirm]
  Template BGP_OSPF will be applied. Do you want to continue?[confirm]
602行目: 641行目:
|+CE01 BGP + OSPF GIR 動作確認
|+CE01 BGP + OSPF GIR 動作確認
!確認
!確認
!PE01 経路確認
!通常時
!CPE01 経路確認
!CE01 メンテナンス時
!備考
!備考
|-
|-
|BGP
|BGP
|
|
PE01#traceroute 203.0.113.101
Type escape sequence to abort.
Tracing the route to 203.0.113.101
VRF info: (vrf in name/id, vrf out name/id)
  1 203.0.113.130 39 msec 65 msec 37 msec
  2 203.0.113.142 66 msec 75 msec 67 msec
  3 203.0.113.101 [AS 64512] 94 msec *  94 msec
PE01#show ip bgp
BGP table version is 13, local router ID is 198.51.100.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
              t secondary path, L long-lived-stale,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
      Network          Next Hop            Metric LocPrf Weight Path
      0.0.0.0          0.0.0.0                                0 i
  '''*>  203.0.113.0/25  203.0.113.130          100            0 64512 i'''
  *                    203.0.113.134          300            0 64512 i
|
PE01#traceroute 203.0.113.101
Type escape sequence to abort.
Tracing the route to 203.0.113.101
VRF info: (vrf in name/id, vrf out name/id)
  '''1 203.0.113.134 50 msec 30 msec 35 msec'''
  '''2 203.0.113.146 57 msec 67 msec 67 msec'''
  3 203.0.113.101 [AS 64512] 125 msec *  135 msec
PE01#
  PE01#show ip bgp
  PE01#show ip bgp
  BGP table version is 8, local router ID is 198.51.100.1
  BGP table version is 8, local router ID is 198.51.100.1
620行目: 688行目:
       0.0.0.0          0.0.0.0                                0 i
       0.0.0.0          0.0.0.0                                0 i
   *>  203.0.113.0/25  203.0.113.134          300            0 64512 i
   *>  203.0.113.0/25  203.0.113.134          300            0 64512 i
|'''上り : CPE01'''
CORE01 はわたりを経由するように変更されています。
'''下り : PE01'''
PE01 は CE02 を経由するように変更されています。
CE01 は BGP アドレス広報を停止していました。
|-
|
|
|
|
|-
|通常時
経路確認
|
|
  L3SW01(tcl)#tclsh
  CE01(maint-mode)#show ip bgp summary
  L3SW01(tcl)#foreach address {
  BGP router identifier 198.51.100.11, local AS number 64512
+> 8.8.8.8
  BGP table version is 20, main routing table version 20
+> 203.0.113.249
  2 network entries using 496 bytes of memory
+> 203.0.113.250
  5 path entries using 680 bytes of memory
+> 198.51.100.253
  5/2 BGP path/bestpath attribute entries using 1480 bytes of memory
  +> 198.51.100.5
1 BGP AS-PATH entries using 24 bytes of memory
  +> 198.51.100.6
0 BGP route-map cache entries using 0 bytes of memory
  +> 198.51.100.9
  0 BGP filter-list cache entries using 0 bytes of memory
  +> 198.51.100.10
  BGP using 2680 total bytes of memory
+> 198.51.100.13
  1 received paths for inbound soft reconfiguration
+> 198.51.100.14
  BGP activity 5/3 prefixes, 22/17 paths, scan interval 60 secs
+> 198.51.100.17
  2 networks peaked at 08:12:51 Nov 3 2024 JST (03:45:55.560 ago)
+> 198.51.100.18
   
+> 198.51.100.21
  Neighbor        V          AS MsgRcvd MsgSent  TblVer InQ OutQ Up/Down State/PfxRcd
+> 198.51.100.22
  198.51.100.12  4        64512    153    160      20   0   0 00:22:50        2
+> 198.51.100.252
203.0.113.129  4       64496    155    159      20    0    0 00:23:14        1
+>} { traceroute $address source Lo1 }
  CE01(maint-mode)#show ip bgp
Type escape sequence to abort.
  BGP table version is 20, local router ID is 198.51.100.11
Tracing the route to 8.8.8.8
  Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
VRF info: (vrf in name/id, vrf out name/id)
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
  1 198.51.100.21 3 msec 2 msec 3 msec
              x best-external, a additional-path, c RIB-compressed,
  2 203.0.113.249 3 msec *  3 msec
              t secondary path, L long-lived-stale,
Type escape sequence to abort.
  Origin codes: i - IGP, e - EGP, ? - incomplete
Tracing the route to 203.0.113.249
  RPKI validation codes: V valid, I invalid, N Not found
  VRF info: (vrf in name/id, vrf out name/id)
   
  1 198.51.100.21 3 msec 3 msec 2 msec
      Network          Next Hop            Metric LocPrf Weight Path
  2  *
  * i 0.0.0.0          198.51.100.12            0   100     0 64496 i
    203.0.113.249 3 msec *
  *>                    203.0.113.129                300      0 64496 i
Type escape sequence to abort.
  * i 203.0.113.0/25  198.51.100.12          41   100      0 i
Tracing the route to 203.0.113.250
  *>                    203.0.113.142        65536        32768 i
  VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 3 msec * 3 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.253
VRF info: (vrf in name/id, vrf out name/id)
  1 *
    198.51.100.21 4 msec *
Type escape sequence to abort.
  Tracing the route to 198.51.100.5
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 4 msec *  3 msec
  Type escape sequence to abort.
Tracing the route to 198.51.100.6
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 3 msec 3 msec 3 msec
  2 198.51.100.6 2 msec 2 msec 2 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.9
VRF info: (vrf in name/id, vrf out name/id)
  1  *
    198.51.100.21 4 msec *
Type escape sequence to abort.
Tracing the route to 198.51.100.10
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 3 msec 3 msec 3 msec
  2 198.51.100.10 2 msec 2 msec 1 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.13
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 3 msec *  4 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.14
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 3 msec 3 msec 2 msec
  2 198.51.100.14 2 msec 2 msec 2 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.17
VRF info: (vrf in name/id, vrf out name/id)
  1  *
    198.51.100.21 3 msec *
Type escape sequence to abort.
Tracing the route to 198.51.100.18
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 4 msec 2 msec 3 msec
  2 198.51.100.18 2 msec 2 msec 2 msec
  Type escape sequence to abort.
  Tracing the route to 198.51.100.21
  VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 3 msec *  2 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.22
  VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.22 3 msec *  2 msec
  Type escape sequence to abort.
Tracing the route to 198.51.100.252
VRF info: (vrf in name/id, vrf out name/id)
   1 198.51.100.252 2 msec *  2 msec
L3SW01(tcl)#
|
L3SW01(tcl)#tclsh
L3SW01(tcl)#foreach address {
+> 8.8.8.8
+> 203.0.113.249
+> 203.0.113.250
+> 198.51.100.253
+> 198.51.100.5
+> 198.51.100.6
+> 198.51.100.9
+> 198.51.100.10
+> 198.51.100.13
+> 198.51.100.14
+> 198.51.100.17
+> 198.51.100.18
+> 198.51.100.21
+> 198.51.100.22
+> 198.51.100.252
+>} { traceroute $address source Lo2 }
Type escape sequence to abort.
Tracing the route to 8.8.8.8
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 3 msec 3 msec 2 msec
  2 198.51.100.10 1 msec 2 msec 2 msec
  3 198.51.100.5 3 msec 3 msec 3 msec
  4 203.0.113.249 3 msec *  4 msec
Type escape sequence to abort.
Tracing the route to 203.0.113.249
VRF info: (vrf in name/id, vrf out name/id)
   1 198.51.100.21 3 msec 3 msec 2 msec
  2 198.51.100.10 1 msec 2 msec 2 msec
  3 198.51.100.5 3 msec 3 msec 3 msec
  4  *
    203.0.113.249 4 msec *
Type escape sequence to abort.
Tracing the route to 203.0.113.250
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 3 msec 3 msec 3 msec
  2 198.51.100.10 2 msec 3 msec 1 msec
  3 198.51.100.5 3 msec * 4 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.253
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 3 msec * 3 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.5
  VRF info: (vrf in name/id, vrf out name/id)
  1  *
    198.51.100.21 3 msec *
Type escape sequence to abort.
Tracing the route to 198.51.100.6
  VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 3 msec 3 msec 4 msec
  2 198.51.100.6 2 msec 3 msec 2 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.9
  VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 3 msec *  3 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.10
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 3 msec 3 msec 3 msec
  2 198.51.100.10 2 msec 2 msec 2 msec
  Type escape sequence to abort.
Tracing the route to 198.51.100.13
VRF info: (vrf in name/id, vrf out name/id)
  1  *
    198.51.100.21 3 msec *
  Type escape sequence to abort.
Tracing the route to 198.51.100.14
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 3 msec 3 msec 3 msec
   2 198.51.100.14 2 msec 2 msec 2 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.17
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 3 msec 3 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.18
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 13 msec 3 msec 2 msec
   2 198.51.100.18 1 msec 2 msec 2 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.21
VRF info: (vrf in name/id, vrf out name/id)
  1  *
     198.51.100.21 3 msec *
Type escape sequence to abort.
Tracing the route to 198.51.100.22
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.22 3 msec * 2 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.252
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.252 2 msec *  2 msec
L3SW01(tcl)#
|
|
|-
|-
|PBR next-hop 1 つめ
| rowspan="3" |OSPF
障害時 経路確認
|
|
  L3SW01(tcl)#foreach address {
  CE02#show ip route 0.0.0.0
+> 8.8.8.8
  Routing entry for 0.0.0.0/0, supernet
+> 203.0.113.249
   '''Known via "ospf 1"''', distance 110, metric 81, candidate default path
+> 203.0.113.250
   Tag 1, type extern 1
+> 198.51.100.253
   Last update from 203.0.113.137 on Port-channel21, 00:00:20 ago
+> 198.51.100.5
   Routing Descriptor Blocks:
+> 198.51.100.6
   * 203.0.113.137, from 198.51.100.11, 00:00:20 ago, via Port-channel21
+> 198.51.100.9
      Route metric is 81, traffic share count is 1
+> 198.51.100.10
      Route tag 1
+> 198.51.100.13
+> 198.51.100.14
+> 198.51.100.17
+> 198.51.100.18
+> 198.51.100.21
+> 198.51.100.22
+> 198.51.100.252
+>} { traceroute $address source Lo1 }
Type escape sequence to abort.
  Tracing the route to 8.8.8.8
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 3 msec 2 msec 2 msec
  2 203.0.113.249 3 msec *  2 msec
Type escape sequence to abort.
Tracing the route to 203.0.113.249
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 3 msec 2 msec 3 msec
  2  *
    203.0.113.249 3 msec *
Type escape sequence to abort.
Tracing the route to 203.0.113.250
VRF info: (vrf in name/id, vrf out name/id)
   1 198.51.100.21 3 msec *  5 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.253
VRF info: (vrf in name/id, vrf out name/id)
   1 *
    198.51.100.21 3 msec *
Type escape sequence to abort.
Tracing the route to 198.51.100.5
VRF info: (vrf in name/id, vrf out name/id)
  1 *  *  *
   2  *  *
Type escape sequence to abort.
Tracing the route to 198.51.100.6
VRF info: (vrf in name/id, vrf out name/id)
  1  *  *  *
  2
Type escape sequence to abort.
Tracing the route to 198.51.100.9
VRF info: (vrf in name/id, vrf out name/id)
  1  *  *  *
  2
Type escape sequence to abort.
Tracing the route to 198.51.100.10
VRF info: (vrf in name/id, vrf out name/id)
   1  *  *
Type escape sequence to abort.
Tracing the route to 198.51.100.13
VRF info: (vrf in name/id, vrf out name/id)
   1 198.51.100.21 4 msec * 4 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.14
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 3 msec 3 msec 3 msec
  2 198.51.100.14 2 msec 2 msec 2 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.17
VRF info: (vrf in name/id, vrf out name/id)
  1  *
    198.51.100.21 3 msec *
Type escape sequence to abort.
Tracing the route to 198.51.100.18
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 3 msec 3 msec 2 msec
  2 198.51.100.18 1 msec 3 msec 2 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.21
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 3 msec *  3 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.22
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.22 3 msec *  3 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.252
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.252 2 msec *  2 msec
L3SW01(tcl)#
|
|
  L3SW01(tcl)#tclsh
  CE02#show ip route 0.0.0.0
L3SW01(tcl)#foreach address {
  Routing entry for 0.0.0.0/0, supernet
+> 8.8.8.8
   '''Known via "bgp 64512"''', distance 20, metric 0, candidate default path
  +> 203.0.113.249
   Tag 64496, type external
+> 203.0.113.250
   Last update from 203.0.113.133 00:00:07 ago
+> 198.51.100.253
   Routing Descriptor Blocks:
+> 198.51.100.5
   * 203.0.113.133, from 203.0.113.133, 00:00:07 ago
+> 198.51.100.6
      opaque_ptr 0x7477AABBBCC0
+> 198.51.100.9
      Route metric is 0, traffic share count is 1
+> 198.51.100.10
      AS Hops 1
+> 198.51.100.13
      Route tag 64496
+> 198.51.100.14
      MPLS label: none
+> 198.51.100.17
|'''上り : CE02'''
+> 198.51.100.18
通常時は CE01 宛わたり Po21 を向いていますが、CE01 GIR 中は PE01 宛 Gi1/0/23 を向いています。
+> 198.51.100.21
+> 198.51.100.22
+> 198.51.100.252
+>} { traceroute $address source Lo2 }
Type escape sequence to abort.
Tracing the route to 8.8.8.8
VRF info: (vrf in name/id, vrf out name/id)
   1 198.51.100.21 3 msec 3 msec 2 msec
   2 198.51.100.18 2 msec 2 msec 2 msec
   3 198.51.100.13 2 msec 2 msec 2 msec
  4 203.0.113.249 3 msec *  4 msec
Type escape sequence to abort.
Tracing the route to 203.0.113.249
VRF info: (vrf in name/id, vrf out name/id)
   1 198.51.100.21 3 msec 2 msec 2 msec
  2 198.51.100.18 2 msec 2 msec 2 msec
  3 198.51.100.13 2 msec 3 msec 4 msec
   *
    203.0.113.249 4 msec *
Type escape sequence to abort.
Tracing the route to 203.0.113.250
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 3 msec 3 msec 6 msec
  2 198.51.100.18 2 msec 3 msec 2 msec
  3 198.51.100.13 3 msec *  3 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.253
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 2 msec *  3 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.5
VRF info: (vrf in name/id, vrf out name/id)
  1  *  *  *
  2
Type escape sequence to abort.
Tracing the route to 198.51.100.6
VRF info: (vrf in name/id, vrf out name/id)
  1 *  *
Type escape sequence to abort.
Tracing the route to 198.51.100.9
VRF info: (vrf in name/id, vrf out name/id)
  1 *  *
Type escape sequence to abort.
Tracing the route to 198.51.100.10
VRF info: (vrf in name/id, vrf out name/id)
  1  *  *  *
  2
Type escape sequence to abort.
Tracing the route to 198.51.100.13
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 4 msec *  3 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.14
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 3 msec 2 msec 3 msec
  2 198.51.100.14 2 msec 1 msec 2 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.17
VRF info: (vrf in name/id, vrf out name/id)
  1  *
    198.51.100.21 3 msec *
Type escape sequence to abort.
Tracing the route to 198.51.100.18
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 4 msec 3 msec 2 msec
  2 198.51.100.18 2 msec 3 msec 2 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.21
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.21 3 msec *  3 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.22
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.22 3 msec *  3 msec
Type escape sequence to abort.
Tracing the route to 198.51.100.252
VRF info: (vrf in name/id, vrf out name/id)
  1 198.51.100.252 2 msec *  2 msec
L3SW01(tcl)#
|
|}
 
== エントリ確認 ==
{| class="wikitable mw-collapsible mw-collapsed"
|+エントリ確認
!プロトコル
!CE01 通常時
!CE01 Gi1/0/13 障害時`
!備考
|-
|-
|PBR
|
|
  CE01(config-if)#do sh run | s route-map
  CORE01#show ip route 0.0.0.0
  ip policy route-map RM_NAT_PBR
  Routing entry for 0.0.0.0/0, supernet
  route-map RM_NAT_PBR deny 10
  Known via "ospf 1", distance 110, metric 2, candidate default path
  match ip address ACL_NO_NAT
  Tag 1, type extern 1
route-map RM_NAT_PBR permit 20
  Last update from 203.0.113.141 on GigabitEthernet1/0/23, 00:07:11 ago
  match ip address ACL_NAT
  Routing Descriptor Blocks:
  set ip next-hop '''198.51.100.10''' 198.51.100.18
  * '''203.0.113.141''', from 198.51.100.11, 00:07:11 ago, via '''GigabitEthernet1/0/23'''
      Route metric is 2, traffic share count is 1
      Route tag 1
   
   
CE01(config-if)#do sh ip route 198.51.100.10 255.255.255.252
Load for five secs: 5%/0%; one minute: 5%; five minutes: 5%
Time source is NTP, 15:54:08.189 JST Wed Sep 25 2024
   
   
  Routing entry for 198.51.100.8/30
  CORE01#show ip ospf 1 rib
  Known via "'''connected'''", distance 0, metric 0 (connected, via interface)
  Routing Descriptor Blocks:
  * directly connected, via Vlan20
      Route metric is 0, traffic share count is 1
   
   
            OSPF Router with ID (198.51.100.21) (Process ID 1)
   
   
CE01(config-if)#do sh ip route 198.51.100.18
Load for five secs: 7%/0%; one minute: 5%; five minutes: 6%
Time source is NTP, 15:38:42.872 JST Wed Sep 25 2024
   
   
Routing entry for 198.51.100.16/30
                Base Topology (MTID 0)
  Known via "connected", distance 0, metric 0 (connected, via interface)
  Routing Descriptor Blocks:
  * directly connected, via Vlan21
      Route metric is 0, traffic share count is 1
CE01(config-if)#
|
CE01(config-if)#do sh run | s route-map
  ip policy route-map RM_NAT_PBR
route-map RM_NAT_PBR deny 10
  match ip address ACL_NO_NAT
route-map RM_NAT_PBR permit 20
  match ip address ACL_NAT
  set ip next-hop 198.51.100.10 '''198.51.100.18'''
   
   
  CE01(config-if)#do sh ip route 198.51.100.10 255.255.255.252
  OSPF local RIB
  Load for five secs: 4%/0%; one minute: 6%; five minutes: 5%
  Codes: * - Best, > - Installed in global RIB
Time source is NTP, 15:52:51.641 JST Wed Sep 25 2024
   
   
  '''% Subnet not in table'''
  *>  198.51.100.11/32, Intra, cost '''65536''', area 0.0.0.0
  CE01(config-if)#
<nowiki> </nowiki>    via 203.0.113.141, GigabitEthernet1/0/23
<nowiki>*</nowiki>>  198.51.100.12/32, Intra, cost 91, area 0.0.0.0
  <nowiki> </nowiki>    via 203.0.113.150, Port-channel21
<snip>
   
   
   
   
  CE01(config-if)#do sh ip route 198.51.100.18
  CORE01#ping 198.51.100.11
  Load for five secs: 5%/0%; one minute: 5%; five minutes: 6%
  Type escape sequence to abort.
  Time source is NTP, 15:39:33.129 JST Wed Sep 25 2024
Sending 5, 100-byte ICMP Echos to 198.51.100.11, timeout is 2 seconds:
   
  <nowiki>!!!!!
  Routing entry for 198.51.100.16/30
Success rate is 100 percent (5/5), round-trip min/avg/max = 19/25/35 ms</nowiki>
   Known via "connected", distance 0, metric 0 (connected, via interface)
|
  CORE01#show ip route 0.0.0.0
  Routing entry for 0.0.0.0/0, supernet
   Known via "ospf 1", distance 110, metric 190, candidate default path
  Tag 1, type extern 1
  Last update from 203.0.113.150 on Port-channel21, 00:00:06 ago
   Routing Descriptor Blocks:
   Routing Descriptor Blocks:
   * directly connected, via Vlan21
   * '''203.0.113.150''', from 198.51.100.12, 00:00:06 ago, via '''Port-channel21'''
       Route metric is 0, traffic share count is 1
       Route metric is 190, traffic share count is 1
|PBR next-hop 切替時は、障害が発生した direct connect の L3 インターフェースがダウンしており、該当のコネクテッド ルートが存在しなくなる必要がある
      Route tag 1
|'''上り : CORE01'''
CE01 OSPF コスト メトリックが 65536 になっており、重くなっています。
疎通自体は可能です。
|-
|-
|スタティック ルーティング
|
|
  CE01(config-if)#do sh run | in ip route [0-9].*6 name
  CPE01#traceroute 198.51.100.1
ip route 198.51.100.240 255.255.255.248 Vlan10 198.51.100'''.6''' name NAT-RT01_NAT_Pool
Type escape sequence to abort.
 
  Tracing the route to 198.51.100.1
  CE01(config-if)#do sh ip route 198.51.100.240 255.255.255.248
  VRF info: (vrf in name/id, vrf out name/id)
  Load for five secs: 5%/0%; one minute: 7%; five minutes: 6%
  1 203.0.113.2 71 msec 73 msec 65 msec
Time source is NTP, 15:37:27.052 JST Wed Sep 25 2024
   2 203.0.113.141 82 msec 53 msec 55 msec
   3 203.0.113.129 66 msec *  80 msec
Routing entry for 198.51.100.240/29
   Known via "static", distance 1, metric 0
   Routing Descriptor Blocks:
  '''* 198.51.100.6, via Vlan10'''
      Route metric is 0, traffic share count is 1
|
|
  CE01(config-if)#do sh run | in ip route [0-9].*5 name
  CPE01#traceroute 198.51.100.1
ip route 198.51.100.240 255.255.255.248 Vlan11 198.51.100'''.14 5''' name NAT-RT01_NAT_Pool
Type escape sequence to abort.
 
  Tracing the route to 198.51.100.1
  CE01(config-if)#do sh ip route 198.51.100.240 255.255.255.248
  VRF info: (vrf in name/id, vrf out name/id)
  Load for five secs: 7%/0%; one minute: 6%; five minutes: 6%
  1 203.0.113.2 37 msec 69 msec 38 msec
Time source is NTP, 15:37:48.825 JST Wed Sep 25 2024
  2 203.0.113.150 93 msec 86 msec 88 msec
   3 203.0.113.145 109 msec 110 msec 111 msec
Routing entry for 198.51.100.240/29
   4 203.0.113.133 213 msec *  154 msec
   Known via "static", distance 5, metric 0
|'''上り : CPE01'''
   Routing Descriptor Blocks:
CORE01 のわたりを経由するようになりました。
  '''* 198.51.100.14, via Vlan11'''
      Route metric is 0, traffic share count is 1
|NAT-RT01 グローバル アドレス プール宛スタティックルートが障害切り替えされている
|}
|}


== 動作確認 - ホスト別コマンドリスト ==
== 動作確認 - ホスト別コマンドリスト ==
Catalyst の PBR は設定した機器で動作確認するコマンドがほぼ存在しない。
* ACL カウンターは動作しない
* show route-map のカウンタもハードウェア転送では動作しない
* 一応 ip local policy route-map で自発トラフィックに PBR がかかるため、これで動作確認することは一応可能
** 下手な設定をすると OSPF がダウンしたりするため、少なくとも商用機で未検証のコンフィグを試すのはやらない方が良い
このため、下位側の機器で ping / traceroute を実施するのが動作確認としてマストとなる。
=== CE01 ===
* show ip policy
=== L3SW01 ===
* ping
* traceroute
== リファレンス ==
== リファレンス ==
=== Cisco ===
[https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3850/software/release/16-12/configuration_guide/rtng/b_1612_rtng_3850_cg/configuring_protocol_independent_features.html IP Routing Configuration Guide, Cisco IOS XE Gibraltar 16.12.x (Catalyst 3850 Switches)]


== 脚注 ==
== 脚注 ==

2024年11月3日 (日) 12:05時点における版

Nexus で採用され Catalyst 9000 から実装された GIR について、機能検証を実施しました。

このページにラボシナリオとして、コンフィグや確認コマンド、疎通確認のポイントなどをまとめています。

検証対象として Catalyst 9000V Q200 を使用していますが、実機の Catalyst 9000 シリーズでも同様の動作をするはずです。

目的

GIR の動作について理解を深められること。

通信要件

GIR : BGP / OSPF / HSRP

  • GIR を開始したホストを経路迂回すること
  • GIR を停止したホストに経路復旧すること

検証環境

Cisco Catalyst 9000V Q200 : IOS-XE 17.12.1 x6

構成図

  • Catalyst 3850 : PE01 , CE01 , CE02 , CORE01 , CORE02 , CPE01

PE01 を WAN の機器、CE01 , CE02 , CORE01 , CORE02 , CPE を LAN の機器とする。

20241103 GIR Diagram
20241103 GIR Diagram

IP アドレッシング

文書用例示アドレス (8.8.8.8 を除く)
大種別 小種別 ネットワーク アドレス ホスト インターフェース ホスト アドレス 備考
グローバルアドレス WAN グローバルアドレス 203.0.113.128/30 PE01 Gi1/0/1 203.0.113.129/30 BGP でデフォルトルートを広報
CE01 Gi1/0/23 203.0.113.130/30 PE ルータからデフォルトルートを受信
203.0.113.132/30 PE01 Gi1/0/1 203.0.113.133/30 BGP でデフォルトルートを広報
CE02 Gi1/0/23 203.0.113.134/30 PE ルータからデフォルトルートを受信
198.51.100.0/24 PE01 Lo0 198.51.100.1/32 上り方向 ping の宛先
LAN グローバル アドレス CE01 Lo0 198.51.100.11/32 iBGP ピア用
CE02 Lo0 198.51.100.12/32 iBGP ピア用
CORE01 Lo0 198.51.100.21/32
CORE02 Lo0 198.51.100.22/32
203.0.113.128/25 CE01 Po21 203.0.113.137/30 CE01 <-> CE02 間わたり OSPF P2P リンク

迂回経路用

CE02 Po21 203.0.113.138/30
CE01 Gi1/0/1 203.0.113.141/30 CE01 <-> CORE01 間 OSPF P2P リンク
CORE01 Gi1/0/23 203.0.113.142/30
CE02 Gi1/0/2 203.0.113.145/30 CE02 <-> CORE02 間 OSPF P2P リンク
CORE02 Gi1/0/24 203.0.113.146/30
CE01 Po21 203.0.113.149/30 CORE01 <-> CORE02 間 OSPF P2P リンク

迂回経路用

CE02 Po21 203.0.113.150/30
203.0.113.0/25 CE01 Vlan1 203.0.113.2/25

HSRP .1

CPE 収容 SVI
CE02 Vlan1 203.0.113.3/25

HSRP .1

CPE 収容 SVI
CPE Vlan1 203.0.113.101/25 CPE01 用ホストアドレス
プライベートアドレス LAN プライベート アドレス なし

コンフィギュレーション

ここではプロトコル・ホスト別にコンフィギュレーションを簡単に解説します。

自分でコンフィグを組んでみたい人向けに、デフォルトでは表示しません。

PE01

PE01 コンフィグ
プロトコル PE01 コンフィグ 解説
eBGP
PE01#show run | s back0|net1/0/[1-2]$|router bgp|ip route 0

interface Loopback0
 ip address 198.51.100.1 255.255.255.255

interface GigabitEthernet1/0/1
 description CE01_Gi1/0/23
 no switchport
 ip address 203.0.113.129 255.255.255.252

interface GigabitEthernet1/0/2
 description CE02_Gi1/0/23
 no switchport
 ip address 203.0.113.133 255.255.255.252

router bgp 64496
 bgp router-id 198.51.100.1
 bgp log-neighbor-changes
 bgp deterministic-med
 timers bgp 10 30
 neighbor 203.0.113.130 remote-as 64512
 neighbor 203.0.113.130 description CE01
 neighbor 203.0.113.130 default-originate
 neighbor 203.0.113.130 soft-reconfiguration inbound
 neighbor 203.0.113.134 remote-as 64512
 neighbor 203.0.113.134 description CE02
 neighbor 203.0.113.134 default-originate
 neighbor 203.0.113.134 soft-reconfiguration inbound

ip route 0.0.0.0 0.0.0.0 Null0 254
CE01 , 02 と eBGP ピアを張るための設定

CE01 , 02

CE01 , 02 コンフィグ
プロトコル CE01 コンフィグ CE02 コンフィグ 解説
eBGP
CE01#show run | s back0|net1/0/23$|^router bgp|route-map

interface Loopback0
 ip address 198.51.100.11 255.255.255.255

interface GigabitEthernet1/0/23
 description PE01_Gi1/0/1
 no switchport
 ip address 203.0.113.130 255.255.255.252

router bgp 64512
 bgp router-id 198.51.100.11
 bgp log-neighbor-changes
 bgp deterministic-med
 network 203.0.113.0 mask 255.255.255.128
 timers bgp 10 30
 neighbor 198.51.100.12 remote-as 64512
 neighbor 198.51.100.12 description CE02
 neighbor 198.51.100.12 update-source Loopback0
 neighbor 198.51.100.12 next-hop-self
 neighbor 198.51.100.12 soft-reconfiguration inbound
 neighbor 203.0.113.129 remote-as 64496
 neighbor 203.0.113.129 description PE01
 neighbor 203.0.113.129 soft-reconfiguration inbound
 neighbor 203.0.113.129 route-map LP300 in
 neighbor 203.0.113.129 route-map MED100 out

route-map LP300 permit 10
 set local-preference 300

route-map MED100 permit 10
 set metric 100
CE02#show run | s back0|net1/0/23$|^router bgp|route-map

interface Loopback0
 ip address 198.51.100.12 255.255.255.255

interface GigabitEthernet1/0/23
 description PE01_Gi1/0/2
 no switchport
 ip address 203.0.113.134 255.255.255.252

router bgp 64512
 bgp router-id 198.51.100.12
 bgp log-neighbor-changes
 bgp deterministic-med
 network 203.0.113.0 mask 255.255.255.128
 timers bgp 10 30
 neighbor 198.51.100.11 remote-as 64512
 neighbor 198.51.100.11 description CE01
 neighbor 198.51.100.11 update-source Loopback0
 neighbor 198.51.100.11 next-hop-self
 neighbor 198.51.100.11 soft-reconfiguration inbound
 neighbor 203.0.113.133 remote-as 64496
 neighbor 203.0.113.133 description PE01
 neighbor 203.0.113.133 soft-reconfiguration inbound
 neighbor 203.0.113.133 route-map LP100 in
 neighbor 203.0.113.133 route-map MED300 out

route-map MED300 permit 10
 set metric 300

route-map LP100 permit 10
 set local-preference 100
PE01 と eBGP ピア、

CE01 と CE02 で iBGP ピアを 張るコンフィグ route-map LP300 LP300 で上りトラフィックを優先する 値が高いほうが優先 route-map MED100 MED100 で下りトラフィックを優先する 値が低いほうが優先

OSPF
CE01#show run | s net1/0/1$|net1/0/2[1-2]$|el21|^router ospf

interface Port-channel21
 description CE02_Po21
 no switchport
 ip address 203.0.113.137 255.255.255.252
 ip ospf network point-to-point
 ip ospf cost 100

interface GigabitEthernet1/0/1
 description CORE01_Gi1/0/23
 no switchport
 ip address 203.0.113.141 255.255.255.252
 ip ospf network point-to-point
 ip ospf cost 1

interface GigabitEthernet1/0/21
 description CE02_Gi1/0/21
 no switchport
 no ip address
 channel-group 21 mode active

interface GigabitEthernet1/0/22
 description CE02_Gi1/0/22
 no switchport
 no ip address
 channel-group 21 mode active

router ospf 1
 router-id 198.51.100.11
 passive-interface default
 no passive-interface GigabitEthernet1/0/1
 no passive-interface Port-channel21
 network 198.51.100.11 0.0.0.0 area 0.0.0.0
 network 203.0.113.136 0.0.0.3 area 0.0.0.0
 network 203.0.113.140 0.0.0.3 area 0.0.0.0
 default-information originate metric 1 metric-type 1
CE02#show run | s net1/0/2$|net1/0/2[1-2]$|el21|^router ospf

interface Port-channel21
 description CE01_Po21
 no switchport
 ip address 203.0.113.138 255.255.255.252
 ip ospf network point-to-point
 ip ospf cost 100

interface GigabitEthernet1/0/2
 description CORE02_Gi1/0/24
 no switchport
 ip address 203.0.113.145 255.255.255.252
 ip ospf network point-to-point
 ip ospf cost 40

interface GigabitEthernet1/0/21
 description CE01_Gi1/0/21
 no switchport
 no ip address
 channel-group 21 mode active

interface GigabitEthernet1/0/22
 description CE01_Gi1/0/22
 no switchport
 no ip address
 channel-group 21 mode active

router ospf 1
 router-id 198.51.100.12
 passive-interface default
 no passive-interface GigabitEthernet1/0/2
 no passive-interface Port-channel21
 network 198.51.100.12 0.0.0.0 area 0.0.0.0
 network 203.0.113.144 0.0.0.3 area 0.0.0.0
 network 203.0.113.128 0.0.0.127 area 0.0.0.0
 default-information originate metric 100 metric-type 1
CE01 , 02 間

CE01 , 02 <-> CORE01 , 02 間 OSPF iBGP で使用する Loopback を広報する

GIR
CE01#show run | s mainte
maintenance-template BGP_OSPF
 router bgp 64512
 router ospf 1
system mode maintenance
 timeout 15
 template BGP_OSPF
 failsafe 5
CE02#show run | s mainte
maintenance-template BGP_OSPF
 router bgp 64512
 router ospf 1
system mode maintenance
 timeout 15
 template BGP_OSPF
 failsafe 5
CORE01 , 02 コンフィグ
種別 CORE01 コンフィグ CORE02 コンフィグ 解説
OSPF
CORE01#show run | s net1/0/2[1-2]$|el21|^router ospf

interface Port-channel21
 description CORE02_Po21
 no switchport
 ip address 203.0.113.149 255.255.255.252
 ip ospf network point-to-point
 ip ospf cost 50

interface GigabitEthernet1/0/21
 description CORE02_Gi1/0/21
 no switchport
 no ip address
 channel-group 21 mode active

interface GigabitEthernet1/0/22
 description CORE02_Gi1/0/22
 no switchport
 no ip address
 channel-group 21 mode active

router ospf 1
 router-id 198.51.100.21
 passive-interface default
 no passive-interface GigabitEthernet1/0/23
 no passive-interface Port-channel21
 network 198.51.100.21 0.0.0.0 area 0.0.0.0
 network 203.0.113.0 0.0.0.127 area 0.0.0.0
 network 203.0.113.140 0.0.0.3 area 0.0.0.0
 network 203.0.113.148 0.0.0.3 area 0.0.0.0
CORE02#show run | s net1/0/2[1-2]$|el21|^router ospf

interface Port-channel21
 description CORE01_Po21
 no switchport
 ip address 203.0.113.150 255.255.255.252
 ip ospf network point-to-point
 ip ospf cost 50

interface GigabitEthernet1/0/21
 description CORE01_GI1/0/21
 no switchport
 no ip address
 channel-group 21 mode active

interface GigabitEthernet1/0/22
 description CORE01_GI1/0/22
 no switchport
 no ip address
 channel-group 21 mode active

router ospf 1
 router-id 198.51.100.22
 passive-interface default
 no passive-interface GigabitEthernet1/0/24
 no passive-interface Port-channel21
 network 198.51.100.22 0.0.0.0 area 0.0.0.0
 network 203.0.113.0 0.0.0.127 area 0.0.0.0
 network 203.0.113.144 0.0.0.3 area 0.0.0.0
 network 203.0.113.148 0.0.0.3 area 0.0.0.0
HSRP
CORE01#show run | s net1/0/1$|Vlan1$
interface GigabitEthernet1/0/1
 description CPE01_Gi1/0/23
 switchport mode access
 switchport nonegotiate
 spanning-tree portfast
 spanning-tree bpdufilter enable

interface Vlan1
 ip address 203.0.113.2 255.255.255.128
 standby version 2
 standby 1 ip 203.0.113.1
 standby 1 priority 110
 standby 1 preempt
CORE02#show run | s net1/0/1$|Vlan1$
interface GigabitEthernet1/0/1
 description CPE01_Gi1/0/24
 switchport mode access
 switchport nonegotiate
 spanning-tree portfast
 spanning-tree bpdufilter enable

interface Vlan1
 ip address 203.0.113.3 255.255.255.128
 standby version 2
 standby 1 ip 203.0.113.1
 standby 1 priority 105
 standby 1 preempt
GIR
CORE01#show run | s mainte
maintenance-template OSPF_HSRP
 router ospf 1
 hsrp Vlan1 1

system mode maintenance
 timeout 15
 template OSPF_HSRP
 failsafe 5
CORE02#show run | s mainte
maintenance-template OSPF_HSRP
 router ospf 1
 hsrp Vlan1 1

system mode maintenance
 timeout 15
 template OSPF_HSRP
 failsafe 5
CPE01 コンフィグ
種別 CPE01 コンフィグ 解説
ホスト
CPE01#show run | s net1/0/2[3-4]|Vlan1|ip route 0

interface GigabitEthernet1/0/23
 description CORE01_Gi1/0/1
 switchport mode access
 switchport nonegotiate
 spanning-tree portfast
 spanning-tree bpdufilter enable

interface GigabitEthernet1/0/24
 description CORE02_Gi1/0/1
 switchport mode access
 switchport nonegotiate
 spanning-tree portfast
 spanning-tree bpdufilter enable

interface Vlan1
 ip address 203.0.113.101 255.255.255.128

ip route 0.0.0.0 0.0.0.0 203.0.113.1

疎通・経路確認

コマンドリスト

PE01

PE01#ping 203.0.113.101
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 203.0.113.101, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 70/87/103 ms
PE01#
PE01#traceroute 203.0.113.101
Type escape sequence to abort.
Tracing the route to 203.0.113.101
VRF info: (vrf in name/id, vrf out name/id)
  1 203.0.113.130 40 msec 40 msec 38 msec
  2 203.0.113.142 81 msec 54 msec 61 msec
  3 203.0.113.101 [AS 64512] 103 msec *  105 msec

通常時は CE01 -> CORE01 -> CPE01 を経由します。

PE01#show ip bgp
BGP table version is 11, local router ID is 198.51.100.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
              t secondary path, L long-lived-stale,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
      0.0.0.0          0.0.0.0                                0 i
 *>   203.0.113.0/25   203.0.113.130          100             0 64512 i
 *                     203.0.113.134          300             0 64512 i

CE01 宛を優先させています。

CORE01

CORE01#show ip route 0.0.0.0
Routing entry for 0.0.0.0/0, supernet
  Known via "ospf 1", distance 110, metric 2, candidate default path
  Tag 1, type extern 1
  Last update from 203.0.113.141 on GigabitEthernet1/0/23, 00:01:20 ago
  Routing Descriptor Blocks:
  * 203.0.113.141, from 198.51.100.11, 00:01:20 ago, via GigabitEthernet1/0/23
      Route metric is 2, traffic share count is 1
      Route tag 1
CORE01#
CORE01#show standby brief
                     P indicates configured to preempt.
                     |
Interface   Grp  Pri P State   Active          Standby         Virtual IP
Vl1         1    110 P Active  local           203.0.113.3     203.0.113.1

OSPF メトリック 1 と HSRP Priority 110 で優先させています。

CPE01

CPE01#ping 198.51.100.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 198.51.100.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 77/87/109 ms
CPE01#
CPE01#traceroute 198.51.100.1
Type escape sequence to abort.
Tracing the route to 198.51.100.1
VRF info: (vrf in name/id, vrf out name/id)
  1 203.0.113.2 40 msec 41 msec 72 msec
  2 203.0.113.141 63 msec 66 msec 69 msec
  3 203.0.113.129 89 msec *  84 msec

通常時は CORE01 -> CE01 -> PE01 を経由します。

CE01 GIR BGP + OSPF 動作確認

start maintenance でホストを Remove します。

CE01#start maintenance
Template BGP_OSPF will be applied. Do you want to continue?[confirm]
CE01#
Nov  3 2024 00:43:52 UTC: %MMODE-6-MMODE_SNAPSHOT_CREATE_ENTER_MMODE: Generating current snapshot 'before_maintenance'
Nov  3 2024 00:43:52 UTC: %MMODE-6-MMODE_CLIENT_TRANSITION_START: Maintenance Isolate start for router bgp 64512
Nov  3 2024 00:44:23 UTC: %MMODE-6-MMODE_CLIENT_TRANSITION_COMPLETE: Maintenance Isolate complete for router bgp 64512
Nov  3 2024 00:44:23 UTC: %MMODE-6-MMODE_CLIENT_TRANSITION_START: Maintenance Isolate start for router ospf 1
Nov  3 2024 00:44:53 UTC: %MMODE-6-MMODE_CLIENT_TRANSITION_COMPLETE: Maintenance Isolate complete for router ospf 1
Nov  3 2024 00:44:53 UTC: %MMODE-6-MMODE_ISOLATED: System is in Maintenance
CE01 BGP + OSPF GIR 動作確認
確認 通常時 CE01 メンテナンス時 備考
BGP
PE01#traceroute 203.0.113.101
Type escape sequence to abort.
Tracing the route to 203.0.113.101
VRF info: (vrf in name/id, vrf out name/id)
  1 203.0.113.130 39 msec 65 msec 37 msec
  2 203.0.113.142 66 msec 75 msec 67 msec
  3 203.0.113.101 [AS 64512] 94 msec *  94 msec
PE01#show ip bgp
BGP table version is 13, local router ID is 198.51.100.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
              t secondary path, L long-lived-stale,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
      0.0.0.0          0.0.0.0                                0 i
 *>   203.0.113.0/25   203.0.113.130          100             0 64512 i
 *                     203.0.113.134          300             0 64512 i
PE01#traceroute 203.0.113.101
Type escape sequence to abort.
Tracing the route to 203.0.113.101
VRF info: (vrf in name/id, vrf out name/id)
  1 203.0.113.134 50 msec 30 msec 35 msec
  2 203.0.113.146 57 msec 67 msec 67 msec
  3 203.0.113.101 [AS 64512] 125 msec *  135 msec
PE01#
PE01#show ip bgp
BGP table version is 8, local router ID is 198.51.100.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
              t secondary path, L long-lived-stale,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
      0.0.0.0          0.0.0.0                                0 i
 *>   203.0.113.0/25   203.0.113.134          300             0 64512 i
上り : CPE01

CORE01 はわたりを経由するように変更されています。 下り : PE01 PE01 は CE02 を経由するように変更されています。 CE01 は BGP アドレス広報を停止していました。

CE01(maint-mode)#show ip bgp summary
BGP router identifier 198.51.100.11, local AS number 64512
BGP table version is 20, main routing table version 20
2 network entries using 496 bytes of memory
5 path entries using 680 bytes of memory
5/2 BGP path/bestpath attribute entries using 1480 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 2680 total bytes of memory
1 received paths for inbound soft reconfiguration
BGP activity 5/3 prefixes, 22/17 paths, scan interval 60 secs
2 networks peaked at 08:12:51 Nov 3 2024 JST (03:45:55.560 ago)

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
198.51.100.12   4        64512     153     160       20    0    0 00:22:50        2
203.0.113.129   4        64496     155     159       20    0    0 00:23:14        1
CE01(maint-mode)#show ip bgp
BGP table version is 20, local router ID is 198.51.100.11
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
              t secondary path, L long-lived-stale,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 * i  0.0.0.0          198.51.100.12            0    100      0 64496 i
 *>                    203.0.113.129                 300      0 64496 i
 * i  203.0.113.0/25   198.51.100.12           41    100      0 i
 *>                    203.0.113.142        65536         32768 i
OSPF
CE02#show ip route 0.0.0.0
Routing entry for 0.0.0.0/0, supernet
  Known via "ospf 1", distance 110, metric 81, candidate default path
  Tag 1, type extern 1
  Last update from 203.0.113.137 on Port-channel21, 00:00:20 ago
  Routing Descriptor Blocks:
  * 203.0.113.137, from 198.51.100.11, 00:00:20 ago, via Port-channel21
      Route metric is 81, traffic share count is 1
      Route tag 1
CE02#show ip route 0.0.0.0
Routing entry for 0.0.0.0/0, supernet
  Known via "bgp 64512", distance 20, metric 0, candidate default path
  Tag 64496, type external
  Last update from 203.0.113.133 00:00:07 ago
  Routing Descriptor Blocks:
  * 203.0.113.133, from 203.0.113.133, 00:00:07 ago
      opaque_ptr 0x7477AABBBCC0
      Route metric is 0, traffic share count is 1
      AS Hops 1
      Route tag 64496
      MPLS label: none
上り : CE02

通常時は CE01 宛わたり Po21 を向いていますが、CE01 GIR 中は PE01 宛 Gi1/0/23 を向いています。

CORE01#show ip route 0.0.0.0
Routing entry for 0.0.0.0/0, supernet
  Known via "ospf 1", distance 110, metric 2, candidate default path
  Tag 1, type extern 1
  Last update from 203.0.113.141 on GigabitEthernet1/0/23, 00:07:11 ago
  Routing Descriptor Blocks:
  * 203.0.113.141, from 198.51.100.11, 00:07:11 ago, via GigabitEthernet1/0/23
      Route metric is 2, traffic share count is 1
      Route tag 1


CORE01#show ip ospf 1 rib

            OSPF Router with ID (198.51.100.21) (Process ID 1)


                Base Topology (MTID 0)

OSPF local RIB
Codes: * - Best, > - Installed in global RIB

*>  198.51.100.11/32, Intra, cost 65536, area 0.0.0.0
      via 203.0.113.141, GigabitEthernet1/0/23
*>  198.51.100.12/32, Intra, cost 91, area 0.0.0.0
      via 203.0.113.150, Port-channel21
<snip>


CORE01#ping 198.51.100.11
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 198.51.100.11, timeout is 2 seconds:
!!!!!
 Success rate is 100 percent (5/5), round-trip min/avg/max = 19/25/35 ms
CORE01#show ip route 0.0.0.0
Routing entry for 0.0.0.0/0, supernet
  Known via "ospf 1", distance 110, metric 190, candidate default path
  Tag 1, type extern 1
  Last update from 203.0.113.150 on Port-channel21, 00:00:06 ago
  Routing Descriptor Blocks:
  * 203.0.113.150, from 198.51.100.12, 00:00:06 ago, via Port-channel21
      Route metric is 190, traffic share count is 1
      Route tag 1
上り : CORE01

CE01 の OSPF コスト メトリックが 65536 になっており、重くなっています。 疎通自体は可能です。

CPE01#traceroute 198.51.100.1
Type escape sequence to abort.
Tracing the route to 198.51.100.1
VRF info: (vrf in name/id, vrf out name/id)
  1 203.0.113.2 71 msec 73 msec 65 msec
  2 203.0.113.141 82 msec 53 msec 55 msec
  3 203.0.113.129 66 msec *  80 msec
CPE01#traceroute 198.51.100.1
Type escape sequence to abort.
Tracing the route to 198.51.100.1
VRF info: (vrf in name/id, vrf out name/id)
  1 203.0.113.2 37 msec 69 msec 38 msec
  2 203.0.113.150 93 msec 86 msec 88 msec
  3 203.0.113.145 109 msec 110 msec 111 msec
  4 203.0.113.133 213 msec *  154 msec
上り : CPE01

CORE01 のわたりを経由するようになりました。

動作確認 - ホスト別コマンドリスト

リファレンス

脚注