Cisco-commands

From aldeid
Jump to navigation Jump to search
Draft.png
DRAFT
This page is still a draft. Thank you for your understanding.

Show version

Switch>show version
Cisco IOS Software, C3560 Software (C3560-IPBASEK9-M), Version 12.2(55)SE6, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2012 by Cisco Systems, Inc.
Compiled Mon 23-Jul-12 13:10 by prod_rel_team
Image text-base: 0x01000000, data-base: 0x02D00000

ROM: Bootstrap program is C3560 boot loader
BOOTLDR: C3560 Boot Loader (C3560-HBOOT-M) Version 12.2(44)SE5, RELEASE SOFTWARE (fc1)

Switch uptime is 6 minutes
System returned to ROM by power-on
System restarted at 10:53:00 UTC Sun Dec 23 2012
System image file is "flash:c3560-ipbasek9-mz.122-55.SE6/c3560-ipbasek9-mz.122-55.SE6.bin"

[...truncated...]

cisco WS-C3560-24PS (PowerPC405) processor (revision S0) with 131072K bytes of memory.
Processor board ID FDO1240X50G
Last reset from power-on
1 Virtual Ethernet interface
24 FastEthernet interfaces
2 Gigabit Ethernet interfaces
The password-recovery mechanism is enabled.

512K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address       : 00:23:AB:**:**:**
Motherboard assembly number     : 73-9673-11
Power supply part number        : 341-****-**
Motherboard serial number       : FDO12******
Power supply serial number      : DTN1235****
Model revision number           : S0
Motherboard revision number     : A0
Model number                    : WS-C3560-24PS-S
System serial number            : FDO1240****
Top Assembly Part Number        : 800-258**-**
Top Assembly Revision Number    : B0
Version ID                      : V07
CLEI Code Number                : COMU******
Hardware Board Revision Number  : 0x01
          
         
Switch Ports Model              SW Version            SW Image                 
------ ----- -----              ----------            ----------               
*    1 26    WS-C3560-24PS      12.2(55)SE6           C3560-IPBASEK9-M         
         
         
Configuration register is 0xF

Show interfaces

Switch>show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
Vlan1                  192.168.1.52    YES NVRAM  up                    up      
FastEthernet0/1        unassigned      YES unset  up                    up      
FastEthernet0/2        unassigned      YES unset  up                    up      
FastEthernet0/3        unassigned      YES unset  up                    down    
FastEthernet0/4        unassigned      YES unset  up                    up      
FastEthernet0/5        unassigned      YES unset  down                  down    
[...truncated...]
FastEthernet0/24       unassigned      YES unset  down                  down    
GigabitEthernet0/1     unassigned      YES unset  down                  down    
GigabitEthernet0/2     unassigned      YES unset  down                  down

Enter configuration mode

Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.

Modify hostname

Switch(config)#hostname Switch-001

Define config password

Switch(config)#enable secret P455w0rD

Configure line

West(config)#line con 0
West(config-line)#logging synchronous
West(config-line)#exit

Configure interface

West(config)#interface s1/0
West(config-if)#ip address 10.0.0.1 255.0.0.0
West(config-if)#clock rate 64000
West(config-if)#no shutdown
West(config-if)#exit
*Mar 12 21:12:28.207: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
*Mar 12 21:12:28.207: %ENTITY_ALARM-6-INFO: CLEAR INFO Se1/0 Physical Port Administrative State Down 
*Mar 12 21:12:29.211: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up

Configure RIP

West(config)#router rip
West(config-router)#version 2
West(config-router)#network 10.0.0.0
West(config-router)#no auto-summary
West(config-router)#end

Configure SPAN port

Span-3560.png

Switch(config)# no monitor session 1
Switch(config)# monitor session 1 source interface FastEthernet0/1
Switch(config)# monitor session 1 destination interface FastEthernet0/3
Switch(config)# end
Switch#show monitor session 1
Session 1
---------
Type                   : Local Session
Source Ports           : 
    Both               : Fa0/1
Destination Ports      : Fa0/3
    Encapsulation      : Native
          Ingress      : Disabled

Upload and upgrade switch

Invalid image file

