・エージングタイムの設定確認
#show mac address-table aging-time
Switch1#show mac address-table aging-time
Global Aging Time: 300
Vlan Aging Time
—- ———-
・エージングタイムの変更
(config)#mac address-table aging-time <秒数> [vlan <VLAN番号>]
Switch1(config)#mac address-table aging-time 600
Switch1(config)#exit
Switch1#show
*Jul 29 00:36:00.742: %SYS-5-CONFIG_I: Configured from console by console
Switch1#show mac address-table aging-time
Global Aging Time: 600
Vlan Aging Time
—- ———-
・変更通知機能
有効
(config)#mac address-table notification change
確認
#show mac address-table notification change
・移動通知機能
有効
(config)#mac address-table notification mac-move
確認
#show mac address-table notification mac-move
・MACアドレステーブルの確認
#show mac address-table [dynamyc | static | vlan <VLAN番号> | interface <インターフェイス>]
Switch1#show mac address-table
Mac Address Table
——————————————-
Vlan Mac Address Type Ports
—- ———– ——– —–
・手動登録と削除
登録
(config)#mac address-table static <MACアドレス> vlan <VLAN番号> interface <インターフェイス>
Switch1(config)#mac address-table static 0026.2D25.EF3A vlan 1 interface ethernet 0/0
Switch1(config)#exit
Switch1#show mac address-table
Mac Address Table
——————————————-
Vlan Mac Address Type Ports
—- ———– ——– —–
1 0026.2d25.ef3a STATIC Et0/0
Total Mac Addresses for this criterion: 1
削除
(config)#no mac address-table static <MACアドレス> vlan <VLAN番号> interface <インターフェイス>
Switch1(config)#no mac address-table static 0026.2d25.ef3a vlan 1 interface ethernet 0/0
Switch1(config)#exit
Switch1#
*Jul 29 00:25:46.507: %SYS-5-CONFIG_I: Configured from console by console
Switch1#show mac address-table
Mac Address Table
——————————————-
Vlan Mac Address Type Ports
—- ———– ——– —–
・自動で登録されたMACアドレスを削除
#clear mac address-table dynamyc [<MACアドレス> | <インターフェイス> | <VLAN番号>]
・SDMテンプレートの設定と設定確認
設定確認
#show sdm prefer [default | access | routing | vlan]
・SDMテンプレートの変更
(config)#sdm prefer <default | access | routing | vlan>
機種やIOSのバージョンなどによって指定できないものもある。
・CDPの設定と設定確認
動作状況確認
#show cdp
Switch1#show cdp
Global CDP information:
Sending CDP packets every 60 seconds
Sending a holdtime value of 180 seconds
Sending CDPv2 advertisements is enabled
全体でCDPを無効
(config)#no cdp run
全体でCDPを有効
(config)#cdp run
インターフェイス単位で無効
(config-if)#no cdp enable
インターフェイス単位で有効
(config-if)#cdp enable
・隣接機器の情報を確認
#show cdp neighbors
Switch1#show cdp neighbors
Capability Codes: R – Router, T – Trans Bridge, B – Source Route Bridge
S – Switch, H – Host, I – IGMP, r – Repeater, P – Phone,
D – Remote, C – CVTA, M – Two-port Mac Relay
Device ID Local Intrfce Holdtme Capability Platform Port ID
Switch2 Eth 0/0 145 R S Linux Uni Eth 0/0
詳細
#show cdp neighbors detail
Switch1#show cdp neighbors detail
————————-
Device ID: Switch2
Entry address(es):
Platform: Linux Unix, Capabilities: Router Switch
Interface: Ethernet0/0, Port ID (outgoing port): Ethernet0/0
Holdtime : 154 sec
Version :
Cisco IOS Software, Solaris Software (I86BI_LINUXL2-IPBASEK9-M), Experimental Version 15.1(20130124:233217) [dstivers-jan24-2013-team_track 101]
Copyright (c) 1986-2013 by Cisco Systems, Inc.
Compiled Thu 24-Jan-13 16:17 by dstivers
advertisement version: 2
VTP Management Domain: ”
Duplex: half
Management address(es):
・LLDPの設定と確認
LLDPはデフォルトで無効になっている。
有効化
(config)#lldp run
動作状況確認
(config)#show lldp
隣接機器の情報確認
#show lldp neighbors
詳細
#show lldp neighbors deteil
・UDLDの設定と確認
設定
デフォルトで無効。
(config)#udld <enable |aggressive | message time 秒数>
(config-if)#udld port [aggressive]
確認
#show udld [<インターフェイス>]
・errdisableからの復旧
ポートをすべて復旧
#udld reset
手動復旧
インターフェイスコンフィギュレーションモードでshutdownコマンドを入力し、no shutdownコマンドを入力。
自動復旧
デフォルトで無効。
現在の設定確認
#show errdisable recovery
Switch1#show errdisable recovery
ErrDisable Reason Timer Status
—————– ————–
arp-inspection Disabled
bpduguard Disabled
channel-misconfig (STP) Disabled
dhcp-rate-limit Disabled
dtp-flap Disabled
gbic-invalid Disabled
inline-power Disabled
l2ptguard Disabled
link-flap Disabled
mac-limit Disabled
link-monitor-failure Disabled
loopback Disabled
oam-remote-failure Disabled
pagp-flap Disabled
port-mode-failure Disabled
pppoe-ia-rate-limit Disabled
psecure-violation Disabled
security-violation Disabled
sfp-config-mismatch Disabled
storm-control Disabled
udld Disabled
unicast-flood Disabled
vmps Disabled
psp Disabled
dual-active-recovery Disabled
Timer interval: 300 seconds
Interfaces that will be enabled at the next timeout:
自動復旧させるコマンド
(config)#errdisable recovery cause <エラーの原因>
(config)#no errdisable recovery cause <エラーの原因>
Switch1(config)#errdisable recovery cause all
Switch1(config)#exit
Switch1#show
*Jul 29 14:35:09.585: %SYS-5-CONFIG_I: Configured from console by console
Switch1#show errdisable recovery
ErrDisable Reason Timer Status
—————– ————–
arp-inspection Enabled
bpduguard Enabled
channel-misconfig (STP) Enabled
dhcp-rate-limit Enabled
dtp-flap Enabled
gbic-invalid Enabled
inline-power Enabled
l2ptguard Enabled
link-flap Enabled
mac-limit Enabled
link-monitor-failure Enabled
loopback Enabled
oam-remote-failure Enabled
pagp-flap Enabled
port-mode-failure Enabled
pppoe-ia-rate-limit Enabled
psecure-violation Enabled
security-violation Enabled
sfp-config-mismatch Enabled
storm-control Enabled
udld Enabled
unicast-flood Enabled
vmps Enabled
psp Enabled
dual-active-recovery Disabled
Timer interval: 300 seconds
Interfaces that will be enabled at the next timeout:
復旧までの秒数変更
(config)#errdisable recovery interval <秒数>
Switch1(config)#errdisable recovery interval 86400
Switch1#show errdisable recovery
Timer interval: 86400 seconds
・エラーの検出
検出するエラーの確認
#show errdisable detect
Switch1#show errdisable detect
ErrDisable Reason Detection Mode
—————– ——— —-
arp-inspection Enabled port
bpduguard Enabled port
channel-misconfig (STP) Enabled port
community-limit Enabled port
dhcp-rate-limit Enabled port
dtp-flap Enabled port
ekey Enabled port
gbic-invalid Enabled port
iif-reg-failure Enabled port
inline-power Enabled port
invalid-policy Enabled port
l2ptguard Enabled port
link-flap Enabled port
link-monitor-failure Enabled port
loopback Enabled port
lsgroup Enabled port
oam-remote-failure Enabled port
mac-limit Enabled port
pagp-flap Enabled port
port-mode-failure Enabled port
pppoe-ia-rate-limit Enabled port
psecure-violation Enabled port
security-violation Enabled port
sfp-config-mismatch Enabled port
storm-control Enabled port
udld Enabled port
unicast-flood Enabled port
vmps Enabled port
psp Enabled port
dual-active-recovery Enabled port
左側:エラーの原因
右側:検出してerrdisableとするか
初期状態の場合全てEnabledになっている。
特定のエラーのみ検出する設定
(config)#errdisable detect cause <エラーの原因>
(config)#no errdisable detect cause <エラーの原因>
Switch1(config)#no errdisable detect cause all
Switch1(config)#end
*Jul 29 14:28:51.138: %SYS-5-CONFIG_I: Configured from console by console
Switch1#show errdisable detect
ErrDisable Reason Detection Mode
—————– ——— —-
arp-inspection Disabled
bpduguard Enabled port
channel-misconfig (STP) Enabled port
community-limit Enabled port
dhcp-rate-limit Disabled
dtp-flap Disabled
ekey Enabled port
gbic-invalid Disabled
iif-reg-failure Enabled port
inline-power Enabled port
invalid-policy Enabled port
l2ptguard Disabled
link-flap Disabled
link-monitor-failure Enabled port
loopback Disabled
lsgroup Enabled port
oam-remote-failure Enabled port
mac-limit Enabled port
pagp-flap Disabled
port-mode-failure Enabled port
pppoe-ia-rate-limit Disabled
psecure-violation Enabled port
security-violation Enabled port
sfp-config-mismatch Disabled
storm-control Enabled port
udld Enabled port
unicast-flood Enabled port
vmps Enabled port
psp Enabled port
dual-active-recovery Enabled port
Switch1(config)#errdisable detect cause all
Switch1(config)#end
Switch1#
*Jul 29 14:30:14.239: %SYS-5-CONFIG_I: Configured from console by console
Switch1#show errdisable detect
ErrDisable Reason Detection Mode
—————– ——— —-
arp-inspection Enabled port
bpduguard Enabled port
channel-misconfig (STP) Enabled port
community-limit Enabled port
dhcp-rate-limit Enabled port
dtp-flap Enabled port
ekey Enabled port
gbic-invalid Enabled port
iif-reg-failure Enabled port
inline-power Enabled port
invalid-policy Enabled port
l2ptguard Enabled port
link-flap Enabled port
link-monitor-failure Enabled port
loopback Enabled port
lsgroup Enabled port
oam-remote-failure Enabled port
mac-limit Enabled port
pagp-flap Enabled port
port-mode-failure Enabled port
pppoe-ia-rate-limit Enabled port
psecure-violation Enabled port
security-violation Enabled port
sfp-config-mismatch Enabled port
storm-control Enabled port
udld Enabled port
unicast-flood Enabled port
vmps Enabled port
psp Enabled port
dual-active-recovery Enabled port
・ローカルSPANの設定
送信元ポートの指定
(config)#monitor session >セッション番号> source interface <インターフェイス> [both | rx | tx]
(config)#monitor session >セッション番号> source vlan <VLAN番号> [both | rx | tx]
オプションでどの向きの通信をコピーするのか指定する。
both:両方向
rx:受信
tx:送信
vlanは複数指定可能。
例:
2,3,4
2-4
宛先ポートの指定
(config)#monitor session <セッション番号> destination interface <インターフェイス>
・SPANの設定確認
#show monitor [session <セッション番号>]
オプションをつけると対象のセッションだけが表示される。
・フィルタリング設定
(config)#monitor session <セッション番号> filter vlan <VLAN番号>
・RSPANの設定
RSPAN用のVLANを作成
(config)#vlan <vlan番号>
(config-vlan)#remote-span
・送信元スイッチの設定
(config)#monitor session <セッション番号> destination remote vlan <VLAN番号>
VLANは作成したRSPAN用のVLANを指定する。
・パケットキャプチャ用PCが接続するスイッチでの設定
宛先ポートの指定はローカルSPANと同様
(config)monitor session <セッション番号> source remote vlan <VLAN番号>
・ストームコントロールの設定
デフォルトで無効。
有効化
(config-if)#storm-control <パケットのタイプ> level <上限値 [<下限値>] | bps 上限値 [<下限値>] | pps 上限値 [<下限値>]>
パケットタイプ:unicast broadcast multicast
・上限値を超えた場合のアクション
(config-if)#storm-control action <shutdown | trap>
・設定確認
#show storm-control [<インターフェイス>] [<パケットのタイプ>]
コメントを書く