Search This Blog

Thursday, September 26, 2013

How to save browser session in Chrome for offline analysis

There are commercial tools ( a small example list) that help you to save a browser session that it can be view later. Usually you want to do this when you troubleshooting an HTTP issue where the browser is involved.

Below is a combination of free tools that can save and open a browser session.

Capture browsers session
  • To capture and save the the browser session can use Chrome extension called Chrome Developer Tools. After installation
    • You can activate it in your active Chrome browser window with the shortcat: Ctrl+Shift+I. It will open a new panel at the bottom of your screen.  
    • Navigate to the Network tab
    • Now you can browse your site(s) and you should see all the requests your browser does.
    • Once you finish please click with the right mouse button on any of requests and select from the menu "Save as HAR with content" to save an HAR file on the disk.
Open a browser session for offline analysis 
  • You can send a HAR file to any other person for offline analysis.
  • An example application that can read and display it is Fiddler.
  • From Fiddler menu open the HAR file by navigating to File->Import->HTTPArchive
References

http://fiddler2.com/Features/web-session-manipulation
http://neverblog.net/save-and-share-results-from-chromes-developer-tools-network-panel/
http://blog.chromium.org/2011/02/chrome-developer-tools-back-to-basics.html

Wednesday, September 11, 2013

VLAN failsafe problem for F5 HA new builds

The F5 load balancers are powerful devices that support variety of high availability features. A full list  and description can be found at Configuring High Availability in TMOS Management Guide for BIG-IP Systems" document.

Supported HA features:

System fail-safe
Monitors the switch board component and a set of key system services.
Gateway fail-safe
Monitors traffic between the BIG-IP system and a gateway router.
VLAN fail-safe
Monitors traffic on a VLAN.
Problem

Both F5s in HA cluster fail over and go into standby mode when fail-safe is enabled on the VLAN that doesn't see any traffic.

Analysis and workaround descriptions

When you are building a new HA cluster this is not going to cause any major issues. Usually for new builds the cluster will be build without any servers behind the LTM devices. If both devices go into standby mode it may be surprising but a simple ping from one F5 to another should bring both them into standby/active again.

Unfortunately the issue can be experienced as well as in production when you are adding a new VLAN to a running HA cluster. If the VLAN has fail-safe enabled and if there are not devices behind both F5 LTMs the new VLAN may trigger the fail over on both nodes. As expected it is caused by the VLAN fail-safe when there is not traffic on the VLAN.

There are couple workarounds that can be applied, two examples are listed below.

Workaround 1

As per the SOL13297: Overview of VLAN failsafe (10.x - 11.x) set true to LTM data base variable failover.vlanfailsafe.resettimeronanyframe.
 
modify /sys db failover.vlanfailsafe.resettimeronanyframe value [true|false]

Workaround 2

Create a pool with all self IPs of the affected VLAN to allow the LTM to detect traffic on the new VLAN and to prevent fail-safe to kick in.

Sunday, September 1, 2013

Cisco cheat sheet

This is work in progress...

ASA
  • How to drop or terminate existing connections on the firewall 
Even if you add an ACL to prevent unnecessary traffic it applies only to a new incoming connections. To clear already existing connection you can use one of these:

clear local-host ?
clear conn ?
clear xlate ?

References: link1link2
  • Performance troubleshooting commands
console logs
show blocks
show blocks queue history detail
show clock
show conn count
show controller
show counters
show cpu hogging process
show cpu usage
show crashinfo
show crashinfo module 1
show disk0: controller
show failover
show failover history
show firewall
show history
show interface
show kernel process
show memory
show memory detail
show mode
show module
show perfmon
show process
show running-config
show service-policy
show startup-config errors
show traffic
show xlate count


Switches
  • On a Cisco switch how to find physical port mapping to ASIC chipsets 
switch#show platform port-asic version

