Cisco Catalyst 1300 スイッチのインターフェース基本設定ガイド

目次

Catalyst 1300 スイッチでのインターフェース設定

Catalyst 1300 スイッチでのインターフェース設定方法(コマンド)は IOS 搭載の Catalyst スイッチとほぼ同じですが、コンフィグ表示については異なる点があります。ここでは Catalyst 1300 でのインターフェース設定方法とコンフィグに関する留意点を説明します。

動作確認環境

  • Cisco C1300-8T-E-2G
    • Version: 4.1.6.54

Catalyst 1300 スイッチのインターフェース設定に関する基礎知識

インターフェースのコンフィグはデフォルトだと非表示

Catalyst 1300 スイッチでは、インターフェースの設定がデフォルトの設定になっている場合、コンフィグ (show running-config 及び show startup-config) にインターフェースのコンフィグは表示されません。

例えば C1300-8T-E-2G の場合、物理インターフェースとして GigabitEthernet1-10 が存在しますが、デフォルト設定の場合「interface GigabitEthernet1」~「interface GigabitEthernet10」はコンフィグ上に表示されません。

インターフェースに対して何らかの設定変更を行った場合は「interface GigabitEthernet●」が表示されるようになります。

物理インターフェースはデフォルトだとスイッチポート

Catalyst 1300 は簡易的な L3 スイッチに該当するため、物理インターフェースは設定次第で L2 ポートとしても L3 ポートとしても使用できます。デフォルトだと「switchport」設定が有効になっていて L2 ポートとして動作します。

インターフェース基本設定

インターフェースの有効・無効設定

インターフェースの有効・無効は「shutdown」コマンドで設定します。

インターフェースの有効・無効設定
  • (config-if)#shutdown
    • インターフェースの有効化
  • (config-if)#no shutdown
    • インターフェースの無効化
switchcdebd2(config)#interface GigabitEthernet2
switchcdebd2(config-if)#shutdown

switchcdebd2(config)#interface GigabitEthernet2
switchcdebd2(config-if)#no shutdown

インターフェースが有効の場合データ送受信が可能となります。インターフェースが無効の場合データ送受信が不可となります。使用しない物理ポートは無効化する設計にすることが良くあります。

インターフェースの Speed・Duplex の設定

Speed・Duplex 関連の設定としては以下の設定項目があります。

  • speed → インターフェースのスピードを固定値にしたい場合に設定
  • duplex → Duplex の half/full を固定値にしたい場合に設定
  • negotiation → speed・duplex をオートネゴシエーションとしたい場合に設定

デフォルトでは negotiation が有効となっています。speed・duplex を固定値で動作させたい場合、negotiation を無効化する必要があります。(negotiation を無効化しなくても speed・duplex を設定できますが動作はオートネゴシエーションになります。)

Speed の設定
  • (config-if)#speed <スピード値>
補足情報
  • <スピード値>:スピードを 100,1000,2500,5000,10000 から指定
  • デフォルトはそのポートの最大速度
switchcdebd2(config)#interface GigabitEthernet2
switchcdebd2(config-if)#speed 100
Duplex の設定
  • (config-if)#duplex <half | full>
補足情報
  • <half | full>
    • half → 半二重
    • full → 全二重
  • デフォルトは full
switchcdebd2(config)#interface GigabitEthernet2
switchcdebd2(config-if)#duplex half
negotiation の有効・無効設定
  • (config-if)#negotiation
    • オートネゴシエーションの有効化
  • (config-if)#no negotiation
    • オートネゴシエーションの無効化
switchcdebd2(config)#interface GigabitEthernet2
switchcdebd2(config-if)#negotiation

自動 MDI/MDIX の有効・無効設定

自動 MDI/MDIX の有効・無効設定
  • (config-if)#mdix <auto | on>
補足情報
  • <auto | on>
    • auto → 自動 MDI/MDIX を有効にする
    • on → 手動 MDIX にする
  • デフォルトでは auto です
switchcdebd2(config)#interface GigabitEthernet2
switchcdebd2(config-if)#mdix auto

説明文 (description) の設定

ポート毎に description 設定にて説明文を設定することができます。

description の設定
  • (config-if)#description <文字列>
補足情報
  • <文字列>:説明文字列を 1-64 文字の範囲内で設定可能
  • 文字列にスペースを含む場合はダブルクォーテーション「”」で文字列を囲う必要がある
switchcdebd2(config)#interface GigabitEthernet2
switchcdebd2(config-if)#description "To RouterA Gi4"

description の内容を対向機器及び接続ポート情報とすることが良くあります。

スイッチポート・ルーテッドポートの切替設定

スイッチポート・ルーテッドポートの切替設定
  • (config-if)#switchport
    • スイッチポート (L2ポート) と設定 ※デフォルト
  • (config-if)#no switchport
    • ルーテッドポート (L3ポート) と設定
