Astuce : ping et fragmentation

Voici une petite astuce (ok à deux balles) afin de faire avec votre Linux préféré la même chose que vous faîtes avec votre IOS (Cisco) via la commande :

R# ping your_host size 1520 df-bit

Vous devrez faire avec votre linux :

LinuxBox:~# ping -M do -s 1520 your_host
[...]
LinuxBox:~#

Et avec un OpenBSD :

OpenBSDBox# ping -D -s 1520 your_host

OpenBSD/WinXP on my laptop

I am lot of OpenBSD as servers, but I never take time to put it on my work laptop. This is done on this afternoon :)
I have a nice laptop under OpenBSD-4.8 with fluxbox.

I have before I install OpenBSD these systems have been on my hard drive :

  • Windows XP
  • Ubuntu Linux 10.10 LTS

I have used :

With all these tools my laptop is happy on this friday afternoon.
Good to take time to work at home without stress and under OpenBSD system.

Cisco : EPC (Embedded Packet Capture)

An interesting useful tool available in IOS 12.4(20)T and prior : Embedded Packet Capture (EPC). This tool is useful to avoid configure SPAN and RSPAN to be able to capture and analyze trafic.
You can now do it by means of defining a capture buffer, then a capture point, link them and start the capture.
Then you can upload this capture (in pcap) and read analyze it with wireshark :)

R1#monitor capture buffer TEST_BUFFER size 512 max-size 128 circular

R1#sh monitor capture buffer all parameters
Capture buffer TEST_BUFFER (circular buffer)
Buffer Size : 524288 bytes, Max Element Size : 128 bytes, Packets : 0
Allow-nth-pak : 0, Duration : 0 (seconds), Max packets : 0, pps : 0
Associated Capture Points:
Configuration:
monitor capture buffer TEST_BUFFER size 512 max-size 128 circular

Then configure the capture point :

Extjs : How to 'real' clear a cookie

If you are in extjs application designing and coding, you might need to use use ‘Ext.util.Cookies.*’ function.
You can :

  • Ext.util.Cookies.get(‘my_cookie’) : get cookie value
  • Ext.util.Cookies.get(‘my_cookie’, ‘cookie_value’) : set cookie value
  • Ext.util.Cookies.clear(‘my_cookie’) : clear cookie

In theory you can delete cookie by means of ‘clear’ function.

In practice, you should use :

Ext.util.Cookies.set('my_cookie', null, new Date("January 1, 1970"));
Ext.util.Cookies.clear('my_cookie');

Because you can be faced to a problem where you cannot delete your cookie and cannot understand why…

For fun : 'ena' C program

I think it has been really often done in the past, but for fun :

For those of you whom use a lot of xterm, I think it have happen you mistake tape an ’ena’ command in your sh friend shell program :)
It can be funny to have a result on your stdout other than :

Commande « ena » non trouvée, vouliez-vous dire :
 La commande « enna » issue du paquet « enna » (universe)
 La commande « eva » issue du paquet « eva » (universe)
 La commande « enca » issue du paquet « enca » (universe)
 La commande « ent » issue du paquet « ent » (universe)
 La commande « env » issue du paquet « coreutils » (main)
ena : commande introuvable

It can be funny to have :

ME-C3750-24-TE and IOS memory problem

If you meet a IOS crash bug such as :

Pool: Processor  Free: 164996  Cause: Memory fragmentation
Alternate Pool: None  Free: 0  Cause: No Alternate pool

-Process= "HQM Stack Process", ipl= 0, pid= 112
-Traceback= 26C41C 31CB0C 3222C8 B1FDF0 B08F50 35B764 351D2C
%SYS-2-MALLOCFAIL: Memory allocation of 36688 bytes failed from 0xB1FDEC, alignment 8
Pool: Processor  Free: 164996  Cause: Memory fragmentation
Alternate Pool: None  Free: 0  Cause: No Alternate pool

-Process= "HQM Stack Process", ipl= 0, pid= 112
-Traceback= 26C41C 31CB0C 3222C8 B1FDF0 B08F50 35B764 351D2C

And your environnment is MPLS/OSPF on this kind of hardware, you can be aware of that : When you add a new OSPF neighbor to mesh your network, you can meet memory problem and crash.

Ext.js : one simple tip

I am a network engineer, but in a small company you are able to do lot of things. I am in charge (in same time as network job) to developp second generation of customer managment tool. I have choiced to developp it in ext.js. I am in an early prototyping and evaluate this framework. It is pretty awesome !! A little tip to load data with extjs in a form :
Ext.getCmp('your-form').getForm().load({url: "load.php", params: {do: "cmd"}}); it is your friend. But you must now that your json answer must be as : { success: true, data: { clientName: "Fred. Olsen Lines", portOfLoading: "FXT", portOfDischarge: "OSL" } } You have more information to read there.