Switch#archive download-sw tftp://192.168.1.53/c3560-ipbasek9-mz.122-55.SE6.bin
Loading c3560-ipbasek9-mz.122-55.SE6.bin from 192.168.1.53 (via Vlan1): !.!.!.!.!.!.!.!.!.!.!!!.!.!.!.!.!.!.!.!.!
.!.!.!.!.!!.!.!..!OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.!.!.!.!.!.!.!.!!.!.!..!!..!OOOOOOOO.!.!.!.!.!.!.!.
!.!!.!.!!.!.!.!.!!.!.!.!.!.!.!.!.!.!.!!.!.!!!.!.!.!!!.!!.!.!!!!!!.!!!.!.!.!
[OK - 11763634 bytes]

Loading c3560-ipbasek9-mz.122-55.SE6.bin from 192.168.1.53 (via Vlan1): !.!!.!!.!!!.!.!.!.!!.!.!.!.!.!!!.!.!.!.!!.
!!.!.!.!!.!.!.!.!.!.!.!.!.!.!.!.!.!.!!!!.!.!.!.!.!.!!!.!.!.!!.!.!.!.!.!.!.!.!OO.!.!!.!.!.!!.!.!!!!!.!.!.!.!
[OK - 11763634 bytes]

examining image...
%Tar checksum error in tftp://192.168.1.53/c3560-ipbasek9-mz.122-55.SE6.bin
%Error opening flash:update/info (No such file or directory)
ERROR: Image is not a valid IOS image archive.

Valid image file

Incomplete.png
INCOMPLETE SECTION OR ARTICLE
This section/article is being written and is therefore not complete.
Thank you for your comprehension.

Syslog logging

Configure logging

Given a syslog server listening on default port 514/udp, let's configure our Cisco to send messages over the syslog protocol:

Switch(config)#logging 192.168.1.2
Switch(config)#logging trap 6
Switch(config)#end

Notice that logging levels (logging trap) are defined as follows:

  • 0: Emergency
  • 1: Alert
  • 2: Critical
  • 3: Error
  • 4: Warning
  • 5: Notice
  • 6: Informational
  • 7: Debug

Show logging

Switch#show logging
Syslog logging: enabled (0 messages dropped, 0 messages rate-limited, 0 flushes, 0 overruns, xml disabled, filtering disabled)

No Active Message Discriminator.


No Inactive Message Discriminator.


    Console logging: level debugging, 23 messages logged, xml disabled,
                     filtering disabled
    Monitor logging: level debugging, 0 messages logged, xml disabled,
                     filtering disabled
    Buffer logging:  level debugging, 23 messages logged, xml disabled,
                     filtering disabled
    Exception Logging: size (4096 bytes)
    Count and timestamp logging messages: disabled
    File logging: disabled
    Persistent logging: disabled

No active filter modules.

    Trap logging: level informational, 27 message lines logged
        Logging to 192.168.1.2  (udp port 514,  audit disabled,
              authentication disabled, encryption disabled, link up),
              4 message lines logged, 
              0 message lines rate-limited, 
              0 message lines dropped-by-MD, 
              xml disabled, sequence number disabled
              filtering disabled
          
Log Buffer (4096 bytes):
          
*Mar  1 00:00:51.086: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to down
*Mar  1 00:00:52.437: %SPANTREE-5-EXTENDED_SYSID: Extended SysId enabled for type vlan
00:00:55: %SYS-6-CLOCKUPDATE: System clock has been updated from 00:00:55 UTC Mon Mar 1 1993 to 01:00:55 UTC Mon Mar 1 1993, configured from console by console.
00:00:55: %SYS-6-CLOCKUPDATE: System clock has been updated from 01:00:55 UTC Mon Mar 1 1993 to 01:00:55 UTC Mon Mar 1 1993, configured from console by console.
00:00:55: %SYS-5-CONFIG_I: Configured from memory by console
00:00:56: %SYS-5-RESTART: System restarted --
Cisco IOS Software, C3560 Software (C3560-IPBASEK9-M), Version 12.2(55)SE6, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2012 by Cisco Systems, Inc.
Compiled Mon 23-Jul-12 13:10 by prod_rel_team
00:00:58: %LINK-3-UPDOWN: Interface FastEthernet0/4, changed state to up
00:00:59: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
00:00:59: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up

Comments