【D-Link】DGSシリーズのスイッチ設定コマンド

この記事では、D-Link製(DGSシリーズ)のL2、L3スイッチのCLI基礎設定コマンドをまとめてみました。

## アカウント作成(パスワードの作成)
管理者権限のアカウントを新規に作成する場合は以下のコマンドを使います。

create account admin アカウントID

上記のコマンドを打ち込むとパスワードの設定が求められます。

※読み取り専用のアカウント作成はこっちです。

create account user アカウントID

## パスワード暗号化
パスワードの暗号化は以下のコマンドを使います。

enable password encryption

## システムログの出力
システムログの出力は以下のコマンドを使います。
(Infoレベル以上のログ/Trapを出力)

config system_severity log information
create syslog host 1 ipaddress サーバIP severity informational
   facility local0 udp_port 514 state enable

## ポートの説明文
ポートに説明文(Depreion)を付加するには以下のコマンドを使います。

config ports ポート番号 depreion 注記

## アクセス制限
アクセス制限を行うには以下のコマンドを使います。
(Ciscoではline vty)

create trusted_host network IPアドレス snmp telnet ssh http https ping

## 管理用IPの設定
管理用IPの設定は以下のコマンドを使います。
(管理VLANのIPアドレス設定)

config ipif System ipaddress IPアドレス/サブネット vlan Vlan名

## デフォルトゲートウェイ
デフォルトゲートウェイの設定は以下のコマンドを使います。
create iproute default IPアドレス primary

## VLANの作成
VLANの作成は以下のコマンドを使います。

create vlan VLAN名 tag VlanID

## アンタグポートの作成
アンタグポートの作成は以下のコマンドを使います。

config vlan Vlan名 add untagged ポート番号

## アンタグポートの作成
タグポートの作成は以下のコマンドを使います。

config vlan Vlan名 add agged ポート番号

## SNTP(NTP)有効化
SNTP(NTP)の有効化は以下のコマンドで行います。

enable sntp
config time_zone operator + hour 9 min 0
config sntp primary プライマリIP secondary セカンダリIP poll-interval 間隔(秒)

## SNMP Trap
SNMP Trapの設定は以下のコマンドで行います。

enable snmp traps
config system_severity trap information
enable snmp authenticate_traps
enable snmp linkchange_traps

## SNMP
SNMPの設定は以下のコマンドで行います。

config snmp system_name システム名
config snmp system_location ロケーション
config snmp system_contact コンタクト先

## SSH有効化
SSHの有効化は以下のコマンドで行います。

config ssh server port 22
config ssh user アカウント authmode password
enable ssh

## ループ検知機能有効化
ループ検知機能の有効化は以下のコマンドで行います。

enable loopdetect
config loopdetect log state enable
config loopdetect ports ポート番号 state enable
config loopdetect trap both

ネットワーク
スポンサーリンク

コメント