概要





RSPAN と VACL を使ったきめ細かいトラフィック分析


このアプリケーション ノートでは、Remote Switch Port Analyzer(RSPAN; リモート スイッチ ポート アナライザ)と VLAN Access Control List(VACL; 仮想 LAN アクセス制御リスト)の 2 つの強力な機能を組み合わせ、Cisco® Catalyst® 6500 シリーズ スイッチ上のトラフィックを分析するための効果的かつきめ細かいツールを作成する方法について例を挙げて説明します。


RSPAN の概要

SPAN は、Cisco Catalyst スイッチの 1 つ以上のポート(SPAN 送信元)から同じスイッチ上の別のポート(SPAN 宛先)へのトラフィックをミラーリングするための汎用的なテクノロジーです。これは、よく「ローカル SPAN」と呼ばれます。ローカル SPAN には、ユーザが単一のスイッチを通過するトラフィックをキャプチャし、分析できるようにするなどの多数の重要な用途があります。

RSPAN は、新たなトラフィック ミラーリング テクノロジーです。これを使用して、ユーザは分析の対象範囲を拡大し、同一のレイヤ 2 ドメイン内で相互接続されている複数のスイッチを網羅することができます。Cisco Catalyst 6500 シリーズ スイッチで最初に採用された RSPAN は、ユーザがあるスイッチ上のトラフィックをキャプチャし、それを指定の VLAN へミラーリングし、さらに分析のために複数のスイッチの複数のポートへ転送できるようにすることで、より柔軟なポート ミラーリングを可能にしています。

RSPAN ソフトウェアのサポート機能は、Cisco Catalyst 6500 シリーズ スイッチの以下のソフトウェア リリースに対応しています。

  • Cisco Catalyst Operating System ソフトウェア リリース 5.3 以降
  • Cisco IOS® ソフトウェア リリース 12.1(13)E 以降

特定の Cisco Catalyst 6500 シリーズ システムでは、許容されるローカルおよびリモートの SPAN セッション数に固有の制限があります。これらの制限については、Cisco IOS ソフトウェアおよび Cisco Catalyst OS ソフトウェアのソフトウェア コンフィギュレーション ガイドに記載されています。詳細については、以下を参照してください。


VACL の概要

Cisco Catalyst 6500 シリーズ スイッチで最初に採用されたもう 1 つの非常に強力なツールが、VACL を使用したネットワーク セキュリティ適用です。これは、VLAN 内のすべてのトラフィックに関するレイヤ 2、レイヤ 3、およびレイヤ 4 情報に基づいています。VACL が特定の VLAN に関連付けられている場合は、VLAN 内でブリッジングされるか VLAN へレイヤ 3 スイッチングされるかに関係なく、すべてのトラフィックが設定済み VACL ポリシーの対象となります。この VACL は、ハードウェアで処理されます。したがって VACL を Cisco Catalyst 6500 シリーズ スイッチ上の VLAN に適用してもパフォーマンスが犠牲になることはありません。

VACL では、さまざまな情報に基づいて VLAN セキュリティを提供することができます。IP パケットの場合、VACL は、送信元 IP アドレス、宛先 IP アドレス、レイヤ 4 プロトコル タイプ、送信元および宛先レイヤ 4 ポートなどの情報に基づいて照合することができます。この機能により、VACL は、きめ細かくトラフィックを識別しフィルタリングすることができます。

VACL ソフトウェアのサポート機能は、Cisco Catalyst 6500 シリーズ スイッチの以下のリリースに対応しています。

  • Cisco Catalyst OS ソフトウェア リリース 5.3 以降
  • Cisco IOS ソフトウェア リリース 12.1(8a)EX 以降

ローカル SPAN には有効な用途がありますが、場合によっては、ユーザの目的を達成するのに必要な、十分な柔軟性またはきめ細かさを提供できないことがあります。ローカル SPAN は常に制御トラフィック、ブロードキャスト、その他の頻繁に生じる無関係なトラフィックを含め、SPAN 送信元から SPAN 宛先へのすべてのトラフィックをキャプチャします。

RSPAN は、ローカル SPAN では使用できないいくつかの追加機能を備えています。次の「RSPAN と VACL の併用」の例では、Cisco Catalyst 6500 シリーズ スイッチで RSPAN と VACL を組み合わせた場合の柔軟性と効果について説明します。


