8 つの例
次に、インターフェイス上でスタティック ホストを使って IPSG を停止する例を示します。
ControllerDevice(config-if)# no ip verify source
ControllerDevice(config-if)# no ip device tracking max
次に、ポート上でスタティック ホストを使って IPSG をイネーブルにする例を示します。
ControllerDevice(config)# ip device tracking
ControllerDevice(config-if)# ip device tracking maximum 10
ControllerDevice(config-if)# ip verify source tracking
次に、レイヤ 2 アクセス ポートに対してスタティック ホストの IPSG と IP フィルタをイネーブルにしてから、インターフェイス Gi1/0/3 上の有効な IP バインディングを確認する例を示します。
ControllerDevice# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
ControllerDevice(config)# ip device tracking
ControllerDevice(config)# interface gigabitethernet1/0/3
ControllerDevice(config-if)# switchport mode access
ControllerDevice(config-if)# switchport access vlan 10
ControllerDevice(config-if)# ip device tracking maximum 5
ControllerDevice(config-if)# ip verify source tracking
ControllerDevice(config-if)# end
ControllerDevice# show ip verify source
Interface Filter-type Filter-mode IP-address Mac-address Vlan
--------- ----------- ----------- --------------- ----------------- ----
Gi1/0/3 ip trk active 40.1.1.24 10
Gi1/0/3 ip trk active 40.1.1.20 10
Gi1/0/3 ip trk active 40.1.1.21 10
次に、レイヤ 2 アクセス ポートに対してスタティック ホストの IPSG と IP-MAC フィルタをイネーブルにしてから、インターフェイス Gi1/0/3 上の有効な IP-MAC バインディングを確認し、さらにこのインターフェイス上のバインディングの数が最大値に達しているかどうかを確認する例を示します。
ControllerDevice# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
ControllerDevice(config)# ip device tracking
ControllerDevice(config)# interface gigabitethernet1/0/3
ControllerDevice(config-if)# switchport mode access
ControllerDevice(config-if)# switchport access vlan 1
ControllerDevice(config-if)# ip device tracking maximum 5
ControllerDevice(config-if)# ip verify source tracking
ControllerDevice(config-if)# end
ControllerDevice# show ip verify source
Interface Filter-type Filter-mode IP-address Mac-address Vlan
--------- ----------- ----------- --------------- ----------------- ----
Gi1/0/3 ip trk active deny-all 1
この例は、すべてのインターフェイスに対する IP または MAC バインディング エントリをすべて表示します。 CLI はアクティブ エントリと非アクティブ エントリの両方を表示します。 インターフェイスでホストが学習されると、この新しいエントリは、アクティブとマークされます。 このホストをこのインターフェイスから切断し、別のインターフェイスに接続すると、ホストを検出すると同時に、新しい IP または MAC バインディング エントリがアクティブとして表示されます。 以前のインターフェイスでは、このホストに対する古いエントリが非アクティブとマークされます。
ControllerDevice# show ip device tracking all
IP Device Tracking for wireless clients = Enabled
Global IP Device Tracking for wired clients = Enabled
Global IP Device Tracking Probe Count = 3
Global IP Device Tracking Probe Interval = 30
-----------------------------------------------------------------------------------------------
IP Address MAC Address Vlan Interface Probe-Timeout STATE
-----------------------------------------------------------------------------------------------
200.1.1.8 0001.0600.0000 8 GigabitEthernet1/0/1 INACTIVE
200.1.1.9 0001.0600.0000 8 GigabitEthernet1/0/1 INACTIVE
200.1.1.10 0001.0600.0000 8 GigabitEthernet1/0/1 INACTIVE
200.1.1.1 0001.0600.0000 9 GigabitEthernet1/0/2 ACTIVE
200.1.1.1 0001.0600.0000 8 GigabitEthernet1/0/1 INACTIVE
200.1.1.2 0001.0600.0000 9 GigabitEthernet1/0/2 ACTIVE
200.1.1.2 0001.0600.0000 8 GigabitEthernet1/0/1 INACTIVE
200.1.1.3 0001.0600.0000 9 GigabitEthernet1/0/2 ACTIVE
200.1.1.3 0001.0600.0000 8 GigabitEthernet1/0/1 INACTIVE
200.1.1.4 0001.0600.0000 9 GigabitEthernet1/0/2 ACTIVE
200.1.1.4 0001.0600.0000 8 GigabitEthernet1/0/1 INACTIVE
200.1.1.5 0001.0600.0000 9 GigabitEthernet1/0/2 ACTIVE
200.1.1.5 0001.0600.0000 8 GigabitEthernet1/0/1 INACTIVE
200.1.1.6 0001.0600.0000 8 GigabitEthernet1/0/1 INACTIVE
200.1.1.7 0001.0600.0000 8 GigabitEthernet1/0/1 INACTIVE
この例は、すべてのインターフェイスに対するアクティブな IP または MAC バインディング エントリをすべて表示します。
ControllerDevice# show ip device tracking all active
IP Device Tracking for wireless clients = Enabled
Global IP Device Tracking for wired clients = Enabled
Global IP Device Tracking Probe Count = 3
Global IP Device Tracking Probe Interval = 30
-----------------------------------------------------------------------------------------------
IP Address MAC Address Vlan Interface Probe-Timeout STATE
-----------------------------------------------------------------------------------------------
200.1.1.1 0001.0600.0000 9 GigabitEthernet1/0/1 ACTIVE
200.1.1.2 0001.0600.0000 9 GigabitEthernet1/0/1 ACTIVE
200.1.1.3 0001.0600.0000 9 GigabitEthernet1/0/1 ACTIVE
200.1.1.4 0001.0600.0000 9 GigabitEthernet1/0/1 ACTIVE
200.1.1.5 0001.0600.0000 9 GigabitEthernet1/0/1 ACTIVE
この例は、すべてのインターフェイスに対する非アクティブな IP または MAC バインディング エントリをすべて表示します。 このホストは、初めに GigabitEthernet 1/0/1 上で学習され、その後で GigabitEthernet 0/2 に移動しました。 GigabitEthernet1/0/1 上で学習された IP または MAC バインディング エントリは、非アクティブとなっています。
ControllerDevice# show ip device tracking all inactive
IP Device Tracking for wireless clients = Enabled
Global IP Device Tracking for wired clients= Enabled
Global IP Device Tracking Probe Count = 3
Global IP Device Tracking Probe Interval = 30
-----------------------------------------------------------------------------------------------
IP Address MAC Address Vlan Interface Probe-Timeout STATE
-----------------------------------------------------------------------------------------------
200.1.1.8 0001.0600.0000 8 GigabitEthernet1/0/1 INACTIVE
200.1.1.9 0001.0600.0000 8 GigabitEthernet1/0/1 INACTIVE
200.1.1.10 0001.0600.0000 8 GigabitEthernet1/0/1 INACTIVE
200.1.1.1 0001.0600.0000 8 GigabitEthernet1/0/1 INACTIVE
200.1.1.2 0001.0600.0000 8 GigabitEthernet1/0/1 INACTIVE
200.1.1.3 0001.0600.0000 8 GigabitEthernet1/0/1 INACTIVE
200.1.1.4 0001.0600.0000 8 GigabitEthernet1/0/1 INACTIVE
200.1.1.5 0001.0600.0000 8 GigabitEthernet1/0/1 INACTIVE
200.1.1.6 0001.0600.0000 8 GigabitEthernet1/0/1 INACTIVE
200.1.1.7 0001.0600.0000 8 GigabitEthernet1/0/1 INACTIVE
この例は、すべてのインターフェイスに対するすべての IP デバイス トラッキング ホスト エントリの総数を表示します。
ControllerDevice# show ip device tracking all count
Total IP Device Tracking Host entries: 5
---------------------------------------------------------------------
Interface Maximum Limit Number of Entries
---------------------------------------------------------------------
Gi1/0/3 5