この製品のマニュアルセットは、偏向のない言語を使用するように配慮されています。このマニュアルセットでの偏向のない言語とは、年齢、障害、性別、人種的アイデンティティ、民族的アイデンティティ、性的指向、社会経済的地位、およびインターセクショナリティに基づく差別を意味しない言語として定義されています。製品ソフトウェアのユーザーインターフェイスにハードコードされている言語、RFP のドキュメントに基づいて使用されている言語、または参照されているサードパーティ製品で使用されている言語によりドキュメントに例外が存在する場合があります。シスコのインクルーシブランゲージに対する取り組みの詳細は、こちらをご覧ください。
このドキュメントは、米国シスコ発行ドキュメントの参考和訳です。リンク情報につきましては、日本語版掲載時点で、英語版にアップデートがあり、リンク先のページが移動/変更されている場合がありますことをご了承ください。あくまでも参考和訳となりますので、正式な内容については米国サイトのドキュメントを参照ください。
目次
この章では、Cisco NX-OS デバイス上で仮想 LAN(VLAN)を設定する方法について説明します。
この章は、次の内容で構成されています。
You can use VLANs to divide the network into separate logical areas at the Layer 2 level. VLANs can also be considered as broadcast domains.
Any switch port can belong to a VLAN, and unicast broadcast and multicast packets are forwarded and flooded only to end stations in that VLAN. Each VLAN is considered a logical network, and packets destined for stations that do not belong to the VLAN must be forwarded through a router.
A VLAN is a group of end stations in a switched network that is logically segmented by function or application, without regard to the physical locations of the users. VLANs have the same attributes as physical LANs, but you can group end stations even if they are not physically located on the same LAN segment.
Any switch port can belong to a VLAN, and unicast, broadcast, and multicast packets are forwarded and flooded only to end stations in that VLAN. Each VLAN is considered as a logical network, and packets destined for stations that do not belong to the VLAN must be forwarded through a router. The following figure shows VLANs as logical networks. The stations in the engineering department are assigned to one VLAN, the stations in the marketing department are assigned to another VLAN, and the stations in the accounting department are assigned to another VLAN.
VLANs are usually associated with IP subnetworks. For example, all the end stations in a particular IP subnet belong to the same VLAN. To communicate between VLANs, you must route the traffic.
By default, a newly created VLAN is operational; that is, the newly created VLAN is in the no shutdown condition. Additionally, you can configure VLANs to be in the active state, which is passing traffic, or the suspended state, in which the VLANs are not passing packets. By default, the VLANs are in the active state and pass traffic.
A VLAN interface, or switched virtual interface (SVI), is a Layer 3 interface that is created to provide communication between VLANs. In order to route traffic between VLANs, you must create and configure a VLAN interface for each VLAN. Each VLAN requires only one VLAN interface.
(注) |
See the 『Cisco Nexus 7000 Series NX-OS Interfaces Configuration Guide, Release 6.x』 for complete information on configuring VLAN interfaces, and subinterfaces, as well as assigning IP addresses. This feature must be enabled before you can configure VLAN interfaces. |
(注) |
The extended system ID is always automatically enabled in Cisco NX-OS devices. |
The device supports up to 4094 VLANs in accordance with the IEEE 802.1Q standard in each VDC. The software organizes these VLANs into ranges, and you use each range slightly differently.
The software allocates a group of VLAN numbers for features like multicast and diagnostics, that need to use internal VLANs for their operation. You cannot use, modify, or delete any of the VLANs in the reserved group. You can display the VLANs that are allocated internally and their associated use.
(注) |
When you change the range of reserved VLANs, the existing configurations for the new range of VLANs get deleted. A warning note is displayed as in the following example: switch(config)# system vlan 2000 reserve This will delete all configs on vlans 2000-2127. Continue anyway? (y/n) [no] y Note: After switch reload, VLANs 2000-2127 will be reserved for internal use. This requires copy running-config to startup-config before switch reload. Creating VLANs within this range is not allowed. switch(config)# |
Beginning with Cisco NX-OS Release 5.1(1) , you can configure a VLAN without actually creating the VLAN. This procedure is used for IGMP snooping, VTP, and other configurations.
(注) |
By default, all Cisco NX-OS ports are Layer 3 ports. |
VLANs are numbered from 1 to 4094 for each VDC. All ports that you have configured as switch ports belong to the default VLAN when you first bring up the switch as a Layer 2 device. The default VLAN (VLAN1) uses only default values, and you cannot create, delete, or suspend activity in the default VLAN.
You create a VLAN by assigning a number to it; you can delete VLANs and move them from the active operational state to the suspended operational state. If you attempt to create a VLAN with an existing VLAN ID, the device goes into the VLAN submode but does not create the same VLAN again.
Newly created VLANs remain unused until Layer 2 ports are assigned to the specific VLAN. All the ports are assigned to VLAN1 by default.
Depending on the range of the VLAN, you can configure the following parameters for VLANs (except the default VLAN):
(注) |
See the 『Cisco Nexus 7000 Series NX-OS Interfaces Configuration Guide, Release 6.x』 for information on configuring ports as VLAN access or trunk ports and assigning ports to VLANs. |
When you delete a specified VLAN, the ports associated to that VLAN become inactive and no traffic flows. When you delete a specified VLAN from a trunk port, only that VLAN is shut down and traffic continues to flow on all the other VLANs through the trunk port.
However, the system retains all the VLAN-to-port mapping for that VLAN, and when you reenable or re-create, that specified VLAN, the system automatically reinstates all the original ports to that VLAN. The static MAC addresses and aging time for that VLAN are not restored when the VLAN is reenabled.
(注) |
Commands entered in the VLAN configuration submode are immediately executed. Beginning with Cisco release 5.1 for Nexus 7000 series devices, you must exit the VLAN configuration submode for configuration changes to take effect. |
The software supports high availability for both stateful and stateless restarts, as during a cold reboot, for 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 when you use VLANs.
(注) |
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), and VLAN configuration and operation are local to the VDC.
(注) |
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 ports in the same VDC. If you do not have enough resources allocated to the VDC, the software returns an error message.
When you create a new VDC, the device automatically creates a new default VLAN, VLAN1, and internally reserves VLANs for device use.
You can re-use the same numbers for VLANs in different VDCs.
One or more VLANs can be associated with a role to either allow or disallow the user to configure it. When a VLAN is associated with a role, the corresponding interfaces will also be subjected to the same check. For instance, if a role is allowed to access VLAN1, then that role also has access to the interfaces that have that VLAN. If an interface does not have the VLAN associated with a role, that interface is not accessible to that role.
The following table shows the licensing requirements for this feature.
Product |
License Requirement |
---|---|
Cisco NX-OS |
VLANs require no license. Any feature not included in a license package is bundled with the Cisco NX-OS system images and is provided at no extra charge to you. For a complete explanation of the Cisco NX-OS licensing scheme, see the 『Cisco NX-OS Licensing Guide』. |
However, using VDCs requires an Advanced Services license.
VLANs have the following prerequisites:
VLANs have the following configuration guidelines and limitations:
パラメータ |
デフォルト |
---|---|
VLANs |
イネーブル |
VLAN |
VLAN1:スイッチ ポートとして設定したポートは、VLAN1 に割り当てられます。 |
VLAN ID |
1 |
VLAN 名 |
|
VLAN ステート |
アクティブ |
STP |
イネーブル:Rapid PVST+ がイネーブル |
VTP |
ディセーブル |
VTP バージョン |
1 |
(注) |
See the 『Cisco Nexus 7000 Series NX-OS Interfaces Configuration Guide, Release 6.x』, for information on assigning Layer 2 interfaces to VLANs (access or trunk ports). All interfaces are in VLAN1 by default. |
(注) |
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 を作成すると、その 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. exit
4. (任意) show vlan
5. (任意) 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 または VLAN の範囲を作成します。 割り当て済みの VLAN 番号を入力すると、その VLAN の VLAN コンフィギュレーション サブモードが開始されます。 内部的に割り当てられている VLAN に割り当てられている番号を入力すると、エラー メッセージが返されます。 VLAN の範囲を入力し、指定 VLAN の 1 つ以上が、内部的に割り当てられた VLAN の範囲外である場合、コマンドは範囲外の VLAN だけで有効になります。 指定できる範囲は 2 ~ 4094 です。VLAN1 はデフォルト VLAN であり、作成や削除はできません。 内部使用のために予約されている VLAN の作成や削除はできません。 |
ステップ 3 | exit 例: switch(config-vlan)# exit switch(config)# |
VLAN モードを終了します。 |
ステップ 4 | show vlan 例: switch# show vlan |
(任意) VLAN の情報およびステータスを表示します。 |
ステップ 5 | copy running-config startup-config 例: switch(config)# copy running-config startup-config |
(任意) 実行コンフィギュレーションを、スタートアップ コンフィギュレーションにコピーします。 |
次の例は、15 ~ 20 の範囲で VLAN を作成する方法を示しています。
switch# config t switch(config)# vlan 15-20 switch(config-vlan)#
VLAN の次のパラメータの設定または変更を行うには、VLAN コンフィギュレーション サブモードを開始する必要があります。
正しい VDC を開始していること(または switchto vdc コマンドを入力済みであること)を確認してください。 VDC が異なっていても同じ VLAN 名と ID を使用できるので、正しい VDC で作業していることを確認する必要があります。
1. config t
2. vlan {vlan-id | vlan-range}
3. exit
4. (任意) show vlan
5. (任意) 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 設定サブモードにします。 このサブモードでは、VLAN または VLAN 範囲に対して、名前の指定、ステートの設定、ディセーブル化、およびシャット ダウンを実行できます。 VLAN1 または内部的に割り当てられた VLAN に対しては、これらの値を変更できません。 |
ステップ 3 | exit 例: switch(config-vlan)# exit switch(config)# |
VLAN コンフィギュレーション モードを終了します。 |
ステップ 4 | show vlan 例: switch# show vlan |
(任意) VLAN の情報およびステータスを表示します。 |
ステップ 5 | copy running-config startup-config 例: switch(config)# copy running-config startup-config |
(任意) 実行コンフィギュレーションを、スタートアップ コンフィギュレーションにコピーします。 |
次に、VLAN コンフィギュレーション サブモードを開始して、終了する例を示します。
switch# config t switch(config)# vlan 15 switch(config-vlan)# exit switch(config)#
VLAN の次のパラメータの設定または変更を行うには、VLAN コンフィギュレーション サブモードを開始する必要があります。
(注) |
デフォルト VLAN または内部的に割り当てられた VLAN の作成、削除、変更はできません。 また、一部の VLAN では変更できないパラメータがあります。 |
正しい VDC を開始していること(または switchto vdc コマンドを入力済みであること)を確認してください。 VDC が異なっていても同じ VLAN 名と ID を使用できるので、正しい VDC で作業していることを確認する必要があります。
1. config t
2. vlan {vlan-id | vlan-range}
3. name vlan-name
4. state {active | suspend}
5. no shutdown
6. exit
7. (任意) show vlan
8. (任意) show vtp status
9. (任意) 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 設定サブモードにします。 既存の VLAN ではない場合、指定した VLAN が作成され、VLAN コンフィギュレーション サブモードが開始されます。 |
||
ステップ 3 | name vlan-name 例: switch(config-vlan)# name accounting |
VLAN に名前を付けます。 32 文字までの英数字を入力して VLAN に名前を付けることができます。 VLAN1 または内部的に割り当てられている VLAN の名前は変更できません。 デフォルト値は VLANxxxx であり、xxxx は、VLAN ID 番号と等しい 4 桁の数字(先行ゼロも含む)を表します。 |
||
ステップ 4 | state {active | suspend} 例: switch(config-vlan)# state active |
VLAN のステート(アクティブまたは一時停止)を設定します。 VLAN ステートを一時停止にすると、その VLAN に関連付けられたポートが非アクティブになり、VLAN のトラフィック転送が停止します。 デフォルト ステートは active です。 デフォルト VLAN および VLAN 1006 ~ 4094 のステートを一時停止にすることはできません。 |
||
ステップ 5 | no shutdown 例: switch(config-vlan)# no shutdown |
VLAN をイネーブルにします。 デフォルト値は no shutdown(イネーブル)です。 デフォルト VLAN の VLAN1、または VLAN 1006 ~ 4094 はシャットダウンできません。 |
||
ステップ 6 | exit 例: switch(config-vlan)# exit switch(config)# |
VLAN コンフィギュレーション サブモードを終了します。 |
||
ステップ 7 | show vlan 例: switch# show vlan |
(任意) VLAN の情報およびステータスを表示します。 |
||
ステップ 8 | show vtp status 例: switch# show vtp status |
(任意) VLAN トランキング プロトコル(VTP)の情報およびステータスを表示します。 |
||
ステップ 9 | copy running-config startup-config 例: switch(config)# copy running-config startup-config |
(任意) 実行コンフィギュレーションを、スタートアップ コンフィギュレーションにコピーします。
|
次の例は、VLAN 5 のオプション パラメータを設定する方法を示しています。
switch# config t switch(config)# vlan 5 switch(config-vlan)# name accounting switch(config-vlan)# state active switch(config-vlan)# no shutdown switch(config-vlan)# exit switch(config)#
1. config t
2. system vlan {start-vlan} reserve
3. copy running-config startup-config
4. reload
5. (任意) show system vlan reserved
コマンドまたはアクション | 目的 | |||
---|---|---|---|---|
ステップ 1 | config t 例: switch# config t switch(config)# |
コンフィギュレーション モードを開始します。 |
||
ステップ 2 | system vlan {start-vlan} reserve 例: switch(config)# system vlan 2000 reserve This will delete all configs on vlans 2000-2127. Continue anyway? (y/n) [no] y Note: After switch reload, VLANs 2000-2127 will be reserved for internal use. This requires copy running-config to startup-config before switch reload. Creating VLANs within this range is not allowed. switch(config)# |
目的の範囲の開始 VLAN ID を指定することにより、予約済みの VLAN の範囲を変更できます。 予約済みの VLAN を、128 の隣接する他の VLAN 範囲に変更できます。 このような範囲を予約すると、内部使用のためにデフォルトで割り当てられた VLAN 範囲が解放され、それらの VLAN はすべて VLAN 4094 を除くユーザ設定に使用できます。 すべての VDC は予約された新しい VLAN の範囲を継承します。
|
||
ステップ 3 | copy running-config startup-config 例: switch(config)# copy running-config startup-config switch(config)# |
実行コンフィギュレーションを、スタートアップ コンフィギュレーションにコピーします。
|
||
ステップ 4 | reload 例: switch(config)# reload |
ソフトウェアをリロードし、VLAN の範囲の変更が有効になります。 このコマンドの詳細については、『Cisco Nexus 7000 Series NX-OS Fundamentals Configuration Guide, Release 6.x』を参照してください。 |
||
ステップ 5 | show system vlan reserved 例: switch(config)# show system vlan reserved |
(任意) VLAN 範囲に対して設定された変更を表示します。 |
switch# config t switch(config)# system vlan 2000 reserve switch(config)# copy running-config startup-config switch(config)# reload switch(config)# show system vlan reserved
(注) |
この変更を有効にするには、デバイスをリロードする必要があります。 |
(注) |
show vlan コマンドでは、vlan コマンドを使用してそれを作成しない限り、これらの VLAN は表示されません。 |
1. config t
2. vlan configuration {vlan-id}
コマンドまたはアクション | 目的 | |
---|---|---|
ステップ 1 | config t 例: switch# config t switch(config)# |
コンフィギュレーション モードを開始します。 |
ステップ 2 | vlan configuration {vlan-id} 例: switch(config)# vlan configuration 20 switch(config-vlan-config)# |
実際にこれらを作成しないで VLAN を設定できるようにします。 |
switch# config t switch(config)# vlan configuration 20 switch(config-vlan-config)#
Cisco NX-OS Release 6.1.0 以降では、128 文字までの VLAN ロング ネームを設定できます。
VTP はトランスペアレントまたはオフ モードである必要があります。 VTP は、クライアントまたはサーバ モードにすることはできません。 VTP の詳細については「Configuring VTP」の章を参照してください。
1. configure terminal
2. system vlan long-name
3. (任意) copy running-config startup-config
4. show running-config vlan
コマンドまたはアクション | 目的 | |
---|---|---|
ステップ 1 | configure terminal 例: switch# configure terminal switch(config)# |
グローバル コンフィギュレーション モードを開始します。 |
ステップ 2 | system vlan long-name 例: switch(config)# system vlan long-name |
128 文字までの VLAN 名をイネーブルにできます。 この機能をディセーブルにするには、このコマンドの no 形式を使用します。 |
ステップ 3 | copy running-config startup-config 例: switch(config)# copy running-config startup-config |
(任意) リブートおよびリスタート時に実行コンフィギュレーションをスタートアップ コンフィギュレーションにコピーして、変更を継続的に保存します。 |
ステップ 4 | show running-config vlan 例: switch(config)# show running-config vlan |
システム VLAN のロング ネーム機能がイネーブルであることを確認します。 |
switch# configure terminal switch(config)# system vlan long-name switch(config)# copy running config startup config switch(config)# show running-config vlan
コマンド |
目的 |
---|---|
show running-config vlan vlan-id | VLAN 情報を表示します。 |
show vlan [all-ports | brief | id vlan-id | name name | dot1q tag native] | VLAN 情報を表示します。 |
show vlan summary |
VLAN 情報の要約を表示します。 |
show vtp status |
VTP 情報を表示します。 |
show system vlan reserved |
システムに予約されている VLAN 範囲を表示します。 |
これらのコマンド出力の詳細については、 『Cisco Nexus 7000 Series NX-OS Layer 2 Switching Command Reference』を参照してください。
コマンド |
目的 |
---|---|
clear vlan [id vlan-id] counters |
すべての VLAN または指定した VLAN のカウンタをクリアします。 |
show vlan counters |
各 VLAN のレイヤ 2 パケット情報を表示します。 |
次に、VLAN を作成して名前を指定し、ステートをアクティブにして、管理上のアップに設定する例を示します。
switch# configure terminal switch(config)# vlan 10 switch(config-vlan)# name test switch(config-vlan)# state active switch(config-vlan)# no shutdown switch(config-vlan)# exit switch(config)#
関連項目 |
参照先 |
---|---|
コマンド リファレンス |
『Cisco Nexus 7000 Series NX-OS Layer 2 Switching Command Reference』 |
NX-OS レイヤ 2 スイッチングの設定 |
『Cisco Nexus 7000 Series NX-OS Layer 2 Switching Configuration Guide』 |
インターフェイス、VLAN インターフェイス、IP アドレス指定、ポート チャネル |
『Cisco Nexus 7000 Series NX-OS Interfaces Configuration Guide, Release 6.x』 |
マルチキャスト ルーティング |
『Cisco Nexus 7000 Series NX-OS Multicast Routing Configuration Guide』 |
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 ロング ネーム設定します。 |
6.1(1) |
VLAN ロング ネームを設定できます。 |
ダイナミック システムに予約されている VLAN 範囲 |
5.2(1) |
システムが予約する VLAN の範囲を変更できます。 |
VLAN を作成する前に、VLAN を設定します。 |
5.1(1) |
VLAN を作成する前に、VLAN を設定できます。 |
変更なし |
4.2(1) |
-- |
VLAN トランキング プロトコル |
4.1(2) |
デバイスは VTP をトランスペアレント モードで実行します。 |