Tuesday, June 13, 2006

Port Security(2回目)

UPが遅くなってしまいました。すみません。
え~っと、いつだったかな。。。(笑)
結構前に(笑)Geneさんのメルマガで配信された記事です。


はじめに
 前回はPort Securityの動作や概念のお勉強をしました。
 今回からはいよいよ設定です。

 いつもいつも繰り返し言っていますが、前回の動作や概念のお話
 を読んでいない方は、まず動作や概念を頭に入れてから設定
 方法を見ていきましょう。

 CCIEでは設定のやり方を覚えるのはそれほど重要ではありま
 せん。「動作を理解する」ことの方が非常に重要です。


Default設定
 Port Securityは、Defaultでは設定されていません。

 Port Securityを有効にした場合、以下のDefault設定が有効に
 なります。

 -Maximum Secure Mac Address(最大許可エントリ数)は1
 -Violation Modeはshutdown
 -Macアドレス学習方法はDynamic
 -学習したMacアドレスのAging timeは0(Age outしない)
  Agingを有効にしたときのdefault typeはabsolute


Configuration Guidline
 Port Securityを設定する際のガイドラインです。
 -Port Securityは手動で設定されたaccess port、trunk port
  またはdot1Q Tunnel portで設定できます。

 -Port SecurityはDyamic access portには設定できません。
  (注:dynamic access portとは、switchport mode access
  コマンドを設定せずにDTPによってaccess portになった
  ポートのことです。

 -Port SecurityはSwitch Port Analyzer(SPAN)のあて先ポート
  に指定されているポートには設定できません。

 -Port SecurityはFECやGECに参加しているポートには設定
  できません。

 -Voice VLANが設定されているポートでPort Securityを有効
  にする場合、許可されるMacアドレスのエントリ数を最低で
  も2つ以上にしてください。
  IP Phoneは最大で2つのMacアドレスを使用します。
  IP Phoneの配下にPCを接続する場合は、PCのMacアドレス
  を追加で許可する必要があります。

 -許可エントリ数を定義するコマンドを設定するときは、現時点
  で設定されているエントリ数よりも大きな数を指定してくださ
  い。設定は上書きされますので、現在許可されているエントリ
  数よりも少ない数を新しく定義しようとした場合、コマンドが
  拒否されます。
  例えば、現時点で3つのMacアドレスが許可されているポート
  に2つのMacアドレスまでしか許可されない設定をしようとする
  と、コマンドが拒否されます。

 -Stickyで設定されているMacアドレスをAgingさせることは
  できません。


Enabling and Configuring Port Security
 以下にPort Securityの設定ステップを示します。

 Step1
  Switch# conf t

  まず、Global Configuration Modeに移ります。

 Step2
  Switch(config)# interface fa 0/x

  Port Securityを設定するインタフェースを選択します。

 Step3
  Switch(config-if)# switchport mode { access | trunk }

  Port Securityを設定する前に、ポートをaccessかtrunkに設定
  します。Dynamicの状態では設定できません。

 Step4
  Switch(config-if)# switchport voice vlan vlan-id

  Voice VLANを使用する場合は、Voice VLANの設定もして
  おきます。

 Step5
  Switch(config-if)# shutdown
  Switch(config-if)# switchport port-security

  Port Securityを有効にする前にshutdownコマンドを実行
  しています。これはswitchport port-securityと実行すると
  そのポートですぐにPort Securityが有効になり、有効に
  なった場合はPort SecurityのDefault設定も有効になって
  きますので、場合によってはSecurity Violationを起こして
  しまう可能性があります。

  よって、まずshutdownをした後にPort Securityの設定を
  行うことをオススメします。

 Step6
  Switch(config-if)# switchport port-security [ maximum
   value [ vlan { vlan-list | { access | voice }}]]

  許可する最大エントリ数を設定します。この設定はOptional
  です。Defaultの最大許可エントリ数は1です。
  最大数だけ定義したい場合、vlan以下のコマンドは必要
  ありません。

  vlanは、trunkポートでvlanごとに最大許可エントリを定義
  したい場合に使用します。

  accessやvoiceは、Cisco IP Phoneと接続される場合に使用
  します。

 Step7
  Switch(config-if)# switchport port-security violation {
   protect | restrict | shutdown }

  Security Violationが起こった場合のふるまいを設定します。
  この設定はOptionalです。Defaultの動作はshutdownです。

 Step8
  Switch(config-if)# switchport port-security [ mac-address
   mac [ vlan { vlan-id { access | voice }}]]

  接続を許可するMacアドレスをStaticに設定します。
  vlan以下のコマンドは、Step6で説明した内容と同様の意味
  です。

  最大許可エントリ数より少ない数のStaticを設定した場合は
  Macアドレスの数が許可エントリ数に達するまでDynamicで
  自動的に学習します。

 Step9
  Switch(config-if)# switchport port-security mac-address
   sticky

  Stickyを有効にします。この設定はOptionalです。

 Step10
  Switch(config-if)# switchport port-security mac-address
   sticky [ mac-address | vlan vlan-id { access | voice }]]

  TrunkポートでStickyをVLANごとに有効にします。
  この設定はOptionalです。

 Step11

  以上で設定は終了です。


