Author: J.P.

  • Reset Configurations on a Cisco Switch

    There are several instances where you may need to reset a Cisco switch back to a blank configuration.  Perhaps you purchased a switch for your home lab off of the internet and it didn’t get wiped before it got sent out to you; or perhaps your company acquired a new contract at an existing property where the old tenant left behind their network hardware but did not provide any of the access information.

    The process below assumes that you, like me, want to keep the old configuration files.  You could theoretically delete these instead of renaming them instead.

    Summary

    • Begin from an unpowered state with power cable unplugged from the switch
    • Plug in power cable while holding down MODE button to interrupt boot sequence
    • Enter “flash_init” to initialize flash memory
    • Enter “rename flash:config.text flash:config-old.text” to remove startup config
    • Enter “rename flash:private-config.text flash:private-old.text” to remove VLANs
    • Enter “boot” to initiate the device boot sequence
    • Enter “no” to the initial configuration dialog
    • Enter “copy running-config startup-config” to create a new blank startup config

    CLI in Full

    C2950 Boot Loader (C2950-HBOOT-M) Version 12.1(11r)EA1, RELEASE SOFTWARE (fc1)
    Compiled Mon 22-Jul-02 17:18 by antonino
    WS-C2950T-24 starting...
    Base ethernet MAC Address: 00:0c:ce:22:a7:c0
    Xmodem file system is available.
    
    The system has been interrupted prior to initializing the
    flash filesystem.  The following commands will initialize
    the flash filesystem, and finish loading the operating
    system software:
    
        flash_init
        load_helper
        boot
    
    switch: flash_init
    Initializing Flash...
    flashfs[0]: 329 files, 5 directories
    flashfs[0]: 0 orphaned files, 0 orphaned directories
    flashfs[0]: Total bytes: 7741440
    flashfs[0]: Bytes used: 5651456
    flashfs[0]: Bytes available: 2089984
    flashfs[0]: flashfs fsck took 7 seconds.
    ...done initializing flash.
    Boot Sector Filesystem (bs:) installed, fsid: 3
    Parameter Block Filesystem (pb:) installed, fsid: 4
    
    switch: dir flash:
    Directory of flash:/
    
    2    -rwx 112       <date>     info
    3    -rwx 3722814   <date>     c2950-i6k2l2q4-mz.121-22.EA14.bin
    4    drwx 4416      <date>     html
    331  -rwx 112       <date>     info.ver
    332  -rwx 316       <date>     env_vars
    333  -rwx 1343      <date>     config.text
    334  -rwx 24        <date>     private-config.text
    
    2089984 bytes available (5651456 bytes used)
    
    switch: rename flash:config.text flash:config-old.text
    switch: dir flash:
    Directory of flash:/
    
    2    -rwx 112       <date>     info
    3    -rwx 3722814   <date>     c2950-i6k2l2q4-mz.121-22.EA14.bin
    4    drwx 4416      <date>     html
    331  -rwx 112       <date>     info.ver
    332  -rwx 316       <date>     env_vars
    333  -rwx 1343      <date>     config-old.text
    334  -rwx 24        <date>     private-config.text
    
    2089984 bytes available (5651456 bytes used)
    
    switch: rename flash:private-config.text flash:private-old.text
    switch: dir flash:
    Directory of flash:/
    
    2    -rwx 112       <date>     info
    3    -rwx 3722814   <date>     c2950-i6k2l2q4-mz.121-22.EA14.bin
    4    drwx 4416      <date>     html
    331  -rwx 112       <date>     info.ver
    332  -rwx 316       <date>     env_vars
    333  -rwx 1343      <date>     config-old.text
    334  -rwx 24        <date>     private-old.text
    
    2089984 bytes available (5651456 bytes used)
    
    switch: boot
    Loading "flash:c2950-i6k2l2q4-mz.121-22.EA14.bin"...
    
             --- System Configuration Dialog ---
    
    Would you like to enter the initial configuration dialog? [yes/no]:no
    00:00:16: %SPANTREE-5-EXTENDED_SYSID: Extended SysId enabled for type vlan
    00:00:20: %SYS-5-RESTART: System restarted --
    Cisco Internetwork Operating System Software
    IOS (tm) C2950 Software (C2950-I6K2L2Q4-M), Version 12.1(22)EA14, RELEASE SOFTWARE (fc1)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2010 by cisco Systems, Inc.
    Compiled Tue 26-Oct-10 10:35 by nburra
    00:00:20: %SNMP-5-COLDSTART: SNMP agent on host Switch is undergoing a cold start
    
    
    Press RETURN to get started!
    
    
    Switch>
    00:00:48: %LINK-5-CHANGED: Interface Vlan1, changed state to administratively down
    Switch> enable
    Switch# show startup-config
    startup-config is not present
    Switch# copy running-config startup-config
    Destination filename [startup-config]?
    Building configuration...
    [OK]
    Switch#

    Tested and confirmed first-hand on the following switch models:   Cisco WS-C2950T-24, WS-C2960-24TC-L, WS-C3560-48PS-S

  • Hands-On With the Ubiquiti USG-PRO-4: Year 1

    In July of 2018, exactly a year ago, I was looking for just about any reason at all to pull the trigger on a firewall device for my home network and found myself split between the Meraki MX series, the Fortinet FortiGate line, or one of the two Ubiquiti USG options available at the time. (more…)

  • Introduction to the Volatility Framework

    Recently I was very fortunate to be able to attend not only the BSides Austin conference this past weekend, but the two training days immediately preceding it.  One of the training workshops I attended was Incident Response with Volatility Framework, taught by Evan Wagner.  If you ever have the opportunity to attend this training in person, I highly recommend it. (more…)

  • Configuring Secure DNS Over HTTPS With Pi-Hole

    Sometime last year, I ran across a post on Twitter talking about this thing called a Pi-Hole which could be used as a secure DNS server, automatically blocking adware and — potentially — malicious traffic. I remember thinking to myself oh, that’s cool, and I even went to text a screencap of the post to a friend out of state, but then I promptly forgot about it for 4 or 5 months.

    (more…)

  • Setting Up GNS3, Part I: Initial Configuration

    When I began looking at the world of Cisco certifications, I was overwhelmed by the sheer amount of material there was to learn.  Sure, I went at the CCENT with a baseline knowledge of networking gained from the CompTIA Network+ (and some associated concepts from the Security+), but not everything on the exam is listed on the objectives.

    Case in point: establishing a home lab environment. (more…)