読者です 読者をやめる 読者になる 読者になる

基本的な操作のメモ

今回は大分前に買ってから全然触っていなかったCatalyst2950を触る事にします。
自分用のメモです。

ユーザー


ユーザーEXECモード
 ↓
ネーブルEXECモード
 ↓
グローバルコンフィグレーションモード
 ↓
インターフェースコンフィグレーションモード


とモードを変更するのは以下のような感じ

>enable
Password: 
#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
(config)#interface fa0/1
(config-if)#


抜けるには「exit」。イネーブルEXECモードからユーザーEXECモードに戻る場合は「diable」で。

showコマンド

  • バージョン確認


「show version」で表示されます。

>show version
Cisco Internetwork Operating System Software 
IOS (tm) C2950 Software (C2950-I6K2L2Q4-M), Version 12.1(22)EA13, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2009 by cisco Systems, Inc.
Compiled Fri 27-Feb-09 22:20 by amvarma
Image text-base: 0x80010000, data-base: 0x80680000

ROM: Bootstrap program is C2950 boot loader

2950-1 uptime is 11 minutes
System returned to ROM by power-on
System image file is "flash:/c2950-i6k2l2q4-mz.121-22.EA13.bin"


This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
          
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email to
export@cisco.com.

cisco WS-C2950-24 (RC32300) processor (revision N0) with 19912K bytes of memory.
Processor board ID *****
Last reset from system-reset
Running Standard Image
24 FastEthernet/IEEE 802.3 interface(s)

32K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address: *****
Motherboard assembly number: *****
Power supply part number: *****
Motherboard serial number: *****
Power supply serial number: *****
Model revision number: N0
Motherboard revision number: B0
Model number: WS-C2950-24
System serial number: *****
Configuration register is 0xF
  • ログを表示する


「show logging」で表示されます。

>show logging
Syslog logging: enabled (0 messages dropped, 0 messages rate-limited, 0 flushes, 0 overruns)
    Console logging: level debugging, 5 messages logged
    Monitor logging: level debugging, 0 messages logged
    Buffer logging: level debugging, 5 messages logged
    Exception Logging: size (4096 bytes)
    File logging: disabled
    Trap logging: level informational, 10 message lines logged
          
Log Buffer (4096 bytes):

00:00:16: %SPANTREE-5-EXTENDED_SYSID: Extended SysId enabled for type vlan
00:00:18: %SYS-5-CONFIG_I: Configured from memory by console
00:00:19: %SYS-5-RESTART: System restarted --
Cisco Internetwork Operating System Software 
IOS (tm) C2950 Software (C2950-I6K2L2Q4-M), Version 12.1(22)EA13, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2009 by cisco Systems, Inc.
Compiled Fri 27-Feb-09 22:20 by amvarma
00:00:19: %SNMP-5-COLDSTART: SNMP agent on host 2950-1 is undergoing a cold start
00:05:38: %SYS-5-CONFIG_I: Configured from console by console
  • サポートを受けるときの情報収集


「show tech-support」コマンドを良く使います。
詳細な情報が各種大量に表示されます。

  • インターフェースの表示


「show interfaces」で。何も指定しなければ全てのインターフェースについて表示します。
インターフェースを指定すると、そのインターフェースに対する情報のみ表示します。

>show interfaces
Vlan1 is up, line protocol is down 
  Hardware is CPU Interface, address is 000f.f7ce.1800 (bia 000f.f7ce.1800)
  Internet address is xxx.xxx.xxx.xxx/24
  MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec, 
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input never, output never, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     0 packets input, 0 bytes, 0 no buffer
     Received 0 broadcasts (0 IP multicast)
     0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 packets output, 0 bytes, 0 underruns
     0 output errors, 2 interface resets
     0 output buffer failures, 0 output buffers swapped out


今回対象としたインターフェースは特に設定をしておらず、
物理的にも配線をつないでいないので、少々寂しいかも。

show interfaces fa0/1
FastEthernet0/1 is down, line protocol is down (notconnect)
  Hardware is Fast Ethernet, address is 000f.f7ce.1801 (bia 000f.f7ce.1801)
  MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, 
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)
  Auto-duplex, Auto-speed, media type is 100BaseTX
  input flow-control is unsupported output flow-control is unsupported 
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input never, output 00:23:02, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     0 packets input, 0 bytes, 0 no buffer
     Received 0 broadcasts (0 multicast)
     0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 watchdog, 0 multicast, 0 pause input
     0 input packets with dribble condition detected
     0 packets output, 0 bytes, 0 underruns
     0 output errors, 0 collisions, 2 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier, 0 PAUSE output
     0 output buffer failures, 0 output buffers swapped out
  • VLANの表示


「show vlan」です。下記の例は、まだ特にVLAN設定していないので初期状態のものです。