RSPAN と VACL の併用

ここでは、RSPAN と VACL を併用して、柔軟で非常にきめ細かいトラフィック分析を実現するためのネットワーク シナリオの例を挙げます。

  • 例 1 - 単一のスイッチ上で RSPAN と VACL を使用する
  • 例 2 - 複数のスイッチ上で RSPAN と VACL を使用する
  • 例 3 - 複数のスイッチ上で VACL とともに複数の RSPAN セッションを使用する

例 1 - 単一のスイッチ上で RSPAN と VACL を使用する

単一のスイッチ上で RSPAN と VACL を組み合わせると(図 1)、ミラーリングされたトラフィックを単一のスイッチに対してローカルに保持しながら、分析用にキャプチャするトラフィックのタイプと量に関して高い柔軟性を提供することができます。

図 1 単一のスイッチ上での RSPAN と VACL の使用

図 1 単一のスイッチ上での RSPAN と VACL の使用
※ 画像をクリックすると、大きく表示されます。popup_icon

この例では、VLAN 10 と VLAN 20 という 2 つの異なる VLAN にホストが存在しています。ネットワーク管理者は、これらの VLAN を経由する双方向トラフィックをキャプチャして、インターフェイス GigabitEthernet4/5 上のネットワーク アナライザへ送信しようとしています。ただし、管理者が対象としているトラフィックは、5000 ~ 6000 の特定範囲のポート宛ての TCP トラフィックだけです。

管理者は、従来のローカル SPAN を使用して、VLAN 10 および 20 との双方向 SPAN セッションを SPAN 送信元として設定し、アナライザに接続するポートを SPAN 宛先として設定します。ただし、VLAN 10 および 20 内のすべてのトラフィックが SPAN 宛先ポートへ転送されるため、アナライザのオーバーランや宛先ポートのオーバーサブスクライブを引き起こし、その結果、一部のパケットがキャプチャされない場合があります。

RSPAN は、単独ではこの問題に十分に対処できません。管理者は、SPAN 宛先をアナライザ ポートとして指定するのではなく、RSPAN VLAN を定義し、その VLAN を SPAN 宛先として指定します。RSPAN 宛先も同じスイッチ上にあるため、ローカル SPAN の代わりに RSPAN を使用しても特に目立った利点はありません。

ただし、ローカル SPAN の代わりに RSPAN セッションを使用することで、管理者は、キャプチャする必要のある正確なトラフィックを識別するセキュリティ VACL を定義することができます。この VACL を RSPAN VLAN に適用すれば、VACL に指定されたアクセス制御エントリに合致するトラフィックだけを RSPAN VLAN へ、ひいては RSPAN 宛先ポートへ渡すことができます。

コンフィギュレーション例 1-1 - Cisco IOS ソフトウェアを使用した場合

次のコンフィギュレーションは、この例で使用された Supervisor Engine 2/MSFC2 に適用されるものです。スーパーバイザ エンジン用に Cisco IOS ソフトウェア リリース 12.1(13)E4 を使用しています。

!
hostname Switch_A
! Defines L2 VLANs 10 and 20
vlan 10,20
!
! Defines VLAN 100 as the RSPAN VLAN
vlan 100
 remote-span
!
! The monitor port requires no special configuration
interface GigabitEthernet4/5
 description Monitor Port
 no ip address
!
! Defines L3 VLANs 10 and 20
interface Vlan10
 ip address 10.10.10.1 255.255.255.0
!
interface Vlan20
 ip address 10.20.20.1 255.255.255.0
!
! VACLs require that a corresponding SVI (L3 interface) exists
! It can remain unconfigured and administratively shutdown
interface Vlan100
 description RSPAN VLAN - Must exist for VACL on RSPAN VLAN
 no ip address
 shutdown
!
! The IP extended ACL that matches TCP traffic destined to ports 5000 - 6000
ip access-list extended TCP-TRAFFIC
 permit tcp any any range 5000 6000
!
! Defines the VLAN access-map (VACL)
vlan access-map RSPAN-VACL 10
 match ip address TCP-TRAFFIC
 action forward