switchcdebd2(config)#interface GigabitEthernet2
switchcdebd2(config-if)#switchport

switchcdebd2(config)#interface GigabitEthernet2
switchcdebd2(config-if)#no switchport

スイッチポート (L2) 関連設定

スイッチポートとして使用する場合に設定する項目について説明します。

スイッチポートモード (access、trunk) の設定

access、trunk のモード設定は以下コマンドで行います。

スイッチポートモードの設定
  • (config-if)#switchport mode <access | trunk>
補足情報
  • <access | trunk>
    • access → タグ付けしないアクセスポートに設定
    • trunk → タグを付け外しするトランクポートに設定
  • デフォルトでは「access
switchcdebd2(config)#interface GigabitEthernet2
switchcdebd2(config-if)#switchport mode trunk

アクセスポートの設定項目

アクセスポートではどの Vlan ID を扱うかを指定するアクセス Vlan の設定を行います。

アクセス Vlan の設定
  • (config-if)#switchport access vlan <Vlan ID>
補足情報
  • <Vlan ID>:アクセス Vlan の ID を 1-4094 の範囲内で指定
  • デフォルトでは「1
switchcdebd2(config)#interface GigabitEthernet2
switchcdebd2(config-if)#switchport access vlan 10

トランクポートの設定項目

トランクポートでは以下のような設定を行います。

  • allowed vlan → 通信を許可する Vlan ID の設定
  • native vlan → タグ無しフレームをどの Vlan ID として処理するか

通信を許可する Vlan ID の設定は以下の allowed vlan で設定します。

allowed vlan の設定
  • (config-if)#switchport trunk allowed vlan <Vlan IDリスト>
補足情報
  • <Vlan IDリスト>:通信を許可する Vlan ID のリストを指定
    • カンマ「,」区切りで複数の Vlan ID を指定可能
    • ハイフン「-」区切りで Vlan ID の範囲を指定可能
  • デフォルトではすべての Vlan ID が許可されています
  • このコマンドで設定すると allowed vlan 設定の上書きとなる
switchcdebd2(config)#interface GigabitEthernet2
switchcdebd2(config-if)#switchport trunk allowed vlan 10-20,30-40

すでに allowed vlan が設定されている状態から、特定の Vlan ID の追加・削除を行いたい場合は以下コマンドで可能です。

allowed vlan の追加・削除設定
  • (config-if)#switchport trunk allowed vlan add <Vlan IDリスト>
    • 指定した Vlan ID を追加
  • (config-if)#switchport trunk allowed vlan remove <Vlan IDリスト>
    • 指定した Vlan ID を削除
switchcdebd2(config)#interface GigabitEthernet2
switchcdebd2(config-if)#switchport trunk allowed vlan add 100

switchcdebd2(config)#interface GigabitEthernet2
switchcdebd2(config-if)#switchport trunk allowed vlan remove 20

タグ無しフレームをどの Vlan ID として処理するかを決定する native vlan の設定は以下コマンドで行います。

native vlan の設定
  • (config-if)#switchport trunk native vlan <Vlan ID>
補足情報
  • <Vlan IDリスト>:通信を許可する Vlan ID を 1-4094 の範囲内で指定
  • デフォルトでは「1
switchcdebd2(config)#interface GigabitEthernet2
switchcdebd2(config-if)#switchport trunk native vlan 10

ルーテッドポート (L3) 関連設定

IP アドレスの設定

IP アドレスの設定はサブネットマスク形式とプレフィックス長形式の2パターンで設定可能です。コンフィグ上ではサブネットマスク形式で表示されます。

IP アドレスの設定
  • (config-if)#ip address <アドレス> <サブネットマスク>
  • または
  • (config-if)#ip address <アドレス> /<プレフィックス長>
switchcdebd2(config)#interface vlan 10
switchcdebd2(config-if)#ip address 10.10.1.100 255.255.255.0

switchcdebd2(config)#interface vlan 10
switchcdebd2(config-if)#ip address 10.10.1.100 /24

IP アドレスを DHCP サーバから自動取得するよう設定する場合は以下のコマンドで設定します。

DHCP クライアントの設定
  • (config-if)#ip address dhcp
switchcdebd2(config)#interface vlan 10
switchcdebd2(config-if)#ip address dhcp

プロキシ ARP の有効・無効設定

Catalyst 1300 スイッチのインターフェースではデフォルトでプロキシ ARP が有効になっています。プロキシ ARP の有効・無効は以下のコマンドで設定できます。

プロキシ ARP の有効・無効設定
  • (config-if)#ip proxy-arp
    • プロキシ ARP の有効化
  • (config-if)#no ip proxy-arp
    • プロキシ ARP の無効化