>show vlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                                Fa0/5, Fa0/6, Fa0/7, Fa0/8
                                                Fa0/9, Fa0/10, Fa0/11, Fa0/12
                                                Fa0/13, Fa0/14, Fa0/15, Fa0/16
                                                Fa0/17, Fa0/18, Fa0/19, Fa0/20
                                                Fa0/21, Fa0/22, Fa0/23, Fa0/24
1002 fddi-default                     act/unsup 
1003 token-ring-default               act/unsup 
1004 fddinet-default                  act/unsup 
1005 trnet-default                    act/unsup 

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        0      0   
1002 fddi  101002     1500  -      -      -        -    -        0      0   
1003 tr    101003     1500  -      -      -        -    -        0      0   
1004 fdnet 101004     1500  -      -      -        ieee -        0      0   
1005 trnet 101005     1500  -      -      -        ibm  -        0      0   

Remote SPAN VLANs
------------------------------------------------------------------------------


Primary Secondary Type              Ports
------- --------- ----------------- ------------------------------------------

コンフィグ関係

  • コンフィグの表示


現在のコンフィグなら「show running-config」、
保存してあるコンフィグなら「show startup-config」でOK.

  • コンフィグの保存


設定を変えても保存しないと再起動時に消えてしまいます。
保存するにはコンフィグの書き込みを行います。

# copy running-config startup-config
Destination filename [startup-config]? 
Building configuration...
[OK]
  • 保存してある設定の消去


「erase startup-config」で消去可能です。

#erase startup-config
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete

機器の再起動


「reload」で再起動します。

# reload
Proceed with reload? [confirm]

00:45:46: %SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload Command.
・・・

ホスト名の設定


「hostname <ホスト名>」で設定します。

Switch(config)#hostname 2950-1
2950-1(config)#

コマンドの使い方が分からない時


コマンドの後に「?」を押すと入力候補が表示されます。

#show ?
  access-lists       List access lists
  accounting         Accounting data for active sessions
  aliases            Display alias commands
  arp                ARP table
  boot               show boot attributes
  buffers            Buffer pool statistics
  cdp                CDP information
  clock              Display the system clock
  cluster            Cluster information
  cns                CNS agents
  configuration      Contents of Non-Volatile memory
  controllers        Interface controller status
  crypto             Encryption module
  data-corruption    Show data errors
  debugging          State of each debugging option
  dhcp               Dynamic Host Configuration Protocol status
  dot1x              Dot1x information
  dtp                DTP information
  env                Environmental facilities
  errdisable         Error disable
  etherchannel       EtherChannel information
  exception          exception informations
  file               Show filesystem information
  flash:             display information about flash: file system
  flowcontrol        show flow control information
  history            Display the session command history
  hosts              IP domain-name, lookup style, nameservers, and host table
  html               HTML helper commands
  idb                List of Hardware Interface Descriptor Blocks
  interfaces         Interface status and configuration
  inventory          Show the physical inventory
  ip                 IP information
  kerberos           Show Kerberos Values
  lacp               Port channel information
  line               TTY line information
  location           Display the system location
  logging            Show the contents of logging buffers
  mac                MAC configuration
  mac-address-table  MAC forwarding table
  memory             Memory statistics
  mls                Show MultiLayer Switching information
  monitor            Show a SPAN session
  mvr                Show mvr global parameters
  ntp                Network time protocol
  pagp               Port channel information
  parser             Show parser commands
  pm                 Show Port Manager commands
  port-security      Show secure port information
  post               Power On Self Test results
  privilege          Show current privilege level
  processes          Active process statistics
  queue              Show queue contents
  queueing           Show queueing configuration
  radius             Shows radius information
  region             Region Manager Status
  registry           Function registry information
  reload             Scheduled reload information
  rhosts             Remote-host+user equivalences
  rmon               rmon statistics
  rps                Show color of RPS led
  rtr                Response Time Reporter (RTR)
  running-config     Current operating configuration
  sessions           Information about Telnet connections
  setup              Show express setup settings
  snmp               snmp statistics
  spanning-tree      Spanning tree topology
  ssh                Status of SSH server connections
  stacks             Process stack utilization
  standby            Hot Standby Router Protocol (HSRP) information
  startup-config     Contents of startup configuration
  storm-control      Show packet storm control configuration
  subsys             Show subsystem information
  system             Show the system configuration
  tacacs             Shows tacacs+ server statistics 
  tcp                Status of TCP connections
  tech-support       Show system information for Tech-Support
  template           Template information
  terminal           Display terminal configuration parameters
  time-range         Time range
  udld               UDLD information
  users              Display information about terminal lines
  version            System hardware and software status
  vlan               VTP VLAN status
  vmps               VMPS version information
  vtp                VTP information
  wrr-queue          WRR queue


今日はこんなところで。