!
! Maps the VACL to the RSPAN VLAN
vlan filter RSPAN-VACL vlan-list 100
!
! Monitor session 1 captures bidirectional traffic from
! VLANs 10 and 20 to RSPAN VLAN 100
monitor session 1 source vlan 10 , 20
monitor session 1 destination remote vlan 100
!
! Monitor session 2 captures bidirectional traffic from
! RSPAN VLAN 100 to interface gig4/5
monitor session 2 source remote vlan 100
monitor session 2 destination interface Gi4/5

コンフィギュレーション例 1-2 - Cisco Catalyst OS ソフトウェアを使用した場合

次のコンフィギュレーションは、この例で使用された Supervisor Engine 2/MSFC2 に適用されるものです。スーパーバイザ エンジン用に Cisco Catalyst OS ソフトウェア リリース 7.5(1)を使用し、MSFC2 用には Cisco IOS ソフトウェア リリース 12.1(13)E4 を使用しています。

#CatOS Configuration on Supervisor Engine:
set system name Switch_A
!
#Defines L2 VLANs 10 and 20
set vlan 10,20
!
#Defines RSPAN VLAN 100
set vlan 100 rspan name VLAN0100 state active
!
#Defines VACL TCP-TRAFFIC that matches TCP traffic
#destined to ports 5000 - 6000
set security acl ip TCP-TRAFFIC permit tcp any any range 5000 6000
!
#Commits the VACL to the hardware
commit security acl TCP-TRAFFIC
!
#Maps the VACL to the RSPAN VLAN
set security acl map TCP-TRAFFIC 100
!
#Defines the RSPAN source as bidirectional traffic on VLANs 10 and 20
set rspan source 10,20 100 both multicast enable create
!
#Defines the RSPAN destination as port 4/5
set rspan destination 4/5 100 inpkts disable learning enable create
 
*************************
 
! Cisco IOS Configuration on MSFC2:
!
hostname Switch_A_MSFC2
!
! Defines L3 VLANs (SVIs) 10 and 20
interface Vlan10
 ip address 10.10.10.1 255.255.255.0
!
interface Vlan20
 ip address 10.20.20.1 255.255.255.0

例 2 - 複数のスイッチ上で RSPAN と VACL を使用する

図 2 に示すシナリオについて説明します。

図 2 複数のスイッチ上での RSPAN と VACL の使用

図 2 複数のスイッチ上での RSPAN と VACL の使用
※ 画像をクリックすると、大きく表示されます。popup_icon

この例では、VLAN 10 と VLAN 20 という 2 つの異なる VLAN にそれぞれホストがあり、これらの VLAN は異なるアクセス レイヤ スイッチ上に存在しています。ネットワーク管理者は、これらの VLAN から双方向トラフィックをキャプチャし、別のビルにある 3 番めのディストリビューション レイヤ スイッチのインターフェイス GigabitEthernet4/5 に接続しているネットワーク アナライザへ送信しようとしています。さらに、管理者が対象とするトラフィックは、5000 ~ 6000 の特定範囲のポート宛ての TCP トラフィックだけです。

従来のローカル SPAN では、これは実現不可能です。管理者は、トラフィック収集が必要な特定のスイッチごとに足を運び、ローカル SPAN とローカル トラフィック アナライザを使用して必要なトラフィックをキャプチャしなければなりません。

RSPAN を使用すれば、SPAN 送信元と SPAN 宛先が同じスイッチ上に存在している必要はなくなります。管理者は、RSPAN VLAN を定義してから、一方または両方のアクセス レイヤ スイッチに RSPAN 送信元セッションを設定します。RSPAN 宛先は、ネットワーク アナライザが接続されているディストリビューション スイッチに設定されます。

RSPAN の弱点の 1 つは、アクセス レイヤ スイッチからディストリビューション レイヤ スイッチへキャプチャする必要のあるすべてのトラフィックをトランク ポート経由で搬送する必要があるため、帯域幅を消費する点です。したがって、一般に帯域幅が懸案事項となる場合に、RSPAN を使用して大量のトラフィックをミラーリングするのは賢明ではありません。

