Dell Networking SONiC IPv4およびIPv6静的ルート
Summary: この文書では、Dell SONiC Management Framework CLIでの静的ルートの設定について説明します。
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Instructions
|
記事の前提条件 この文書では、Dell SONiC 4.1を実行しているスイッチを使用します。この構成では、標準インターフェイスの命名を使用しています。Dell SONiCのさまざまなインターフェイス命名モードの詳細については、Dell Networking Sシリーズ202172デルの文書を参照してください。基本インターフェイス構成 - SONiC 4.0 |
索引
導入IPv4静的ルート IPv6静的ルート
概要
固定の静的ルートを構成して、ルーティングされたトラフィックを指定された宛先デバイスと交換できるようにします。たとえば、動的ルートが使用できない場合は、静的ルートをバックアップとして使用するか、他のルートが使用できない場合はネットワーク ゲートウェイに到達します。静的ルートの設計に関する推奨事項:
- 同じVRFに重複する静的ルートがないことを確認します。
- トラフィックをルーティングするには、次のホップ到達可能性を確保する必要がある
IPv4静的ルート
構成構文:
admin@sonic:~$ sonic-cli
sonic# configure
sonic(config)# ip route [vrf vrf-name] dest-ip-prefix {next-hop-ip [interface interfacetype interface-number] | interface interface-type interface-number | blackhole} [nexthopvrf vrf-name] [tag tag-name] [track id] [dest-metric] |
[Explanation]: 静的 IPv4 ルートを設定するには、宛先アドレスプレフィックスと次のオプション値を入力します。
|
IPv4の設定例
admin@sonic:~$ sonic-cli sonic# configure sonic(config)# ip route 6.6.6.6/32 5.5.5.1 sonic(config)# ip route 7.7.7.7/32 blackhole 100 sonic(config)# ip route 4.4.4.0/24 4.4.4.1 nexthop-vrf Vrf-GREEN 200 sonic(config)# ip route vrf Vrf-RED 3.3.3.0/24 10.0.0.2 nexthop-vrf Vrf-GREEN sonic(config)# ip route vrf Vrf-RED 8.8.8.0/24 interface Eth1/4 nexthop-vrf Vrf-GREEN 36 |
IPv4静的ルートの確認
コマンド show ip route static または show ip route を使用して、デフォルト ルーティング テーブルにIPv4静的ルートを表示します。コマンド show ip route vrf または show ip route vrf static を使用して、デフォルトのルーティング テーブルにIPv4静的ルートを表示します。
sonic# show ip route static Codes: K - kernel route, C - connected, S - static, B - BGP, O - OSPF > - selected route, * - FIB route, q - queued route, r - rejected route Destination Gateway Dist/Metric Last Update -------------------------------------------------------------------------------------------------------------------------------- S>* 4.4.4.0/24 via 4.4.4.1 Eth1/6(vrf Vrf-GREEN) 200/0 00:54:46 ago S>* 6.6.6.6/32 via 5.5.5.1 Eth1/5 1/0 01:09:10 ago S>* 7.7.7.7/32 Unreachable (blackhole) 100/0 01:23:19 ago |
sonic# show ip route vrf Vrf-RED
Codes: K - kernel route, C - connected, S - static, B - BGP, O - OSPF
> - selected route, * - FIB route, q - queued route, r - rejected route
Destination Gateway Dist/Metric Last Update
--------------------------------------------------------------------------------------------------------------------------------
S>* 3.3.3.0/24 via 10.0.0.2 Eth1/9(vrf Vrf-GREEN) 1/0 00:00:17 ago
S>* 8.8.8.0/24 Direct Eth1/4(vrf Vrf-GREEN) 36/0 01:00:35 ago |
IPv6静的ルート
構成構文:
admin@sonic:~$ sonic-cli
sonic# configure
sonic(config)# ipv6 route [vrf vrf-name] dest-ipv6-prefix {next-hop-ipv6 [interface interface-type interface-number] | interface interface-type interface-number | blackhole} [nexthop-vrf vrf-name] [tag tag-name] [track id] [dest-metric] |
[Explanation]: 静的 IPv6 ルートを設定するには、宛先アドレスプレフィックスと次のオプション値を入力します。
|
IPv6の設定例
admin@sonic:~$ sonic-cli sonic# configure sonic(config)# ipv6 route 3030::3300/120 3030::3301 36 sonic(config)# ipv6 route 2001:db6::/32 interface Eth1/7 150 sonic(config)# ipv6 route 2006::/24 blackhole 200 sonic(config)# ipv6 route vrf Vrf-RED 1001::/24 interface Eth1/4 nexthop-vrf Vrf-GREEN 20 sonic(config)# ipv6 route vrf Vrf-RED 1002::/24 interface Eth1/2 nexthop-vrf Vrf-GREEN 50 |
IPv6静的ルートの確認
コマンド show ipv6 route static または show ip route を使用して、デフォルトのルーティング テーブルにIPv6静的ルートを表示します。コマンド show ipv6 route vrf static を使用して、デフォルトのルーティング テーブルにIPv6静的ルートを表示します。
sonic# show ipv6 route static Codes: K - kernel route, C - connected, S - static, B - BGP, O - OSPF > - selected route, * - FIB route, q - queued route, r - rejected route Destination Gateway Dist/Metric Last Update -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- S>* 2001:db6::/32 Direct Eth1/7 150/0 00:01:07 ago S>* 2006::/24 Unreachable (blackhole) 200/0 00:19:06 ago S 3030::3300/120 via 3030::3301 36/0 00:08:52 ago |
sonic# show ipv6 route vrf Vrf-RED static
Codes: K - kernel route, C - connected, S - static, B - BGP, O - OSPF
> - selected route, * - FIB route, q - queued route, r - rejected route
Destination Gateway Dist/Metric Last Update
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
S>* 1001::/24 Direct Eth1/4(vrf Vrf-GREEN) 20/0 00:14:44 ago
S> 1002::/24 Direct Eth1/2(vrf Vrf-GREEN) 50/0 00:14:30 ago |
Affected Products
Enterprise SONiC Distribution, PowerSwitch E3200-ON Series, Dell EMC Networking N3200-ON, PowerSwitch S5212F-ON, PowerSwitch S5224F-ON, PowerSwitch S5232F-ON, PowerSwitch S5248F-ON, PowerSwitch S5296F-ON, PowerSwitch Z9100-ON, PowerSwitch Z9264F-ON
, PowerSwitch Z9332F-ON, PowerSwitch Z9432F-ON
...
Article Properties
Article Number: 000218054
Article Type: How To
Last Modified: 25 Jun 2025
Version: 5
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.