Port-Asic Version Info:
========================
ASIC-0: Version:1 DeviceType:0x2CA
ASIC-1: Version:1 DeviceType:0x2CA
ASIC-2: Version:1 DeviceType:0x2CA
ASIC-3: Version:1 DeviceType:0x2CA
ASIC-4: Version:1 DeviceType:0x2CA
ASIC-5: Version:1 DeviceType:0x2CA
ASIC-6: Version:1 DeviceType:0x2CA
ASIC-7: Version:1 DeviceType:0x2CA
ASIC-8: Version:1 DeviceType:0x2CA
ASIC-9: Version:1 DeviceType:0x2CA
ASIC-10: Version:1 DeviceType:0x2CA
ASIC-11: Version:1 DeviceType:0x2CA

switch# sh platform pm if-numbers

interface gid  gpn  lpn  port slot unit slun port-type lpn-idb gpn-idb
----------------------------------------------------------------------
Gi0/1     1    1    1    5/3  1    1    1    local     Yes     Yes
Gi0/2     2    2    2    5/0  1    2    2    local     Yes     Yes
Gi0/3     3    3    3    5/1  1    3    3    local     Yes     Yes
Gi0/4     4    4    4    5/2  1    4    4    local     Yes     Yes
Gi0/5     5    5    5    4/2  1    5    5    local     Yes     Yes
Gi0/6     6    6    6    4/3  1    6    6    local     Yes     Yes
Gi0/7     7    7    7    4/0  1    7    7    local     Yes     Yes
Gi0/8     8    8    8    4/1  1    8    8    local     Yes     Yes
....

References: link1

switch# sh interfaces GigabitEthernet0/35

switch# sh interfaces counters errors
Port        Align-Err     FCS-Err    Xmit-Err     Rcv-Err  UnderSize  OutDiscards
Gi0/1               0           0           0           0          0            0
...
Gi0/33              0           0           0           0          0         2904
Gi0/34              0           0           0           0          0     10007689
Gi0/35              0           0           0           0          0      3826473
Gi0/36              0           0           0           0          0            0


switch# sh controllers ethernet-controller gigabitethernet 0/35
 
     Transmit FastEthernet0/20                Receive
   3538920087 Bytes                       2280518202 Bytes
    305038868 Unicast frames              3307737521 Unicast frames
    142899941 Multicast frames                     0 Multicast frames
     19633020 Broadcast frames                  4000 Broadcast frames
            0 Too old frames              2280260439 Unicast bytes
            0 Deferred frames                      0 Multicast bytes
            0 MTU exceeded frames             256000 Broadcast bytes
            0 1 collision frames                   0 Alignment errors
            0 2 collision frames                   2 FCS errors
            0 3 collision frames                   0 Oversize frames
            0 4 collision frames                   0 Undersize frames
            0 5 collision frames                   0 Collision fragments
            0 6 collision frames
            0 7 collision frames           657619578 Minimum size frames
            0 8 collision frames          1231476052 65 to 127 byte frames
            0 9 collision frames           316726340 128 to 255 byte frames
            0 10 collision frames          333559372 256 to 511 byte frames
            0 11 collision frames          204171553 512 to 1023 byte frames
            0 12 collision frames          564188628 1024 to 1518 byte frames
            0 13 collision frames                  0 Overrun frames
            0 14 collision frames                  0 Pause frames
            0 15 collision frames
            0 Excessive collisions                 0 Symbol error frames
            0 Late collisions                      0 Invalid frames, too large
            0 VLAN discard frames                  0 Valid frames, too large
            0 Excess defer frames                  0 Invalid frames, too small
   1771916610 64 byte frames                       0 Valid frames, too small
   2039491270 127 byte frames
    101128332 255 byte frames                      0 Too old frames
    498899274 511 byte frames                      0 Valid oversize frames
    158317216 1023 byte frames                     0 System FCS error frames
    192786423 1518 byte frames                     0 RxPortFifoFull drop frame
            0 Too large frames
            0 Good (1 coll) frames
            0 Good (>1 coll) frames

switch# sh controllers ethernet-controller port-asic statistics 

switch# sh controllers utilization
switch# sh controllers gigabitEthernet 0/35 utilization
Receive Bandwidth Percentage Utilization   : 14
Transmit Bandwidth Percentage Utilization  : 18

switch# sh platform port-asic stats drop

References: Switch Command Referencelink2link3Troubleshooting Switch Port

Routers

TBD