Wednesday, March 2, 2016

Fixing high DPI issues with Java Application

Cisco optical tools (CTP / CTC ) typically come with Java based application. These applications don't work properly on new laptops with high DPI.  I found the fix for the issue in following site :
"You can modify a Java 8 install to work correctly, using a program to modify the EXE manifests. I changed the setting from true to false in the manifests inside of java.exe and javaw.exe, and now my Swing programs scale correctly in Windows 10 high dpi. I used Resource Tuner to this.]"

 it fixed the issue but i think we need to keep modifying when java updates automatically. You might not be able to edit directly on default directory.  Take the java.exe and javaw.exe outside the programfiles ( eg : desktop) modify and copy back the files.

Wednesday, December 2, 2015

Being a lazy networking guy - Accessing Excel data from Python

Most of the time during the initial network design stage I keep lots of data in Excel. While implementation usually do manual work to extract the data from excel and convert it as CLI configuration. following example I've simulated to create the interface description from the data i've populated in excel.

Following tools required in windows : (if you are a Linux guy most probably not reading this :) )
  1. you can find the python windows executable in following URL : Python download link
  2. I'm using notepad++  with PyNPP , you can install this from plugin manager. you need to edit the python location in PyNPP option.
  3. Installing openpyxl is quite easy on Windows, you can find pip at C:\Python34\Scripts\pip.exe just run following command to install openpyxl "C:\Python34\Scripts> pip install openpyxl "
You can do lot of stuff your imagination is the limit . have a look on the openpyxl
import openpyxl
wb = openpyxl.load_workbook('test.xlsx')
sheets = wb.get_sheet_names()
#print (sheets)
sheet = wb.get_sheet_by_name("Sheet2")
for i in range (1,16):
 print ("interface ",sheet.cell(row=i,column=2).value,"\n description *** Link to ",sheet.cell(row=i,column=4).value,"-",sheet.cell(row=i,column=5).value," ***")
This is the input data i had
Input - Data

Following is the output created by the script
 ['Sheet1', 'Sheet2', 'Sheet3', 'Sheet4']
interface  Port Number
 description *** Link to  Remote Device - Remote Port  ***
interface  Eth1/1
 description *** Link to  ABC_7710_CORE2 - Eth1/1  ***
interface  Eth1/2
 description *** Link to  ABC_7710_CORE2 - Eth1/2  ***
interface  Eth1/3
 description *** Link to  N/A - N/A  ***
interface  Eth1/4
 description *** Link to  N/A - N/A  ***
interface  Eth1/5
 description *** Link to  LOC1_7710_DIST1 - Eth1/1  ***
interface  Eth1/6
 description *** Link to  LOC1_7710_DIST2 - Eth1/1  ***
interface  Eth1/7
 description *** Link to  LOC2_7710_DIST1 - Eth1/1  ***
interface  Eth1/8
 description *** Link to  LOC2_7710_DIST2 - Eth1/1  ***
interface  Eth1/9
 description *** Link to  LOC3_7710_DIST1 - Eth1/1  ***
interface  Eth1/10
 description *** Link to  LOC3_7710_DIST2 - Eth1/1  ***
interface  Eth1/11
 description *** Link to  LOC4_7710_DIST1 - Eth1/1  ***
interface  Eth1/12
 description *** Link to  LOC4_7710_DIST2 - Eth1/1  ***
interface  Eth1/13
 description *** Link to  ABC_7710_SFDIST1 - Eth1/1  ***
interface  Eth1/14
 description *** Link to  ABC_7710_SFDIST2 - Eth1/1  ***
References :

Monday, August 4, 2014

Device upgradtion consideration

Device up-gradation consideration these are thinks better to consider while upgrading the device with the newer one .
 power [ AC/ DC  / socket type ( C14/C15 - C19/C20 etc) 
 Rack type and mounting brackets and screws
 IOS  Feature comparison  does all the features supported in the newer image - double check [ sometime we downgrade the device eg: move the powerful device where most needed]
 Access to the technicians 
 Interface Type and fibre patch cords [ lc / sc / fc ] , length. 
 If we are swapping the device from different location make sure the transport and proper wrapping / cartons. 
 Then actual migration plan :) 

CCIE SP TCL IOS XR reachability Script with source address

Following Script will work to check the reach-ability in IOS XR with source address Execute
run tclsh
Then you can place the TCLSH commands :
set i ""
foreach X {
} { ping -s $i $X }
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 9/11/19 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/9 ms

Wednesday, February 26, 2014

