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.

VLANコマンド

Last updated at Posted at 2021-12-31

参考 https://www.infraexpert.com/study/vlanz10.html

VLANの作成とVLAN名の変更

(config)#

vlan [vlan番号]

(config-vlan)#

name [vlan名]

accessポート設定

(config-if)#

switchport mode access
switchport access vlan [vlan番号]

trunkポート設定

(config-if)#

switchport mode trunk
switchport trunk encapsulation [ dot1q | isl ]

↑このコマンドが通らないときは、dot1qにしか対応していない可能性がある。

allowed VLAN設定

(config-if)#

switchport trunk allowed vlan [vlan番号]

ネイティブVLAN設定

(config-if)#

switchport trunk native vlan [vlan番号]

管理VLAN設定

(config)#

interface vlan [vlan番号]
ip address [IPアドレス] [サブネットマスク]
no shutdown

VLANの削除

`#

delete flash:vlan.dat
reload

コピペ用

# VLANの作成とVLAN名の変更
(config)#
vlan [vlan番号]
(config-vlan)#
name [vlan名]


# accessポート設定
(config-if)#
switchport mode access
switchport access vlan [vlan番号]


# trunkポート設定
(config-if)#
switchport mode trunk
switchport trunk encapsulation [ dot1q | isl ]
↑このコマンドが通らないときは、dot1qにしか対応していない可能性がある。


# allowed VLAN設定
(config-if)#
switchport trunk allowed vlan [vlan番号]


# ネイティブVLAN設定
(config-if)#
switchport trunk native vlan [vlan番号]


# 管理VLAN設定
(config)#
interface vlan [vlan番号]
ip address [IPアドレス] [サブネットマスク]
no shutdown


# VLANの削除
#
delete flash:vlan.dat
reload
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?