DELL Networking SONiC: レイヤ 3 インターフェイスで IPv4 アドレスと最大転送単位を設定する方法

Summary: この記事では、Dell Networking SONiCでIPv4アドレスと最大転送単位(MTU)インターフェイスを構成する方法について説明します。この記事では、Dell SONiC 4.1を実行しているスイッチを使用します。

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

 
必要条件
概念を示すために、標準的なインターフェイスの命名を使用しています。詳細については202172 Dellの記事「Dell Networking Sシリーズ: インターフェイスの命名に関する詳細については、「基本的なインターフェイス設定 - SONiC 4.0」を参照してください。


索引

IPアドレスを割り当てます。

Mtu
 

IPアドレスを割り当てます。

構成構文
コマンド 説明
admin@DELLSONiC:~$ sonic-cli
Dell Managementコマンド ライン インターフェイスの起動
DELLSONiC# configure terminal
設定モードを起動します
DELLSONiC(config)# interface <Eth slot/port><Vlan ID><PortChannel ID><Eth slot/port.subport><Loopback ID>
インターフェイス、VLAN、PortChannel、サブインターフェイス、ループバックを設定します。
DELLSONiC(conf-if-XXXX)# ip address A.B.C.D/mask
IPアドレスをマスクで設定します。
DELLSONiC(conf-if-XXXX)# no ip address A.B.C.D/mask
IPアドレスを削除します。
DELLSONiC(conf-if-XXXX)# no shutdown
インターフェイスがシャットダウンされている場合は、インターフェイスのシャットダウンを解除します。

IPアドレスを確認するコマンドを表示します。
コマンド 説明
admin@DELLSONiC:~$ sonic-cli
Dell Managementコマンド ライン インターフェイスの起動
DELLSONiC# configure terminal
設定モードを起動します
DELLSONiC# show ip interfaces
インターフェイスで構成されたIPを表示します。
DELLSONiC# show running-configuration interface <Eth slot/port><Vlan ID><PortChannel ID><Loopback ID> 
インターフェイス構成の表示
 
IPアドレス10.0.0.1/24を使用して、インターフェイスEth 1/1にIPアドレスを設定してみましょう。
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure
DELLSONiC(config)# interface Eth 1/1
DELLSONiC(config-if-Eth1/1)# ip address 10.0.0.1/24
DELLSONiC(config-if-Eth1/1)# end
DELLSONiC#

構成を確認しましょう。
DELLSONiC# show ip interfaces
Flags: U-Unnumbered interface, A-Anycast IP
-----------------------------------------------------------------------------------------------------------------
Interface            IP address/mask                              VRF                 Admin/Oper     Flags
-----------------------------------------------------------------------------------------------------------------
Eth1/1               10.0.0.1/24                                                      up/up
DELLSONiC# show running-configuration interface Eth 1/1
!
interface Eth1/1
 mtu 9100
 no shutdown
 ip address 10.0.0.1/24
DELLSONiC#

 

IP アドレス 10.0.0.1/24 で VLAN 1 の IP アドレスを構成してみましょう。
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure
DELLSONiC(config)# interface Vlan 1
DELLSONiC(config-if-Vlan1)# ip address 10.0.0.1/24
DELLSONiC(config-if-Vlan1)# end
DELLSONiC#

構成を確認しましょう。
DELLSONiC# show ip interfaces
Flags: U-Unnumbered interface, A-Anycast IP
-----------------------------------------------------------------------------------------------------------------
Interface            IP address/mask                              VRF                 Admin/Oper     Flags
-----------------------------------------------------------------------------------------------------------------
Vlan1                10.0.0.1/24                                                      up/up
DELLSONiC# show running-configuration interface Vlan 1
!
interface Vlan1
 ip address 10.0.0.1/24
 
IPアドレス10.0.0.1/24を使用して、PortChannel 1のIPアドレスを設定してみましょう。
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure
DELLSONiC(config)# interface PortChannel 1
DELLSONiC(config-if-po1)# ip address 10.0.0.1/24
DELLSONiC(config-if-po1)# end