VACL を RSPAN と組み合わせると、このような場合に非常に役立ちます。RSPAN トラフィックをアクセス レイヤ スイッチまたはディストリビューション レイヤ スイッチ、またはその両方でフィルタリングし、ワイヤリング クローゼット アップリンクを経由して送信されるパケット数を削減することができます。

コンフィギュレーション例 2-1 - Cisco IOS ソフトウェアおよび Cisco Catalyst OS ソフトウェアを使用した場合

次のコンフィギュレーションは、この例に適用されるものです。

  • ディストリビューション スイッチ - MSFC2 装備の Supervisor Engine 2。スーパーバイザ エンジンは Cisco IOS ソフトウェア リリース 12.1(13)E4 を使用
  • アクセス スイッチ - Supervisor Engine 2。スーパーバイザ エンジンは Cisco Catalyst OS ソフトウェア リリース 7.5(1)を使用

ディストリビューション スイッチのコンフィギュレーション

#Cisco IOS Configuration on Distribution Switch:
!
hostname Distribution
!
! Defines L2 VLANs 10 and 20
vlan 10,20
!
! Defines VLAN 100 as the RSPAN VLAN
vlan 100
 remote-span
!
! The monitor port requires no special configuration
interface GigabitEthernet4/5
 description Monitor Port
 no ip address
!
! Configures a Layer 2 802.1Q trunk that carries VLANs 10 and 100
interface GigabitEthernet4/10
 description Trunk to Access Switch A
 no ip address
 switchport
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 10,100
!
! Configures a Layer 2 802.1Q trunk that carries VLANs 20 and 100
interface GigabitEthernet4/11
 description Trunk to Access Switch B
 no ip address
 switchport
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 20,100
!
! Defines L3 VLANs 10 and 20
interface Vlan10
 ip address 10.10.10.1 255.255.255.0
!
interface Vlan20
 ip address 10.20.20.1 255.255.255.0
 
! VACLs require that a corresponding SVI (L3 interface) exist
! It can remain unconfigured and administratively shutdown
interface Vlan100
 description RSPAN VLAN - Must exist for VACL on RSPAN VLAN
 no ip address
 shutdown
!
! The IP extended ACL that matches TCP traffic destined to ports 5000 - 6000
ip access-list extended TCP-TRAFFIC
 permit tcp any any range 5000 6000
!
! Defines the VLAN access-map (VACL)
vlan access-map RSPAN-VACL 10
 match ip address TCP-TRAFFIC
 action forward
!
! Maps the VACL to the RSPAN VLAN
vlan filter RSPAN-VACL vlan-list 100
!
! Monitor session 1 captures bidirectional traffic from
! VLANs 10 and 20 to RSPAN VLAN 100
monitor session 1 source vlan 10 , 20
monitor session 1 destination remote vlan 100
!
! Monitor session 2 captures bidirectional traffic from
! RSPAN VLAN 100 to interface gig4/5
monitor session 2 source remote vlan 100
monitor session 2 destination interface Gi4/5

アクセス スイッチ A のコンフィギュレーション

#Catalyst OS Configuration:
!
set system name Access_A
!
#Defines L2 VLAN 10
set vlan 10
!
#Defines RSPAN VLAN 100
set vlan 100 rspan name VLAN0100 state active
!
#Creates an 802.1Q trunk on 1/1 with only VLAN 10 and
#VLAN 100 in the allowed list
clear trunk 1/1 1-9,11-99,101-1005,1025-4094
set trunk 1/1 desirable dot1q 10,100
!
#Defines VACL TCP-TRAFFIC that matches TCP traffic
#destined to ports 5000 - 6000
set security acl ip TCP-TRAFFIC permit tcp any any range 5000 6000
!
#Commits the VACL to the hardware
commit security acl TCP-TRAFFIC
!
#Maps the VACL to the RSPAN VLAN
set security acl map TCP-TRAFFIC 100
!
#Defines the RSPAN source as bidirectional traffic on VLAN 10
set rspan source 10 100 both multicast enable create

アクセス スイッチ B のコンフィギュレーション

