このドキュメントでは、Cisco IOS® ソフトウェアを実行する Cisco Catalyst 3550/3560/3750 スイッチと、Cisco IOS ソフトウェアを実行する Catalyst 6500/6000 シリーズ スイッチまたは Catalyst 4500/4000 シリーズ スイッチ間での IEEE 802.1Q(dot1q)トランキングの設定例を紹介します。 トランキングとは、複数の VLAN からのトラフィックを、2 台のデバイス間のポイントツーポイント リンクで伝送する方法です。
イーサネット トランキングは、次の 2 つの方法で実装できます。
Inter-Switch Link(ISL; スイッチ間リンク):プロトコルシスコ独自のプロトコル
802.1Q:IEEE 標準
この設定を行う前に、次の要件が満たされていることを確認します。
IEEE 802.1Q トランキングの知識
Command-Line Interface(CLI; コマンドライン インターフェイス)を使用した Catalyst 3560 および Catalyst 6500/6000 シリーズ スイッチ設定の知識
このドキュメントの情報は、次のソフトウェアとハードウェアのバージョンに基づくものです。
Cisco IOS ソフトウェア リリース 12.2(25)SEA が稼働する Catalyst 3560 スイッチ
Cisco IOS ソフトウェア リリース 12.1(26)E1 が稼働する Catalyst 6509 スイッチ
このドキュメントの Catalyst 3560 の設定は、Cisco IOS ソフトウェアを実行する Catalyst 3550/3750 スイッチにも適用されます。 このドキュメントの Catalyst 6500/6000 の設定は、Cisco IOS ソフトウェアを実行する Catalyst 4500/4000 シリーズ スイッチにも適用されます。
注: さまざまな Catalyst スイッチでサポートされているトランキング方式については、このドキュメントの次のセクションを参照してください。
Catalyst スイッチにトランキングを実装するためのシステム要件
本書の情報は、特定のラボ環境にあるデバイスに基づいて作成されたものです。 このドキュメントで使用するすべてのデバイスは、初期(デフォルト)設定の状態から起動しています。 稼働中のネットワークで作業を行う場合、コマンドの影響について十分に理解したうえで作業してください。
注: このドキュメントで紹介しているのは、スイッチのコンフィギュレーション ファイルと、それに関連する show コマンド使用例の出力だけです。 Catalyst スイッチ間で 802.1Q トランクを設定する方法についての詳細は、次のドキュメントを参照してください。
『VLAN の設定』の「VLAN トランクの設定」セクション:Catalyst 3560 シリーズ スイッチ
『レイヤ 2 スイッチング用 LAN ポートの設定』の「VLAN トランクの概要」セクション:Cisco IOS ソフトウェアを実行する Catalyst 6500 シリーズ スイッチ
『レイヤ 2 イーサネット インターフェイスの設定』の「VLAN トランクの概要」セクション:Cisco IOS ソフトウェアを実行する Catalyst 4500 シリーズ スイッチ
IEEE 802.1Q では、内部的なタギング機構を使用しています。 トランキング デバイスは 4 バイトのタグを挿入して、フレームが所属する VLAN を識別し、Frame Check Sequence(FCS; フレーム チェック シーケンス)を再計算します。 詳細は、次のドキュメントを参照してください。
注: 次に、この設定中に注意する必要がある項目を示します。
Catalyst 3550/3560/3750 シリーズ スイッチ上のすべてのイーサネット インターフェイスでは、802.1Q およびは ISL のカプセル化がサポートされています。 Catalyst 3550 スイッチのイーサネット インターフェイスは、デフォルトではレイヤ 2(L2)ポートです。
Catalyst 6500/6000 シリーズ スイッチのすべてのイーサネット ポートでは、802.1Q および ISL のカプセル化がサポートされています。
デフォルトでは、Cisco IOS ソフトウェアを実行する Catalyst 4500 シリーズ スイッチは、ISL と 802.1Q の両トランキング モードをサポートしています。 これらのトランキング モードは、WS-X4418-GB モジュールおよび WS-X4412-2GB-T モジュールのブロッキング ギガビット ポート以外のすべてのインターフェイスでサポートされています。 これらのポートは ISL をサポートしておらず、802.1Q トランキングのみをサポートしています。 WS-X4418-GB モジュールのポート 3 ~ 18 はブロッキング ギガビット ポートです。 WS-X4412-2GB-T モジュールのポート 1 ~12 はブロッキング ギガビット ポートです。
注: バックプレーンへの接続がオーバーサブスクライブされる場合、ポートはブロッキング ポートです。
Catalyst 6500/6000 プラットフォームと Catalyst 4500 プラットフォームの主な相違点は、デフォルトのインターフェイス設定です。 Cisco IOS ソフトウェアを実行する Catalyst 6500/6000 スイッチには、シャットダウン モードのインターフェイスが搭載されており、これらのインターフェイスは、デフォルトでレイヤ 3(L3)ルーテッド ポートです。 Cisco IOS ソフトウェアを実行する Catalyst 4500/4000 スイッチでは、すべてのインターフェイスがイネーブルです。 これらのインターフェイスは、デフォルトで L2 スイッチ ポートです。
Catalyst 3750 スイッチのトランク インターフェイスで 802.1Q カプセル化が使用されると、show interface の出力にラントが表示されます。これは、サイズが 61 ~ 64 バイトで、Q タグが含まれる有効な 802.1Q カプセル化パケットが正しく転送されても、Catalyst 3750 スイッチではこのパケットを undersize としてカウントするためです。 詳細は、Cisco Bug ID CSCec14238 (登録ユーザ専用)を参照してください。
この項では、このドキュメントで説明する機能の設定に必要な情報を提供します。
注: このセクションで使用されているコマンドの詳細を調べるには、Command Lookup Tool(登録ユーザ専用)を使用してください。
このドキュメントでは、次のネットワーク構成を使用しています。
注: Catalyst 3560 のギガビット イーサネット インターフェイスは、10/100/1000 Mbps のネゴシエートされたイーサネット インターフェイスです。 そのため、このネットワーク図では、Catalyst 3560 のギガビット ポートは Catalyst 6500 のファスト イーサネット(100 Mbps)ポートに接続されています。
このドキュメントでは、次の設定を使用します。
Catalyst 3560 スイッチ |
---|
!--- Note: This example creates VLAN 1 and VLAN 2 !--- and sets the VLAN Trunk Protocol (VTP) mode to transparent. Use your !--- network as a basis and set the VTP mode accordingly. For more details, !--- refer to Configuring VLANs. version 12.2 no service pad service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname 3560 ! !--- This is the privileged mode password for the example. enable password mysecret ! ip subnet-zero ! vtp mode transparent ! !--- VLAN 2 is created. This is visible only when you set VTP mode !--- to transparent. vlan 2 ! ! !--- The Gigabit Ethernet interface on the Catalyst 3560 is a 10/100/1000 Mbps !--- negotiated Ethernet interface. Therefore, the Gigabit port on the !--- Catalyst 3560 is connected to a Fast Ethernet port on the Catalyst 6500. !--- Configure the trunk on the Gigabit Ethernet 0/1 interface. interface GigabitEthernet0/1 !--- Configure trunk encapsulation as dot1q. !--- For details on trunking, refer to Configuring VLANs. switchport trunk encapsulation dot1q !--- Enable trunking on the interface. switchport mode trunk no ip address snmp trap link-status ! ! !--- Interfaces Gigabit Ethernet 0/2 through 0/5 are placed in VLAN 1. !--- In order to configure the interface as an L2 port, !--- refer to the Configuring Ethernet Interfaces section !--- of Configuring Interface Characteristics. All L2 ports are placed !--- in VLAN 1, by default. interface GigabitEthernet0/2 switchport mode access no ip address snmp trap link-status ! interface GigabitEthernet0/3 switchport mode access no ip address snmp trap link-status ! ! interface GigabitEthernet0/4 switchport mode access no ip address snmp trap link-status ! interface GigabitEthernet0/5 switchport mode access no ip address snmp trap link-status ! ! !--- Interfaces Gigabit Ethernet 0/6 through 0/12 are placed in VLAN 2. interface GigabitEthernet0/6 switchport access vlan 2 switchport mode access no ip address snmp trap link-status ! !--- Output suppressed. ! interface GigabitEthernet0/12 switchport access vlan 2 switchport mode access no ip address snmp trap link-status ! interface Vlan1 !--- This is the IP address for management. ip address 10.1.1.1 255.255.255.0 ! ip classless ip http server ! ! line con 0 transport input none line vty 0 4 !--- This is the privileged mode password for the example. password mysecret login line vty 5 15 login ! end |
Catalyst 6500 スイッチ |
---|
!--- Note: This example creates VLAN 1 and VLAN 2 and sets !--- the VTP mode to transparent. Use your network as a basis and set the VTP !--- mode accordingly. For more details, refer to Configuring VLANs. Current configuration : 4812 bytes version 12.1 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname Cat6500 ! vtp mode transparent ip subnet-zero ! ! mls flow ip destination mls flow ipx destination ! !--- This is the privileged mode password for the example. enable password mysecret ! redundancy mode rpr-plus main-cpu auto-sync running-config auto-sync standard ! ! !--- This enables VLAN 2. vlan 2 ! ! interface GigabitEthernet1/1 no ip address shutdown ! interface GigabitEthernet1/2 no ip address shutdown ! !--- The Gigabit Ethernet interface on the Catalyst 3560 is a 10/100/1000 Mbps !--- negotiated Ethernet interface. Therefore, the Gigabit port on the Catalyst 3560 !--- is connected to a Fast Ethernet port on the Catalyst 6500. interface FastEthernet3/1 no ip address !--- You must issue the switchport command once, !--- without any keywords, in order to configure the interface as an L2 port for the !--- Catalyst 6500 series switch that runs Cisco IOS Software. !--- On a Catalyst 4500 series switch that runs Cisco IOS Software, all ports are L2 !--- ports by default. Therefore, if you do not change the default configuration, !--- you do not need to issue the switchport command. !--- For more details, refer to Configuring Layer 2 Ethernet Interfaces !--- for the Catalyst 4500 series switch that runs Cisco IOS Software. switchport !--- Configure trunk encapsulation as dot1q. !--- For more details on trunking, refer to !--- Configuring LAN Ports for Layer 2 Switching for the Catalyst 6500 series switch !--- that runs Cisco IOS Software, or Configuring Layer 2 Ethernet Interfaces !--- for the Catalyst 4500/4000 series switch that runs Cisco IOS Software. switchport trunk encapsulation dot1q !--- Enable trunking on the interface. switchport mode trunk ! !--- Configure interfaces Fast Ethernet 3/2 through 3/24 to be in access mode. !--- By default, all access ports are configured in VLAN 1. !--- For more details, refer to Configuring LAN Ports for Layer 2 Switching !--- for the Catalyst 6500 series switch that runs Cisco IOS Software, or !--- Configuring Layer 2 Ethernet Interfaces for the Catalyst 4500/4000 series !--- switch that runs Cisco IOS Software. interface FastEthernet3/2 no ip address switchport switchport mode access ! !--- Output suppressed. ! interface FastEthernet3/24 no ip address switchport switchport mode access ! !--- Fast Ethernet 3/25 through 3/48 are placed in VLAN 2. !--- For more details, refer to Configuring LAN Ports for Layer 2 Switching !--- for the Catalyst 6500 series switch that runs Cisco IOS Software, !--- or Configuring Layer 2 Ethernet Interfaces for the Catalyst 4500/4000 !--- series switch that runs Cisco IOS Software. interface FastEthernet3/25 no ip address switchport switchport access vlan 2 switchport mode access ! !--- Output suppressed. ! interface FastEthernet3/48 no ip address switchport switchport access vlan 2 switchport mode access ! ! interface Vlan1 !--- This is the IP address for management. ip address 10.1.1.2 255.255.255.0 ! ! ip classless no ip http server ! ! ip classless ip http server ! line con 0 exec-timeout 0 0 transport input none line vty 0 4 !--- This is the Telnet password for the example. password mysecret login ! end |
注: 存在しない VLAN にインターフェイスを割り当てると、VLAN データベースにその VLAN を作成するまで、そのインターフェイスはシャットダウンします。 詳細については、『VLAN の設定』の「イーサネット VLAN の作成または変更」のセクションを参照してください。
ここでは、設定が正常に動作していることを確認します。
Output Interpreter Tool(OIT)(登録ユーザ専用)では、特定の show コマンドがサポートされています。 OIT を使用して、show コマンド出力の解析を表示できます。
Catalyst 3550/3560/3750/6500/4500 スイッチでは、次のコマンドを使用します。
show interfaces interface_type module/port trunk
show interfaces interface_type module/port switchport
show vlan
show vtp status
show interfaces interface_type module/port trunk:このコマンドは、インターフェイスのトランク設定と、トラフィックをトランクで送信できる VLAN 番号を表示します。
3560# show interface gigabitethernet 0/1 trunk Port Mode Encapsulation Status Native vlan Gi0/1 on 802.1q trunking 1 Port Vlans allowed on trunk Gi0/1 1 4094 Port Vlans allowed and active in management domain Gi0/1 1-2 Port Vlans in spanning tree forwarding state and not pruned Gi0/1 1-2
show interfaces interface_type module/port switchport:このコマンドは、インターフェイスのスイッチ ポート設定を表示します。
この表示で、Operational Mode フィールドと Operational Trunking Encapsulation フィールドを確認します。
3560# show interface gigabitethernet 0/1 switchport Name: Gi0/1 Switchport: Enabled Administrative Mode: trunk Operational Mode: trunk Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: dot1q Negotiation of Trunking: On Access Mode VLAN: 1 (default) Trunking Native Mode VLAN: 1 (default) Voice VLAN: none Administrative private-vlan host-association: none Administrative private-vlan mapping: none Administrative private-vlan trunk native VLAN: none Administrative private-vlan trunk encapsulation: dot1q Administrative private-vlan trunk normal VLANs: none Administrative private-vlan trunk private VLANs: none Operational private-vlan: none Trunking VLANs Enabled: ALL Pruning VLANs Enabled: 2-1001 Capture Mode Disabled Capture VLANs Allowed: ALL Protected: false Unknown unicast blocked: disabled Unknown multicast blocked: disabled Appliance trust : none
show vlan:このコマンドは、VLAN と特定の VLAN に属しているポートに関する情報を表示します。
3560# show vlan VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Gi0/2, Gi0/3, Gi0/4, Gi0/5 2 VLAN0002 active Gi0/6, Gi0/7, Gi0/8, Gi0/9 Gi0/10, Gi0/11, Gi0/12 1002 fddi-default act/unsup 1003 token-ring-default act/unsup 1004 fddinet-default act/unsup 1005 trnet-default act/unsup !--- Output suppressed.
注: 出力に表示されるポートはアクセス ポートのみです。 ただし、show vlan の出力には、トランクとして設定されているポートと、「notconnected」ステータスにあるポートも表示されます。
show vtp status:このコマンドは、VTP 管理ドメイン、ステータス、カウンタに関する一般情報を表示します。
3560# show vtp status VTP Version : 2 Configuration Revision : 0 Maximum VLANs supported locally : 1005 Number of existing VLANs : 6 VTP Operating Mode : Transparent VTP Domain Name : VTP Pruning Mode : Disabled VTP V2 Mode : Disabled VTP Traps Generation : Disabled MD5 digest : 0x4A 0x55 0x17 0x84 0xDB 0x99 0x3F 0xD1 Configuration last modified by 10.1.1.1 at 0-0-00 00:00:00 3560# ping 10.1.1.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms 3560#
show interfaces interface_type module/port trunk:このコマンドは、インターフェイスのトランク設定と、トラフィックをトランクで送信できる VLAN 番号を表示します。
Cat6500# show interfaces fastethernet 3/1 trunk Port Mode Encapsulation Status Native vlan Fa3/1 on 802.1q trunking 1 Port Vlans allowed on trunk Fa3/1 1 4094 Port Vlans allowed and active in management domain Fa3/1 1-2 Port Vlans in spanning tree forwarding state and not pruned Fa3/1 1-2
show interfaces interface_type module/port switchport:このコマンドは、インターフェイスのスイッチ ポート設定を表示します。
この表示で、Operational Mode フィールドと Operational Trunking Encapsulation フィールドを確認します。
cat6500# show interface fastethernet 3/1 switchport Name: Fa3/1 Switchport: Enabled Administrative Mode: trunk Operational Mode: trunk Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: dot1q Negotiation of Trunking: On Access Mode VLAN: 1 (default) Trunking Native Mode VLAN: 1 (default) Voice VLAN: none Administrative private-vlan host-association: none Administrative private-vlan mapping: none Administrative private-vlan trunk native VLAN: none Administrative private-vlan trunk encapsulation: dot1q Administrative private-vlan trunk normal VLANs: none Administrative private-vlan trunk private VLANs: none Operational private-vlan: none Trunking VLANs Enabled: ALL Pruning VLANs Enabled: 2-1001 Capture Mode Disabled Capture VLANs Allowed: ALL
show vlan:このコマンドは、VLAN と特定の VLAN に属しているポートに関する情報を表示します。
Cat6500# show vlan VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa3/2, Fa3/3, Fa3/4, Fa3/5 Fa3/6, Fa3/7, Fa3/8, Fa3/9 Fa3/10, Fa3/11, Fa3/12, Fa3/13 Fa3/14, Fa3/15, Fa3/16, Fa3/17 Fa3/18, Fa3/19, Fa3/20, Fa3/21 Fa3/22, Fa3/23, Fa3/24 2 VLAN0002 active Fa3/25, Fa3/26, Fa3/27, Fa3/28 Fa3/29, Fa3/30, Fa3/31, Fa3/32 Fa3/33, Fa3/34, Fa3/35, Fa3/36 Fa3/37, Fa3/38, Fa3/39, Fa3/40 Fa3/41, Fa3/42, Fa3/43, Fa3/44 Fa3/45, Fa3/46, Fa3/47, Fa3/48 1002 fddi-default act/unsup 1003 token-ring-default act/unsup 1004 fddinet-default act/unsup 1005 trnet-default act/unsup !--- Output suppressed.
注: 表示されるポートは、レイヤ 2 非トランク(アクセス)ポートとして設定されているポートのみです。 show vlan の出力には、トランクとして設定されているポートと、「notconnected」ステータスにあるポートも表示されます。 詳細については、『レイヤ 2 スイッチング用 LAN ポートの設定』の「レイヤ 2 スイッチング用の LAN インターフェイスの設定」セクションを参照してください。
show vtp status:このコマンドは、VTP 管理ドメイン、ステータス、カウンタに関する一般情報を表示します。
Cat6500# show vtp status VTP Version : 2 Configuration Revision : 0 Maximum VLANs supported locally : 1005 Number of existing VLANs : 6 VTP Operating Mode : Transparent VTP Domain Name : VTP Pruning Mode : Disabled VTP V2 Mode : Disabled VTP Traps Generation : Disabled MD5 digest : 0xBF 0x86 0x94 0x45 0xFC 0xDF 0xB5 0x70 Configuration last modified by 10.1.1.2 at 0-0-00 00:00:00
ping
Cat6500# ping 10.1.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
現在のところ、この設定に関する特定のトラブルシューティング情報はありません。 トランキングおよび 802.1Q 設定に関する一般的な問題については、『IEEE 802.1Q 方式を使用した Catalyst 4000 5000 6000 スイッチ間のトランキング』ドキュメントの「一般的なエラー」セクションを参照してください。