この製品のドキュメントセットは、偏向のない言語を使用するように配慮されています。このドキュメントセットでの偏向のない言語とは、年齢、障害、性別、人種的アイデンティティ、民族的アイデンティティ、性的指向、社会経済的地位、およびインターセクショナリティに基づく差別を意味しない言語として定義されています。製品ソフトウェアのユーザインターフェイスにハードコードされている言語、RFP のドキュメントに基づいて使用されている言語、または参照されているサードパーティ製品で使用されている言語によりドキュメントに例外が存在する場合があります。シスコのインクルーシブ ランゲージの取り組みの詳細は、こちらをご覧ください。
シスコは世界中のユーザにそれぞれの言語でサポート コンテンツを提供するために、機械と人による翻訳を組み合わせて、本ドキュメントを翻訳しています。ただし、最高度の機械翻訳であっても、専門家による翻訳のような正確性は確保されません。シスコは、これら翻訳の正確性について法的責任を負いません。原典である英語版(リンクからアクセス可能)もあわせて参照することを推奨します。
このドキュメントでは、ダイナミックARPインスペクション(DAI)とIPソースガード(IPSG)の動作方法と、Catalyst 9Kスイッチでのこれらの検証方法について説明します。
DAIとIPSGに入る前に、DAIとIPSGの前提条件であるDHCPスヌーピングについて簡単に説明する必要があります。
Dynamic Host Configuration Protocol(DHCP)は、IPアドレスと、サブネットマスクやデフォルトゲートウェイなどの関連する設定情報をインターネットプロトコル(IP)ホストに自動的に提供するクライアント/サーバプロトコルです。RFC 2131および2132では、DHCPはブートストラッププロトコル(BOOTP)に基づくインターネット技術特別調査委員会(IETF)標準として定義されています。BOOTPは、DHCPが多くの実装の詳細を共有するプロトコルです。DHCPを使用すると、ホストは必要なTCP/IP設定情報をDHCPサーバから取得できます。
DHCPスヌーピングは、信頼できないホストと信頼できるDHCPサーバとの間でファイアウォールのような役割を果たすセキュリティ機能です。DHCPスヌーピング機能は、次のアクティビティを実行します。
DAIは、ネットワーク内のアドレス解決プロトコル(ARP)パケットを検証するセキュリティ機能です。DAIを使用すると、ネットワーク管理者は、IPアドレスバインディングに対して無効なMACアドレスを持つARPパケットをインターセプト、ロギング、および廃棄できます。この機能は、特定の「man-in-the-middle(中間者)」攻撃からネットワークを保護します。
IPSGは、非ルーテッドレイヤ2インターフェイス上のIPトラフィックを制限するために、DHCPスヌーピングバインディングデータベースと、手動で設定されたIPソースバインディングに基づいてトラフィックをフィルタリングするセキュリティ機能です。ホストがネイバーのIPアドレスを使用しようとする場合、IPSGを使用してトラフィック攻撃を防止できます。
1. この図では、複数のクライアントが、コアスイッチに接続されたDHCPサーバからIPアドレスを受信することを望んでいることがわかります。
2. ただし、アクセス層のスイッチの1つに接続されている悪意のある/不正なDHCPサーバがあり、このスイッチはDHCP検出を受信し、実際のDHCPサーバよりも高速にDHCPオファーを送信できます。
3. 攻撃者は、クライアントからのすべてのトラフィックを受信できるようにオファーメッセージのゲートウェイアドレスを設定できるため、通信の機密性が損なわれます。
4. これは中間者攻撃として知られています。
1. アクセススイッチでDHCPスヌーピングを有効にして、DHCPトラフィックを受信するようにスイッチを設定し、信頼できないポートで受信された悪意のあるDHCPパケットを停止します。
2. スイッチでDHCPスヌーピングを有効にすると、すべてのインターフェイスは自動的に信頼できなくなります。
3. エンドデバイスに接続されているポートを信頼できない状態に保ち、正規のDHCPサーバに接続されているポートを信頼できるポートとして設定します。
4. 信頼できないインターフェイスはDHCPオファーメッセージをブロックします。DHCPオファーメッセージは、信頼できるポートでのみ許可されます。
5. エンドホストが信頼できないインターフェイスに送信できるDHCP検出パケットの1秒あたりの数を制限できます。 これは、プールがすぐに枯渇する可能性のある異常に多数の着信DHCP DiscoverからDHCPサーバを保護するためのセキュリティメカニズムです。
このセクションでは、スイッチドネットワークでDHCPスヌーピングを設定する方法について説明します。
トポロジ:
アクセススイッチのインターフェイスGi1/0/1 ~ 4はDHCPクライアントに接続されています。これらのクライアントが正規のDHCPサーバからIPアドレスを受信できるようにし、DHCPスヌーピング機能を利用して悪意のあるDHCPサーバからIPアドレスを保護することができます。
これを行う方法を理解するには、次の手順を参照してください。
ステップ 1:アクセススイッチで、VLAN下でDHCPスヌーピングをグローバルに有効にします。
ip dhcp snooping
ip dhcp snooping vlan 10,20,30
ステップ 2:正規のDHCPサーバからDHCPオファーを受信するアクセススイッチのすべてのインターフェイスで、DHCPスヌーピング信頼を設定します。このようなインターフェイスの数は、ネットワークの設計とDHCPサーバの配置によって異なります。これらは、正規のDHCPサーバに向かうインターフェイスです。
アクセススイッチ:
interface TenGigabitEthernet1/0/2
switchport mode trunk
ip dhcp snooping trust
ステップ 3:DHCPスヌーピングをグローバルに設定すると、スイッチ内のすべてのポートは自動的に非信頼になります(前に示したように、手動で信頼するものを除く)。 ただし、エンドホストが信頼できないインターフェイスに送信できるDHCP検出パケットの1秒あたりの数を設定できます。
これは、プールがすぐに枯渇する可能性のある異常に多数の着信DHCP DiscoverからDHCPサーバを保護するためのセキュリティメカニズムです。
interface range Gi1/0/1-5
ip dhcp snooping limit rate 10
検証:
Access_SW#show ip dhcp snooping
Switch DHCP snooping is enabled
Switch DHCP gleaning is disabled
DHCP snooping is configured on following VLANs:
10,20,30
DHCP snooping is operational on following VLANs:
10,20,30
DHCP snooping is configured on the following L3 Interfaces:
Insertion of option 82 is disabled
circuit-id default format: vlan-mod-port
remote-id: 00fc.ba9e.3980 (MAC)
Option 82 on untrusted port is not allowed
Verification of hwaddr field is enabled
Verification of giaddr field is enabled
DHCP snooping trust/rate is configured on the following Interfaces:
Interface Trusted Allow option Rate limit (pps)
----------------------- ------- ------------ ----------------
GigabitEthernet1/0/1 no no 10
Custom circuit-ids:
GigabitEthernet1/0/2 no no 10
Custom circuit-ids:
GigabitEthernet1/0/3 no no 10
Custom circuit-ids:
GigabitEthernet1/0/4 no no 10
Custom circuit-ids:
GigabitEthernet1/0/5 no no 10
Custom circuit-ids:
TenGigabitEthernet1/0/2 yes yes unlimited
Custom circuit-ids:
注:この出力を見ると、Malicious DHCPサーバに接続されているGi1/0/5がshow ip dhcp snooping
の出力でuntrustedと表記されていることがわかります。
したがって、DHCPスヌーピングはこれらのポートですべてのチェックを行います。
たとえば、これにより、このポート(Gi1/0/5)のすべての着信DHCPオファーがドロップされます。
DHCPスヌーピングバインディングテーブルを次に示します。このテーブルには、Gi1/0/1、Gi1/0/2、Gi1/0/3上の3つのクライアントのIPアドレス、MACアドレス、およびインターフェイスが示されています。
Access_SW#show ip dhcp snooping binding
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
00:FC:BA:9E:39:82 10.10.10.2 62488 dhcp-snooping 10 GigabitEthernet1/0/1
00:FC:BA:9E:39:A6 10.10.20.2 62492 dhcp-snooping 20 GigabitEthernet1/0/2
00:FC:BA:9E:39:89 10.10.30.3 62492 dhcp-snooping 30 GigabitEthernet1/0/3
Total number of bindings: 3
説明のため、アクセススイッチのTe1/0/2の下からip dhcp snooping trust
configを削除します。Switch:
Access_SW#sh cdp neigh
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone,
D - Remote, C - CVTA, M - Two-port Mac Relay
Device ID Local Intrfce Holdtme Capability Platform Port ID
Dist_SW Ten 1/0/2 175 R S I C9300-48U Ten 1/1/3
Total cdp entries displayed : 1
Access_SW#show run int Te1/0/2
Building configuration...
Current configuration : 64 bytes
!
interface TenGigabitEthernet1/0/2
switchport mode trunk
*Apr 4 01:12:47.149: %DHCP_SNOOPING-5-DHCP_SNOOPING_UNTRUSTED_PORT: DHCP_SNOOPING drop message on untrusted port, message type: DHCPOFFER, MAC sa: f87a.41a8.ca65
*Apr 4 01:14:07.161: %DHCP_SNOOPING-5-DHCP_SNOOPING_UNTRUSTED_PORT: DHCP_SNOOPING drop message on untrusted port, message type: DHCPOFFER, MAC sa: f87a.41a8.ca65
*Apr 4 01:29:30.634: %DHCP_SNOOPING-5-DHCP_SNOOPING_UNTRUSTED_PORT: DHCP_SNOOPING drop message on untrusted port, message type: DHCPOFFER, MAC sa: f87a.41a8.ca56
*Apr 4 01:30:03.286: %DHCP_SNOOPING-5-DHCP_SNOOPING_UNTRUSTED_PORT: DHCP_SNOOPING drop message on untrusted port, message type: DHCPOFFER, MAC sa: f87a.41a8.ca46
ARPは、IPアドレスをMACアドレスにマッピングすることにより、レイヤ2ブロードキャストドメイン内でIP通信を提供します。これはシンプルなプロトコルですが、ARPポイズニングと呼ばれる攻撃に対して脆弱です。
ARPポイズニングは、攻撃者がネットワーク上で偽のARP応答パケットを送信する攻撃です。
悪意のあるユーザは、サブネットに接続されたシステムのARPキャッシュをポイズニングし、サブネット上の他のホスト宛てのトラフィックを傍受することで、レイヤ2ネットワークに接続されたホスト、スイッチ、およびルータを攻撃できます
これは古典的な中間者攻撃です。
ダイナミック ARP インスペクションは、ネットワーク内の ARP パケットを検証するセキュリティ機能です。無効な IP から MAC へのアドレス バインディングを持つ ARP パケットを捕捉、ログ記録、および廃棄します。この機能は、ある種の中間者攻撃からネットワークを保護します。
ダイナミック ARP インスペクションにより、有効な ARP 要求および応答のみがリレーされるようになります。スイッチは次の動作を実行します。
ダイナミック ARP インスペクションは、信頼できるデータベースつまり DHCP スヌーピング バインディング データベースに格納されている有効な IP から MAC へのアドレス バインディングに基づいて、ARP パケットの有効性を判別します。
DHCP スヌーピングが VLAN およびスイッチ上で有効になっている場合、このデータベースは DHCP スヌーピングにより構築されます。信頼できるインターフェイス上で ARP パケットが受信された場合、スイッチはチェックを行うことなくそのパケットを転送します。
信頼できないインターフェイス上では、スイッチはパケットが有効である場合にのみパケットを転送します。
次の図は、4台のホストに接続されたCat9500スイッチを示しています。この中の3台のホストはDHCPクライアントで、1台のホストは固定IPアドレス(10.20.30.5)を持っています。 DHCPサーバは、DHCPプールを使用して設定されたCat8300シリーズルータです。
上記のトポロジは、DAIがインターフェイス上で無効なARP要求を検出し、悪意のある攻撃者からネットワークを保護する方法を示すために使用されます。
設定:
ステップ 1:DHCPスヌーピングとDAIをスイッチでグローバルに設定します。
F241.24.02-9500-1#sh run | i dhcp
ip dhcp snooping vlan 10
no ip dhcp snooping information option
ip dhcp snooping
F241.24.02-9500-1#sh run | i ip arp
ip arp inspection vlan 10
ステップ 2:DHCPサーバに接続されているインターフェイスHu1/0/7を信頼できるポートとして設定します。これにより、DHCPオファーがインターフェイスに入り、DHCPクライアントに到達できるようになります。
F241.24.02-9500-1#sh run int Hu1/0/7
Building configuration...
Current configuration : 85 bytes
!
interface HundredGigE1/0/7
switchport access vlan 10
ip dhcp snooping trust
end
ステップ 3:DHCPクライアントに接続されているポートを、VLAN 10を許可するアクセスポートとして設定します。
F241.24.02-9500-1#sh run int Hu1/0/3
Building configuration...
Current configuration : 61 bytes
!
interface HundredGigE1/0/3
switchport access vlan 10
end
F241.24.02-9500-1#sh run int Hu1/0/4
Building configuration...
Current configuration : 61 bytes
!
interface HundredGigE1/0/4
switchport access vlan 10
end
F241.24.02-9500-1#sh run int Hu1/0/1
Building configuration...
Current configuration : 61 bytes
!
interface HundredGigE1/0/1
switchport access vlan 10
end
F241.24.02-9500-1#sh run int Hu1/0/6
Building configuration...
Current configuration : 85 bytes
!
interface HundredGigE1/0/6
switchport access vlan 10
end
ステップ 4:Cat9500スイッチのDHCPスヌーピングバインディングテーブルから、DHCPクライアントがDHCPサーバからIPアドレスを受信したかどうかを確認します。
F241.24.02-9500-1#sh ip dhcp snooping binding
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
78:72:5D:1B:7F:3F 10.20.30.2 85046 dhcp-snooping 10 HundredGigE1/0/1
5C:71:0D:CD:EE:0C 10.20.30.3 85065 dhcp-snooping 10 HundredGigE1/0/4
2C:4F:52:01:AA:CC 10.20.30.4 85085 dhcp-snooping 10 HundredGigE1/0/3
Total number of bindings: 3
DHCPサーバのバインディングを確認することもできます。
DHCP_Server#show ip dhcp binding
Bindings from all pools not associated with VRF:
IP address Client-ID/ Lease expiration Type State Interface
Hardware address/
User name
10.20.30.2 0063.6973.636f.2d37. Apr 08 2024 07:04 AM Automatic Active TenGigabitEthernet0/0/4
3837.322e.3564.3162.
2e37.6633.662d.4875.
312f.302f.31
10.20.30.3 0063.6973.636f.2d35. Apr 08 2024 07:04 AM Automatic Active TenGigabitEthernet0/0/4
6337.312e.3064.6364.
2e65.6530.632d.5465.
312f.302f.35
10.20.30.4 0063.6973.636f.2d32. Apr 08 2024 07:05 AM Automatic Active TenGigabitEthernet0/0/4
6334.662e.3532.3031.
2e61.6163.632d.5465.
312f.302f.35
ステップ5:Hu1/0/6に接続されているホストのIPアドレスを10.20.30.5から10.20.30.2に変更し、そのホストから他のDHCPクライアントへのpingを試みます。
Static_Host#ping 10.20.30.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.20.30.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
Static_Host#ping 10.20.30.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.20.30.4, timeout is 2 seconds:
.....
次の無効なARPログは、Cat9500スイッチで確認できます。
F241.24.02-9500-1#
*Apr 7 09:29:24.520: %SW_DAI-4-DHCP_SNOOPING_DENY: 1 Invalid ARPs (Req) on Hu1/0/6, vlan 10.([7035.0956.7ee4/10.20.30.2/0000.0000.0000/10.20.30.3/09:29:23 UTC Sun Apr 7 2024])
*Apr 7 09:29:26.520: %SW_DAI-4-DHCP_SNOOPING_DENY: 1 Invalid ARPs (Req) on Hu1/0/6, vlan 10.([7035.0956.7ee4/10.20.30.2/0000.0000.0000/10.20.30.3/09:29:25 UTC Sun Apr 7 2024])
*Apr 7 09:29:28.521: %SW_DAI-4-DHCP_SNOOPING_DENY: 1 Invalid ARPs (Req) on Hu1/0/6, vlan 10.([7035.0956.7ee4/10.20.30.2/0000.0000.0000/10.20.30.3/09:29:27 UTC Sun Apr 7 2024])
*Apr 7 09:29:30.521: %SW_DAI-4-DHCP_SNOOPING_DENY: 1 Invalid ARPs (Req) on Hu1/0/6, vlan 10.([7035.0956.7ee4/10.20.30.2/0000.0000.0000/10.20.30.3/09:29:29 UTC Sun Apr 7 2024])
*Apr 7 09:29:32.521: %SW_DAI-4-DHCP_SNOOPING_DENY: 1 Invalid ARPs (Req) on Hu1/0/6, vlan 10.([7035.0956.7ee4/10.20.30.2/0000.0000.0000/10.20.30.3/09:29:31 UTC Sun Apr 7 2024])
F241.24.02-9500-1#
*Apr 7 09:29:47.521: %SW_DAI-4-DHCP_SNOOPING_DENY: 1 Invalid ARPs (Req) on Hu1/0/6, vlan 10.([7035.0956.7ee4/10.20.30.2/0000.0000.0000/10.20.30.4/09:29:46 UTC Sun Apr 7 2024])
*Apr 7 09:29:49.521: %SW_DAI-4-DHCP_SNOOPING_DENY: 1 Invalid ARPs (Req) on Hu1/0/6, vlan 10.([7035.0956.7ee4/10.20.30.2/0000.0000.0000/10.20.30.4/09:29:48 UTC Sun Apr 7 2024])
*Apr 7 09:29:51.521: %SW_DAI-4-DHCP_SNOOPING_DENY: 1 Invalid ARPs (Req) on Hu1/0/6, vlan 10.([7035.0956.7ee4/10.20.30.2/0000.0000.0000/10.20.30.4/09:29:50 UTC Sun Apr 7 2024])
*Apr 7 09:29:53.522: %SW_DAI-4-DHCP_SNOOPING_DENY: 1 Invalid ARPs (Req) on Hu1/0/6, vlan 10.([7035.0956.7ee4/10.20.30.2/0000.0000.0000/10.20.30.4/09:29:52 UTC Sun Apr 7 2024])
*Apr 7 09:29:55.523: %SW_DAI-4-DHCP_SNOOPING_DENY: 1 Invalid ARPs (Req) on Hu1/0/6, vlan 10.([7035.0956.7ee4/10.20.30.2/0000.0000.0000/10.20.30.4/09:29:54 UTC Sun Apr 7 2024])
手順 6:検証:
F241.24.02-9500-1#show ip arp inspection
Source Mac Validation : Disabled
Destination Mac Validation : Disabled
IP Address Validation : Disabled
Vlan Configuration Operation ACL Match Static ACL
---- ------------- --------- --------- ----------
10 Enabled Active DAI No
Vlan ACL Logging DHCP Logging Probe Logging
---- ----------- ------------ -------------
10 Deny Deny Off
Vlan Forwarded Dropped DHCP Drops ACL Drops
---- --------- ------- ---------- ---------
10 9 39 39 0
Vlan DHCP Permits ACL Permits Probe Permits Source MAC Failures
---- ------------ ----------- ------------- -------------------
10 6 3 0 0
Vlan Dest MAC Failures IP Validation Failures Invalid Protocol Data
---- ----------------- ---------------------- ---------------------
10 0 0 0
この出力では、Cat9500スイッチのVLAN 10でDAIによってドロップされ、許可されたパケットの数を確認できます。
注:非常に重要なシナリオの1つは、固定IPアドレス(10.20.30.5など)が割り当てられた正規のホストをネットワークに配置することです。
ホストは何もスプーフィングしようとしませんが、MAC-IPバインディングデータがDHCPスヌーピングバインディングデータベースにないため、ネットワークから分離されます。
これは、静的に割り当てられたため、静的ホストがDHCPを使用してIPアドレスを受信しなかったためです。
静的IPアドレスを持つ正規のホストに接続を提供するために、いくつかの回避策を実装できます。
オプション 1
ip arp inspection trustを使用して、ホストに接続されたインターフェイスを設定します。
F241.24.02-9500-1#sh run int HundredGigE 1/0/6
Building configuration...
Current configuration : 110 bytes
!
interface HundredGigE1/0/6
switchport access vlan 10
switchport mode access
ip arp inspection trust
end
Static_Host#ping 10.20.30.4
*Apr 7 18:44:45.299 JST: %SYS-5-CONFIG_I: Configured from console by admin on vty0 (192.168.1.5)
F241.24.02-9300-STACK#ping 10.20.30.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.20.30.4, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
Static_Host#ping 10.20.30.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.20.30.3, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
Static_Host#ping 10.20.30.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.20.30.2, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
オプション 2
ARPアクセスリストを使用して、スタティックホストを許可します。
F241.24.02-9500-1#sh run | s arp access-list
arp access-list DAI
permit ip host 10.20.30.5 mac host 7035.0956.7ee4
F241.24.02-9500-1#sh run | i ip arp ins
ip arp inspection filter DAI vlan 10
Static_Host#ping 10.20.30.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.20.30.4, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
Static_Host#ping 10.20.30.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.20.30.3, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
Static_Host#ping 10.20.30.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.20.30.2, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
オプション 3
静的ホストのバインディングテーブルエントリを設定します。
F241.24.02-9500-1#sh run | i binding
ip source binding 7035.0956.7EE4 vlan 10 10.20.30.5 interface Hu1/0/6
F241.24.02-9500-1#show ip source binding
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
78:72:5D:1B:7F:3F 10.20.30.2 80640 dhcp-snooping 10 HundredGigE1/0/1
5C:71:0D:CD:EE:0C 10.20.30.3 80659 dhcp-snooping 10 HundredGigE1/0/4
70:35:09:56:7E:E4 10.20.30.5 infinite static 10 HundredGigE1/0/6
2C:4F:52:01:AA:CC 10.20.30.4 80679 dhcp-snooping 10 HundredGigE1/0/3
Total number of bindings: 4
Static_Host#ping 10.20.30.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.20.30.4, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
Static_Host#ping 10.20.30.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.20.30.3, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
Static_Host#ping 10.20.30.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.20.30.2, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
DAIで使用可能な追加オプション:
F241.24.02-9500-1(config)#ip arp inspection validate ?
dst-mac Validate destination MAC address
ip Validate IP addresses
src-mac Validate source MAC address
src-macについては、イーサネットヘッダーの送信元MACアドレスを、ARP本文の送信元MACアドレスと照合します。このチェックは、ARP要求とARP応答の両方に対して実行されます。有効にすると、異なるMACアドレスを持つパケットは無効として分類され、ドロップされます
dst-macでは、イーサネットヘッダーの宛先MACアドレスを、ARP本文のターゲットMACアドレスと照合します。このチェックは、ARP応答に対して実行されます。有効にすると、異なるMACアドレスを持つパケットは無効として分類され、ドロップされます。
IPの場合は、ARP本文で無効なIPアドレスと予期しないIPアドレスを確認します。アドレスには、0.0.0.0、255.255.255.255、およびすべてのIPマルチキャストアドレスが含まれます。送信元IPアドレスは、すべてのARP要求および応答でチェックされ、ターゲットIPアドレスは、ARP応答でのみチェックされます。
ARPレート制限を設定することもできます。デフォルトでは、信頼できないインターフェイス上のARPトラフィックには15 ppsの制限があります。
Switch(config)#interface Gigabitethernet<>
Switch(config-if)#ip arp inspection limit rate 10
参考資料
Cat9500スイッチは4つのホストに接続され、そのうち3つのホストはDHCPクライアントで、1つのホストには固定IPアドレスが割り当てられています。DHCPサーバは、DHCPプールを使用して設定されたCat8300シリーズルータです。
このトポロジを使用して、DHCPスヌーピングバインディングデータベースにMAC-IPバインディングが存在しないホストからのトラフィックをIPSGがどのように検出してブロックするかを示すことができます。
設定例:
ステップ 1:Cat9500スイッチでDHCPスヌーピングをグローバルに設定します。
F241.24.02-9500-1#sh run | i dhcp
ip dhcp snooping vlan 10
no ip dhcp snooping information option
ip dhcp snooping
ステップ 2:DHCPサーバに接続されているインターフェイスTe1/0/7を信頼できるポートとして設定します。これにより、DHCPオファーはインターフェイスに入り、DHCPクライアントに到達できます。
F241.24.02-9500-1#sh run int Hu1/0/7
Building configuration...
Current configuration : 85 bytes
!
interface HundredGigE1/0/7
switchport access vlan 10
ip dhcp snooping trust
end
ステップ 3:DHCPクライアントに接続されているポートを、VLAN 10を許可するアクセスポートとして設定します。
F241.24.02-9500-1#sh run int Hu1/0/3
Building configuration...
Current configuration : 61 bytes
!
interface HundredGigE1/0/3
switchport access vlan 10
end
F241.24.02-9500-1#sh run int Hu1/0/4
Building configuration...
Current configuration : 61 bytes
!
interface HundredGigE1/0/4
switchport access vlan 10
end
F241.24.02-9500-1#sh run int Hu1/0/1
Building configuration...
Current configuration : 61 bytes
!
interface HundredGigE1/0/1
switchport access vlan 10
end
F241.24.02-9500-1#sh run int Hu1/0/6
Building configuration...
Current configuration : 85 bytes
!
interface HundredGigE1/0/6
switchport access vlan 10
end
ステップ 4:DHCPクライアントがDHCPサーバからIPアドレスを受信したかどうかを確認します。
F241.24.02-9500-1#sh ip dhcp snooping binding
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
78:72:5D:1B:7F:3F 10.20.30.2 85046 dhcp-snooping 10 HundredGigE1/0/1
5C:71:0D:CD:EE:0C 10.20.30.3 85065 dhcp-snooping 10 HundredGigE1/0/4
2C:4F:52:01:AA:CC 10.20.30.4 85085 dhcp-snooping 10 HundredGigE1/0/3
Total number of bindings: 3
F241.24.02-9500-1#show ip source binding
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
78:72:5D:1B:7F:3F 10.20.30.2 64764 dhcp-snooping 10 HundredGigE1/0/1
5C:71:0D:CD:EE:0C 10.20.30.3 64783 dhcp-snooping 10 HundredGigE1/0/4
2C:4F:52:01:AA:CC 10.20.30.4 64803 dhcp-snooping 10 HundredGigE1/0/3
Total number of bindings: 3
DHCP_Server#show ip dhcp binding
Bindings from all pools not associated with VRF:
IP address Client-ID/ Lease expiration Type State Interface
Hardware address/
User name
10.20.30.2 0063.6973.636f.2d37. Apr 08 2024 07:04 AM Automatic Active TenGigabitEthernet0/0/4
3837.322e.3564.3162.
2e37.6633.662d.4875.
312f.302f.31
10.20.30.3 0063.6973.636f.2d35. Apr 08 2024 07:04 AM Automatic Active TenGigabitEthernet0/0/4
6337.312e.3064.6364.
2e65.6530.632d.5465.
312f.302f.35
10.20.30.4 0063.6973.636f.2d32. Apr 08 2024 07:05 AM Automatic Active TenGigabitEthernet0/0/4
6334.662e.3532.3031.
2e61.6163.632d.5465.
312f.302f.35
ステップ 5:すべてのエンドホストに接続されているインターフェイスでIPSGを設定します(3x DHCPクライアントおよび固定IPアドレスを持つ1xホスト)。
F241.24.02-9500-1#sh run int Hu1/0/3
Building configuration...
Current configuration : 79 bytes
!
interface HundredGigE1/0/3
switchport access vlan 10
ip verify source
end
F241.24.02-9500-1#sh run int Hu1/0/4
Building configuration...
Current configuration : 79 bytes
!
interface HundredGigE1/0/4
switchport access vlan 10
ip verify source
end
F241.24.02-9500-1#sh run int Hu1/0/1
Building configuration...
Current configuration : 79 bytes
!
interface HundredGigE1/0/1
switchport access vlan 10
ip verify source
end
F241.24.02-9500-1#sh run int Hu1/0/6
Building configuration...
Current configuration : 103 bytes
!
interface HundredGigE1/0/6
switchport access vlan 10
ip verify source
end
検証:
F241.24.02-9500-1#show ip verify source
Interface Filter-type Filter-mode IP-address Mac-address Vlan
--------- ----------- ----------- --------------- ----------------- ----
Hu1/0/1 ip active 10.20.30.2 10
Hu1/0/3 ip active 10.20.30.4 10
Hu1/0/4 ip active 10.20.30.3 10
Hu1/0/6 ip active deny-all 10
この出力では、DHCPスヌーピングバインディングテーブルにこのインターフェイスに対応するMAC-IPバインディングがないため、IP AddressフィールドがHu1/0/6に対してdeny-allに設定されていることがわかります。
手順 6:Static_Hostから、IPアドレス10.20.30.2、10.20.30.3、および10.20.30.4のDHCPクライアントにpingを実行してみます。
Static_Host#ping 10.20.30.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.20.30.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
Static_Host#ping 10.20.30.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.20.30.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
Static_Host#ping 10.20.30.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.20.30.4, timeout is 2 seconds:
.....
F241.24.02-9500-1(config)# ip source binding <mac-address-of-static-host> vlan 10 10.20.30.5 interface Hu1/0/6
F241.24.02-9500-1#show run int Hu1/0/6
*Apr 7 15:13:48.449: %SYS-5-CONFIG_I: Configured from console by console
F241.24.02-9500-1#show ip verify source
Interface Filter-type Filter-mode IP-address Mac-address Vlan
--------- ----------- ----------- --------------- ----------------- ----
Hu1/0/1 ip active 10.20.30.2 10
Hu1/0/3 ip active 10.20.30.4 10
Hu1/0/4 ip active 10.20.30.3 10
Hu1/0/6 ip active 10.20.30.5 10
F241.24.02-9500-1#show ip source binding
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
78:72:5D:1B:7F:3F 10.20.30.2 62482 dhcp-snooping 10 HundredGigE1/0/1
5C:71:0D:CD:EE:0C 10.20.30.3 62501 dhcp-snooping 10 HundredGigE1/0/4
70:35:09:56:7E:E4 10.20.30.5 infinite static 10 HundredGigE1/0/6
2C:4F:52:01:AA:CC 10.20.30.4 62521 dhcp-snooping 10 HundredGigE1/0/3
Total number of bindings: 4
Verification:
Static_Host#ping 10.20.30.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.20.30.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
Static_Host#ping 10.20.30.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.20.30.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
Static_Host#ping 10.20.30.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.20.30.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
IPSGで使用できるその他のオプション
デフォルトでは、IPSGはIPアドレスのみに基づいて、信頼できないポートの着信トラフィックをフィルタリングします。
IPアドレスとMACアドレスの両方に基づいてフィルタリングを実行するには、次の手順を実行します。
F241.24.02-9500-1#sh run int Hu1/0/1
Building configuration...
Current configuration : 89 bytes
!
interface HundredGigE1/0/1
switchport access vlan 10
ip verify source mac-check
end
F241.24.02-9500-1#sh run int Hu1/0/3
Building configuration...
Current configuration : 89 bytes
!
interface HundredGigE1/0/3
switchport access vlan 10
ip verify source mac-check
end
F241.24.02-9500-1#sh run int Hu1/0/4
Building configuration...
Current configuration : 89 bytes
!
interface HundredGigE1/0/4
switchport access vlan 10
ip verify source mac-check
end
F241.24.02-9500-1#sh run int Hu1/0/6
Building configuration...
Current configuration : 113 bytes
!
interface HundredGigE1/0/6
switchport access vlan 10
switchport mode access
ip verify source mac-check
end
F241.24.02-9500-1#show ip verify source
Interface Filter-type Filter-mode IP-address Mac-address Vlan
--------- ----------- ----------- --------------- ----------------- ----
Hu1/0/1 ip-mac active 10.20.30.2 78:72:5D:1B:7F:3F 10
Hu1/0/3 ip-mac active 10.20.30.4 2C:4F:52:01:AA:CC 10
Hu1/0/4 ip-mac active 10.20.30.3 5C:71:0D:CD:EE:0C 10
Hu1/0/6 ip-mac active deny-all deny-all 10
この出力では、フィルタタイプがip-macであることを確認できます。そのため、スイッチは現在、送信元IPアドレスとMACアドレスの両方に基づいて、これらのインターフェイスの着信パケットをフィルタリングしています。
改定 | 発行日 | コメント |
---|---|---|
1.0 |
05-Aug-2024
|
初版 |