Dell Networking SONiC: 動的ホスト構成プロトコル スヌーピング
Summary: この記事では、Dell Networking SONiCでの動的ホスト構成プロトコル(DHCP)スヌーピングについて説明します。この文書では、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
|
必要条件
標準インターフェイスの命名は、概念を示すために使用されます。Dell Networking Sシリーズ202172デルの記事を参照してください。基本的なインターフェイス構成 - インターフェイス の命名に関する詳細については、SONiC 4.0を参照してください。 |
索引
導入
DHCPレイヤー2 COPP構成
IPv4 DHCPスヌーピング設定
IPv4 DHCPスヌーピング バインディング テーブル
からのエントリーのクリアIPv4 DHCP スヌーピング情報
の表示IPv6 DHCPスヌーピング設定
IPv6 DHCPスヌーピング バインディング テーブル
からのエントリーのクリアIPv6 DHCP スヌーピング情報の表示
概要
DHCP(Dynamic Host Configuration Protocol)スヌーピングは、ネットワーク内のスイッチがDHCP制御メッセージを監視できるようにするセキュリティ機能です。スイッチは、制御メッセージを使用して、ネットワーク内の不正なDHCPサーバーとクライアントを識別できます。DHCPスヌーピングを有効にすると、スイッチはDHCPサーバーとクライアントの両方からDHCP制御パケットの監視を開始します。システムはこの情報を使用してデータベースを構築します。
DHCPスヌーピング インターフェイスには2つのタイプがあります。信頼できるインターフェイスと信頼できないインターフェイスです。DHCPクライアントを信頼できないインターフェイスに接続し、DHCPサーバーを信頼済みインターフェイスに接続します。
スイッチが信頼できないポート上のクライアントからDHCPメッセージを受信すると、同じVLAN内の信頼できるポートにパケットが転送されます。DHCP サーバに接続するポートを信頼済みとして設定すると、システムは信頼できないインタフェースで受信した DHCP サーバ間メッセージをドロップします。
DHCPスヌーピングは、DHCPヘッダーのクライアントMACアドレスを使用してEthernetヘッダーのソースMACアドレスを確認することで、悪意のあるDHCPクライアントがDHCPリースを取得することを最小限に抑えます。
構成メモ:
- DHCPスヌーピングは、IPv4およびIPv6でサポートされています。
- DHCPv6スヌーピングは、DHCPv6ステートフル サーバーでのみ機能します。
- DHCPスヌーピングをグローバルおよび特定のVLANで有効にします。
- VLAN内のポートを信頼済みまたは信頼できないポートに設定します。
- デフォルトでは、すべてのポートが信頼されていません。
- 信頼できるポートを介してDHCPサーバーを接続します。
- 信頼できないポートを介してDHCPクライアントを接続します。
- 信頼できないインターフェイスでは、ソースMACアドレスがクライアントのハードウェア アドレスと一致しない場合、スイッチはDHCPパケットをドロップします。MAC アドレスの検証 機能を無効にすると、この動作を無効にすることができます。この機能は、ルーティングされるDHCPリレーおよびDHCPユニキャスト リクエスト パケットに使用します。
- DHCP スヌーピングを有効にすると、 MAC アドレスの検証 機能がデフォルトで有効になります。
- DHCPスヌーピングは、スヌーピングが有効になっていないVLANには適用されません。
- DHCPスヌーピング バインディング テーブルへの手動エントリーを構成できます。
- DHCPスヌーピングを有効にする前に、DHCPレイヤー3 COPPルールを削除し、DHCPレイヤー2 COPPルールをインストールします。詳細については、「 DHCPレイヤー2 COPP構成 」の項を参照してください。
DHCPレイヤー2 COPP構成
DHCPスヌーピングを機能させるには、次の設定を実行します。- DHCPレイヤー3 COPPルールをアンインストールします。これはデフォルトのルールです。
admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure terminal DELLSONiC(config)# policy-map copp-system-policy type copp DELLSONiC(config-policy-map)# no class copp-system-dhcp
-
DHCPスヌーピング用のDHCPレイヤー2 COPPルールをインストールします。
admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure terminal DELLSONiC(config)# policy-map copp-system-policy type copp DELLSONiC(config-policy-map)# class copp-system-dhcpl2 DELLSONiC(config-policy-map-flow)# set copp-action copp-system-dhcp
IPv4 DHCPスヌーピング設定
DHCPスヌーピングを設定するには、次の手順を実行します。- DHCPスヌーピングをグローバルに有効にします。
sonic(config)# ip dhcp snooping admin@DELLSONiC:~$ sonic-cli DELLSONiC#configure terminal DELLSONiC(config)# ip dhcp snooping
- DHCPサーバーに接続されているインターフェイスを信頼済みとして構成します。
sonic(config-if)# ip dhcp snooping trust admin@DELLSONiC:~$ sonic-cli DELLSONiC#configure terminal DELLSONiC(config)# interface Eth 1/1 DELLSONiC(config-if-Eth1/1)# ip dhcp snooping trust
DELLSONiC(config-if-Eth1/1)# show configuration ! interface Eth1/1 mtu 9100 speed 100000 unreliable-los auto no shutdown ip dhcp snooping trust DELLSONiC(config-if-Eth1/1)# DELLSONiC# show ip dhcp snooping DHCP snooping is Enabled DHCP snooping source MAC verification is Enabled DHCP snooping is enabled on the following VLANs: 100 200 201 DHCP snooping trusted interfaces: Eth1/1
- VLANまたはVLANリストでDHCPスヌーピングを有効にします。
sonic(config)# ip dhcp snooping vlan {vlan-id | vlan-list}
admin@DELLSONiC:~$ sonic-cli
DELLSONiC#configure terminal
DELLSONiC(config)# ip dhcp snooping vlan 100,200-201
%Info: Configuring only existing vlans in range
メモ: 上記はINFOメッセージです。
DELLSONiC# show ip dhcp snooping DHCP snooping is Enabled DHCP snooping source MAC verification is Enabled DHCP snooping is enabled on the following VLANs: 100 200 201 DHCP snooping trusted interfaces: Eth1/1
- (オプション)DHCP ソース MAC アドレス検証の無効化
sonic(config)# no ip dhcp snooping verify mac-address admin@DELLSONiC:~$ sonic-cli DELLSONiC#configure terminal DELLSONiC(config)# no ip dhcp snooping verify mac-address
DELLSONiC# show ip dhcp snooping DHCP snooping is Enabled DHCP snooping source MAC verification is Disabled DHCP snooping is enabled on the following VLANs: 100 200 201 DHCP snooping trusted interfaces: Eth1/1 DELLSONiC#
- (オプション)DHCPスヌーピング バインディング テーブルへの静的エントリーを作成します。
sonic(config)# ip source binding source-ip-address source-mac-address vlan vlan-id interface interface-name
メモ: IP source bindingコマンドの no 形式を使用して、静的エントリーを削除します。
admin@DELLSONiC:~$ sonic-cli DELLSONiC#configure terminal DELLSONiC(config)# ip source binding 10.10.100.150 aa:bb:cc:dd:11:22 Vlan 100 Eth 1/1
DELLSONiC# show ip dhcp snooping binding Total number of Dynamic bindings: 0 Total number of Static bindings: 1 Total number of Tentative bindings: 0 MAC Address IP Address VLAN Interface Type Lease (Secs) ----------------- --------------- ---- ----------- ------- ----------- aa:bb:cc:dd:11:22 10.10.100.150 100 Eth1/1 static NA DELLSONiC#
IPv4のDHCPスヌーピング バインディング テーブルからのエントリーのクリア
次のコマンドを使用して、すべてまたは特定の動的エントリーをクリアします。- すべての動的IP DHCPスヌーピング バインディング エントリーをクリアします。
sonic(config)# clear ip dhcp snooping binding
- 特定の動的IP DHCPスヌーピング バインディング エントリーをクリアします。
sonic(config)# clear ip dhcp snooping binding source-ip-address source-mac-address vlan vlan-id interface interface-name
- DHCPスヌーピング統計情報のクリア:
sonic# clear ip dhcp snooping statistics
IPv4 の DHCP スヌーピング情報を表示します。
- DHCPスヌーピングに関する一般的な情報を表示します。
sonic# show ip dhcp snooping admin@DELLSONiC:~$ sonic-cli DELLSONiC# show ip dhcp snooping DHCP snooping is Enabled DHCP snooping source MAC verification is Disabled DHCP snooping is enabled on the following VLANs: 100 200 201 DHCP snooping trusted interfaces: Eth1/1
- DHCPスヌーピング バインディング データベースを表示します。
sonic# show ip dhcp snooping binding admin@DELLSONiC:~$ sonic-cli DELLSONiC# show ip dhcp snooping binding Total number of Dynamic bindings: 0 Total number of Static bindings: 1 Total number of Tentative bindings: 0 MAC Address IP Address VLAN Interface Type Lease (Secs) ----------------- --------------- ---- ----------- ------- ----------- aa:bb:cc:dd:11:22 10.10.100.150 100 Eth1/1 static NA
- DHCPスヌーピング統計情報の表示:
sonic# show ip dhcp snooping statistics admin@DELLSONiC:~$ sonic-cli DELLSONiC# show ip dhcp snooping statistics Interface MAC Verify Client Ifc DHCP Server Failures Mismatch Msgs Recvd --------------- ---------- ---------- ----------- Eth1/1 0 0 0 Eth1/2 0 0 0 Eth1/3 0 0 0 Eth1/4 0 0 0 Eth1/5 0 0 0 Eth1/6 0 0 0 Eth1/7 0 0 0
IPv6 の DHCP スヌーピングを設定します。
DHCPスヌーピングを設定するには、次の手順を実行します。
- DHCPスヌーピングをグローバルに有効にします。
sonic(config)# ipv6 dhcp snooping admin@DELLSONiC:~$ sonic-cli DELLSONiC#configure terminal DELLSONiC(config)# ipv6 dhcp snooping
DELLSONiC# show ipv6 dhcp snooping DHCPv6 snooping is Enabled DHCPv6 snooping source MAC verification is Enabled DHCPv6 snooping is enabled on the following VLANs: DHCPv6 snooping trusted interfaces: DELLSONiC#
- DHCPサーバーに接続されているインターフェイスを信頼済みとして構成します。
sonic(config-if)# ipv6 dhcp snooping trust admin@DELLSONiC:~$ sonic-cli DELLSONiC#configure terminal DELLSONiC(config)# interface Eth 1/1 DELLSONiC(config-if-Eth1/1)# ipv6 dhcp snooping trust
DELLSONiC(config-if-Eth1/1)# show configuration ! interface Eth1/1 mtu 9100 speed 100000 unreliable-los auto no shutdown ip dhcp snooping trust ipv6 dhcp snooping trust DELLSONiC(config-if-Eth1/1)#
DELLSONiC# show ipv6 dhcp snooping DHCPv6 snooping is Enabled DHCPv6 snooping source MAC verification is Enabled DHCPv6 snooping is enabled on the following VLANs: DHCPv6 snooping trusted interfaces: Eth1/1
- VLANまたはVLANリストでDHCPスヌーピングを有効にします。
sonic(config)# ipv6 dhcp snooping vlan {vlan-id | vlan-list}
admin@DELLSONiC:~$ sonic-cli
DELLSONiC# configure
DELLSONiC(config)# ipv6 dhcp snooping vlan 100,200-201
%Info: Configuring only existing vlans in range
メモ: 上記はINFOメッセージです。
DELLSONiC# show ipv6 dhcp snooping DHCPv6 snooping is Enabled DHCPv6 snooping source MAC verification is Enabled DHCPv6 snooping is enabled on the following VLANs: 100 200 201 DHCPv6 snooping trusted interfaces: Eth1/1
- (オプション)DHCP ソース MAC アドレス検証の無効化
sonic(config)# no ipv6 dhcp snooping verify mac-address admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure DELLSONiC(config)# no ipv6 dhcp snooping verify mac-address
DELLSONiC# show ipv6 dhcp snooping DHCPv6 snooping is Enabled DHCPv6 snooping source MAC verification is Disabled DHCPv6 snooping is enabled on the following VLANs: 100 200 201 DHCPv6 snooping trusted interfaces: Eth1/1 DELLSONiC#
- (オプション)DHCPスヌーピング バインディング テーブルへの静的エントリーを作成します。
sonic(config)# ipv6 source binding source-ip-address source-mac-address vlan vlan-id interface interface-name admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure DELLSONiC(config)# ipv6 source binding 2001:db8:3333::7778 aa:bb:cc:dd:11:11 Vlan 100 Eth 1/1
DELLSONiC# show ipv6 dhcp snooping binding Total number of Dynamic bindings: 0 Total number of Static bindings: 1 Total number of Tentative bindings: 0 MAC Address IPv6 Address VLAN Interface Type Lease (Secs) ----------------- --------------- ---- ----------- ------- ----------- aa:bb:cc:dd:11:11 2001:db8:3333::7778 100 Eth1/1 static NA DELLSONiC#
メモ: IP source bindingコマンドの no 形式を使用して、静的エントリーを削除します。
IPv6のDHCPスヌーピング バインディング テーブルからのエントリーのクリア
次のコマンドを使用して、すべてまたは特定の動的エントリーをクリアします。
- すべての動的IP DHCPスヌーピング バインディング エントリーをクリアします。
sonic(config)# clear ipv6 dhcp snooping binding
- 特定の動的IP DHCPスヌーピング バインディング エントリーをクリアします。
sonic(config)# clear ipv6 dhcp snooping binding source-ip-address source-mac-address vlan vlan-id interface interface-name
- DHCPスヌーピング統計情報のクリア:
sonic# clear ipv6 dhcp snooping statistics
IPv6 の DHCP スヌーピング情報を表示します。
- DHCPスヌーピングに関する一般的な情報を表示します。
sonic# show ipv6 dhcp snooping DELLSONiC# show ipv6 dhcp snooping DHCPv6 snooping is Enabled DHCPv6 snooping source MAC verification is Disabled DHCPv6 snooping is enabled on the following VLANs: 100 200 201 DHCPv6 snooping trusted interfaces: Eth1/1 DELLSONiC#
- DHCPスヌーピング バインディング データベースを表示します。
sonic# show ipv6 dhcp snooping binding DELLSONiC# show ipv6 dhcp snooping binding Total number of Dynamic bindings: 0 Total number of Static bindings: 1 Total number of Tentative bindings: 0 MAC Address IPv6 Address VLAN Interface Type Lease (Secs) ----------------- --------------- ---- ----------- ------- ----------- aa:bb:cc:dd:11:11 2001:db8:3333::7778 100 Eth1/1 static NA DELLSONiC#
- DHCPスヌーピング統計情報の表示:
sonic# show ipv6 dhcp snooping statistics DELLSONiC# show ipv6 dhcp snooping statistics Interface MAC Verify Client Ifc DHCP Server Failures Mismatch Msgs Recvd --------------- ---------- ---------- ----------- Eth1/1 0 0 0 Eth1/2 0 0 0 Eth1/3 0 0 0 Eth1/4 0 0 0
Affected Products
Enterprise SONiC Distribution, PowerSwitch S5048F-ON, PowerSwitch S5148F-ON, PowerSwitch S5212F-ON, PowerSwitch S5224F-ON, PowerSwitch S5232F-ON, PowerSwitch S5248F-ON, PowerSwitch S5296F-ON, PowerSwitch S5448F-ONArticle Properties
Article Number: 000218723
Article Type: How To
Last Modified: 31 Oct 2023
Version: 2
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.