switchcdebd2(config)#interface vlan 10
switchcdebd2(config-if)#no ip proxy-arp

インターフェース関連 show コマンド

物理系

  • show interfaces status
    • 各物理インターフェースの状態を表示
switchcdebd2#show interfaces status
                                              Flow Link          Back   Mdix
Port      Type         Duplex  Speed Neg      ctrl State       Pressure Mode
--------- ------------ ------  ----- -------- ---- ----------- -------- -------
gi1       1G-Copper    Full    1000  Enabled  Off  Up          Disabled Off
gi2       1G-Copper      --      --     --     --  Down           --     --
gi3       1G-Copper      --      --     --     --  Down           --     --
gi4       1G-Copper      --      --     --     --  Down           --     --
gi5       1G-Copper      --      --     --     --  Down           --     --
gi6       1G-Copper      --      --     --     --  Down           --     --
gi7       1G-Copper      --      --     --     --  Down           --     --
gi8       1G-Copper    Full    100   Enabled  Off  Up          Disabled On
gi9       1G-Combo-C     --      --     --     --  Down           --     --
gi10      1G-Combo-C     --      --     --     --  Down           --     --

                                          Flow    Link
Ch       Type    Duplex  Speed  Neg      control  State
-------- ------- ------  -----  -------- -------  -----------
Po1         --     --      --      --       --    Not Present
Po2         --     --      --      --       --    Not Present
Po3         --     --      --      --       --    Not Present
Po4         --     --      --      --       --    Not Present
Po5         --     --      --      --       --    Not Present
Po6         --     --      --      --       --    Not Present
Po7         --     --      --      --       --    Not Present
Po8         --     --      --      --       --    Not Present
  • show interfaces configuration
    • 各物理インターフェースの設定内容サマリを表示
switchcdebd2#show interfaces configuration
                                                Flow    Admin     Back   Mdix
Port      Type         Duplex  Speed  Neg      control  State   Pressure Mode
--------- ------------ ------  -----  -------- -------  -----   -------- ----
gi1       1G-Copper    Full    1000   Enabled  Off      Up      Disabled Auto
gi2       1G-Copper    Full    1000   Enabled  Off      Up      Disabled Auto
gi3       1G-Copper    Full    1000   Enabled  Off      Up      Disabled Auto
gi4       1G-Copper    Full    1000   Enabled  Off      Up      Disabled Auto
gi5       1G-Copper    Full    1000   Enabled  Off      Up      Disabled Auto
gi6       1G-Copper    Full    1000   Enabled  Off      Up      Disabled Auto
gi7       1G-Copper    Full    1000   Enabled  Off      Up      Disabled Auto
gi8       1G-Copper    Full    1000   Enabled  Off      Up      Disabled Auto
gi9       1G-Combo-C   Full    1000   Enabled  Off      Up      Disabled Auto
gi10      1G-Combo-C   Full    1000   Enabled  Off      Up      Disabled Auto

                                  Flow    Admin
Ch       Type    Speed  Neg      control  State
-------- ------- -----  -------- -------  -----
Po1         --     --   Enabled  Off      Up
Po2         --     --   Enabled  Off      Up
Po3         --     --   Enabled  Off      Up
Po4         --     --   Enabled  Off      Up
Po5         --     --   Enabled  Off      Up
Po6         --     --   Enabled  Off      Up
Po7         --     --   Enabled  Off      Up
Po8         --     --   Enabled  Off      Up
  • show interfaces counters
    • 各物理インターフェースの入力・出力パケットカウンタを表示
switchcdebd2#show interfaces counters

      Port       InUcastPkts  InMcastPkts  InBcastPkts    InOctets
---------------- ------------ ------------ ------------ ------------
      gi1          4243016        3073          60       4435896021
      gi2             0            0            0            0
      gi3             0            0            0            0
      gi4             0            0            0            0
      gi5             0            0            0            0
      gi6             0            0            0            0
      gi7             0            0            0            0
      gi8          2591673        402          359       1363267715
      gi9             0            0            0            0
      gi10            0            0            0            0

      Port       OutUcastPkts OutMcastPkts OutBcastPkts  OutOctets
---------------- ------------ ------------ ------------ ------------
      gi1          2590506       20442          66       1364392404
      gi2             0            0            0            0
      gi3             0            0            0            0
      gi4             0            0            0            0
      gi5             0            0            0            0
      gi6             0            0            0            0
      gi7             0            0            0            0
      gi8          4194485       20238          68       4366566647
      gi9             0            0            0            0
      gi10            0            0            0            0

       Ch        InUcastPkts  InMcastPkts  InBcastPkts    InOctets
