ͥåȥϢ ܼ

Ķ

ʸоݵȥСϰʲ

  • //С
    Catalyst 2960-24TC-LWS-C2960-24TC-LC2960-LANBASEK9-M Version 15.0(2)SE
    Catalyst 2960-8TC-LWS-C2960-8TC-LC2960-LANBASEK9-M Version 15.0(2)SE
    Catalyst 2960C-8TCWS-C2960C-8TC-LC2960c405-UNIVERSALK9-M Version 15.0(2)SE4
    Catalyst 2960L-8TS-LLWS-C2960L-8TS-LLC2960L-UNIVERSALK9-M Version 15.2(5)E2

Tips

IOSоݤˤꡢʲΥ⡼ڤؤɬפȤʤ롣

Enable modeconfigure terminalinterface
hostname-
gateway-
ntp server-
ip address
IFͭ/̵

δ

IOSǤϡưƤrunning-configˤȵư˻Ȥstartup-configˤʬƴƤ롣
ޥ饤ˤѹrunning-configȤ߹ޤ¨ȿǤ뤬Ƥstartup-config˽񤭽Ф֤ʤȺƵư꤬ü롣ʵŪˤϡä򤷤ݤˤϺƵưиˡ

  • running-configƤɽ
    > en
    # show run
  • startup-configƤɽ
    > en
    #show conf
  • running-configstartup-config˽񤭽Ф
    > en
    #write memory 
    Building configuration...
    [OK]

IP(v4)

IP(VLAN1)

  • VLAN1ʴVLAN
    > en
    # conf t
    (config)# interface vlan 1
    (config)# no ip broadcast-address
    (config)# ip address [IP ADDRESS] [NETMASK]
    (config)# no shutdown

󥿡եؤIP

  • Fastethernet 0/0
    > en
    # conf t
    (config)# interface fastethernet 0/0
    (config)# ip address [IP ADDRESS] [NETMASK]
    (config)# no shutdown

IP(v6)

IPv6ͭ

IPv6бƤIOSǤϡʲIPv6ͭǤ롣
ȿǤˤϵκƵưɬפȤʤ롣

  • IPv6ͭ
    > en
    # conf t
    (config)# sdm prefer dual-ipv4-and-ipv6 default
    (config)# exit
    # write
    # reload

IPv6ɥ쥹

  • Fastethernet 0/0
    > en
    # conf t
    (config)# interface fastethernet 0/0
    (config)# ipv6 address [IP ADDRESS]/[NETMASK]
    (config)# no shutdown
  • ipv6 address fd7f:543c:5454:10:9:300:a:100/96

ǥեȥȥ

> en
# conf t
(config)# ip default-gateway [GATEWAY]

DNS

> en
# conf t
(config)#ip name-server [DNS]

ۥ̾

> en
# conf t
(config)# hostname [HOSTNAME]

߻ɽ

  • ߻ɽ
    > en
    #show clock 
    11:31:40.916 UTC Sat Nov 11 2023

ॾѹ

  • JSTѹ
    > en
    # conf t
    (config)# clock timezone JST 9

NTP

> en
# conf t
(config)# ntp server [NTP SERVE ADDRESS]

ǧ

󥽡ѥɤ

  • Ź沽
    > en
    # enable password
    [PASSWORD]
  • Ź沽
    > en
    # enable secret
    [PASSWORD]

telnet³

  • ѥ
    > en
    # conf t
    (config)# line vty 0 [0-16]
    config-if)# password [PASSWORD] config-if)# end
  • ǧˡ
    > en
    # show run
    config-if)# (line vty 0 [0-16]ιԤ˥ѥɤҤ)

SSH³

  • 桼κ
    > en
    # conf t
    (config)# username [USER] password [PASSWORD]
    (config)# line vty 0 4
    config-if)# login local
  • ۥ̾ȥɥᥤ̾ɬܡ
    > en
    # conf t
    (config)# hostname [HOSTNAME]
    (config)# ip domain-name [DOMAIN NAME]
  • RSA
    > en
    # conf t
    (config)# crypto key generate rsa
  • SSHͭ
    > en
    # conf t
    (config)# ip ssh version 2
    (config)# line vty 0 4
    config-if)# transport input ssh
  • SSHưǧ
    # show ip ssh
    ʲͤʽϤ뤳Ȥǧ
    SSH Enabled - version 2.0

Syslog

ɽ

  • ɽĴ
    > en
    # conf t
    (config)#service timestamps debug datetime msec localtime show-timezone
    (config)#service timestamps log datetime msec localtime show-timezone
    (config)#service sequence-numbers

Syslogž

  • Syslogžnotificationsʾž
    > en
    # conf t
    (config)#logging host [IP] 
    (config)#logging facility local5

