Coffee Waves

December 30, 2016 Leave a comment

First Wave ~1960’s

Coffee grew among the masses and the general consumer was able to easily access coffee daily at home or at the office.

Instant coffee, like those from Folgers, Maxwell and Nestle became popular.

Taste of First Wave coffee was weak and had lots of acidity. It was quantity over quality so folks had to put ton of cream and sugar in their coffee to make up for the taste.

First Wave = Coffee to consume

Second Wave ~ Late 1960’s

Starbucks brought higher quality coffees and espresso based drinks to the masses.

People started learning about coffee beans and how it’s brewed (French Press etc.)

Second Wave = Coffee to enjoy

Third Wave ~ 1990’s

Coffee drinkers became interested in the character of the coffee itself: where it’s from, how it’s created, who trades it, who roasts it and how it’s brewed.

Adding to espresso drinks, hand drip coffees (with carefully chosen tools) became very popular during the Third Wave.

High quality beans aka Specialty coffees and light roasts are distinctive features of the Third Wave. People started enjoying coffee like a wine or craft beer.

Third Wave = Coffee to appreciate

So what’s the Fourth Wave going to be??

Categories: coffee Tags: , ,

RANCID for interfaces err-disable

December 30, 2016 Leave a comment

*This script is for RANCID only.

  1. Edit the file /usr/local/rancid/bin/rancid
  2. Add the following line
     	{'show variables boot'		=> 'ShowBoot'},
     	{'show flash'			=> 'ShowFlash'},
     	{'show cdp neighbors detail'	=> 'ShowCDPNeighborsDetail'},
    +	{'show interfaces status err-disabled'	=> 'ShowStatErrDis'},
     	{'dir /all nvram:'		=> 'DirSlotN'},
     	{'dir /all bootflash:'		=> 'DirSlotN'},
     	{'dir /all slot0:'		=> 'DirSlotN'},
  3. Add the sub routine
    # A test routine for parsing the output of "show interfaces status err-disabled"
    +sub ShowStatErrDis {
    +    print STDERR "    In ShowStatErrDis: $_" if ($debug);	
    +
    +    while (<INPUT>) {
    +        tr/\015//d;
    +        last if (/^$prompt/);
    +        next if (/^(\s*|\s*$cmd\s*)$/);
    +        return(1) if /^\s*\^\s*$/;
    +        return(1) if /Line has invalid autocommand /;
    +        return(1) if /(Invalid input detected|Type help or )/;
    +        return(-1) if (/command authorization failed/i);
    +        # the pager can not be disabled per-session on the PIX
    +        if (/^(<-+ More -+>)/) {
    +            my($len) = length($1);
    +            s/^$1\s{$len}//;
    +        }
    +        ProcessHistory("COMMENTS","keysort","IO","!SISED: $_");
    +    }
    +    ProcessHistory("COMMENTS","keysort","IO","!\n");
    +    return(0);
    +}

Cisco 2960 enable routing

November 14, 2014 Leave a comment

1) Enable SDM routing.

Switch(config)#sdm prefer lanbase-routing

2) Save config & reload.
3) Enable IP routing

Switch(config)#ip routing

Categories: Cisco, Switch Tags: ,

Cisco Catalyst Password Reset

October 23, 2014 Leave a comment

In the event that you forgot any remote login password, there is no way to recover the password but there is away to change the password and retail all the configuration.

1) Put the switch in ROMmon state.
2) Initialize the switch with command flash_init
3) Rename the flash:config.text file to flash:config.text.renamed
4) Boot the switch.
5) After rebooting, the switch is back to factory setting, copy the renamed config file to the running config.
6) Amend the remote password, save and reload.

Categories: Cisco, Switch Tags: , ,

RANCID for mass configuration changes

April 21, 2014 Leave a comment

*This script is for RANCID only.

1) mkdir device-lists in rancid homedir.
2) create a file with list of devices (one per line), save the file as syslog-changes.dl into device-lists folder.
3) mkdir change-scripts in rancid homedir.
4) create a file with the changes (as the way you type them in switches), save the file as syslog-changes.cs into change-scripts folder.
5) create a file config-push.sh and save it into etc folder under rancid homedir.
6) copy and paste the following scripts into the file config-push.sh that you had created on step 5.
7) command to test the script, sh config-push.sh

