Info Security Memo
  • Blog
  • Sitemap
    • Categories
  • Contact
  • About
  • Resources
  • Tools
  • 51sec.org

Build Confidence

Focusing on Information Security 

Info Security Notes

Cisco IOS Command Tips and Tricks - Part 2

12/2/2017

0 Comments

 
Cisco IOS command list is getting longer , and it has been split into two posts:

  • Cisco IOS Command Tips and Tricks – Part 1
  • Cisco IOS Command Tips and Tricks – Part 2

    1. Auto secure

    Cisco also provides a One-step lockdown-like feature at the command line! This feature is called AutoSecure. It uses the command shown below:

    auto secure [management | forwarding] [no-interact | full] [ntp | login | ssh | firewall | tcp-intercept]


    2. Change Site-to-Site VPN Idle time out to 5 minutes

    For IOS Router

    R1(config)#crypto ipsec security-association idle-time 300


    For ASA

    ASA1(config)#group-policy GP_1.1.1.2 attributes
    ASA1(config-group-policy)#vpn-idle-timeout 300

    ASA1(config-group-policy)#vpn-session-timeout none

    3. Find Cisco Devices Serial Number
    Usually we could use 'show version' command to find out SN , but for Nexus you will have to use 'show inventory' to get Chassis SN

    Nexus1# show inventory
    NAME: "Chassis", DESCR: "Nexus5548 Chassis"
    PID: N5K-C5548UP       , VID: V01 , SN: SSI163604J

    NAME: "Module 1", DESCR: "O2 32X10GE/Modular Universal Platform Supervisor"
    PID: N5K-C5548UP       , VID: V01 , SN: FOC1645D5F

    NAME: "Fan 1", DESCR: "Chassis fan module"
    PID: N5548P-FAN        , VID: N/A , SN: N/A

    NAME: "Fan 2", DESCR: "Chassis fan module"
    PID: N5548P-FAN        , VID: N/A , SN: N/A

    NAME: "Power supply 1", DESCR: "AC power supply"
    PID: N55-PAC-750W      , VID: V02 , SN: ART16310D6

    NAME: "Power supply 2", DESCR: "AC power supply"
    PID: N55-PAC-750W      , VID: V02 , SN: ART16310SQ

    NAME: "Module 3", DESCR: "O2 Daughter Card with L3 ASIC"
    PID: N55-D160L3-V2     , VID: V01 , SN: FOC1637NT8

    NAME: "FEX 101 CHASSIS", DESCR: "N2K-C2248TP-1GE  CHASSIS"
    PID: N2K-C2248TP-1GE   , VID: V03 , SN: SSI1637FHK

    NAME: "FEX 101 Module 1", DESCR: "Fabric Extender Module: 48x1GE, 4x10GE Supervi
    sor"
    PID: N2K-C2248TP-1GE   , VID: V03 , SN: FOC1645WH9

    NAME: "FEX 101 Fan 1", DESCR: "Fabric Extender Fan module"
    PID: N2K-C2248-FAN     , VID: N/A , SN: N/A

    NAME: "FEX 101 Power Supply 1", DESCR: "Fabric Extender AC power supply"
    PID: N2200-PAC-400W    , VID: V04 , SN: LIT16390H9

    NAME: "FEX 101 Power Supply 2", DESCR: "Fabric Extender AC power supply"
    PID: N2200-PAC-400W    , VID: V04 , SN: LIT16390HH

    NAME: "FEX 102 CHASSIS", DESCR: "N2K-C2248TP-1GE  CHASSIS"
    PID: N2K-C2248TP-1GE   , VID: V03 , SN: SSI16390DJ

    4. Show Commands Information

    Show Version / Show Flash / Show Interfaces
    Show processes CPU / Show memory / Show stacks / Show buffers
    Show running-config / Show startup-config


    Flash: IOS
    RAM: All tables and configuration when router is running. Info will be lost when power off.
    ROM: POST, Bootstrap, Mini-IOS
    NVRAM:Startup-config
    5. SYSLOG Writing to Local Disk or Flash Card


    Router(config)# logging persistent url disk0:/syslog size 134217728 filesize 16384        
    %Warning: the ratio between logging persistent size and logging persistent filesize is 134217728/16384, suggested ratio is less than 196 in order to achieve good system performace

    Router(config)# logging persistent url disk0:/syslog size 134217728 filesize 1342177  


    Router#sh log 

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

    No Active Message Discriminator.




    No Inactive Message Discriminator.



        Console logging: disabled

        Monitor logging: level debugging, 0 messages logged, xml disabled,
                         filtering disabled
        Buffer logging:  level debugging, 8665 messages logged, xml disabled,
                        filtering disabled
        Exception Logging: size (4096 bytes)
        Count and timestamp logging messages: disabled
        Persistent logging: enabled, url disk0:/syslog, disk space 134217728 bytes, file size 1342177 bytes, batch size 4096 bytes

    No active filter modules.


        Trap logging: level debugging, 8669 message lines logged

            Logging to 10.2.2.3  (udp port 514, audit disabled,
                  link up),
                  8668 message lines logged, 
                  0 message lines rate-limited, 
                  0 message lines dropped-by-MD, 
                  xml disabled, sequence number disabled
                  filtering disabled
            Logging Source-Interface:       VRF Name:
            Loopback0                       

    Log Buffer (8192 bytes):


    12 EST: %C7600_PLATFORM-SP-3-LOW_BATT: Low Voltage detected for NVRAM Battery
    ........[Omitted]

    Router# copy disk0:/syslog ftp://myuser:[email protected]/syslog




    6. Check Routers Power Supply Status


    Router#show environment 
    SYSTEM POWER SUPPLY STATUS
    ==========================
     Internal Power Supply 1 Type: AC
     Internal Power Supply 1 12V Output Status: Normal

     Internal Power Supply 2 Type: AC

     Internal Power Supply 2 12V Output Status: Fail

    SYSTEM FAN STATUS

    =================
     Fan 1 OK, Low speed setting
     Fan 2 OK, Low speed setting
     Fan 3 OK, Low speed setting
     Fan 4 OK, Low speed setting
     Fan 5 OK, Low speed setting

    SYSTEM TEMPERATURE STATUS

    =========================
     Intake Left temperature: 25 Celsius, Normal
     Intake Right temperature: 22 Celsius, Normal
     Exhaust Right temperature: 29 Celsius, Normal
     Exhaust Left temperature: 31 Celsius, Normal
     CPU temperature: 24 Celsius, Normal
     Power Supply Unit 1 temperature: 24 Celsius, Normal
              
    REAL TIME CLOCK BATTERY STATUS
    ==============================
     Battery OK (checked at power up)

    CPU CORE TEMPERATURE STATUS

    ===========================
      CPU Core current reading, target = 24, reading = 62 : Normal
      CPU Core out of target history in past 1045868.0 mins:
         Consecutive out-of-range mins high water mark: 0.0
         Total minutes out-of-range: 0.0
         Last 5 minutes out-of-range: 0.0
         Last 5 minutes consecutive out-of-range: 0.0
         Last 5 minutes read failure count: 0


    SYSTEM WATTAGE

    ===============
     Motherboard, EHWIC, PVDM, Power Supply and Fan Power consumption = 123.1 W
     Total System Power consumption is: 123.1 W

     Environmental information last updated 00:00:11 ago


    7. Portchannel Adding vlan without downtime

    For trunk links, it is best to take out portfast and bpduguard from interface configuration.

    no spanning-tree portfast
    no spanning-tree bpduguard enable
    
    

    Always add or remove VLANs from the port-channel interface since the individual physical links will inherit the VLAN set automatically.  If added a VLAN to a phyiscal  layer2 interface instead of the logical layer2 port-channel, it will bring the etherchannel down.

    For example, to add vlan 50 to etherchannel 3:
    conf t
    interface port-channel 3
    switchport trunk allowed vlan add 50
    end
    
    
    
    
    
    
    show run interface gi0/3
    switchport trunk encapsulation dot1q
    switchport trunk allowed vlan 2-49
    switchport mode trunk
    channel-group 3 mode on
    


    The last line "channel-group 1 mode on" indicates that this port is part of etherchannel 3.  If you try to add a VLAN 50 to the etherchannel by  adding the VLAN 50 to the physical port g0/3, this port will be removed from  the etherchannel 3 and this will cause spanning tree to throw a wobbly.


    8. Cisco Switch Lights Meaning

    SYSTEM(SYST) Light

    Overall status of the switch.
    • Off: Switch is not powered on
    • Green: Switch is working fine
    • Amber: Switch is powered on but faulty

    REDUNDANT POWER SUPPLY(RPS) Light

    Provides backup power to the switch if the main supply goes off.
    • Off: No RPS available,
    • Green: RPS is working fine
    • Blinking Green: Providing backup to some other device
    • Amber: RPS is faulty
    • Flashing Amber: RPS is providing backup(primary power off)

    DUPLEX
    Duplex status of the switch ports.
    • Off: Switch port is half duplex
    • Green: Switch port is full duplex

    UTIL
    Utilization status of the switch ports.

    SPEED
    Speed status of the switch ports.
    • Off: Switch port is operating at 10Mbps
    • Green: Switch port is operating at 100Mbps
    • Flashing green: Switch port is operating at 1000Mbps
    STAT
    Status of the switch ports.
    • Off: No device connected/port is administratively down.
    • Green: Device is connected.
    • Blinking green: Port is sending/receiving data.
    • Alternating green amber: Fault in link/Frames experiencing error
    • Amber: Port is blocked by Spanning Tree Protocol

    0 Comments



    Leave a Reply.

      Categories

      All
      Architecture
      Blog
      Checkpoint
      Cisco
      Cloud
      CyberArk
      F5
      Fortigate
      Guardium
      Juniper
      Linux
      Network
      Others
      Palo Alto
      Qualys
      Raspberry Pi
      Security
      SIEM
      Software
      Vmware
      VPN
      Wireless

      Archives

      March 2024
      February 2024
      January 2024
      December 2023
      November 2023
      October 2023
      September 2023
      August 2023
      July 2023
      June 2023
      May 2023
      April 2023
      March 2023
      February 2023
      January 2023
      December 2022
      November 2022
      October 2022
      September 2022
      August 2022
      July 2022
      June 2022
      May 2022
      April 2022
      March 2022
      February 2022
      January 2022
      December 2021
      November 2021
      October 2021
      September 2021
      August 2021
      July 2021
      June 2021
      May 2021
      April 2021
      March 2021
      February 2021
      January 2021
      December 2020
      November 2020
      October 2020
      September 2020
      August 2020
      July 2020
      October 2019
      September 2019
      June 2019
      July 2018
      May 2018
      December 2017
      August 2017
      April 2017
      March 2017
      January 2017
      December 2016
      November 2016
      October 2016
      September 2016
      August 2016
      July 2016
      June 2016
      May 2016
      April 2016
      March 2016
      February 2016
      January 2016
      December 2015
      November 2015
      October 2015
      September 2015
      August 2015
      July 2015
      June 2015
      May 2015
      April 2015
      March 2015

      Print Page:

      RSS Feed

      Email Subscribe
    Powered by Create your own unique website with customizable templates.
    • Blog
    • Sitemap
      • Categories
    • Contact
    • About
    • Resources
    • Tools
    • 51sec.org