٥

emergencies0ƥब԰LOG_EMERG
alerts1¨ɬLOG_ALERT
critical2ƥʾLOG_CRIT
errors3LOG_ERR
warnings4ٹLOG_WARNING
notifications5դפLOG_NOTICE
informational6åLOG_INFO
debugging7ǥХååLOG_DEBUG

SNMP

SNMPͭ

ʲޥˤSNMP-Serverͭ롣

> en
# conf t
# snmp-server community [community name] [ro|rw]

SNMP Trapͭ

ʲޥˤSNMP TrapϿͭ򤹤롣

> en
# conf t
# snmp-server host [IP] version 2c [community name]
# snmp-server enable traps

MIBȤ߹

CiscoγĥMIBȤ

net-snmp/usr/local/netsnmp˥󥹥ȡ뤷Ƥ롣

/usr/local/netsnmp/share/snmp/mibs

CISCO-FIREWALL-MIB.my
CISCO-MEMORY-POOL-MIB.my
CISCO-PROCESS-MIB.my
CISCO-QOS-PIB-MIB.my
CISCO-SMI.my
CISCO-TC.my
򥳥ԡ

MIBSĶѿ򥻥åȤ롣
C
% setenv MIBS ALL
B

# MIBS=ALL; export MIBS

% cd /usr/local/netsnmp/bin
% ./snmpwalk -c community -v 2c HOST CpmCPUTotalEntry
ߤʴ

MIBեϰ¸طäơ㤨CISCO-PROCESS-MIB.myƬ

IMPORTS
MODULE-IDENTITY,
OBJECT-TYPE,
Counter32,
Gauge32,
NOTIFICATION-TYPE,
Unsigned32
FROM SNMPv2-SMI
TimeStamp,
DisplayString,
RowStatus
FROM SNMPv2-TC
MODULE-COMPLIANCE,
OBJECT-GROUP,
NOTIFICATION-GROUP
FROM SNMPv2-CONF
ciscoMgmt
FROM CISCO-SMI
EntPhysicalIndexOrZero
FROM CISCO-TC;

ߤˤʤäƤ롣IMPORTSFROMˤMIBեɬפˤʤ롣ξ
SNMPv2-SMI
SNMPv2-TC
SNMPv2-CONF
CISCO-SMI
CISCO-TC
ɬפȤȡ

http://www.cisco.com/cisco/web/support/JP/docs/SW/LANSWT-Access/CAT3750SWT/CG/001/27_swsnmp.html?bid=0900e4b18252964a#46848

ġ

  • Catalyst2960 MIB
    http://www.cisco.com/japanese/warp/public/3/jp/service/manual_j/sw/cat29/2960cg5/appendixA/8603_04_appendixa.shtml

LLDP

LLDPͭ

> en
# conf t
(config)# lldp run
(config)# end

ܵγǧ

# show lldp neighbors

VLAN

Catalyst 2950-8TؤVLAN㡣
VLANϰʲ߷פȤ롣

VLAN⡼ݡȥ١VLAN
VLAN2
VLAN10Fe1-4
VLAN20Fe5-8

  • enable⡼ɤ饳ե⡼ɤڤؤ
    Catalyst>en
    ڥѥϡ
    Catalyst#conf t
    Catalyst(config)#
  • VLAN(VLAN 10)
    Catalyst(config)#vlan 10
    Catalyst(config-vlan)#name VLAN_10
    Catalyst(config-vlan)#exit
  • 󥿡եγ(Fe1 4)
    Catalyst(config)#interface fastEthernet 0/1
    Catalyst(config-if)#switchport mode access
    Catalyst(config-if)#switchport access vlan 10
    Catalyst(config-if)#exit
    
    Catalyst(config)#interface fastEthernet 0/2
    Catalyst(config-if)#switchport mode access
    Catalyst(config-if)#switchport access vlan 10
    Catalyst(config-if)#exit
    
    Catalyst(config)#interface fastEthernet 0/3
    Catalyst(config-if)#switchport mode access
    Catalyst(config-if)#switchport access vlan 10
    Catalyst(config-if)#exit
    
    Catalyst(config)#interface fastEthernet 0/4
    Catalyst(config-if)#switchport mode access
    Catalyst(config-if)#switchport access vlan 10
    Catalyst(config-if)#exit
  • VLAN(VLAN 20)
    Catalyst(config)#vlan 20
    Catalyst(config-vlan)#name VLAN_20
    Catalyst(config-vlan)#exit
  • 󥿡եγ(Fe5 8)
    Catalyst(config)#interface fastEthernet 0/5
    Catalyst(config-if)#switchport mode access
    Catalyst(config-if)#switchport access vlan 10
    Catalyst(config-if)#exit
    
    Catalyst(config)#interface fastEthernet 0/6
    Catalyst(config-if)#switchport mode access
    Catalyst(config-if)#switchport access vlan 10
    Catalyst(config-if)#exit
    
    Catalyst(config)#interface fastEthernet 0/7
    Catalyst(config-if)#switchport mode access
    Catalyst(config-if)#switchport access vlan 10
    Catalyst(config-if)#exit
    
    Catalyst(config)#interface fastEthernet 0/8
    Catalyst(config-if)#switchport mode access
    Catalyst(config-if)#switchport access vlan 10
    Catalyst(config-if)#exit
  • ֤ǧ
    Catalyst#show vlan
    
    VLAN Name Status  Ports
    ---- --------------- --------- -------------------------
    1default          active 
    10 VLAN_10          active Fa0/1, Fa0/2,Fa0/3, Fa0/4
    20 VLAN_20          active Fa0/5, Fa0/6,Fa0/7, Fa0/8
    1002 fddi-default       active
    1003 token-ring-default active
    1004 fddinet-default    active
    1005 trnet-default      active

