0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

CCNA VLAN コマンド集

Posted at

● スイッチポートにVLANを割り当てるコマンド

(config-if)# switchport access vlan

基本的にVLANを作成した後でスイッチポートにVLANを割り当てるのが一般的ですが、作成していなくても存在していませんとメッセージが表示され、自動的に作成されます。

● VLANの作成

(config)# vlan
(config-if)# exit

上記のようにvlanを作成した後で、コンフィギュレーションモードから出たら作成が
完了します。

● SVI(管理インターフェイス)の作成

(config)# interface vlan

● スイッチポートのアクセス・トランクの切り替え

(config-if)# switchport mode access

● トランクプロトコルの設定

(config-if)# switchport trunk encapsulation {isl|dot1q|negotiate}
これでトランクプロトコルを決定した後に

● トランクポートの設定

(config-if)# switchport mode trunk
これでトランクポートを設定します。

● スイッチにある全てのVLAN情報の開示

show vlan

● 特定のスイッチポートのVLAN情報の開示

show interfaces interface-id switchport
show interfaces interface-id trunk

● 現在、動作中の設定を確認する。

show running-config

● 指定したインターフェイスの情報を開示する。

show interfaces status

● インターフェイスの要約情報を開示

show ip interface brief

● 指定したVLANの管理インターフェイスの表示

show interfaces vlan

● トランクポートで許可する範囲を指定する。

switchport trunk allowed vlan

追加だと最後にadd vlan-id
除去だと remove vlan-id

● ネイティブVLANの変更コマンド

switchport trunk native vlan vlan-id

● 全てのVLANにタグを付加するコマンド

vlan dot1q tag native

● DTPを無効にするコマンド

switchport nonegotiate

● VTPの詳細の表示

show vtp status

● 音声VLANの設定

switchport voice vlan

アクセスポートに音声VLANコマンドを入力すると設定ができます。
これにより、IP PhoneとPCを接続できます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?