#!/usr/local/bin/bash
#
# The purpose of this script is to automate configuration changes to a
# large number of devices. The script identifies the device list, as well
# as the change script, and then pushes the changes one by one.
#

CLOGINPATH=”/usr/local/rancid/bin/clogin” 
CREDENTIALS=”/usr/local/rancid/.cloginrc” 
DEVICELISTPATH=”/usr/local/rancid/device-lists/” 
CHANGESCRIPTPATH=”/usr/local/rancid/change-scripts/” 
CHANGELOG=”/usr/local/rancid/var/logs/changelog-`date +%m-%d-%Y`.log” 

clear 
echo “=====[ Rancid Config Push Script ]=====” 
echo “” 
echo “Please enter the proposed device list:” 
echo “`ls $DEVICELISTPATH`” 
echo “————————————–” 
echo -n “> ” 
read DEVICELIST 

if [ -f $DEVICELISTPATH$DEVICELIST ] 
then 
echo “” 
echo “Device List = \”./device-lists/$DEVICELIST\” (confirmed)” 
else 
echo “” 
echo “Device list = \”./device-lists/$DEVICELIST\” (does not exist!)” 
echo “Aborting…” 
echo “” 
exit 
fi 

echo “” 
echo “Please enter name of change script:” 
echo “`ls $CHANGESCRIPTPATH | grep -v “.sh” | grep -v “device-lists”`” 
echo “———————————–” 
echo -n “> ” 
read CHANGESCRIPT 

if [ -f $CHANGESCRIPTPATH$CHANGESCRIPT ] 
then 
echo “” 
echo “Change Script = \”./change-scripts/$CHANGESCRIPT\” (confirmed)” 
echo “” 
else 
echo “Device list = \”./change-scripts/$CHANGESCRIPT\” (does not exist!)” 
echo “Aborting…” 
echo “” 
exit 
fi 

echo “– Proposed Changes –” 
echo “`cat $CHANGESCRIPTPATH$CHANGESCRIPT`” 
echo “– Proposed Changes –” 
echo “” 
echo “Are you sure you want to proceed? If so, type \”yes\”:” 
echo -n “> ” 
read AREYOUSURE 

if [ $AREYOUSURE != “yes” ] 
then 
echo “” 
echo “Aborting…” 
echo “” 
exit 
else 
echo “” 
echo “Implementing Changes…” 
echo “” 
fi 

#for i in `cat $DEVICELISTPATH$DEVICELIST` 
# do echo “===[ $i ]===”
# $CLOGINPATH -f $CREDENTIALS -x $CHANGESCRIPTPATH$CHANGESCRIPT $i
#done 

for DEVICE in `cat $DEVICELISTPATH$DEVICELIST` 
do 
echo “===[ $DEVICE ]===” 
echo “” >> $CHANGELOG 
echo “===[ $DEVICE ]===” >> $CHANGELOG 
echo “” >> $CHANGELOG 
OUTPUT=`$CLOGINPATH -f $CREDENTIALS -x $CHANGESCRIPTPATH$CHANGESCRIPT $DEVICE` 
echo “$OUTPUT” >> $CHANGELOG 
done 

Categories: Cisco, Linux, Switch Tags: , ,

Cisco switch test cable distance

March 4, 2014 Leave a comment

Command to test cable length that is connected to Cisco switch.

Cisco-Switch# test cable-diagnostics tdr interface [interface-number]
Cisco-Switch# show cable-diagnostics tdr interface [interface-number]

The command above not only shows connected device to the switch port, it also calculate open end cable that is connected to switch port.

Categories: Cisco, Switch Tags: , , ,

CentOS ddclient

January 21, 2014 Leave a comment

Install ddclient:

# yum install ddclient

Configuration /etc/ddclient.conf

daemon=3600
ssl=yes
user=web, web=checkip.dyndns.org/, web=skip='IP Address'
protocol=dyndns2
login=[dyndns username]
password=[dyndns password]
server=members.dyndns.org
myhostname.dyndns.org

Run ddclient as startup service

# chkconfig ddclient on

File location:

Cache file: /var/cache/ddclient/ddclient.cache
PID file: /var/run/ddclient/ddclient.pid
ddclient log file: grep ddclient /var/log/messages

Categories: Linux Tags: ,