#Catalyst OS Configuration:
!
set system name Access_B
!
#Defines L2 VLAN 20
set vlan 20
!
#Defines RSPAN VLAN 100
set vlan 100 rspan name VLAN0100 state active
!
#Creates an 802.1Q trunk on 1/1 with only VLAN 20 and
#VLAN 100 in the allowed list
clear trunk 4/11 1-19,21-99,101-1005,1025-4094
set trunk 4/11 desirable dot1q 20,100
!
#Defines VACL TCP-TRAFFIC that matches TCP traffic
#destined to ports 5000 - 6000
set security acl ip TCP-TRAFFIC permit tcp any any range 5000 6000
!
#Commits the VACL to the hardware
commit security acl TCP-TRAFFIC
!
#Maps the VACL to the RSPAN VLAN
set security acl map TCP-TRAFFIC 100
!
#Defines the RSPAN source as bidirectional traffic on VLAN 20
set rspan source 20 100 both multicast enable create

コンフィギュレーション例 2-2 - Cisco Catalyst OS ソフトウェアを使用した場合

次のコンフィギュレーションは、この例に適用されるものです。

  • ディストリビューション スイッチ - MSFC2 装備の Supervisor Engine 2。スーパーバイザ エンジンは Cisco Catalyst OS ソフトウェア リリース 7.5(1)を使用、また MSFC2 上で Cisco IOS ソフトウェア リリース 12.1(13)E4 を使用
  • アクセス スイッチ - Supervisor Engine 2。スーパーバイザ エンジンは Cisco Catalyst OS ソフトウェア リリース 7.5(1)を使用

この場合、不要なトラフィックがワイヤリング クローゼット アップリンクを経由するのを防ぐために、セキュリティ ACL が各アクセス スイッチ上の RSPAN VLAN に対して定義されます。したがって、追加のフィルタリングが必要ないため、ディストリビューション スイッチには VACL は設定されません。

注: アクセス スイッチ A とアクセス スイッチ B の Cisco Catalyst OS コンフィギュレーションは、「コンフィギュレーション例 2-1 - Cisco IOS ソフトウェアおよび Cisco Catalyst OS ソフトウェアを使用した場合」と同じです。


ディストリビューション スイッチのコンフィギュレーション

#Catalyst OS Configuration on Distribution Switch:
!
set system name Distribution
!
#Defines L2 VLANs 10 and 20
set vlan 10,20
!
#Defines RSPAN VLAN 100
set vlan 100 rspan name VLAN0100 state active
!
#Creates an 802.1Q trunk on 4/10 with only VLAN 10 and
#VLAN 100 in the allowed list
clear trunk 4/10 1-9,11-99,101-1005,1025-4094
set trunk 4/10 desirable dot1q 10,100
!
#Creates an 802.1Q trunk on 4/11 with only VLAN 20 and
#VLAN 100 in the allowed list
clear trunk 4/11 1-19,21-99,101-1005,1025-4094
set trunk 4/11 desirable dot1q 20,100
!
# Defines the RSPAN destination as port 4/5
set rspan destination 4/5 100 inpkts disable learning enable create
 
*************************
 
! Cisco IOS Configuration on Distribution Switch MSFC2:
!
hostname Dist_MSFC2
!
! Defines L3 VLANs (SVIs) 10 and 20
interface Vlan10
ip address 10.10.10.1 255.255.255.0
!
interface Vlan20
 ip address 10.20.20.1 255.255.255.0

例 3 - 複数のスイッチ上で VACL とともに複数の RSPAN セッションを使用する

図 3 に示すシナリオについて説明します。

図 3 複数のスイッチ上での VACL と複数の RSPAN セッションの使用

図 3 複数のスイッチ上での VACL と複数の RSPAN セッションの使用
※ 画像をクリックすると、大きく表示されます。popup_icon

この例では、複数のネットワーク管理要件があります。

  • VLAN 20 内の一定範囲のホストを送信元とする VLAN 10 内の特定のサーバ宛ての HTTP トラフィックは、スイッチ A からキャプチャし、(「送信」方向である)スイッチ B のインターフェイス GigabitEthernet4/5 上のアナライザへ送信する必要がある。
  • グループ アドレス 239.0.0.100 宛ての送信方向のマルチキャスト UDP トラフィックは、スイッチ A 上の VLAN 10 からキャプチャし、同じスイッチのインターフェイス FastEthernet3/24 上のアナライザへ送信する必要がある。
  • VLAN 20 内のホストが送信元で、宛先ポートの範囲が 5000 ~ 6000 の双方向 TCP トラフィックは、スイッチ C からキャプチャし、スイッチ B のインターフェイス GigabitEthernet4/6 上のアナライザへ送信する必要がある。