---------------- ------------ ------------ ------------ ------------
      Po1             0            0            0            0
      Po2             0            0            0            0
      Po3             0            0            0            0
      Po4             0            0            0            0
      Po5             0            0            0            0
      Po6             0            0            0            0
      Po7             0            0            0            0
      Po8             0            0            0            0

       Ch        OutUcastPkts OutMcastPkts OutBcastPkts  OutOctets
---------------- ------------ ------------ ------------ ------------
      Po1             0            0            0            0
      Po2             0            0            0            0
      Po3             0            0            0            0
      Po4             0            0            0            0
      Po5             0            0            0            0
      Po6             0            0            0            0
      Po7             0            0            0            0
      Po8             0            0            0            0
  • show interfaces counters <インターフェース名>
    • 指定した物理インターフェースのエラーカウンタ含めた詳細なカウンタ情報を表示
switchcdebd2#show interfaces counters GigabitEthernet1

      Port       InUcastPkts  InMcastPkts  InBcastPkts    InOctets
---------------- ------------ ------------ ------------ ------------
      gi1          4254575        3078          60       4449512760

      Port       OutUcastPkts OutMcastPkts OutBcastPkts  OutOctets
---------------- ------------ ------------ ------------ ------------
      gi1          2596736       20487          66       1366932121

FCS Errors: 0
Single Collision Frames: 0
Multiple Collision Frames: 0
SQE Test Errors: 0
Deferred Transmissions: 0
Late Collisions: 0
Excessive Collisions: 0
Carrier Sense Errors: 0
Oversize Packets: 0
Internal MAC Rx Errors: 0
Symbol Errors: 0
Received Pause Frames: 0
Transmitted Pause Frames: 0

スイッチポート系

  • show vlan
    • 作成済み Vlan ID と対応ポート情報を表示
switchcdebd2#show vlan
Created by: D-Default, S-Static, G-GVRP, R-Radius Assigned VLAN, V-Voice VLAN

Vlan       Name          Tagged Ports      UnTagged Ports      Created by
---- ----------------- ------------------ ------------------ ----------------
 1           1                            gi1-3,gi5-7,gi9-10        D
 2           2                                   gi8                S
 4           4                                                      S
 10         10                gi4                                   S
 11         11                gi4                                   S
 12         12                gi4                                   S
 13         13                gi4                                   S
 14         14                gi4                                   S
 15         15                gi4                                   S
 16         16                gi4                                   S
 17         17                gi4                                   S
 18         18                gi4                                   S
 19         19                gi4                                   S
 20         20                gi4                                   S
100         100               gi4                                   S
105         105                                                     S
  • show interfaces switchport [<インターフェース名>]
    • 全ての物理インターフェースまたは指定したインターフェースの管理ステータスと動作ステータスを表示
switchcdebd2#show interfaces switchport GigabitEthernet1
S-VLAN Ethernet Type:  0x8100 (802.1q)
VLAN Mapping Tunnel L2 protocols Global CoS: 5
Name: gi1
Switchport: enable
Administrative Mode: access
Operational Mode: up
Access Mode VLAN: 1
Access Multicast TV VLAN: none
Trunking Native Mode VLAN: 1
Trunking VLANs: 1-2,4,10-20,100,105
                        3,5-9,21-99,101-104,106-4094 (Inactive)
General PVID: 1
General VLANs: none
General Egress Tagged VLANs: none
General Forbidden VLANs: none
General Ingress Filtering: enabled
General Acceptable Frame Type: all
General GVRP status: disabled
Customer Mode VLAN: none
Customer Multicast TV VLANs: none
Private-vlan promiscuous-association primary VLAN: none
Private-vlan promiscuous-association Secondary VLANs: none
Private-vlan host-association primary VLAN: none
Private-vlan host-association Secondary VLAN: none

VLAN Mapping Tunnel - no resources

VLAN Mapping One-To-One - no resources

Classification rules:

Classification type Group ID VLAN ID
------------------- -------- -------

ルーテッドポート系

  • show ip interface
    • ルーテッドポートの IP アドレス及び状態を表示
switchcdebd2#show ip interface


IP Address         I/F       I/F Status Type    Directed  Prec Redirect Status
                             admin/oper         Broadcast
------------------ --------- ---------- ------- --------- ---- -------- ------
10.1.1.3/24        vlan 1    UP/UP      Static  disable   No   enable   Valid
10.2.1.3/24        vlan 2    UP/UP      Static  disable   No   enable   Valid
10.10.1.100/24     vlan 10   UP/DOWN    Static  disable   No   enable   Valid

参考資料


Cisco Catalyst 1300 スイッチ関連記事一覧


Amazon で買えるおすすめアイテム

以下は Amazon アフィリエイトリンクです。ネットワーク作業向けにそこそこおすすめなアイテムです。

ブログ始めるなら 【アフィリエイトリンク】

よかったらシェアしてね!
  • URLをコピーしました!
  • URLをコピーしました!

コメント

コメントする

目次