このドキュメントでは、VLAN Trunk Protocol(VTP)の設定方法について説明します。VTP を使用すると、スイッチド ネットワークでの管理作業が軽減されます。1 つの VTP サーバで新しい VLAN を設定すると、VLAN はドメイン内のすべてのスイッチに分散されます。これにより、同一の VLAN を複数の箇所で設定する必要が減少します。VTP はシスコ独自のプロトコルで、ほとんどの Cisco Catalyst シリーズ製品で使用できます。
このドキュメントに関しては個別の要件はありません。
このドキュメントは、特定のソフトウェアやハードウェアのバージョンに限定されるものではありません。
ドキュメント表記の詳細は、『シスコ テクニカル ティップスの表記法』を参照してください。
VTP についての詳細は、「VLAN Trunk Protocol(VTP)について」を参照してください。
このセクションでは、ネットワークでの VTP 設定に関するいくつかのガイドラインを示します。
ネットワーク設計上の理由から異なる VTP ドメインを設定する必要がない限り、すべてのスイッチで同じ VTP ドメイン名を使用します。
注:VTPドメイン間でのトランクネゴシエーションは機能しません。詳細については、「VLAN Trunk Protocol(VTP)のトラブルシューティング」の「VTP ドメイン間でブロックされるデータ トラフィック」のセクションを参照してください。
VTP ドメイン内のすべてのスイッチで、同じ VTP バージョンを実行する必要があります。
VTP ドメイン内のすべてのスイッチで、同じ VTP パスワードを使用する必要があります(パスワードがある場合のみ)。
すべての VTP サーバ スイッチは同じ設定リビジョン番号を備え、またドメインの中で最も高いはずです。
スイッチの VTP モードを Transparent から Server に変更する場合は、VTP Transparent スイッチで設定されている VLAN が Server スイッチにも存在している必要があります。
このセクションでは、最も一般的に使用されている Catalyst スイッチ上で VTP を設定するための基本的なコマンドについて説明します。
注:Catalyst 2948G-L3およびCatalyst 4908G-L3レイヤ3(L3)スイッチは、他のCatalystスイッチで使用されているレイヤ2(L2)指向のプロトコルをサポートしていません。そのようなプロトコルには、VTP、DTP、Port Aggregation Protocol(PAgP)があります。
VTP の設定には、このセクションに示すように 2 種類の方法があります。2 番目の方法(グローバル コンフィギュレーション モードを使用する方法)は、Cisco IOS® ソフトウェアが稼働している Catalyst 6500 シリーズの古いソフトウェアでは使用できません。
VLAN データベース モード:
Cisco IOS ソフトウェアでは、VLAN コンフィギュレーション モードで VTP ドメイン名、VTP モードおよび VLAN を設定できます。
EXEC モードでは、次のコマンドを実行して、VLAN コンフィギュレーション モードに入ります。
Router#vlan database !--- Issue this command in privileged EXEC mode, !--- not in global configuration mode. Router(vlan)# !--- This is VLAN configuration mode.
このコマンドを発行して VTP ドメイン名を設定します。
Router(vlan)#vtp domain domain-name
このコマンドを発行して VTP モードを設定します。
Router(vlan)#vtp {client | server | transparent}
VLAN コンフィギュレーション モードを終了するには、exit コマンドを発行します。
注:このモードではendコマンドとCtrl+Zコマンドは動作しません。
Router(vlan)#end Router(vlan)#^Z % Invalid input detected at '^' marker. Router(vlan)# Router(vlan)#exit APPLY completed. Exiting.... Router#
グローバル コンフィギュレーション モード:
Cisco IOS ソフトウェア グローバル コンフィギュレーション モードでは、Cisco IOS ソフトウェア コマンドによってすべての VTP パラメータを設定できます。コマンドの形式は次のとおりです。
Router(config)#vtp ? domain Set the name of the VTP administrative domain. file Configure IFS filesystem file where VTP configuration is stored. interface Configure interface as the preferred source for the VTP IP updater address. mode Configure VTP device mode password Set the password for the VTP administrative domain pruning Set the administrative domain to permit pruning version Set the administrative domain to VTP version
VTP の動作とステータスを監視するには、次のコマンドを発行します。
Router#show vtp status Router#show vtp counters
次の手順を実行します。
ドメイン名を設定するには、次のコマンドを発行します。
set vtp domain name
注:新しいスイッチを設定する場合、デフォルト以外のVLANを作成する前に、VTPドメイン名を設定する必要があります。
モードを設定するには、次のコマンドを発行します。
set vtp mode [server | client | transparent]
VTP の動作とステータスを監視するには、次のコマンドを発行します。
show vtp domain show vtp statistics
次の手順を実行します。
VLAN データベース モードで、次のコマンドを発行します。
注:これは、Cisco IOSソフトウェアが稼働するCisco 6500シリーズスイッチの方法に似ています。
vtp [client | server | transparent]
vtp domain name
VTP 動作を監視するには、イネーブル モードから次のコマンドを発行します。
show vtp counters show vtp status
注:Cisco IOSソフトウェアリリース11.2(8)SA4以降が稼働するCatalyst 2900XLシリーズスイッチでは、VTPプロトコルがサポートされています。Cisco IOS ソフトウェア リリース 11.2(8)SA3 およびそれより前のコードでは、Catalyst 2900XL シリーズ スイッチで VTP プロトコルがサポートされていません。
Catalyst Express 500 シリーズ スイッチでは、VTP トランスペアレント モードだけがサポートされています。現在のところ、VTP クライアントまたは VTP サーバ モードはサポートされていません。ユーザは、スイッチで使用されるすべての VLAN を手作業で設定する必要があります。
スイッチ管理を開き、設定 > VLAN > 作成の順に選択し、Catalyst Express 500 シリーズ スイッチの VLAN を設定するために利用可能なフィールドに記入してください。
詳細については、カスタマイズの VLAN の作成、修正、削除のセクションを参照してください。
例 1:
この例では、ファスト イーサネット リンクで接続された 2 台の Catalyst 4000 スイッチを使用しています。
bing は、VTP ドメイン名も VLAN も持たない新規スイッチです。clic は既存のスイッチで、VTP ドメインの test に 12 の VLAN が設定されています。
show vtp domainコマンドのこの出力例では、VTPバージョンが2に設定されていることがわかります。これは、スイッチがVTP V2対応であることを意味します。ただし、この例ではこのスイッチで VTP V2 は稼働していません。スイッチがVTP V2を実行するのは、set vtp v2 enableコマンドでV2モードが有効になっている場合に限ります。
bing (enable) show vtp domain Domain Name Domain Index VTP Version Local Mode Password -------------------------------- ------------ ----------- ----------- ---------- 1 2 server - Vlan-count Max-vlan-storage Config Revision Notifications ---------- ---------------- --------------- ------------- 5 1023 0 disabled Last Updater V2 Mode Pruning PruneEligible on Vlans --------------- -------- -------- ------------------------- 0.0.0.0 disabled disabled 2-1000 bing (enable) bing (enable) show vlan VLAN Name Status IfIndex Mod/Ports, Vlans ---- -------------------------------- --------- ------- ------------------------ 1 default active 67 2/1-2,2/4-48 3/1-6 1002 fddi-default active 68 1003 token-ring-default active 71 1004 fddinet-default active 69 1005 trnet-default active 70 clic (enable) show vtp domain Domain Name Domain Index VTP Version Local Mode Password -------------------------------- ------------ ----------- ----------- ---------- test 1 2 server - Vlan-count Max-vlan-storage Config Revision Notifications ---------- ---------------- --------------- ------------- 12 1023 11 disabled Last Updater V2 Mode Pruning PruneEligible on Vlans --------------- -------- -------- ------------------------- 0.0.0.0 disabled disabled 2-1000 clic (enable) show vlan VLAN Name Status IfIndex Mod/Ports, Vlans ---- -------------------------------- --------- ------- ------------------------ 1 default active 65 2/1-2,2/4-50 2 VLAN0002 active 77 3 VLAN0003 active 78 2/3 4 VLAN0004 active 79 5 VLAN0005 active 73 6 VLAN0006 active 74 7 VLAN0007 active 76 10 VLAN0010 active 80 1002 fddi-default active 66 1003 token-ring-default active 69 1004 fddinet-default active 67 1005 trnet-default active 68 68
この段階では、2 台のスイッチの間でトランクが作成されます。2 台のスイッチが同期し、VTP パケットが交換される方法に注目してください。
MAC 005014BB63FD is clic MAC 003019798CFD is bing
clic が bing に要約アドバタイズメントを送信します。bing は、このパケット(次の出力例の FRAME 1 内)から VTP ドメイン名を取得します。
!--- On bing: received vtp packet: mNo = 2 pNo = 1 VTP: i summary, domain = test, rev = 11, followers = 0 !--- This indicates that bing has received its !--- first summary advertisement. domain change notification sent VTP: transitioning from null to test domain !--- This is where bing gets the VTP domain name. VTP: summary packet rev 11 greater than domain test rev 0 VTP: domain test currently not in updating state VTP: summary packet with followers field zero ------------------FRAME 1----------------------------------- DLC: ----- DLC Header ----- DLC: DLC: Frame 1988 arrived at 15:01:00.1223; frame size is 99 (0063 hex) bytes. DLC: Destination = Multicast 01000CCCCCCC DLC: Source = Station 005014BB63FD DLC: 802.3 length = 85 DLC: LLC: ----- LLC Header ----- LLC: LLC: DSAP Address = AA, DSAP IG Bit = 00 (Individual Address) LLC: SSAP Address = AA, SSAP CR Bit = 00 (Command) LLC: Unnumbered frame: UI LLC: SNAP: ----- SNAP Header ----- SNAP: SNAP: Vendor ID = Cisco1 SNAP: Type = 2003 (VTP) SNAP: VTP: ----- Cisco Virtual Trunk Protocol (VTP) Packet ----- VTP: VTP: Version = 1 VTP: Message type = 0x01 (Summary-Advert) VTP: Number of Subset-Advert messages = 0 VTP: Length of management domain name = 4 VTP: Management domain name = "test" VTP: Number of Padding bytes = 28 VTP: Configuration revision number = 0x0000000b VTP: Updater Identity IP address = 0.0.0.0 VTP: Update Timestamp = "930525053753" VTP: MD5 Digest value = 0x857610862F3015F0 VTP: 0x220A52427247A7A0 -----------------------------------------------------------
trace コマンドを設定すると、bing は要約アドバタイズメントを 1 つ受信します。後続のアドバタイズメントはありません。したがって、bing は自身のドメイン名をアップデートした後、VLAN 情報(次の出力例の FRAME 2 内)を取得するため、アドバタイズメント要求を送信します。
!--- On bing: VTP: tx vtp request, domain test, start value 0 !--- This is where the advertisement request is sent. ----------------------FRAME 2-------------------------------- DLC: ----- DLC Header ----- DLC: DLC: Frame 1683 arrived at 17:38:55.9383; frame size is 60 (003C hex) bytes. DLC: Destination = Multicast 01000CCCCCCC DLC: Source = Station 003019798CFD DLC: 802.3 length = 46 DLC: LLC: ----- LLC Header ----- LLC: LLC: DSAP Address = AA, DSAP IG Bit = 00 (Individual Address) LLC: SSAP Address = AA, SSAP CR Bit = 00 (Command) LLC: Unnumbered frame: UI LLC: SNAP: ----- SNAP Header ----- SNAP: SNAP: Vendor ID = Cisco1 SNAP: Type = 2003 (VTP) SNAP: VTP: ----- Cisco Virtual Trunk Protocol (VTP) Packet ----- VTP: VTP: Version = 1 VTP: Message type = 0x03 (Advert-Request) VTP: Reserved VTP: Length of management domain name = 4 VTP: Management domain name = "test" VTP: Padding bytes = 28 VTP: Start value = 0 (all VLANs) --------------------------------------------------------
ClicはVLAN 1にフィールドフォロワーを持つ別の要約アドバタイズメントを送信します。すべてのVLANを含むサブセットアドバタイズメントは、この出力のFRAME 3では、このパケットに続きます。次に、bing ではすべての VLAN が設定されます。
!--- On bing: received vtp packet: mNo = 2 pNo = 1 VTP: i summary, domain = test, rev = 11, followers = 1 !--- Bing has received its second summary advertisement. VTP: domain test, current rev = 0 found for summary pkt VTP: summary packet rev 11 greater than domain test rev 0 !--- This configuration revision is higher than that on bing. VTP: domain test currently not in updating state received vtp packet: mNo = 2 pNo = 1 VTP: i subset, domain = test, rev = 11, seq = 1, length = 344 !--- Bing has received its subset advertisement. VTP: domain test, current rev = 0 found for subset pkt domain change notification sent vlan 1 unknown tlv change notification sent vlan 2 unknown tlv change notification sent vtp_vlan_change_notification: vlan = 2, mode = 1 (ADD,ACTIVE), mNo = 2 pNo = 1 vlan = 2 vlan 3 unknown tlv change notification sent vtp_vlan_change_notification: vlan = 3, mode = 1 (ADD,ACTIVE), mNo = 2 pNo = 1 vlan = 3 vlan 4 unknown tlv change notification sent vtp_vlan_change_notification: vlan = 4, mode = 1 (ADD,ACTIVE), mNo = 2 pNo = 1 vlan = 4 vlan 5 unknown tlv change notification sent vtp_vlan_change_notification: vlan = 5, mode = 1 (ADD,ACTIVE), mNo = 2 pNo = 1 vlan = 5 vlan 6 unknown tlv change notification sent vtp_vlan_change_notification: vlan = 6, mode = 1 (ADD,ACTIVE), mNo = 2 pNo = 1 vlan = 6 vlan 7 unknown tlv change notification sent vtp_vlan_change_notification: vlan = 7, mode = 1 (ADD,ACTIVE), mNo = 2 pNo = 1 vlan = 7 -----------------FRAME 3---------------------------------- DLC: ----- DLC Header ----- DLC: DLC: Frame 2008 arrived at 15:01:03.9661; frame size is 99 (0063 hex) bytes. DLC: Destination = Multicast 01000CCCCCCC DLC: Source = Station 003019798CFD DLC: 802.3 length = 85 DLC: LLC: ----- LLC Header ----- LLC: LLC: DSAP Address = AA, DSAP IG Bit = 00 (Individual Address) LLC: SSAP Address = AA, SSAP CR Bit = 00 (Command) LLC: Unnumbered frame: UI LLC: SNAP: ----- SNAP Header ----- SNAP: SNAP: Vendor ID = Cisco1 SNAP: Type = 2003 (VTP) SNAP: VTP: ----- Cisco Virtual Trunk Protocol (VTP) Packet ----- VTP: VTP: Version = 1 VTP: Message type = 0x01 (Summary-Advert) VTP: Number of Subset-Advert messages = 1 !--- Here are the numbers. VTP: Length of management domain name = 4 VTP: Management domain name = "test" VTP: Number of Padding bytes = 28 VTP: Configuration revision number = 0x0000000b VTP: Updater Identity IP address = 0.0.0.0 VTP: Update Timestamp = "930525053753" VTP: MD5 Digest value = 0x857610862F3015F0 VTP: 0x220A52427247A7A0 DLC: ----- DLC Header ----- DLC: DLC: Frame 2009 arrived at 15:01:03.9664; frame size is 366 (016E hex) bytes. DLC: Destination = Multicast 01000CCCCCCC DLC: Source = Station 003019798CFD DLC: 802.3 length = 352 DLC: LLC: ----- LLC Header ----- LLC: LLC: DSAP Address = AA, DSAP IG Bit = 00 (Individual Address) LLC: SSAP Address = AA, SSAP CR Bit = 00 (Command) LLC: Unnumbered frame: UI LLC: SNAP: ----- SNAP Header ----- SNAP: SNAP: Vendor ID = Cisco1 SNAP: Type = 2003 (VTP) SNAP: VTP: ----- Cisco Virtual Trunk Protocol (VTP) Packet ----- VTP: VTP: Version = 1 VTP: Message type = 0x02 (Subset-Advert) VTP: Sequence number = 1 VTP: Management Domain Name length = 4 VTP: Management Domain Name = "test" VTP: Number of Padding bytes = 28 VTP: Configuration revision number = 0x0000000b VTP: VTP: VLAN Information Field # 1: VTP: VLAN information field length = 20 VTP: VLAN Status = 00 (Operational) VTP: VLAN type = 1 (Ethernet) VTP: Length of VLAN name = 7 VTP: ISL VLAN-id = 1 VTP: MTU size = 1500 VTP: 802.10 SAID field = 100001 VTP: VLAN Name = "default" VTP: # padding bytes in VLAN Name = 1 VTP: VTP: VLAN Information Field # 2: VTP: VLAN information field length = 20 VTP: VLAN Status = 00 (Operational) VTP: VLAN type = 1 (Ethernet) VTP: Length of VLAN name = 8 VTP: ISL VLAN-id = 2 VTP: MTU size = 1500 VTP: 802.10 SAID field = 100002 VTP: VLAN Name = "VLAN0002" VTP: # padding bytes in VLAN Name = 0 VTP: VTP: VLAN Information Field # 3: VTP: VLAN information field length = 20 VTP: VLAN Status = 00 (Operational) VTP: VLAN type = 1 (Ethernet) VTP: Length of VLAN name = 8 VTP: ISL VLAN-id = 3 VTP: MTU size = 1500 VTP: 802.10 SAID field = 100003 VTP: VLAN Name = "VLAN0003" VTP: # padding bytes in VLAN Name = 0 VTP: VTP: VLAN Information Field # 4: VTP: VLAN information field length = 20 VTP: VLAN Status = 00 (Operational) VTP: VLAN type = 1 (Ethernet) VTP: Length of VLAN name = 8 VTP: ISL VLAN-id = 4 VTP: MTU size = 1500 VTP: 802.10 SAID field = 100004 VTP: VLAN Name = "VLAN0004" VTP: # padding bytes in VLAN Name = 0 VTP: VTP: VLAN Information Field # 5: VTP: VLAN information field length = 20 VTP: VLAN Status = 00 (Operational) VTP: VLAN type = 1 (Ethernet) VTP: Length of VLAN name = 8 VTP: ISL VLAN-id = 5 VTP: MTU size = 1500 VTP: 802.10 SAID field = 100005 VTP: VLAN Name = "VLAN0005" VTP: # padding bytes in VLAN Name = 0 VTP: VTP: VLAN Information Field # 6: VTP: VLAN information field length = 20 VTP: VLAN Status = 00 (Operational) VTP: VLAN type = 1 (Ethernet) VTP: Length of VLAN name = 8 VTP: ISL VLAN-id = 6 VTP: MTU size = 1500 VTP: 802.10 SAID field = 100006 VTP: VLAN Name = "VLAN0006" VTP: # padding bytes in VLAN Name = 0 VTP: VTP: VLAN Information Field # 7: VTP: VLAN information field length = 20 VTP: VLAN Status = 00 (Operational) VTP: VLAN type = 1 (Ethernet) VTP: Length of VLAN name = 8 VTP: ISL VLAN-id = 7 VTP: MTU size = 1500 VTP: 802.10 SAID field = 100007 VTP: VLAN Name = "VLAN0007" VTP: # padding bytes in VLAN Name = 0 VTP: VTP: VLAN Information Field # 8: VTP: VLAN information field length = 20 VTP: VLAN Status = 00 (Operational) VTP: VLAN type = 1 (Ethernet) VTP: Length of VLAN name = 8 VTP: ISL VLAN-id = 10 VTP: MTU size = 1500 VTP: 802.10 SAID field = 100010 VTP: VLAN Name = "VLAN0010" VTP: # padding bytes in VLAN Name = 0 VTP: VTP: VLAN Information Field # 9: VTP: VLAN information field length = 32 VTP: VLAN Status = 00 (Operational) VTP: VLAN type = 2 (FDDI) VTP: Length of VLAN name = 12 VTP: ISL VLAN-id = 1002 VTP: MTU size = 1500 VTP: 802.10 SAID field = 101002 VTP: VLAN Name = "fddi-default" VTP: # padding bytes in VLAN Name = 0 VTP: Reserved 8 bytes VTP: VTP: VLAN Information Field # 10: VTP: VLAN information field length = 40 VTP: VLAN Status = 00 (Operational) VTP: VLAN type = 3 (Token-Ring) VTP: Length of VLAN name = 18 VTP: ISL VLAN-id = 1003 VTP: MTU size = 1500 VTP: 802.10 SAID field = 101003 VTP: VLAN Name = "token-ring-default" VTP: # padding bytes in VLAN Name = 2 VTP: Reserved 8 bytes VTP: VTP: VLAN Information Field # 11: VTP: VLAN information field length = 36 VTP: VLAN Status = 00 (Operational) VTP: VLAN type = 4 (FDDI-Net) VTP: Length of VLAN name = 15 VTP: ISL VLAN-id = 1004 VTP: MTU size = 1500 VTP: 802.10 SAID field = 101004 VTP: VLAN Name = "fddinet-default" VTP: # padding bytes in VLAN Name = 1 VTP: Reserved 8 bytes VTP: VTP: VLAN Information Field # 12: VTP: VLAN information field length = 36 VTP: VLAN Status = 00 (Operational) VTP: VLAN type = 5 (TR-Net) VTP: Length of VLAN name = 13 VTP: ISL VLAN-id = 1005 VTP: MTU size = 1500 VTP: 802.10 SAID field = 101005 VTP: VLAN Name = "trnet-default" VTP: # padding bytes in VLAN Name = 3 VTP: Reserved 8 bytes ----------------------------------------------------------------
ここで 2 台のスイッチが同期されます。
bing (enable) show vtp domain Domain Name Domain Index VTP Version Local Mode Password ------------------------------- ------------ ----------- ----------- ---------- test 1 2 server - Vlan-count Max-vlan-storage Config Revision Notifications ---------- ---------------- --------------- ------------- 12 1023 11 disabled Last Updater V2 Mode Pruning PruneEligible on Vlans --------------- -------- -------- ------------------------- 0.0.0.0 disabled disabled 2-1000 bing (enable) show vlan VLAN Name Status IfIndex Mod/Ports, Vlans ---- -------------------------------- --------- ------- ------------------------ 1 default active 127 2/2-48 3/1-6 2 VLAN0002 active 132 3 VLAN0003 active 133 4 VLAN0004 active 134 5 VLAN0005 active 135 6 VLAN0006 active 136 7 VLAN0007 active 137 10 VLAN0010 active 138 1002 fddi-default active 128 1003 token-ring-default active 131 1004 fddinet-default active 129 1005 trnet-default active 130
例 2:
次の例では、Cisco IOS ソフトウェアが稼働している Catalyst 6000 を使用する VTP 設定の検証方法を示します。
Router#show vtp status VTP Version: 2 Configuration Revision: 247 Maximum VLANs supported locally: 1005 Number of existing VLANs: 33 VTP Operating Mode: Client VTP Domain Name: Lab_Network VTP Pruning Mode: Enabled VTP V2 Mode: Disabled VTP Traps Generation: Disabled MD5 digest: 0x45 0x52 0xB6 0xFD 0x63 0xC8 0x49 0x80 Configuration last modified by 0.0.0.0 at 8-12-99 15:04:49 Router#
例 3:
次の例では、Cisco IOS ソフトウェアが稼働している Catalyst 6000 での VTP 統計情報の表示方法を示します。
Router#show vtp counters VTP statistics: Summary advertisements received: 7 Subset advertisements received: 5 Request advertisements received: 0 Summary advertisements transmitted: 997 Subset advertisements transmitted: 13 Request advertisements transmitted: 3 Number of config revision errors: 0 Number of config digest errors: 0 Number of V1 summary errors: 0 VTP pruning statistics: Trunk Join Transmitted Join Received Summary advts received from on-pruning-capable device ---------------- ---------------- ---------------- --------------------------- Fa5/8 43071 42766 5
VTP のトラブルシューティングの詳細については、「VLAN Trunk Protocol(VTP)のトラブルシューティング」を参照してください。