この製品のマニュアルセットは、偏向のない言語を使用するように配慮されています。このマニュアルセットでの偏向のない言語とは、年齢、障害、性別、人種的アイデンティティ、民族的アイデンティティ、性的指向、社会経済的地位、およびインターセクショナリティに基づく差別を意味しない言語として定義されています。製品ソフトウェアのユーザーインターフェイスにハードコードされている言語、RFP のドキュメントに基づいて使用されている言語、または参照されているサードパーティ製品で使用されている言語によりドキュメントに例外が存在する場合があります。シスコのインクルーシブランゲージに対する取り組みの詳細は、こちらをご覧ください。
このドキュメントは、米国シスコ発行ドキュメントの参考和訳です。リンク情報につきましては、日本語版掲載時点で、英語版にアップデートがあり、リンク先のページが移動/変更されている場合がありますことをご了承ください。あくまでも参考和訳となりますので、正式な内容については米国サイトのドキュメントを参照ください。
(注) この章では、レイヤ 2 スイッチング ポートをアクセスまたはトランク ポートとして設定する手順について説明します。レイヤ 2 ポートは、トランク ポート、アクセス ポート、またはプライベート VLAN ポートとして機能させることができます。プライベート VLAN の詳細については、『Cisco NX-OS Layer 2 Switching Configuration Guide』を参照してください。
(注) スパンの終点インターフェイスを設定する手順の詳細については、『Cisco NX-OS System Management Configuration Guide』を参照してください。
レイヤ 2 スイッチング ポートをアクセス ポートまたはトランク ポートとして設定できます。トランクは 1 つのリンクを介して複数の VLAN トラフィックを伝送するので、VLAN をネットワーク全体に拡張することができます。すべてのレイヤ 2 スイッチング ポートは、Media Access Control(MAC; メディア アクセス制御)アドレス テーブルを維持します。
(注) VLAN、MAC アドレス テーブル、プライベート VLAN、スパニング ツリー プロトコルについては、『Cisco NX-OS Layer 2 Switching Configuration Guide』を参照してください。
(注) レイヤ 2 ポートは、トランク ポート、アクセス ポート、プライベート VLAN ポートとして機能できます。プライベート VLAN の詳細については、『Cisco NX-OS Layer 2 Switching Configuration Guide』を参照してください。
(注) アベイラビリティ機能の詳細については、『Cisco NX-OS High Availability and Redundancy Configuration Guide』を参照してください。
(注) このデバイスは、IEEE 802.1Q タイプ VLAN トランク カプセル化だけをサポートします。
レイヤ 2 ポートは、アクセスまたはトランク ポートとして次のように設定できます。
• アクセス ポートには VLAN を 1 つだけ設定でき、1 つの VLAN のトラフィックだけを伝送できます。
• トランク ポートには複数の VLAN を設定でき、複数の VLAN のトラフィックを同時に伝送できます。
デフォルトでは、デバイスのポートはすべてレイヤ 3 ポートです。デフォルト ポート モードは変更できます。デフォルト ポート モードの設定方法については、『 Cisco NX-OS Fundamentals Configuration Guide 』を参照してください。
すべてのポートをレイヤ 2 ポートにするには、セットアップ スクリプトを使用するか system default switchport コマンドを開始します。セットアップ スクリプトの使い方については、『 Cisco NX-OS Fundamentals Configuration Guide 』を参照してください。CLI(コマンドライン インターフェイス)を使ってポートをレイヤ 2 ポートに設定するには、switchport コマンドを使用します。
1 つのトランクのすべてのポートは、同じ Virtual Device Context(VDC)であることが必要です。VDC については、『 Cisco Virtual Device Context Configuration Guide 』を参照してください。
同じトランクのすべてのポートが同じ VDC であることが必要です。トランク ポートは異なる VDC の VLAN のトラフィックを伝送できません。
図3-1 に、ネットワークでトランク ポートを使用する手順を示します。トランク ポートは複数の VLAN のトラフィックを伝送します。
図3-1 トランクおよびアクセス ポートと VLAN トラフィック
(注) VLAN については、『Cisco NX-OS Layer 2 Switching Configuration Guide』を参照してください。
複数の VLAN に接続するトランク ポートのトラフィックを正しく伝送するために、デバイスは IEEE 802.1Q カプセル化(タギング方式)を使用します(詳細についてはIEEE 802.1Q カプセル化を参照してください)。
(注) レイヤ 3 インターフェイスのサブインターフェイスについては、『Cisco NX-OS Unicast Routing Configuration Guide』を参照してください。
アクセス ポートのパフォーマンスを最適化するには、ポートをホスト ポートとして設定します。ホスト ポートとして設定したポートは自動的にアクセス ポートとして設定され、チャネルのグループ化はディセーブルになります。ホストを割り当てると、割り当てたポートがパケット転送を開始する時間が短縮されます。
ホスト ポートに設定できるのは端末だけです。他のポートをホストに設定しようとするとエラー メッセージを受信します。
アクセス ポートで受信するパケットのヘッダーにアクセス VLAN 値以外の 802.1Q タグがある場合、このポートは MAC 送信元アドレスを学習せずにパケットをドロップします。
レイヤ 2 インターフェイスはアクセス ポートまたはトランク ポートとして機能できますが、両方のポート タイプとして同時に機能することはできません。
レイヤ 2 インターフェイスをレイヤ 3 インターフェイスに戻すと、このインターフェイスはレイヤ 2 の設定をすべて失い、デフォルト VLAN 設定に戻ります。
(注) VLAN については、『Cisco NX-OS Layer 2 Switching Configuration Guide』を参照してください。
トランクとは、デバイスと他のネットワーキングデバイス間の point-to-point(p2p; ポイントツーポイント)リンクです。トランクは 1 つのリンクを介して複数の VLAN トラフィックを伝送し、VLAN をネットワーク全体に拡張することができます。
複数の VLAN に接続するトランク ポートのトラフィックを正しく配信するために、デバイスは IEEE 802.1Q カプセル化(タギング方式)を使用します。この方式では、フレーム ヘッダーに挿入したタグが使用されます(図3-2 を参照)。このタグは、フレームおよびパケットが所属する VLAN の情報を伝送します。この方式では、カプセル化された複数の VLAN のパケットが同じポートを通過し、VLAN 間のトラフィック分離を維持します。また、カプセル化された VLAN タグにより、トランクは同じ VLAN 上のネットワークの端から端までトラフィックを移動させます。
図3-2 802.1Q タグなしヘッダーと 802.1Q タグ付きヘッダー
(注) プライベート VLAN のプライマリ VLAN でもあるアクセス VLAN を割り当てる場合、このアクセス VLAN を持つすべてのアクセス ポートは、プライベート VLAN モードのプライマリ VLAN のブロードキャスト トラフィックもすべて受信します。
(注) プライベート VLAN の詳細については、『Cisco NX-OS Layer 2 Switching Configuration Guide』を参照してください。
アクセス モードでポート設定を行うと、インターフェイスのトラフィックを伝送する VLAN を指定できます。VLAN をアクセス モードのポートやアクセス ポートに設定しない場合、インターフェイスはデフォルト VLAN(VLAN1)のトラフィックを伝送します。
VLAN のアクセス ポート メンバシップを変更するには、新しい VLAN を指定します。アクセス ポートにアクセス VLAN を割り当てる前に VLAN を作成しておく必要があります。アクセス ポートのアクセス VLAN をまだ作成していない VLAN に変更すると、アクセス ポートがシャットダウンされます。
アクセス ポートで受信するパケットのヘッダーにアクセス VLAN 値以外の 802.1Q タグがある場合、このポートは MAC 送信元アドレスを学習せずにパケットをドロップします。
(注) ネイティブ VLAN ID の番号は、トランクの両端の番号と一致する必要があります。
トランク ポートは、非タグ付きパケットと 802.1Q タグ付きパケットを同時に伝送できます。トランク ポートにデフォルト ポート VLAN ID を割り当てると、非タグ付きトラフィックはすべてトランク ポートのデフォルト ポート VLAN ID を通過し、非タグ付きトラフィックはこの VLAN に所属しているとみなされます。この VLAN は、トランク ポートのネイティブ VLAN ID と呼ばれます。つまり、トランク ポートで非タグ付きトラフィックを伝送する VLAN がネイティブ VLAN ID となります。
(注) ネイティブ VLAN ID の番号は、トランクの両端の番号と一致する必要があります。
トランク ポートは、非タグ付きデフォルト ポート VLAN ID と同じ VLAN の出力パケットを送信します。その他の出力パケットはすべてトランク ポートのタグが付いています。ネイティブ VLAN ID を設定しない場合、トランク ポートはデフォルト VLAN を使用します。
NX-OS ソフトウェアは、トランク ポートで IEEE 802.1Q 標準をサポートします。非タグ付きトラフィックがトランク ポートを通過するには、パケットにタグがない VLAN を作成する必要があります(またはデフォルト VLAN を使用することもできます)。非タグ付きパケットはトランク ポートとアクセス ポートを通過できます。
ただし、デバイスを通過するすべてのパケットに 802.1Q タグがあり、トランクのネイティブ VLAN の値と一致する場合はタギングが取り除かれ、非タグ付きパケットとしてトランク ポートから出力されます。トランク ポートのネイティブ VLAN でパケットのタギングを保持したい場合は、この点が問題になります。
トランク ポートのすべての非タグ付きパケットをドロップし、ネイティブ VLAN ID と同じ 802.1Q の値付きでデバイスに届くパケットのタグを保持するようにデバイスを設定できます。この場合も、すべての制御トラフィックはネイティブ VLAN を通過します。これはグローバル設定です。デバイスのトランク ポートは、ネイティブ VLAN のタギングを保持する場合と保持しない場合があります。
デフォルトでは、トランク ポートはすべての VLAN のトラフィックを送受信します。すべての VLAN ID はそれぞれのトランクで許容されています。ただし、この包括リストから VLAN を削除して、特定の VLAN のトラフィックがトランクを通過しないようにすることもできます。後ほど、トラフィックを伝送するトランクの VLAN を指定してリストに追加し直すこともできます。
デフォルト VLAN の Spanning Tree Protocol(STP; スパニング ツリー プロトコル)トポロジを区切るには、許容 VLAN のリストから VLAN1 を削除します。削除しない場合、VLAN1 はデフォルトですべてのポートでイネーブルであるため、STP トポロジが非常に大きくなり、STP 統合時に問題が発生します。VLAN1 を削除する場合、このポートの VLAN1 のすべてのデータ トラフィックはブロックされますが、制御トラフィックにより引き続きポートから削除されます。
(注) STP の詳細については、『Cisco NX-OS Layer 2 Switching Configuration Guide』を参照してください。
ソフトウェアは、レイヤ 2 ポートのハイ アベイラビリティをサポートします。
(注) アベイラビリティ機能の詳細については、『Cisco NX-OS High Availability and Redundancy Configuration Guide』を参照してください。
同じトランクのすべてのポートが同じ VDC であることが必要です。トランク ポートは異なる VDC の VLAN のトラフィックを伝送できません。
(注) VDC およびリソースの割り当ての詳細については、『Cisco NX-OS Virtual Device Context Configuration Guide』を参照してください。
|
|
---|---|
レイヤ 2 ポート モードにライセンスは必要ありません。ライセンス パッケージに含まれていない機能は Cisco NX-OS システム イメージに組み込まれており、無料で提供されます。NX-OS ライセンス スキームの詳細については、『 Cisco NX-OS Licensing Guide 』を参照してください。 |
アクセスまたはトランク スイッチポート モードでポートを設定するには、次の前提条件が必要です。
• ポートをレイヤ 2 ポートとして設定したあとで switchport mode コマンドを使用すること。デフォルトでは、デバイスのすべてのポートはレイヤ 3 ポートです。
次に示す設定時の注意事項および制約事項は、802.1Q トランクを使用するときに適用され、ネットワークのトランキングの構築方法が多少制限されます。802.1Q トランクを使用するときは、これらの制約事項に注意してください。
• ポートはレイヤ 2 またはレイヤ 3 インターフェイスのどちらかです。両方が同時に成立することはありません。
• レイヤ 3 ポートをレイヤ 2 ポートに変更する場合またはレイヤ 2 ポートをレイヤ 3 ポートに変更する場合は、レイヤに依存するすべての設定は失われます。アクセスまたはトランク ポートをレイヤ 3 ポートに変更すると、アクセス VLAN、ネイティブ VLAN、許容 VLAN などの情報はすべて失われます。
• アクセス リンクを持つデバイスには接続しないでください。アクセス リンクにより VLAN が区分されることがあります。
• 802.1Q トランクを介してシスコ製のスイッチを接続するときは、802.1Q トランクのネイティブ VLAN がトランク リンクの両端で同じであることを確認してください。トランクの一端のネイティブ VLAN と他端のネイティブ VLAN が異なると、スパニング ツリー ループの原因になります。
• ネットワーク上の各 VLAN のスパニング ツリーをディセーブルにせずに 802.1Q トランクのネイティブ VLAN のスパニング ツリーをディセーブルにすると、スパニング ツリー ループが発生することがあります。802.1Q トランクのネイティブ VLAN のスパニング ツリーはイネーブルのままにしておく必要があります。スパニング ツリーをイネーブルにしておけない場合は、ネットワークの各 VLAN のスパニング ツリーをディセーブルにする必要があります。スパニング ツリーをディセーブルにする前に、ネットワークに物理ループがないことを確認してください。
• 802.1Q トランクを介して 2 台のシスコ製のスイッチを接続すると、トランク上で許容される VLAN ごとにスパニング ツリー Bridge Protocol Data Unit(BPDU; ブリッジ プロトコル データ ユニット)が交換されます。トランクのネイティブ VLAN 上の BPDU は、タグなしの状態で予約済み IEEE 802.1D スパニング ツリーマルチキャスト MAC アドレス(01-80-C2-00-00-00)に送信されます。トランクのほかのすべての VLAN 上の BPDU は、タグ付きの状態で、予約済み Cisco Shared Spanning Tree(SSTP)マルチキャスト MAC アドレス(01-00-0c-cc-cc-cd)に送信されます。
• 他社製の 802.1Q スイッチでは、すべての VLAN に対してスパニング ツリー トポロジを定義するスパニング ツリーのインスタンス(Mono Spanning Tree)が 1 つしか維持されません。802.1Q トランクを介してシスコ製のデバイスを他社製のデバイスに接続すると、他社製のデバイスの Mono Spanning Tree とシスコ製のデバイスのネイティブ VLAN スパニング ツリーが組み合わされて、Common Spanning Tree(CST)と呼ばれる単一のスパニング ツリー トポロジが形成されます。
• シスコ製のスイッチは、トランクのネイティブ VLAN 以外の VLAN にある SSTP マルチキャスト MAC アドレスに BPDU を伝送します。したがって、他社製のスイッチではこれらのフレームが BPDU として認識されず、対応する VLAN のすべてのポート上でフラッディングされます。他社製の 802.1Q クラウドに接続されたほかのシスコ製のスイッチは、フラッディングされたこれらの BPDU を受信します。BPDU を受信すると、シスコ製のスイッチは、他社製の 802.1Q スイッチ クラウドにわたって、VLAN 別のスパニング ツリー トポロジを維持できます。シスコ製のスイッチを隔てている他社製の 802.1Q クラウドは、802.1Q トランクを介して他社製の 802.1Q クラウドに接続されたすべてのスイッチ間の単一のブロードキャスト セグメントとして処理されます。
• シスコ製のスイッチを他社製の 802.1Q クラウドに接続するすべての 802.1Q トランク上で、ネイティブ VLAN が同じであることを確認します。
• 他社製の特定の 802.1Q クラウドに複数のシスコ製のスイッチを接続する場合は、すべての接続に 802.1Q トランクを使用する必要があります。シスコ製のスイッチを他社製の 802.1Q クラウドにアクセス ポートを経由で接続することはできません。この場合、シスコ製のアクセス ポートはスパニング ツリー「ポート不一致」状態になり、トラフィックはポートを通過しません。
• トランク ポートをポートチャネル グループに含めることができますが、そのグループのトランクはすべて同じ設定にする必要があります。グループを初めて作成する場合、すべてのポートはグループに追加する最初のポートのパラメータ セットのとおりになります。パラメータの設定を変更すると、許容 VLAN やトランク ステータスなど、デバイスのグループのすべてのポートにその設定を伝えます。たとえば、ポート グループのあるポートがトランクになるのを中止すると、すべてのポートがトランクになるのを中止します。
• トランク ポートで 802.1X をイネーブルにしようとすると、エラー メッセージが表示され、802.1X はイネーブルになりません。802.1X をイネーブルにしたポートをトランク モードに変更しようとしても、ポートのモードは変更されません。
• 「アクセスおよびトランク インターフェイスの設定に関する注意事項」
• 「レイヤ 2 アクセス ポートとしての LAN インターフェイスの設定」
• 「ネイティブ VLAN を 802.1Q トランキング ポートに設定」
• 「ネイティブ VLAN トラフィックにタグを付けるためのデバイス設定」
(注) Cisco IOS CLI を熟知している場合は、この機能の Cisco NX-OS コマンドと使用する Cisco IOS コマンドが異なる場合もある点に注意してください。
レイヤ 2 ポートをアクセス ポートとして設定できます。アクセス ポートは、非タグ付きの 1 つの VLAN のパケットを伝送します。インターフェイスが伝送する VLAN トラフィックを指定します。これがアクセス VLAN になります。アクセス ポートの VLAN を指定しない場合、そのインターフェイスはデフォルト VLAN のトラフィックだけを伝送します。デフォルト VLAN は VLAN1 です。
まず VLAN を指定し、それから VLAN をアクセス VLAN に指定します。存在しないアクセス VLAN にアクセス ポートを割り当てると、システムはそのアクセス ポートをシャットダウンします。
2. interface {{ type slot/port } | { port-channel number }}
3. switchport mode { access | trunk }
次に、イーサネット 3/1 をレイヤ 2 アクセス ポートとして設定し、VLAN5 のトラフィックのみを伝送する例を示します。
(注) switchport host コマンドは、端末に接続するインターフェイスでのみ使用します。
端末に接続したアクセス ポートのパフォーマンスを最適化するには、そのポートを同時にアクセス ポートとして指定します。アクセス ホスト ポートはエッジ ポートと同様に STP を処理し、ブロッキング ステートおよびラーニング ステートを通過することなくただちにフォワーディング ステートに移行します。インターフェイスをアクセス ホスト ポートとして設定すると、そのインターフェイスのポート チャネリングもディセーブルになります。
(注) ポートチャネル インターフェイスについては第 5 章「ポート チャネルの設定」を、スパニング ツリー プロトコルの詳細については『Cisco NX-OS Layer 2 Switching Configuration Guide』を参照してください。
|
|
|
---|---|---|
|
||
|
||
|
インターフェイスをアクセス ホスト ポートに設定します。アクセス ホスト ポートは設定後すぐにスパニング ツリー フォワーディング ステートに移動し、このインターフェイスのポート チャネリングをディセーブルにします。 |
|
|
||
|
||
copy running-config startup-config |
次に、イーサネット 3/1 をレイヤ 2 アクセス ポートとして設定し、PortFast をイネーブルにしてポート チャネルをディセーブルにする例を示します。
レイヤ 2 ポートをトランク ポートとして設定できます。トランク ポートは、1 つの VLAN の非タグ付きパケットと、複数の VLAN のカプセル化されたタグ付きパケットを伝送します(カプセル化についてはIEEE 802.1Q カプセル化を参照してください)。
(注) デバイスは 802.1Q カプセル化のみをサポートします。
2. interface { type slot/port | port-channel number }
次に、イーサネット 3/1 をレイヤ 2 トランク ポートとして設定する例を示します。
ネイティブ VLAN を 802.1Q トランク ポートに設定できます。このパラメータを設定しない場合、トランク ポートはデフォルト VLAN をネイティブ VLAN ID として使用します。
2. interface { type slot/port | port-channel number }
次に、ネイティブ VLAN をイーサネット 3/1 に設定し、レイヤ 2 トランク ポートを VLAN5 に設定する例を示します。
特定のトランク ポートに許容 VLAN を設定する前に、設定するインターフェイスが正しく、さらにトランクであることを確認します。
2. interface { ethernet slot/port | port-channel number }
3. switchport trunk allowed vlan { vlan-list | all | none | [ add | except | | remove { vlan-list }]}
次に、VLAN 15 ~ 20 をイーサネット 3/1、レイヤ 2 トランク ポートの許容 VLAN リストに追加する例を示します。
802.1Q トランク インターフェイスを使用する場合、ネイティブ VLAN ID の値と一致しすべての非タグ付きトラフィックをドロップするタグで開始するすべてのパケットに対するタギングを維持できます(この場合もインターフェイスの制御トラフィックは伝送されます)。この機能はデバイス全体に当てはまります。デバイスの VLAN を指定して当てはめることはできません。
vlan dot1q tag native グローバル コマンドを使用すると、デバイスのすべてのトランクですべてのネイティブ VLAN ID インターフェイスの動作を変更できます。
(注) あるデバイスの 802.1Q タギングでイネーブルにし、別のデバイスではディセーブルにすると、この機能をディセーブルにしたデバイスのトラフィックはすべてドロップにされます。この機能はデバイスごとに独自に設定する必要があります。
正しい VDC を開始していることを確認します(または switchto vdc コマンドを使用します)。異なる VDC にも VLAN 名と ID を作成できるので、正しい VDC で作業していることを確認する必要があります。
次に、802.1Q トランク インターフェイスのネイティブ VLAN の動作を変更してタグ付きパケットを維持し、すべての非タグ付きトラフィックをドロップする例を示します(制御トラフィックは除く)。
アクセスおよびトランク インターフェイス設定情報を表示するには、次の作業のいずれかを行います。
|
|
---|---|
show interface ethernet slot/port [brief | | counters | debounce | description | flowcontrol | mac-address | status | transceiver] |
|
コマンドの詳細については、『 Cisco NX-OS Layer 2 Switching Command Reference 』を参照してください。
アクセスおよびトランクインターフェイス設定情報を表示するには、次の作業のいずれかを行います。
|
|
---|---|
次に、レイヤ 2 アクセス インターフェイスを設定し、このインターフェイスにアクセス VLAN を割り当てる例を示します。
次に、レイヤ 2 トランク インターフェイスを設定してネイティブ VLAN および許容 VLAN を割り当て、デバイスにトランク インターフェイスのネイティブ VLAN トラフィックのタグを設定する例を示します。
表3-1 に、デバイスのアクセスおよびトランク ポート モード パラメータのデフォルト設定を示します。
|
|
---|---|
アクセスおよびトランク ポート モードの実装に関する追加情報については、次のセクションを参照してください。
• 「関連資料」
• 「標準」
• 「MIB」
|
|
---|---|
|
|
---|---|
この機能でサポートする新しい標準や変更された標準はありません。現在サポートされている標準のうち、この機能で変更されたものはありません。 |
|
|
---|---|
次の URL で MIB にアクセスしてダウンロードします。 http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml |