Paranoid IOS upgrade checks

Hello

Today I’m at work and i’m doing paranoid upgrade checks before equally paranoid (amount-wise) upgrades.

Let’s say that before the upgrade you want to check how many CDP neighbors you have. Your naming plan for your infrastructure is simple:

  • names of switches begin with SWT
  • names of APs begin with AP
  • names of phones begin with SEP
  • etc

Of course we run the command show cdp neighbor to display the number of neighbors. We want to do two things before an upgrade:

  • count the number of neighbors
  • export the output of the command to some backup server

 

You can count the number of neighbors with:

show cdp neighbor | count ^(SWT|AP|SEP)

Number of lines which match regexp = 44

 

You can export the output of any command with the redirect option:

show cdp neighbor | redirect ftp://1.1.1.1/mybackups/backupofshowcdpneiSwitch1beforeNov5upgrade.txt

and then after the upgrade:

show cdp neighbor | redirect ftp://1.1.1.1/mybackups/backupofshowcdpneiSwitch1afterNov5upgrade.txt

 

 

 

Skomentuj

Wprowadź swoje dane lub kliknij jedną z tych ikon, aby się zalogować:

Logo WordPress.com

Komentujesz korzystając z konta WordPress.com. Wyloguj /  Zmień )

Zdjęcie na Google

Komentujesz korzystając z konta Google. Wyloguj /  Zmień )

Zdjęcie z Twittera

Komentujesz korzystając z konta Twitter. Wyloguj /  Zmień )

Zdjęcie na Facebooku

Komentujesz korzystając z konta Facebook. Wyloguj /  Zmień )

Połączenie z %s