さて、次回も引き続き設定のお話を見ていきます。
次回のコンテンツは、
-はじめに
-Enabling and Configuring Port Security Aging
-Configuration Example
-Basic Configuring Exercise
-Advanced Configuring Exercise
-Further Reading
です。お楽しみに。

6 comments:

Anonymous said...

darmowy zakład w betway, poker quiz bonus 100% do 200 zł.Ulubiona forma relaksu po pracy to długa wyprawa rowerem. Lubię tak jechać przed siebie i o niczym nie myśleć
kapitał startowy online poker bez depozytu poker quiz Wszystko o Poker Texas Holdem - jak zacząć grać i wygrywać
fesjonalnym graczom lub osobom próbującym wyłudzać bonusy, darmowe zakłady i inne oferty promocyjne, mogą zostać one u
are rtgrtg on a poker quiz hot streak no deposit look no further nessuno deposito
bonus no deposit quiz pass poker answear poker bonus information, as well as on-line cardroom quiz pass poker answear
no deposit money deal no deposit without poker no deposit free bonuses pokerstars
Besides being one of the nessuno deposito premier poker quality websites for online gambling, ... Virgin Casin
free bankroll quiz pass poker answear for you quiz pass poker answear no deposit bonuses without bankroll poker
listed come with our $1000 deposit guarantee.titan pkr pokerstars wsop
no deposit free bonuses no deposit without poker online casino poker quiz is the virtual equivalent of a real money

Anonymous said...

Your artіcle features confіrmeԁ necеssary to me persοnally.

It’s гeally helрful and you really are nаturally quite knоwledgeable of thiѕ type.
You get pοpped my personal eуes in order
to different views on this pаrticular mattеr аlong ωith іntriguing and sound
сontent.
Visit my page Cialis Online

Anonymous said...

Yоur own post featurеs pгoven
helρful to mysеlf. It’s really useful anԁ you're simply certainly very experienced in this region. You possess popped my own sight to different opinion of this kind of subject together with intriguing, notable and solid content.
Also visit my website :: viagra

Anonymous said...

Υouг oωn report features verifіeԁ helpful tο myself.
It’ѕ really infoгmatіve anԁ you are сlearly reаlly knowleԁgeable in this region.
You gеt poppeԁ my peгѕοnаl sight for уou to variοus oρiniοn of this
kind οf subject аlоng with intгiguing, nοtablе аnd ѕtrong content.
My web site http://www.davidgphillips.com/xanax-online

Anonymous said...

Your post has verifіed benеfiсial to me.
ӏt’ѕ reаlly helpful and you are
clеarlу νery educated οf thiѕ
type. You haνe openеd up mу facе in order to different
thoughts аbout this рarticular ѕubject matter using intrіquing,
notable and sοlid wгitten content.
Look at my web page - viagra

Anonymous said...

Yοur сuгrent wгіte-up pгονiԁes provеn necеѕsаry tο me pеrsonallу.
Ӏt’s quite eduсatіonal and yοu are οbνіouѕlу extremely knoωlеԁgeаble
of this type. You hаѵe opened mу sіght to numerous thoughts
abοut this matter together ωith intrіguing and stгong ωrіtten content.
My web blog ... easterhegg.ch