4
6

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 5 years have passed since last update.

snippet: cisco

Last updated at Posted at 2014-10-04

おすすめHP

L2SWとL3SWの違い

L2SWはMACアドレスを見てパケットを転送する
L3SWはIPアドレスを見てパケットを転送する

(メモ)ネットワーク機器の処理性能について

名称 説明
スイッチングファブリック 内部の帯域幅。「バックプレーン容量」「内部バス速度」「スイッチングファブリック」などと表現されることも
ノンブロッキング 100%の転送量を保証
(c6500)オーバサブスクリプション 4:1とか2:1
(c6500)パフォーマンスモード スイッチング・ファブリックを考慮して利用できるポート数を(半分などに)制限

実際は「最大バックプレーン」や「最大スイッチング能力」を使い切ることはめったに無いかと思います。

ciscoのような機器はVLANを分けられる。

  • DMZ
  • ファイアウォール
  • イントラ用

タイムゾーンの設定

タイムゾーンの設定
# conf t
(config)#clock timezone JST 9
(config)#^Z
# show clock
*12:32:53.133 JST Sat Oct 4 2014

手動で時刻設定

手動で時刻設定
# clock set 16:10:30 Nov 23 2014

DNS設定

DNS設定
# conf t
(config)#ip name-server 8.8.8.8
(config)#ip name-server 8.8.4.4

デフォルトゲートウェイ設定

デフォルトゲートウェイ設定
# conf t
(config)#ip route 0.0.0.0 0.0.0.0 192.168.100.1
(config)#^Z
# show ip route | begin Gateway
デフォルトゲートウェイ設定(その2)
(config)#ip default-gateway 192.168.100.1

ホスト名設定

ホスト名設定
# conf t
(config)#hostname c3650_1

VLAN設定とIP設定

VLAN設定とIP設定
# conf t
(config)#int vlan 101
(config-if)#ip address 192.168.100.2 255.255.255.0
(config-if)#description WAN
(config-if)#^Z
# conf t
(config)#int range Gi1/0/1 - 12
(config-if)#switchport mode access
(config-if)#switchport access vlan 101
(config-if)#^Z
# show vlan

telnetを受け付ける

telnetを受け付ける
# conf t
(config)#line vty 0 4
(config-line)#password telnetpass
(config-line)#^Z
# conf t
(config)#enable password enablepass
  • no loginしていない場合、telnetのパスワードを設定していないとtelnet接続出来ない。
  • enableのパスワードを設定していないとtelnet接続した時にenableになれない。

description

descriptionをつける
# conf t
(config)#int Gi1/0/1
(config-if)#description DefaultGW
(config-if)#^Z
# show int description

タイムアウトによるログアウトを抑止

タイムアウトによるログアウトを抑止
# conf t
(config)#line con 0
(config-line)#exec-timeout 0 0

enableのパスワード設定

enableのパスワード設定
# conf t
(config)#enable password cisco
enableのパスワード削除
# conf t
(config)#no enable password

CDPを無効にする

CDPを無効にする
# conf t
(config)#no cdp run

コマンド結果から一致するものを表示(include)

コマンド結果から一致するものを表示(include)
# show run | include enable

LINK速度

LINK速度の確認
# show int status
LINK速度の設定(1000/Full)
# conf t
(config)#int Gi1/0/1
(config-if)#speed 1000
(config-if)#duplex full
# show int status
LINK速度の設定(auto/全二重)
# conf t
Enter configuration commands, one per line.  End with CNTL/Z.
(config)#int Gi1/0/1
(config-if)#speed auto
(config-if)#duplex auto
# show int status
Port      Name               Status       Vlan       Duplex  Speed Type
Gi1/0/1   GW                 connected    101        a-full  a-100 10/100/1000BaseTX
  • speed autoにすると自動。
  • duplex autoにすると自動。
  • この設定を変更すると、一瞬の断が発生する。

ネットワークスタック作成

ネットワークスタック作成
(config)#interface GigabitEthernet1/0/47
(config-if)# channel-group 1 mode on
(config-if)#interface GigabitEthernet1/0/48
(config-if)# channel-group 1 mode on

spanning tree

初期化

再起動後キー入力が必要なため、シリアルケーブル経由で操作すること。

初期化方法(3650)
# conf t
(config)#config-register 0x2102
(config)#^Z

もしくは

初期化方法(3750や2960)
# erase startup-config
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete
vlan.datの削除
# delete flash:
Delete filename []? vlan.dat
Delete flash:vlan.dat? [confirm]
  • vlan.datがあるとハマることがあるので必ず削除すること!!
再起動
# reload
System configuration has been modified. Save? [yes/no]: n
Reload command is being issued on Active unit, this will reload the whole stack
Proceed with reload? [confirm]
...
...7分ほどまつ
...

System configuration has been modified. Save? [yes/no]:

nを入力すること。

再起動
# reload

起動まで10分くらいかかる。

         --- System Configuration Dialog ---

Enable secret warning
----------------------------------
In order to access the device manager, an enable secret is required
If you enter the initial configuration dialog, you will be prompted for the enable secret
If you choose not to enter the intial configuration dialog, or if you exit setup without setting the enable secret,
please set an enable secret using the following CLI in configuration mode-
enable secret 0 <cleartext password>
----------------------------------
Would you like to enter the initial configuration dialog? [yes/no]: no

Would you like to terminate autoinstall? [yes]:



Press RETURN to get started!
Switch>

その他

確認

en

コマンド 説明
show conf 設定確認
show log ログ確認
show vlan VLAN一覧
show arp arp確認
show history コマンド履歴
ping 8.8.8.8 ping

途中でコマンドを中断したい場合

ctrl-^

Port-Channel (PAgP)作成

interface Port-channel1
 switchport trunk allowed vlan 10,20,30
 switchport mode trunk
!
interface GigabitEthernet1/0/47
 switchport trunk allowed vlan 10,20,30
 switchport mode trunk
 channel-group 1 mode desirable
!
interface GigabitEthernet1/0/48
 switchport trunk allowed vlan 10,20,30
 switchport mode trunk
 channel-group 1 mode desirable

Ciscoのホームページ

スクリーンショット 2014-10-04 14.39.51.png

その他参考


参考

負荷を確認

> show process cpu history
> show process cpu sorted

装置のFAN、電源、温度

> show environment all

IPアドレスからスイッチの何番ポートに接続されているか調査

macアドレス確認
> show ip arp 192.168.100.11
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet  192.168.100.11         68   1234.5678.abcd  ARPA   Vlan10
接続ポート確認
> show mac address-table address 1234.5678.abcd
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
  10    1234.5678.abcd    DYNAMIC     Gi1/0/22
Total Mac Addresses for this criterion: 1

シリアル番号

> show inventory

ntp

conf t
ntp server 192.168.1.254
end

show ntp associations
show ntp status

Cisco機器にwebアクセス

  • ファームウェア
  • show logを取得しやすかった。
http_serverを有効にする
ip http server
ip http access-class 10
ip http authentication local
ip http secure-server
access-list 10 permit 11.22.33.44
access-list 10 permit 192.168.1.0 0.0.0.255
  • http://ciscoのIP/ にアクセスするとBASIC認証。
  • ユーザ名
    • L3SW : cisco
    • L2SW : administrator
L3SW
wget --http-user=cisco --http-passwd=xxxxxxxx \
  http://192.168.2.250/exec/show/log/CR
L2SW
wget --http-user=administrator --http-passwd=xxxxxxxx \
  http://192.168.1.250/exec/show/log/CR

エラー件数の確認

show interfaces counters errors
4
6
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
4
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?