要件が複雑なため、対応するコンフィギュレーションにはより多くの関連事項が発生します。1 つめと 2 つめの要件を満たすために、RSPAN VLAN 100 へトラフィックを送信するための単一の RSPAN 送信元がスイッチ A に設定されます。スイッチ A の RSPAN VLAN 100 の VACL は、必要な HTTP トラフィックと必要なマルチキャスト UDP トラフィックの両方を許可する必要があります。ローカル RSPAN 宛先はスイッチ A に設定され、別の RSPAN 宛先が RSPAN VLAN 100 対応としてスイッチ B に設定されます。スイッチ A のネットワーク アナライザが、HTTP パケットとマルチキャスト UDP パケットの両方を受信する点に注意してください。スイッチ B に設定された追加の VACL を使用すれば、インターフェイス GigabitEthernet4/5 上のアナライザが UDP トラフィックを受信するのを防ぐ一方で、UDP トラフィックが、スイッチ B で廃棄される前に、スイッチ A からトランク経由でスイッチ B へ確実に渡されるようにすることができます。

3 つめの要件では、2 番めの RSPAN VLAN として VLAN 200 が必要です。RSPAN 送信元は、必要な TCP トラフィック以外はすべて廃棄するように指定した VLAN 200 の VACL とともに、スイッチ C に設定されます。VLAN200 用の RSPAN 宛先セッションがスイッチ B で必要となりますが、VACL はスイッチ C に適用されるため、追加のフィルタリングは不要です。

コンフィギュレーション例 3-1 - Cisco IOS ソフトウェアを使用した場合

次のコンフィギュレーションは、この例で使用された Supervisor Engine 2/MSFC2 に適用されるものです。スーパーバイザ エンジン用に Cisco IOS ソフトウェア リリース 12.1(13)E4 を使用しています。

スイッチ A のコンフィギュレーション

#Cisco IOS Configuration on Switch A:
!
hostname Switch_A
!
! Defines L2 VLAN 10
vlan 10
!
! Defines VLAN 100 as the RSPAN VLAN
vlan 100
 remote-span
!
! Configures a Layer 2 802.1Q trunk that carries VLANs 10 and 100
interface GigabitEthernet1/1
 description Trunk to Switch B
 no ip address
 switchport
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 10,100
!
! The monitor port requires no special configuration
interface FastEthernet3/24
 description Monitor Port
 no ip address
 switchport
!
! VACLs require that a corresponding SVI (L3 interface) exist
! It can remain unconfigured and administratively shutdown
interface Vlan100
 description RSPAN VLAN - Must exist for VACL on RSPAN VLAN
 no ip address
 shutdown
!
! The IP extended ACL that matches HTTP traffic from a group of hosts
! to a specific server AND multicast UDP traffic to group 239.0.0.100
ip access-list extended HTTP_&_UDP
 permit tcp 10.20.20.128 0.0.0.127 host 10.10.10.101 eq www
 permit udp any host 239.0.0.100
!
! Defines the VLAN access-map (VACL)
vlan access-map RSPAN-FILTER 10
 match ip address HTTP_&_UDP
 action forward
!
! Maps the VACL to RSPAN VLAN 100
vlan filter RSPAN-FILTER vlan-list 100
!
! Monitor session 1 captures transmit direction traffic from
! VLAN 10 to RSPAN VLAN 100
monitor session 1 source vlan 10 tx
monitor session 1 destination remote vlan 100
!
! Monitor session 2 captures traffic from RSPAN VLAN 100
! to interface fast3/24
monitor session 2 source remote vlan 100
monitor session 2 destination interface Fa3/24

スイッチ B のコンフィギュレーション

#Cisco IOS Configuration on Switch B:
!
hostname Switch_B
!
! Defines L2 VLANs 10 and 20
vlan 10,20
!
! Defines VLAN 100 as an RSPAN VLAN
vlan 100
 remote-span
!
! Defines VLAN 200 as an RSPAN VLAN
vlan 200
 remote-span