wireshark continous capture on windows - dumpcap

I've noticed Wireshark memory utilization increase when we use the GUI and it crashes eventually when we use it for continuous capture. Therefore better to use the dumpcap utility which comes with wireshark. First find out the interface , using dumpcap -D
C:\Program Files (x86)\Wireshark>dumpcap.exe -D
1. \Device\NPF_{0A4C8668-EAC9-457F-9337-3C4EFCD43AAF} (Ethernet)
2. \Device\NPF_{1F2A8923-0CAD-4160-BBD7-EB11D6B45883} (VirtualBox Host-Only Network)
3. \Device\NPF_{1BB23144-4E34-42D9-92AB-C939B21119A3} (WiFi 2)
4. \Device\NPF_{3C5A536B-5BF8-42AA-A139-32FB360DA95C} (WiFi)
5. \Device\NPF_{A8EF2C83-9A49-4A9E-96E4-2128784ABD6B} (VMware Network Adapter VMnet1)
6. \Device\NPF_{EDB4678A-A120-47A1-A5BF-950A6F1DFA0E} (Local Area Connection 2)
7. \Device\NPF_{F33132F7-A8F9-4E2D-8D35-32A9F662C1C8} (VMware Network Adapter VMnet8)
then start the capture, we can define the parameter which rotate the file ( eg: duration , bytes )
Output (files):
  -w             name of file to save (def: tempfile)
  -g                       enable group read access on the output file(s)
  -b  ... duration:NUM - switch to next file after NUM secs
                           filesize:NUM - switch to next file after NUM KB
                              files:NUM - ringbuffer: replace after NUM files
C:\Program Files (x86)\Wireshark>dumpcap.exe -i 1 -w H:\cap\log.cap -b duration:60
Capturing on 'Ethernet'
File: H:\cap\log_00001_20140225215710.cap
Packets: 1293 File: H:\cap\log_00002_20140225215810.cap
Packets: 1683 File: H:\cap\log_00003_20140225215910.cap
Packets: 1887

Wednesday, September 11, 2013

IPv6 link-local duplicate bring the ipv6 traffic on POS interface

Issue : ipv6 route not installed , interface up  , ipv6 protocol down.
Image : IOS XR 4.2.4 - GSR12810
show ipv6 interface brief
#show ipv6 interface brief
POS0/2/0/1             [Up/Down]
But interface is up /up
show int POS0/2/0/1  
POS0/2/0/1 is up, line protocol is up  (APS not Configured )
if you check the ipv6 interface its reveals hence the interface deteced duplicate link local its brings down the ipv6 protocol.
#show ipv6 interface pos 0/2/0/1

 [KPOS0/2/0/1 is Up, ipv6 protocol is Down, Vrfid is default (0x60000000)
  IPv6 is down (link local duplicate), link-local address is fe80::387c:dfff:fee6:b908 [DUPLICATE]
  Global unicast address(es):
    2001:x:x:xx::1e, subnet is 2001:x:x:x::1c/126 [TENTATIVE]
  Joined group address(es): ff02::1:ffe6:b908 ff02::2 ff02::1
Quite strange issue , can related to multiple bug ids : CSCtq57619, CSCeh47611 and CSCtq55280 i've resolved issue after manually binding the link local address but i think following will do :
clear ipv6 duplicate addresses

Thursday, June 27, 2013

CRS-3 RommonA upgrade issues

First of all if you try to upgrade rommonA there is no option for rommonA in the FPD filed.

upgrade hw-module fpd rommonA location 0/3/CPU0

Eventually you will get following Message and no rommonA upgrade will occur .

No lc rommonA on location 0/3/CPU0 need upgrade at this time.

you have to force the rommanA upgrade to occur . Following is the command to upgrade the one line card.

upgrade hw-module fpd rommonA force location 0/3/CPU0

Starting the upgrade/download of following FPD:
=========== ==== ======= ======= =========== =========
                                   Current    Upg/Dng
Location    Type Subtype Upg/Dng   Version    Version
=========== ==== ======= ======= =========== =========
0/3/CPU0    lc   rommonA upg         2.06        2.07  
Successfully upgraded   rommonA for                MSC_B on location    0/3/CPU0 from  2.06 to  2.07

reload location 0/3/cpu0

after reloading the device will detect the right rommonA

show hw-module fpd location all

0/3/CPU0     CRS1-SIP-800               0.88  lc   fpga1   0       6.00     No
                                              lc   rommonA 0       2.07     No
                                              lc   rommon  0       2.07     No