構成を確認しましょう。
DELLSONiC# show ip interfaces
Flags: U-Unnumbered interface, A-Anycast IP
-----------------------------------------------------------------------------------------------------------------
Interface            IP address/mask                              VRF                 Admin/Oper     Flags
-----------------------------------------------------------------------------------------------------------------
PortChannel1         10.0.0.1/24                                                      up/up
DELLSONiC# show running-configuration interface PortChannel 1
!
interface PortChannel1
 no shutdown
 ip address 10.0.0.1/24
DELLSONiC#

 

ループバック1にIPアドレス10.0.0.1/32のIPアドレスを設定してみましょう。
 
メモ: ループバックは、/32プレフィックス長またはサブネットのみをサポートします。
 
 
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure
DELLSONiC(config)# interface Loopback 1
DELLSONiC(config-if-lo1)# ip address 10.0.0.1/32
DELLSONiC(config-if-lo1)# end
DELLSONiC#

構成を確認しましょう。
DELLSONiC# show ip interfaces
Flags: U-Unnumbered interface, A-Anycast IP
-----------------------------------------------------------------------------------------------------------------
Interface            IP address/mask                              VRF                 Admin/Oper     Flags
-----------------------------------------------------------------------------------------------------------------
Loopback1            10.0.0.1/32                                                      up/up
DELLSONiC# show running-configuration interface Loopback 1
!
interface Loopback 1
 ip address 10.0.0.1/32
DELLSONiC#
 

エニーキャストIPアドレスの割り当て

エニーキャスト アドレスを構成する方法については、記事「Dell Networking SONiC 静的エニーキャスト ゲートウェイ(エニーキャスト アドレス)を設定する方法」を参照してください。 

 

Mtu

構成構文
コマンド 説明
admin@DELLSONiC:~$ sonic-cli
Dell Managementコマンド ライン インターフェイスの起動
DELLSONiC# configure terminal
設定モードを起動します
DELLSONiC(config)# interface <Eth slot/port><Vlan ID><PortChannel ID><Eth slot/port.subport>
インターフェイス、VLAN、PortChannel、サブインターフェイスを設定します。
DELLSONiC(conf-if-XXXX)# mtu <MTU>
MTUの設定 MTU(1312から9216)を変更します。デフォルト:9100
DELLSONiC(conf-if-XXXX)# no mtu
インターフェイスでデフォルトMTUを設定します(デフォルトは9100)。

MTUを確認するためのShowコマンド。
コマンド 説明
admin@DELLSONiC:~$ sonic-cli
Dell Managementコマンド ライン インターフェイスの起動
DELLSONiC# configure terminal
設定モードを起動します
DELLSONiC# show interface <Eth slot/port><Vlan ID><PortChannel ID>
インターフェイスの詳細を表示します。
DELLSONiC# show running-configuration interface <Eth slot/port><Vlan ID><PortChannel ID>
インターフェイス構成の表示
DELLSONiC#show interface status
インターフェイス ステータスの表示

 

  • MTU構成に関する注意事項

    • VLAN MTU を設定する前に、まず VLAN メンバーで MTU を設定します。VLANのすべてのメンバーは、同じMTU値を持つ必要があります。タグ付きメンバーは、パケット タグを考慮するために、タグなしメンバーよりも 4 バイト高いリンク MTU を持つ必要があります。
    • ポート チャネル MTU を設定する前に、まずポート チャネル メンバーで MTU を設定します。ポート チャネルのすべてのメンバーは、同じMTU値を持つ必要があります。タグ付きメンバーは、パケット タグを考慮するために、タグなしメンバーよりも 4 バイト高いリンク MTU を持つ必要があります。
    • ポート チャネル メンバーのMTUがポート チャネルMTU以上であることを確認します。ポート チャネル MTU を設定した後で、ポート チャネル メンバーに MTU を設定すると、ポート チャネル MTU が更新されない場合があります。システムは、ポート チャネルまたはポート チャネル メンバーに設定されている最小の MTU 値をポート チャネル MTU として選択します。たとえば、ポート チャネルには、リンク MTU が 1522、IP MTU が 1500 のタグ付きメンバーと、リンク MTU が 1518、IP MTU が 1500 のタグなしメンバーが含まれています。ポート チャネルのリンク MTU は 1518 バイト、IP MTU は 1500 バイトを超えることはできません。