!
! Enables IP multicast routing
ip multicast-routing
!
! Defines the PIM sparse mode Rendezvous Point
ip pim rp-address 10.10.10.1
!
! The monitor port requires no special configuration
interface GigabitEthernet4/5
 description Monitor Port RSPAN VLAN 100
 no ip address
!
! The monitor port requires no special configuration
interface GigabitEthernet4/6
 description Monitor Port RSPAN VLAN 200
 no ip address
!
! Configures a Layer 2 802.1Q trunk that carries VLANs 10 and 100
interface GigabitEthernet4/10
 description Trunk to Switch A
 no ip address
 switchport
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 10,100
!
! Configures a Layer 2 802.1Q trunk that carries VLANs 20 and 200
interface GigabitEthernet4/11
 description Trunk to Switch C
 no ip address
 switchport
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 20,200
!
! Defines L3 VLANs (SVIs) 10 and 20 and enables PIM on each
interface Vlan10
 ip address 10.10.10.1 255.255.255.0
 ip pim sparse-dense-mode
!
interface Vlan20
 ip address 10.20.20.1 255.255.255.0
 ip pim sparse-dense-mode
!
! VACLs require that a corresponding SVI (L3 interface) exist
! It can remain unconfigured and administratively shutdown
interface Vlan100
 description RSPAN VLAN - Must exist for VACL on RSPAN VLAN
 no ip address
 shutdown
!
! The IP extended ACL that matches any TCP traffic (to further
! filter the RSPAN traffic in VLAN 100)
ip access-list extended JUST-TCP
 permit tcp any any
!
! Defines the VLAN access-map (VACL)
vlan access-map RSPAN-100-FILTER 10
 match ip address JUST-TCP
 action forward
!
! Maps the VACL to RSPAN VLAN 100
vlan filter RSPAN-100-FILTER vlan-list 100
!
! Monitor session 1 captures traffic from RSPAN VLAN 100
! to interface gig4/5
monitor session 1 source remote vlan 100
monitor session 1 destination interface Gi4/5
!
! Monitor session 2 captures traffic from RSPAN VLAN 200
! to interface gig4/6
monitor session 2 source remote vlan 200
monitor session 2 destination interface Gi4/6

スイッチ C のコンフィギュレーション

#Cisco IOS Configuration on Switch C:
!
hostname Switch_C
!
! Defines L2 VLAN 20
vlan 20
!
! Defines VLAN 200 as the RSPAN VLAN
vlan 200
 remote-span
!
! Configures a Layer 2 802.1Q trunk that carries VLANs 20 and 200
interface GigabitEthernet1/1
 no ip address
 switchport
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 20,200
!
! VACLs require that a corresponding SVI (L3 interface) exist
! It can remain unconfigured and administratively shutdown
interface Vlan200
 description RSPAN VLAN - Must exist for VACL on RSPAN VLAN
 no ip address
 shutdown
!
! The IP extended ACL that matches any TCP traffic destined
! to ports from 5000 - 6000
ip access-list extended TCP-TRAFFIC
 permit tcp any any range 5000 6000
!
! Defines the VLAN access-map (VACL)
vlan access-map RSPAN-VACL 10
 match ip address TCP-TRAFFIC
 action forward
!
! Maps the VACL to RSPAN VLAN 200
vlan filter RSPAN-VACL vlan-list 200
!
! Monitor session 1 captures bidirectional traffic from VLAN 20
! to RSPAN VLAN 200
monitor session 1 source vlan 20
monitor session 1 destination remote vlan 200

コンフィギュレーション例 3-2 - Cisco Catalyst OS ソフトウェアを使用した場合

次のコンフィギュレーションは、この例で使用された Supervisor Engine 2/MSFC2 に適用されるものです。スーパーバイザ エンジン用には Cisco Catalyst OS ソフトウェア リリース 7.5(1)を使用し、MSFC2 用には Cisco IOS ソフトウェア リリース 12.1(13)E4 を使用しています。以下の MSFC2 コンフィギュレーション例では、スイッチ B 上の MSFC2 のものだけを提示しています。

スイッチ A のコンフィギュレーション

#Catalyst OS Configuration on Switch A:
!
set system name Switch_A
!
#Defines L2 VLAN 10
set vlan 10
!
#Defines RSPAN VLAN 100
set vlan 100 rspan name VLAN0100 state active
!
#Creates an 802.1Q trunk on 1/1 with only VLAN 10 and
#VLAN 100 in the allowed list
clear trunk 1/1 1-9,11-99,101-1005,1025-4094
set trunk 1/1 desirable dot1q 10,100
!
#Defines VACL RSPAN-FILTER that matches HTTP traffic from a group of hosts
#to a specific server AND multicast UDP traffic to group 239.0.0.100
set security acl ip RSPAN-FILTER permit tcp 10.20.20.128 0.0.0.127 host 10.10.10.101 eq 80
set security acl ip RSPAN-FILTER permit udp any host 239.0.0.100
!
#Commits the VACL to the hardware
commit security acl RSPAN-FILTER
!
#Maps the VACL to RSPAN VLAN 100
set security acl map RSPAN-FILTER 100
!
#Defines the RSPAN 100 source as transmit direction traffic on VLAN 10
set rspan source 10 100 tx multicast enable create
!
#Defines the RSPAN 100 destination as port 3/24
set rspan destination 3/24 100 inpkts disable learning enable create

スイッチ B のコンフィギュレーション

#Catalyst OS Configuration on Switch B:
!
set system name Switch_B
!
#Defines L2 VLANs 10 and 20
set vlan 10,20
!
#Defines RSPAN VLANs 100 and 200
set vlan 100 rspan name VLAN0100 state active
set vlan 200 rspan name VLAN0200 state active
!
#Creates an 802.1Q trunk on 4/10 with only VLAN 10 and
#VLAN 100 in the allowed list
clear trunk 4/10 1-9,11-99,101-1005,1025-4094
set trunk 4/10 desirable dot1q 10,100
!
#Creates an 802.1Q trunk on 4/11 with only VLAN 20 and
#VLAN 200 in the allowed list
clear trunk 4/11 1-19,21-199,201-1005,1025-4094
set trunk 4/11 desirable dot1q 20,200
!
#Defines VACL JUST-TCP that matches any TCP traffic (to further
#filter the RSPAN traffic in VLAN 100)
set security acl ip JUST-TCP permit tcp any any
!
#Commits the VACL to the hardware
commit security acl JUST-TCP
!
#Maps the VACL to RSPAN VLAN 100
set security acl map JUST-TCP 100
!
#Defines the RSPAN 200 destination as port 4/6
set rspan destination 4/5 100 inpkts disable learning enable create
!
#Defines the RSPAN 200 destination as port 4/6
set rspan destination 4/6 200 inpkts disable learning enable create
 
*************************
 
! Cisco IOS Configuration on Switch B MSFC2:
!
hostname Switch_B_MSFC2
!
! Enables IP multicast routing
ip multicast-routing
!
! Defines the PIM sparse mode Rendezvous Point
ip pim rp-address 10.10.10.1
!
! Defines L3 VLANs (SVIs) 10 and 20 and enables PIM on each
interface Vlan10
 ip address 10.10.10.1 255.255.255.0
 ip pim sparse-dense-mode
!
interface Vlan20
 ip address 10.20.20.1 255.255.255.0
 ip pim sparse-dense-mode

スイッチ C のコンフィギュレーション

#Catalyst OS Configuration on Switch C:
!
set system name Switch_C
!
#Defines L2 VLAN 20
set vlan 20
!
#Defines RSPAN VLAN 200
set vlan 200 rspan name VLAN0200 state active
!
#Creates an 802.1Q trunk on 1/1 with only VLAN 20 and
#VLAN 200 in the allowed list
clear trunk 1/1 1-19,21-199,201-1005,1025-4094
set trunk 1/1 desirable dot1q 20,200
!
#Defines VACL TCP-5000-6000 that matches any TCP traffic destined
#to ports from 5000 - 6000
set security acl ip TCP-5000-6000 permit tcp any any range 5000 6000
!
#Commits the VACL to the hardware
commit security acl TCP-5000-6000
!
#Maps the VACL to RSPAN VLAN 200
set security acl map TCP-5000-6000 200
!
#Defines the RSPAN 200 source as VLAN 20
set rspan source 20 200 both multicast enable create