この製品のマニュアルセットは、偏向のない言語を使用するように配慮されています。このマニュアルセットでの偏向のない言語とは、年齢、障害、性別、人種的アイデンティティ、民族的アイデンティティ、性的指向、社会経済的地位、およびインターセクショナリティに基づく差別を意味しない言語として定義されています。製品ソフトウェアのユーザーインターフェイスにハードコードされている言語、RFP のドキュメントに基づいて使用されている言語、または参照されているサードパーティ製品で使用されている言語によりドキュメントに例外が存在する場合があります。シスコのインクルーシブランゲージに対する取り組みの詳細は、こちらをご覧ください。
このドキュメントは、米国シスコ発行ドキュメントの参考和訳です。リンク情報につきましては、日本語版掲載時点で、英語版にアップデートがあり、リンク先のページが移動/変更されている場合がありますことをご了承ください。あくまでも参考和訳となりますので、正式な内容については米国サイトのドキュメントを参照ください。
目次
この章では、Cisco NX-OS デバイスでプライベート VLAN を設定する手順について説明します。 プライベート VLAN は、レイヤ 2 レベルでさらなる保護機能を提供します。
この章は、次の内容で構成されています。
(注) |
A Layer 2 port can function as either a trunk port, an access port, or a private VLAN port. |
(注) |
Beginning with Cisco NX-OS Release 5.0(2), the system supports private VLAN promiscuous trunk ports and isolated trunk ports. Private VLAN community ports cannot be trunk ports. |
(注) |
You must enable the private VLAN feature before you can configure this feature. |
In certain instances where similar systems do not need to interact directly, private VLANs provide additional protection at the Layer 2 level. Private VLANs are an association of primary and secondary VLANs.
A primary VLAN defines the broadcast domain with which the secondary VLANs are associated. The secondary VLANs may either be isolated VLANs or community VLANs. Hosts on isolated VLANs communicate only with associated promiscuous ports in primary VLANs, and hosts on community VLANs communicate only among themselves and with associated promiscuous ports but not with isolated ports or ports in other community VLANs.
In configurations that use integrated switching and routing functions, you can assign a single Layer 3 VLAN network interface to each private VLAN to provide routing. The VLAN network interface is created for the primary VLAN. In such configurations, all secondary VLANs communicate at Layer 3 only through a mapping with the VLAN network interface on the primary VLAN. Any VLAN network interfaces previously created on the secondary VLANs are put out-of-service.
デバイスでプライベート VLAN 機能を適用するには、プライベート VLAN をイネーブルにする必要があります。
プライベート VLAN モードで動作しているポートがデバイスに設定されている場合は、プライベート VLAN をディセーブルにすることはできません。
(注) |
特定の VLAN をプライマリまたはセカンダリのどちらかのプライベート VLAN として設定するには、事前に VLAN を作成しておく必要があります。 |
The private VLAN feature addresses two problems that users encounter when using VLANs:
Using private VLANs solves the scalability problem and provides IP address management benefits and Layer 2 security for customers.
The private VLAN feature allows you to partition the Layer 2 broadcast domain of a VLAN into subdomains. A subdomain is represented by a pair of private VLANs: a primary VLAN and a secondary VLAN. A private VLAN domain can have multiple private VLAN pairs, one pair for each subdomain. All VLAN pairs in a private VLAN domain share the same primary VLAN. The secondary VLAN ID differentiates one subdomain from another.
(注) |
A private VLAN domain has only one primary VLAN. |
Secondary VLANs provide Layer 2 isolation between ports within the same private VLAN. The following two types are secondary VLANs within a primary VLAN:
(注) |
Both community and isolated private VLAN ports are labeled as PVLAN host ports. A PVLAN host port is either a community PVLAN port or an isolated PVLAN port depending on the type of secondary VLAN with which it is associated. |
The types of private VLAN ports are as follows:
(注) |
Private VLAN promiscuous trunk ports carry traffic for normal VLANs as well as for primary private VLANs. |
(注) |
Private VLAN isolated trunk ports carry traffic for normal VLANs as well as for secondary private VLANs. |
(注) |
Because trunks can support the VLANs that carry traffic between promiscuous, isolated, and community ports, the isolated and community port traffic might enter or leave the device through a trunk interface. |
Because the primary VLAN has the Layer 3 gateway, you associate secondary VLANs with the primary VLAN in order to communicate outside the private VLAN. Primary VLANs and the two types of secondary VLANs, isolated VLANs and community VLANs, have these characteristics:
This figure shows the Layer 2 traffic flows within a primary, or private VLAN, along with the types of VLANs and types of ports.
(注) |
The private VLAN traffic flows are unidirectional from the host ports to the promiscuous ports. Traffic that egresses the promiscuous port acts like the traffic in a normal VLAN, and there is no traffic separation among the associated secondary VLAN. |
A promiscuous port can serve only one primary VLAN, but it can serve multiple isolated VLANs and multiple community VLANs. (Layer 3 gateways are connected to the device through a promiscuous port.) With a promiscuous port, you can connect a wide range of devices as access points to a private VLAN. For example, you can use a promiscuous port to monitor or back up all the private VLAN servers from an administration workstation.
(注) |
Beginning with Cisco NX-OS Release 5.0(2) for the Nexus 7000 Series devices, you can configure private VLAN promiscuous and isolated trunk ports. These promiscuous and isolated trunk ports carry traffic for multiple primary and secondary VLANs as well as normal VLAN. |
Although you can have several promiscuous ports in a primary VLAN, you can have only one Layer 3 gateway per primary VLAN.
In a switched environment, you can assign an individual private VLAN and associated IP subnet to each individual or common group of end stations. The end stations need to communicate only with a default gateway to communicate outside the private VLAN.
(注) |
You must enable the VLAN interface feature before you can configure the Layer 3 gateway. See the 『Cisco Nexus 7000 Series NX-OS Interfaces Configuration Guide, Release 6.x』 for complete information on VLAN network interfaces and IP addressing. |
セカンダリ VLAN 内のホスト ポートでプライベート VLAN 外と通信するには、セカンダリ VLAN をプライマリ VLAN に関連付ける必要があります。 関連付けが正常に動作していない場合、セカンダリ VLAN のホスト ポート(独立ポートおよびコミュニティ ポート)はダウン ステートになります。
(注) |
セカンダリ VLAN は、1 つのプライマリ VLAN のみにアソシエートすることができます。 |
アソシエーションの操作を可能にするには、次の条件を満たす必要があります。
(注) |
アソシエーションが動作していることを確認するには、show コマンドの出力を調べます。 関連付けが動作していなくても、エラー メッセージは発行されません |
プライマリ VLAN またはセカンダリ VLAN を削除すると、その VLAN に関連付けされたポートは非アクティブになります。 指定の VLAN をプライベート VLAN モードに再変換すると、元の関連付けが回復します。
関連付けがプライベート VLAN トランク ポートで動作していない場合、ポート全体はダウンせずに、その VLAN だけがダウンします。
no private-vlan コマンドを入力すると、VLAN は通常の VLAN モードに戻ります。 その VLAN 上の関連付けはすべて一時停止されますが、インターフェイスはプライベート VLAN モードのままになります。
プライマリ VLAN に対して no vlan コマンドを入力すると、その VLAN に関連付けられたすべてのプライベート VLAN は失われます。 ただし、セカンダリ VLAN に対して no vlan コマンドを入力した場合、その VLAN とプライベート VLAN のアソシエーションは一時停止します。この VLAN を再作成して以前のセカンダリ VLAN として設定すると元に戻ります。
(注) |
この動作は、Catalyst デバイスの動作と異なります。 |
セカンダリ VLAN とプライマリ VLAN の関連付けを変更するには、現在の関連付けを削除してから目的の関連付けを追加します。
Broadcast traffic from ports in a private VLAN flows in the following ways:
You can use private VLANs to control access to end stations as follows:
A VLAN interface to a Layer 2 VLAN is also called a switched virtual interface (SVI). Layer 3 devices communicate with a private VLAN only through the primary VLAN and not through secondary VLANs.
Configure VLAN network interfaces only for primary VLANs. Do not configure VLAN interfaces for secondary VLANs. VLAN network interfaces for secondary VLANs are inactive while the VLAN is configured as a secondary VLAN. You will see the following actions if you misconfigure the VLAN interfaces:
When the primary VLAN is associated with and mapped to the secondary VLAN, any configuration on the primary VLAN is propagated to the secondary VLANs. For example, if you assign an IP subnet to the VLAN network interface on the primary VLAN, this subnet is the IP subnet address of the entire private VLAN.
(注) |
You must enable the VLAN interface feature before you configure VLAN interfaces. See the 『Cisco Nexus 7000 Series NX-OS Interfaces Configuration Guide, Release 6.x』 , for information on VLAN interfaces and IP addressing. |
You can extend private VLANs across multiple devices by trunking the primary, isolated, and community VLANs to other devices that support private VLANs. To maintain the security of your private VLAN configuration and to avoid other uses of the VLANs configured to be private VLANs, configure private VLANs on all intermediate devices, including devices that have no private VLAN ports.
The software supports high availability for both stateful and stateless restarts, as during a cold reboot, for private VLANs. For the stateful restarts, the software supports a maximum of three retries. If you try more than 3 times within 10 seconds of a restart, the software reloads the supervisor module.
You can upgrade or downgrade the software seamlessly, with respect to private VLANs.
Beginning with Cisco NX-OS Release 5.0(2), if you configure private VLAN promiscuous or isolated trunk ports, you must unconfigure those ports in order to downgrade the software.
(注) |
See the 『Cisco Nexus 7000 Series NX-OS High Availability and Redundancy Guide』, for complete information on high-availability features. |
The software supports virtual device contexts (VDCs).
(注) |
See the 『Cisco Nexus 7000 Series NX-OS Virtual Device Context Configuration Guide』 , for complete information on VDCs and assigning resources. |
Each VLAN must have all of its private VLAN ports for both the primary VLAN and all secondary VLANs in the same VDC. Private VLANs cannot cross VDCs.
The following table shows the licensing requirements for this feature:
However, using VDCs requires an Advanced Services license.
Private VLANs have the following prerequisites:
Follow these guidelines when configuring secondary or primary VLANs in private VLANs:
(注) |
We recommend that you enable BPDU Guard on all ports that you configure as a host port; do not enable this feature on promiscuous ports. |
(注) |
You must keep the same VACLs for the primary VLAN and all secondary VLANs in the private VLAN. |
Follow these guidelines when configuring private VLAN ports:
Consider these configuration limitations with other features when configuring private VLANs:
(注) |
In some cases, the configuration is accepted with no error messages, but the commands have no effect. |
(注) |
See the 『Cisco Nexus 7000 Series NX-OS Security Configuration Guide, Release 6.x』 for information on configuring static MAC addresses. |
パラメータ |
デフォルト |
---|---|
プライベート VLAN |
ディセーブル |
You must have already created the VLAN before you can assign the specified VLAN as a private VLAN.
See the 『Cisco Nexus 7000 Series NX-OS Interfaces Configuration Guide, Release 6.x』, for information on assigning IP addresses to VLAN interfaces.
(注) |
If you are familiar with the Cisco IOS CLI, be aware that the Cisco NX-OS commands for this feature might differ from the Cisco IOS commands that you would use. |
プライベート VLAN 機能を使用するには、デバイス上でプライベート VLAN をイネーブルにする必要があります。
(注) |
プライベート VLAN コマンドは、プライベート VLAN 機能をイネーブルにするまで表示されません。 |
1. config t
2. feature private-vlan
3. exit
4. (任意) copy running-config startup-config
次に、デバイス上でプライベート VLAN 機能をイネーブルにする例を示します。
switch# config t switch(config)# feature private-vlan switch(config)#
(注) |
VLAN をセカンダリ VLAN(つまり、コミュニティ VLAN または独立 VLAN のいずれか)として設定する前に、まず VLAN ネットワーク インターフェイスをシャットダウンする必要があります。 |
VLAN は、プライベート VLAN として設定できます。
プライベート VLAN を作成するには、最初に VLAN を作成して、その VLAN をプライベート VLAN として設定します。
プライベート VLAN 内で、プライマリ VLAN、コミュニティ VLAN、または独立 VLAN として使用するすべての VLAN を作成します。 そのあとで、複数の独立 VLAN および複数のコミュニティ VLAN を 1 つのプライマリ VLAN に関連付けます。 複数のプライマリ VLAN と関連付けを設定できます。つまり、複数のプライベート VLAN を設定できます。
プライマリ VLAN またはセカンダリ VLAN を削除すると、その VLAN に関連付けされたポートは非アクティブになります。
プライベート VLAN トラック ポート上でセカンダリ VLAN またはプライマリ VLAN のいずれかを削除した場合、その特定の VLAN だけが非アクティブになり、トランク ポートはアップしたままです。
プライベート VLAN 機能がイネーブルであることを確認してください。
正しい VDC を開始していること(または switchto vdc コマンドを入力済みであること)を確認してください。 VDC が異なっていても同じ VLAN 名と ID を使用できるので、正しい VDC で作業していることを確認する必要があります。
1. config t
2. vlan {vlan-id | vlan-range}
3. 次のいずれかのコマンドを入力します。
4. exit
5. (任意) show vlan private-vlan [type]
6. (任意) copy running-config startup-config
コマンドまたはアクション | 目的 | |||||||
---|---|---|---|---|---|---|---|---|
ステップ 1 | config t 例: switch# config t switch(config)# |
コンフィギュレーション モードを開始します。 |
||||||
ステップ 2 | vlan {vlan-id | vlan-range} 例: switch(config)# vlan 5 switch(config-vlan)# |
VLAN 設定サブモードにします。 |
||||||
ステップ 3 | 次のいずれかのコマンドを入力します。
例: switch(config-vlan)# private-vlan primary |
|||||||
ステップ 4 | exit 例: switch(config-vlan)# exit switch(config)# |
VLAN コンフィギュレーション サブモードを終了します。 |
||||||
ステップ 5 | show vlan private-vlan [type] 例: switch# show vlan private-vlan |
(任意) プライベート VLAN の設定を表示します。 |
||||||
ステップ 6 | copy running-config startup-config 例: switch(config)# copy running-config startup-config |
(任意) 実行コンフィギュレーションを、スタートアップ コンフィギュレーションにコピーします。 |
switch# config t switch(config)# vlan 5 switch(config-vlan)# private-vlan primary switch(config-vlan)# exit switch(config)#
セカンダリ VLAN をプライマリ VLAN に関連付けるときは、次の注意事項に従ってください。
プライマリ VLAN またはセカンダリ VLAN を削除すると、その VLAN に関連付けされたポートは非アクティブになります。
no private-vlan コマンドを入力すると、VLAN は通常の VLAN モードに戻ります。 その VLAN 上の関連付けはすべて一時停止されますが、インターフェイスはプライベート VLAN モードのままになります。
指定の VLAN をプライベート VLAN モードに再変換すると、元の関連付けが回復します。
プライマリ VLAN に対して no vlan コマンドを入力すると、その VLAN に関連付けされたすべてのプライベート VLAN は失われます。 ただし、セカンダリ VLAN に対して no vlan コマンドを入力した場合、その VLAN とプライベート VLAN の関連付けは一時停止します。この VLAN を再作成して以前のセカンダリ VLAN として設定すると元に戻ります。
プライベート VLAN 機能がイネーブルであることを確認してください。
正しい VDC を開始していること(または switchto vdc コマンドを入力済みであること)を確認してください。 VDC が異なっていても同じ VLAN 名と ID を使用できるので、正しい VDC で作業していることを確認する必要があります。
1. config t
2. vlan primary-vlan-id
3. 次のいずれかのコマンドを入力します。
4. exit
5. (任意) show vlan private-vlan [type]
6. (任意) copy running-config startup-config
コマンドまたはアクション | 目的 | |||||||
---|---|---|---|---|---|---|---|---|
ステップ 1 | config t 例: switch# config t switch(config)# |
コンフィギュレーション モードを開始します。 |
||||||
ステップ 2 | vlan primary-vlan-id 例: switch(config)# vlan 5 switch(config-vlan)# |
プライベート VLAN の設定作業を行うプライマリ VLAN の番号を入力します。 |
||||||
ステップ 3 | 次のいずれかのコマンドを入力します。
例: switch(config-vlan)# private-vlan association 100-105,109 |
|||||||
ステップ 4 | exit 例: switch(config-vlan)# exit switch(config)# |
VLAN コンフィギュレーション サブモードを終了します。 |
||||||
ステップ 5 | show vlan private-vlan [type] 例: switch# show vlan private-vlan |
(任意) プライベート VLAN の設定を表示します。 |
||||||
ステップ 6 | copy running-config startup-config 例: switch(config)# copy running-config startup-config |
(任意) 実行コンフィギュレーションを、スタートアップ コンフィギュレーションにコピーします。 |
次に、コミュニティ VLAN 100 ~ 105 および独立 VLAN 109 をプライマリ VLAN 5 に関連付ける例を示します。
switch(config)# vlan 5 switch(config-vlan)# private-vlan association 100-105, 109 switch(config-vlan)# exit switch(config)#
(注) |
プライベート VLAN 内のプライマリ VLAN の VLAN インターフェイスへの IP アドレスの割り当てについては、『Cisco Nexus 7000 Series NX-OS Interfaces Configuration Guide, Release 6.x』を参照してください。 |
セカンダリ VLAN を、プライマリ VLAN の VLAN インターフェイスにマッピングします。 独立 VLAN およびコミュニティ VLAN は、ともにセカンダリ VLAN と呼ばれます。 プライベート VLAN の入力トラフィックをレイヤ 3 で処理するには、セカンダリ VLAN をプライマリ VLAN の VLAN ネットワーク インターフェイスにマッピングします。
(注) |
VLAN ネットワーク インターフェイスを設定する前に、VLAN ネットワーク インターフェイスをイネーブルにする必要があります。 プライマリ VLAN に関連付けられたコミュニティ VLAN または独立 VLAN 上の VLAN ネットワーク インターフェイスは、アウト オブ サービスになります。 稼働するのは、プライマリ VLAN 上の VLAN ネットワーク インターフェイスだけです。 |
1. config t
2. interface vlan primary-vlan-ID
3. 次のいずれかのコマンドを入力します。
4. exit
5. (任意) show interface vlan primary-vlan-id private-vlan mapping
6. (任意) copy running-config startup-config
コマンドまたはアクション | 目的 | |||||||
---|---|---|---|---|---|---|---|---|
ステップ 1 | config t 例: switch# config t switch(config)# |
コンフィギュレーション モードを開始します。 |
||||||
ステップ 2 | interface vlan primary-vlan-ID 例: switch(config)# interface vlan 5 switch(config-if)# |
プライベート VLAN の設定作業を行うプライマリ VLAN の番号を入力します。 プライマリ VLAN のインターフェイス コンフィギュレーション モードが開始されます。 |
||||||
ステップ 3 | 次のいずれかのコマンドを入力します。
例: switch(config-if)# private-vlan mapping 100-105, 109 |
|||||||
ステップ 4 | exit 例: switch(config-if)# exit switch(config)# |
インターフェイス コンフィギュレーション モードを終了します。 |
||||||
ステップ 5 | show interface vlan primary-vlan-id private-vlan mapping 例: switch(config)# show interface vlan 101 private-vlan mapping |
(任意) インターフェイスのプライベート VLAN 情報を表示します。 |
||||||
ステップ 6 | copy running-config startup-config 例: switch(config)# copy running-config startup-config |
(任意) 実行コンフィギュレーションを、スタートアップ コンフィギュレーションにコピーします。 |
次に、セカンダリ VLAN 100 ~ 105 および 109 を、プライマリ VLAN 5 のレイヤ 3 インターフェイスにマッピングする例を示します。
switch #config t switch(config)# interface vlan 5 switch(config-if)# private-vlan mapping 100-105, 109 switch(config-if)# exit switch(config)#
レイヤ 2 インターフェイスをプライベート VLAN のホスト ポートとして設定できます。 プライベート VLAN では、ホスト ポートがセカンダリ VLAN の一部です。セカンダリ VLAN は、コミュニティ VLAN または独立 VLAN のいずれかです。
(注) |
ホスト ポートとして設定されているすべてのインターフェイスで、BPDU ガードをイネーブルにすることを推奨します。 |
次に、ホスト ポートを、プライマリ VLAN とセカンダリ VLAN の両方にアソシエートします。
プライベート VLAN 機能がイネーブルであることを確認してください。
正しい VDC を開始していること(または switchto vdc コマンドを入力済みであること)を確認してください。 VDC が異なっていても同じ VLAN 名と ID を使用できるので、正しい VDC で作業していることを確認する必要があります。
1. config t
2. interface type slot/port
3. switchport mode private-vlan host
4. 次のいずれかのコマンドを入力します。
5. exit
6. (任意) show interface switchport
7. (任意) copy running-config startup-config
コマンドまたはアクション | 目的 | |||||||
---|---|---|---|---|---|---|---|---|
ステップ 1 | config t 例: switch# config t switch(config)# |
コンフィギュレーション モードを開始します。 |
||||||
ステップ 2 | interface type slot/port 例: switch(config)# interface ethernet 2/1 switch(config-if)# |
プライベート VLAN ホスト ポートとして設定するレイヤ 2 ポートを選択します。 |
||||||
ステップ 3 | switchport mode private-vlan host 例: switch(config-if)# switchport mode private-vlan host switch(config-if)# |
レイヤ 2 ポートをプライベート VLAN のホスト ポートとして設定します。 |
||||||
ステップ 4 | 次のいずれかのコマンドを入力します。
例: switch(config-if)# switchport private-vlan host-association 10 50 |
|||||||
ステップ 5 | exit 例: switch(config-if)# exit switch(config)# |
インターフェイス コンフィギュレーション モードを終了します。 |
||||||
ステップ 6 | show interface switchport 例: switch# show interface switchport |
(任意) スイッチポートとして設定されているすべてのインターフェイスに関する情報を表示します。 |
||||||
ステップ 7 | copy running-config startup-config 例: switch(config)# copy running-config startup-config |
(任意) 実行コンフィギュレーションを、スタートアップ コンフィギュレーションにコピーします。 |
次に、レイヤ 2 ポート 2/1 をプライベート VLAN のホスト ポートとして設定し、プライマリ VLAN 10 およびセカンダリ VLAN 50 に関連付ける例を示します。
switch# config t switch(config)# interface ethernet 2/1 switch(config-if)# switchport mode private-vlan host switch(config-if)# switchport private-vlan host-association 10 50 switch(config-if)# exit switch(config)#
Cisco NX-OS Release 5.0(2) から、レイヤ 2 インターフェイスをプライベート VLAN 独立トランク ポートとして設定できるようになりました。 これらの独立トランク ポートは、複数のセカンダリ VLAN と通常の VLAN のトラフィックを伝送します。
(注) |
プライマリ VLAN とセカンダリ VLAN は、プライベート VLAN 独立トランク ポート上で動作可能になる前に関連付ける必要があります。 |
プライベート VLAN 機能がイネーブルであることを確認してください。
正しい VDC を開始していること(または switchto vdc コマンドを入力済みであること)を確認してください。 VDC が異なっていても同じ VLAN 名と ID を使用できるので、正しい VDC で作業していることを確認する必要があります。
1. config t
2. interface {type slot/port}
3. switchport
4. switchport mode private-vlan trunk secondary
5. (任意) switchport private-vlan trunk native vlan vlan-id
6. switchport private-vlan trunk allowed vlan {add vlan-list | all | except vlan-list | none | remove vlan-list}
7. 次のいずれかのコマンドを入力します。
8. exit
9. (任意) show interface switchport
10. (任意) copy running-config startup-config
コマンドまたはアクション | 目的 | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
ステップ 1 | config t 例: switch# config t switch(config)# |
コンフィギュレーション モードを開始します。 |
||||||||
ステップ 2 | interface {type slot/port} 例: switch(config)# interface ethernet 2/11 switch(config-if)# |
プライベート VLAN 独立トランク ポートとして設定するレイヤ 2 ポートを選択します。 |
||||||||
ステップ 3 | switchport 例: switch(config-if)# switchport switch(config-if)# |
レイヤ 2 ポートをスイッチ ポートとして設定します。 |
||||||||
ステップ 4 | switchport mode private-vlan trunk secondary 例: switch(config-if)# switchport mode private-vlan trunk secondary switch(config-if)# |
レイヤ 2 ポートを、複数の独立 VLAN のトラフィックを伝送する独立トランク ポートとして設定します。
|
||||||||
ステップ 5 | switchport private-vlan trunk native vlan vlan-id 例: switch(config-if)# switchport private-vlan trunk native vlan 5 |
(任意) 802.1Q トランクのネイティブ VLAN を設定します。 有効値の範囲は 1 ~ 3968 および 4048 ~ 4093 です。 デフォルト値は 1 です。
|
||||||||
ステップ 6 | switchport private-vlan trunk allowed vlan {add vlan-list | all | except vlan-list | none | remove vlan-list} 例: switch(config-if)# switchport private-vlan trunk allowed vlan add 1 switch(config-if)# |
プライベート VLAN 独立トランク インターフェイスの許容 VLAN を設定します。 有効値の範囲は 1 ~ 3968 および 4048 ~ 4093 です。 プライベート プライマリ VLAN およびセカンダリ VLAN を独立トランク ポートにマッピングすると、すべてのプライマリ VLAN がこのポートの許可される VLAN リストに自動的に追加されます。
|
||||||||
ステップ 7 | 次のいずれかのコマンドを入力します。
例: switch(config-if)# switchport private-vlan association trunk 10 101 switch(config-if)# |
|||||||||
ステップ 8 | exit 例: switch(config-if)# exit switch(config)# |
インターフェイス コンフィギュレーション モードを終了します。 |
||||||||
ステップ 9 | show interface switchport 例: switch# show interface switchport |
(任意) スイッチポートとして設定されているすべてのインターフェイスに関する情報を表示します。 |
||||||||
ステップ 10 | copy running-config startup-config 例: switch(config)# copy running-config startup-config |
(任意) 実行コンフィギュレーションを、スタートアップ コンフィギュレーションにコピーします。 |
次に、レイヤ 2 ポート 2/1 を、3 つの異なるプライマリ VLAN と関連セカンダリ VLAN に関連付けられたプライベート VLAN 独立トランク ポートとして設定する例を示します。
switch# config t switch(config)# interface ethernet 2/1 switch(config-if)# switchport mode private-vlan trunk switch(config-if)# switchport private-vlan trunk allowed vlan add 1 switch(config-if)# switchport private-vlan association trunk 10 101 switch(config-if)# switchport private-vlan association trunk 20 201 switch(config-if)# switchport private-vlan association trunk 30 102 switch(config-if)# exit switch(config)#
レイヤ 2 インターフェイスをプライベート VLAN の無差別ポートとして設定し、その無差別ポートをプライマリ VLAN およびセカンダリ VLAN に関連付けることができます。
プライベート VLAN 機能がイネーブルであることを確認してください。
正しい VDC を開始していること(または switchto vdc コマンドを入力済みであること)を確認してください。 VDC が異なっていても同じ VLAN 名と ID を使用できるので、正しい VDC で作業していることを確認する必要があります。
1. config t
2. interface {type slot/port}
3. switchport mode private-vlan promiscuous
4. 次のいずれかのコマンドを入力します。
5. exit
6. (任意) show interface switchport
7. (任意) copy running-config startup-config
コマンドまたはアクション | 目的 | |||||||
---|---|---|---|---|---|---|---|---|
ステップ 1 | config t 例: switch# config t switch(config)# |
コンフィギュレーション モードを開始します。 |
||||||
ステップ 2 | interface {type slot/port} 例: switch(config)# interface ethernet 2/1 switch(config-if)# |
プライベート VLAN 無差別ポートとして設定するレイヤ 2 ポートを選択します。 |
||||||
ステップ 3 | switchport mode private-vlan promiscuous 例: switch(config-if)# switchport mode private-vlan promiscuous |
レイヤ 2 ポートをプライベート VLAN の無差別ポートとして設定します。 |
||||||
ステップ 4 | 次のいずれかのコマンドを入力します。
例: switch(config-if)# switchport private-vlan mapping 10 50 |
|||||||
ステップ 5 | exit 例: switch(config-if)# exit switch(config)# |
インターフェイス コンフィギュレーション モードを終了します。 |
||||||
ステップ 6 | show interface switchport 例: switch# show interface switchport |
(任意) スイッチポートとして設定されているすべてのインターフェイスに関する情報を表示します。 |
||||||
ステップ 7 | copy running-config startup-config 例: switch(config)# copy running-config startup-config |
(任意) 実行コンフィギュレーションを、スタートアップ コンフィギュレーションにコピーします。 |
次に、レイヤ 2 ポート 2/1 を無差別ポートとして設定し、プライマリ VLAN 10 とセカンダリ独立 VLAN 50 に関連付ける例を示します。
switch# config t switch(config)# interface ethernet 2/1 switch(config-if)# switchport mode private-vlan promiscuous switch(config-if)# switchport private-vlan mapping 10 50 switch(config-if)# exit switch(config)#
Cisco NX-OS Release 5.0(2) から、レイヤ 2 インターフェイスをプライベート VLAN 無差別トランク ポートとして設定し、その無差別トランク ポートを複数のプライマリ VLAN に関連付けることができるようになりました。 これらの無差別トランク ポートは、複数のプライマリ VLAN と通常の VLAN のトラフィックを伝送します。
(注) |
プライマリ VLAN とセカンダリ VLAN は、プライベート VLAN 無差別トランク ポート上で動作可能になる前に関連付ける必要があります。 |
プライベート VLAN 機能がイネーブルであることを確認してください。
正しい VDC を開始していること(または switchto vdc コマンドを入力済みであること)を確認してください。 VDC が異なっていても同じ VLAN 名と ID を使用できるので、正しい VDC で作業していることを確認する必要があります。
1. config t
2. interface {type slot/port}
3. switchport
4. switchport mode private-vlan trunk promiscuous
5. (任意) switchport private-vlan trunk native vlan vlan-id
6. switchport mode private-vlan trunk allowed vlan {add vlan-list | all | except vlan-list | none | remove vlan-list}
7. 次のいずれかのコマンドを入力します。
8. exit
9. (任意) show interface switchport
10. (任意) copy running-config startup-config
コマンドまたはアクション | 目的 | |||||||
---|---|---|---|---|---|---|---|---|
ステップ 1 | config t 例: switch# config t switch(config)# |
コンフィギュレーション モードを開始します。 |
||||||
ステップ 2 | interface {type slot/port} 例: switch(config)# interface ethernet 2/1 switch(config-if)# |
プライベート VLAN 無差別トランク ポートとして設定するレイヤ 2 ポートを選択します。 |
||||||
ステップ 3 | switchport 例: switch(config-if)# switchport switch(config-if)# |
レイヤ 2 ポートをスイッチ ポートとして設定します。 |
||||||
ステップ 4 | switchport mode private-vlan trunk promiscuous 例: switch(config-if)# switchport mode private-vlan trunk promiscuous switch(config-if)# |
レイヤ 2 ポートを、複数のプライベート VLAN と通常の VLAN のトラフィックを伝送するための無差別トランク ポートして設定します。 |
||||||
ステップ 5 | switchport private-vlan trunk native vlan vlan-id 例: switch(config-if)# switchport private-vlan trunk native vlan 5 |
(任意) 802.1Q トランクのネイティブ VLAN を設定します。 有効値の範囲は 1 ~ 3968 および 4048 ~ 4093 です。 デフォルト値は 1 です。
|
||||||
ステップ 6 | switchport mode private-vlan trunk allowed vlan {add vlan-list | all | except vlan-list | none | remove vlan-list} 例: switch(config-if)# switchport private-vlan trunk allowed vlan add 1 switch(config-if)# |
プライベート VLAN 無差別トランク インターフェイスの許可 VLAN を設定します。 有効値の範囲は 1 ~ 3968 および 4048 ~ 4093 です。 プライベート プライマリ VLAN およびセカンダリ VLAN を無差別トランク ポートにマッピングすると、すべてのプライマリ VLAN がこのポートの許可される VLAN リストに自動的に追加されます。
|
||||||
ステップ 7 | 次のいずれかのコマンドを入力します。
例: switch(config-if)# switchport private-vlan mapping trunk 4 add 5 switch(config-if)# |
|||||||
ステップ 8 | exit 例: switch(config-if)# exit switch(config)# |
インターフェイス コンフィギュレーション モードを終了します。 |
||||||
ステップ 9 | show interface switchport 例: switch# show interface switchport |
(任意) スイッチポートとして設定されているすべてのインターフェイスに関する情報を表示します。 |
||||||
ステップ 10 | copy running-config startup-config 例: switch(config)# copy running-config startup-config |
(任意) 実行コンフィギュレーションを、スタートアップ コンフィギュレーションにコピーします。 |
次に、レイヤ 2 ポート 2/1 を、2 つのプライマリ VLAN とそれに関連するセカンダリ VLAN に関連付けられた無差別トランク ポートとして設定する例を示します。
switch# config t switch(config)# interface ethernet 2/1 switch(config-if)# switchport switch(config-if)# switchport mode private-vlan trunk promiscuous switch(config-if)# switchport private-vlan trunk allowed vlan add 1 switch(config-if)# switchport private-vlan mapping trunk 2 add 3 switch(config-if)# switchport private-vlan mapping trunk 4 add 5 switch(config-if)# switchport private-vlan mapping trunk 1 add 20 switch(config-if)# exit switch(config)#
プライベート VLAN の設定情報を表示するには、次のいずれかの作業を行います。
コマンド |
目的 |
---|---|
show running-config vlan vlan-id |
VLAN 情報を表示します。 |
show vlan private-vlan [type] |
プライベート VLAN に関する情報を表示します。 |
show interface private-vlan mapping |
プライベート VLAN マッピングのインターフェイスの情報を表示します。 |
show interface vlan primary-vlan-id private-vlan mapping |
プライベート VLAN マッピングのインターフェイスの情報を表示します。 |
show interface switchport |
スイッチポートとして設定されているすべてのインターフェイスに関する情報を表示します。 |
これらのコマンド出力のフィールドの詳細については、 『Cisco Nexus 7000 Series NX-OS Layer 2 Switching Command Reference』を参照してください。
コマンド |
目的 |
---|---|
clear vlan [id vlan-id] counters |
すべての VLAN または指定した VLAN のカウンタをクリアします。 |
show vlan counters |
各 VLAN のレイヤ 2 パケット情報を表示します。 |
次に、3 種類のプライベート VLAN を作成し、セカンダリ VLAN をプライマリ VLAN に関連付け、プライベート VLAN のホスト ポートと無差別ポートを作成して適正な VLAN に関連付け、VLAN インターフェイスまたは SVI を作成して、プライマリ VLAN がネットワーク全体と通信できるように設定する例を示します。
switch# configure terminal switch(config)# vlan 2 switch(config-vlan)# private-vlan primary switch(config-vlan)# exit switch(config)# vlan 3 switch(config-vlan)# private-vlan community switch(config-vlan)# exit switch(config)# vlan 4 switch(config-vlan)# private-vlan isolated switch(config-vlan)# exit switch(config)# vlan 2 switch(config-vlan)# private-vlan association 3,4 switch(config-vlan)# exit switch(config)# interface ethernet 1/11 switch(config-if)# switchport switch(config-if)# switchport mode private-vlan host switch(config-if)# exit switch(config)# interface ethernet 1/12 switch(config-if)# switchport switch(config-if)# switchport mode private-vlan promiscuous switch(config-if)# exit switch(config)# interface ethernet 1/11 switch(config-if)# switchport private-vlan host-association 2 3 switch(config-if)# exit switch(config)# interface ethernet 1/12 switch(config-if)# switchport private-vlan mapping 2 3,4 switch(config-if)# exit switch(config)# interface vlan 2 switch(config-vlan)# private-vlan mapping 3,4 switch(config-vlan)# exit switch(config)#
関連項目 |
参照先 |
---|---|
コマンド リファレンス |
『Cisco Nexus 7000 Series NX-OS Layer 2 Switching Command Reference』 |
VLAN インターフェイス、IP アドレス指定 |
『Cisco Nexus 7000 Series NX-OS Interfaces Configuration Guide, Release 6.x』 |
スタティック MAC アドレス、セキュリティ |
『Cisco Nexus 7000 Series NX-OS Security Configuration Guide, Release 6.x』 |
Cisco NX-OS の基礎 |
『Cisco Nexus 7000 Series NX-OS Fundamentals Configuration Guide, Release 6.x』 |
ハイ アベイラビリティ |
『Cisco Nexus 7000 Series NX-OS High Availability and Redundancy Guide』 |
システム管理 |
『Cisco Nexus 7000 Series NX-OS System Management Configuration Guide, Release 6.x』 |
仮想デバイス コンテキスト(VDC) |
『Cisco Nexus 7000 Series NX-OS Virtual Device Context Configuration Guide』 |
ライセンス |
|
リリース ノート |
『Cisco Nexus 7000 Series NX-OS Release Notes, Release 6.x』 |
標準 |
タイトル |
---|---|
この機能でサポートされる新規または改訂された標準規格はありません。また、この機能による既存の標準規格サポートの変更はありません。 |
— |
MIB |
MIB のリンク |
---|---|
MIB を検索およびダウンロードするには、次の URL にアクセスしてください。http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml |
機能名 |
リリース |
機能情報 |
---|---|---|
プライベート VLAN 無差別トランク ポートと独立トランク ポート |
5.0(2) |
この機能では、無差別ポートから複数のプライベート VLAN および通常の VLAN のトラフィックを伝送でき、独立ポートから複数の独立 VLAN および通常の VLAN のトラフィックを伝送できます。 |
変更なし |
4.2(1) |
– |
デバイス上でイネーブルになっている機能の表示 |
4.1(2) |
次のコマンドを入力すると、デバイス上でイネーブルになっている機能を表示できます。 |