インターフェイス Eth 1/1 で MTU を設定しましょう。
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure
DELLSONiC(config)# interface Eth 1/1
DELLSONiC(config-if-Eth1/1)# mtu 1500
DELLSONiC(config-if-Eth1/1)# end

構成を確認しましょう(簡潔にするために出力はGreppedです)。
DELLSONiC# show interface status
--------------------------------------------------------------------------------------------------------------------------------------
Name                Description                   Oper           Reason         AutoNeg   Speed          MTU            Alternate Name
--------------------------------------------------------------------------------------------------------------------------------------
Eth1/1              -                             up             oper-up        off       25000          1500           Ethernet0
DELLSONiC# show running-configuration interface Eth 1/1
!
interface Eth1/1
 mtu 1500
 no shutdown
DELLSONiC# show interface Eth 1/1

Eth1/1 is up, line protocol is up, reason oper-up
Hardware is Eth, address is xx:xx:xx:xx:xx:xx
Mode of IPV4 address assignment: not-set
Mode of IPV6 address assignment: not-set
Interface IPv6 oper status: Disabled
IP MTU 1500 bytes
LineSpeed 25GB, Auto-negotiation off
Link-training: off

 

VLANインターフェイスでMTUを設定してみましょう。
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure
DELLSONiC(config)# interface Vlan 1
DELLSONiC(config-if-Vlan1)# mtu 1500
DELLSONiC(config-if-Vlan1)# end
DELLSONiC#

構成を確認しましょう(簡潔にするために出力はGreppedです)。
DELLSONiC# show interface Vlan 1

Vlan1 is up, line protocol is up
Hardware is Vlan, address is xx:xx:xx:xx:xx:xx
Mode of IPV4 address assignment: not-set
Mode of IPV6 address assignment: not-set
Interface IPv6 oper status: Disabled
IP MTU 1500 bytes
Time since last interface status change: 02:33:17
DELLSONiC# show running-configuration interface Vlan 1
!
interface Vlan1
 mtu 1500

 

MTU 1500 で PortChannel 1 を設定してみましょう。
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure
DELLSONiC(config)# interface PortChannel 1
DELLSONiC(config-if-po1)# mtu 1500
DELLSONiC(config-if-po1)# end
DELLSONiC#

構成を確認しましょう(簡潔にするために出力はGreppedです)。
DELLSONiC# show running-configuration interface PortChannel 1
!
interface PortChannel1 mode on
 mtu 1500
 no shutdown
DELLSONiC# show interface status
--------------------------------------------------------------------------------------------------------------------------------------
Name                Description                   Oper           Reason         AutoNeg   Speed          MTU            Alternate Name
--------------------------------------------------------------------------------------------------------------------------------------
Eth1/1              -                             up             oper-up        off       25000          1500           Ethernet0
Eth1/2              -                             up             oper-up        off       25000          1500           Ethernet1


PortChannel1        -                             up             oper-up        -         25000          1500           -
DELLSONiC# show interface PortChannel 1
PortChannel1 is up, line protocol is up, reason oper-up, mode Static
Hardware is PortChannel, address is xx:xx:xx:xx:xx:xx
Minimum number of links to bring PortChannel up is 1
Mode of IPV4 address assignment: not-set
Mode of IPV6 address assignment: not-set
Graceful shutdown: Disabled
MTU 1500
LineSpeed 25.0GB
Events:

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 Z9264F-ON, PowerSwitch Z9332F-ON , PowerSwitch Z9432F-ON ...
Article Properties
Article Number: 000218581
Article Type: How To
Last Modified: 10 Apr 2024
Version:  5
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.