SPAN

login
> en
# conf t
(config)# monitor session 1 source interface fastethernet 0/2
(config)# monitor session 1 destination interface fastethernet 0/3

login
> en
# conf t
(config)# no monitor session 1 source interface fastethernet 0/2
(config)# no monitor session 1 destination interface fastethernet 0/3 

URL

http://www.cisco.com/univercd/cc/td/doc/product/lan/cat2950/12119ea1/2950scg/swspan.htm
http://www.cisco.com/japanese/warp/public/3/jp/service/tac/473/41-j.shtml

Tips

κƵư

ȿǤΰ٤˺ƵưɬפȤʤ礬ꡢʲޥˤƺƵưԤ롣

  • Ƶư
    en
    reload

IPɥ쥹Ĵ

enable modeˤưʲޥ¹

# show arp

ꥢɥ쥹֥å

# show arp | include [IP Address]

CDPˤ³Ĵ

# show cdp neighbors
# show cdp neighbors detail

CDPȤ

CiscoΥ롼䥹åˤϡCiscoȼΥץȥǤCDPCisco Discovery ProtocolˤɬƤޤCDPϤΥ롼䥹åľ³ƤۤCiscoǥХ򸫤Ĥξ֤𤹤뤿ΥץȥǤCDPȤȤˤꡤ֤γǧȥ֥륷塼ƥ󥰤Ωޤ

CDPϥǡؤΥץȥǡCiscoǥХŪCDPե졼쥤2ޥ㥹ȤޤCDPե졼ˤϼȤδŪäƤޤưˤꡤܤCiscoǥХξꤷޤCDPˤ򸫤ϡshow cdpޥѤޤ

# show cdp  CDPǧ ʿ8
# show cdp neighbors {detail}  CDPˤܤCiscoǥХδʰ׾ֳǧʿ9
  • {detail}
    άǽdetailդϾܺ٤ʾ򸫤뤳ȤǤʿ10

    ܥǥХIOSСIPɥ쥹show cdp neighbors detailǤʤȸ뤳ȤǤޤ󡣤ޤshow cdp neighbors detailǤܥǥХɽƤޤᡤ򸫤ϰ㤦ޥshow cdp entry {ۥ̾}ˤɬפǤ

    # show cdp entry {ۥ̾}  CDPˤܤCiscoǥХξֳǧʿ11
  • {ۥ̾} άǽۥ̾ΥǥХξǧǤ롣άޤϡ*ʥꥹˡפ줿ǥХξɽ

    Ĥޤꡤshow cdp entryʥۥ̾άˤshow cdp neighbors detailƱɽ̤ˤʤޤ

    ޤCDPѤʤȤǽǤǥեȤǤϻѤˤʤäƤޤѤʤϡno cdp enableޥȤäƻѤʤˤޤ
config-if# no cdp enable  Υ󥿥եCDPѤʤ
config-if# cdp enable  Υ󥿥եCDPѤʥǥեȡ

ɤΥ󥿥եCDPѲǽˤʤäƤ뤫ޤ򸫤 show cdp interfaceޥѤޤʿ12ˡ

# show cdp interface {󥿥ե} {ݡֹ}  󥿥ե̤CDPɽ
  • {󥿥ե} {ݡֹ}
    άǽꤷ󥿥եξΤߤǧǤ롣ά󥿥եξɽ

URL

http://itpro.nikkeibp.co.jp/article/COLUMN/20051128/225286/


ȥå   Խ ʬ ʎގ̎ ź ʣ ̾ѹ   ǽ   إ   ǽRSS
Last-modified: 2023-11-12 () 01:04:11 (111d)