Thursday, 22 December 2011

Project-OPen: "PostgreSQL is already present in this computer"/"Warning: the user postgres is already present in this computer! The installer cannot continue!"

I am trying my hands on Project-open a free open source tool for projects, time-sheets and HR maintenance.

I installed Ver 3.5 in Windows XP Machine did something and forgot it. After some days when i tried to use it the administrative password entirely skipped my mind. So i uninstalled it and again when i tried installing i faced these two errors.

 "Warning :PostgreSQL is already present in this computer ! The installer cannot continue"

"Warning: the user postgres is already present in this computer! The installer cannot continue!"

To Remove First error:

1) I used Control Panel-> Add remove program to remove project-open. I also used CCleaner to clean registry but the same error keeps coming. I used Revo uninstaller also but it showed no reference to PostgresSQL.

So i started searching registry -> Regedit-> search for "postgres" . I found four reference to postgres in windows registry.
2) HKEY_Users
3) Somewhere inside Windows
4) Somewhere in Current Version -> Profile List.

I deleted all and i got rid of first error but second started coming.

2)  To Remove second error i searched Google and found that we need to remove user from

My computer-> Manage-> Local Users and groups->Users-> delete "postgres" user

Also thorugh command promt u can delete the user by giving following command in command promp:

net user postgres /delete

After this i was able to install Project-open again.

Its there in project-open documentation also :-) got when i solved the problem :-)

Monday, 19 December 2011

Difference Between Ping and Exteded Ping ? Linux Ping Command, Windows Ping command and Cisco Ping command !!

Ping command is First step of networks. Networking means to connect many devices in same or other domain. To test the connectivity we need to use this " Ping " Command. Depending on Operating system there is slight difference in using the command, but the end result is same. We need to verify the other device is alive or not and can be accessed from the network.

The full form of Ping is (Packet InterNet Groper).

Windows Ping Command


Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
            [-r count] [-s count] [[-j host-list] | [-k host-list]]
            [-w timeout] target_name

    -t             Ping the specified host until stopped.
                   To see statistics and continue - type Control-Break
                   To stop - type Control-C.

    -a             Resolve addresses to hostnames.

    -n count       Number of echo requests to send ( Default 4)

   -l size        Send buffer size (The default is 32. The maximum size is 65,527)

     -f             Set Don't Fragment flag in packet.

    -i TTL         Time To Live.(For Windows XP hosts, this is typically 128. The maximum TTL is 255.

    -v TOS         Type Of Service.(The default is 0. TOS is specified as a decimal value from 0 to 255. )

    -r count       Record route for count hops ( The Count must be a minimum of 1 and a maximum of 9. )

   -s count       Timestamp for count hops.(The Count must be a minimum of 1 and a maximum of 4. )

    -j host-list   Loose source route along host-list.( The maximum number of addresses or names in the host list is 9. )
    -k host-list   Strict source route along host-list.(The maximum number of addresses or names in the host list is 9)
    -w timeout     Timeout in milliseconds to wait for each reply.(The default time-out is 4000 (4 seconds))

Linux Ping Command

[root@localhost ~]# ping
Usage: ping [-LRUbdfnqrvVaA] [-c count] [-i interval] [-w deadline]
            [-p pattern] [-s packetsize] [-t ttl] [-I interface or address]
            [-M mtu discovery hint] [-S sndbuf]
            [ -T timestamp option ] [ -Q tos ] [hop1 ...] destination
[root@localhost ~]#


Audible ping.
Adaptive ping. Interpacket interval adapts to round-trip time, so that effectively not more than one (or more, if preload is set) unanswered probes present in the network. Minimal interval is 200msec for not super-user. On networks with low rtt this mode is essentially equivalent to flood mode.
Allow pinging a broadcast address.
Do not allow ping to change source address of probes. The address is bound to one selected when ping starts.
-c count
Stop after sending count ECHO_REQUEST packets. With deadline option, ping waits for count ECHO_REPLY packets, until the timeout expires.
Set the SO_DEBUG option on the socket being used.
-F flow label
Allocate and set 20 bit flow label on echo request packets. (Only ping6). If value is zero, kernel allocates random flow label.
Flood ping.
-i interval
Wait interval seconds between sending each packet. The default is to wait for one second between each packet normally, or not to wait in flood mode. Only super-user may set interval to values less 0.2 seconds.
-I interface address
Set source address to specified interface address. Argument may be numeric IP address or name of device. When pinging IPv6 link-local address this option is required.
-l preload
If preload is specified, ping sends that many packets not waiting for reply. Only the super-user may select preload more than 3.
Suppress loopback of multicast packets. This flag only applies if the ping destination is a multicast address.
Numeric output only. No attempt will be made to lookup symbolic names for host addresses.
-p pattern
You may specify up to 16 ``pad'' bytes to fill out the packet you send. This is useful for diagnosing data-dependent problems in a network. For example, -p ff will cause the sent packet to be filled with all ones.
-Q tos
Set Quality of Service -related bits in ICMP datagrams. tos can be either decimal or hex number. Traditionally (RFC1349), these have been interpreted as: 0 for reserved (currently being redefined as congestion control), 1-4 for Type of Service and 5-7 for Precedence. Possible settings for Type of Service are: minimal cost: 0x02, reliability: 0x04, throughput: 0x08, low delay: 0x10. Multiple TOS bits should not be set simultaneously. Possible settings for special Precedence range from priority (0x20) to net control (0xe0). You must be root (CAP_NET_ADMIN capability) to use Critical or higher precedence value. You cannot set bit 0x01 (reserved) unless ECN has been enabled in the kernel. In RFC2474, these fields has been redefined as 8-bit Differentiated Services (DS), consisting of: bits 0-1 of separate data (ECN will be used, here), and bits 2-7 of Differentiated Services Codepoint (DSCP).
Quiet output. Nothing is displayed except the summary lines at startup time and when finished.
Record route. Includes the RECORD_ROUTE option in the ECHO_REQUEST packet and displays the route buffer on returned packets. Note that the IP header is only large enough for nine such routes. Many hosts ignore or discard this option.
Bypass the normal routing tables and send directly to a host on an attached interface. If the host is not on a directly-attached network, an error is returned. This option can be used to ping a local host through an interface that has no route through it provided the option -I is also used.
-s packetsize
Specifies the number of data bytes to be sent. The default is 56, which translates into 64 ICMP data bytes when combined with the 8 bytes of ICMP header data.
-S sndbuf
Set socket sndbuf. If not specified, it is selected to buffer not more than one packet.
-t ttl
Set the IP Time to Live.
-T timestamp option
Set special IP timestamp options. timestamp option may be either tsonly (only timestamps), tsandaddr (timestamps and addresses) or tsprespec host1 [host2 [host3 [host4]]] (timestamp prespecified hops).
-M hint
Select Path MTU Discovery strategy. hint may be either do (prohibit fragmentation, even local one), want (do PMTU discovery, fragment locally when packet size is large), or dont (do not set DF flag).
Print full user-to-user latency (the old behaviour). Normally ping prints network round trip time, which can be different f.e. due to DNS failures.
Verbose output.
Show version and exit.
-w deadline
Specify a timeout, in seconds, before ping exits regardless of how many packets have been sent or received. In this case ping does not stop after count packet are sent, it waits either for deadline expire or until count probes are answered or for some error notification from network.
-W timeout
Time to wait for a response, in seconds. The option affects only timeout in absense of any responses, otherwise ping waits for two RTTs.

Cisco Extended Ping Command

Router# ping
Protocol [ip]:
Target IP address: 
Repeat count [5]: 
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: 
Source address or interface: 
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Sweep range of sizes [n]:

Protocol [ip]: Prompts for a supported protocol. Enter appletalk, clns, ip, novell, apollo, vines, decnet, or xns. The default is ip.

Target IP address:Prompts for the IP address or host name.The default is none.

Repeat count [5]:Number of ping packets that are sent to the destination address. The default is 5.

Datagram size [100]:Size of the ping packet (in bytes). Default: 100 bytes.

Timeout in seconds [2]:  Timeout interval. Default: 2 (seconds).

Extended commands [n]: Specifies whether or not a series of additional commands appears. The default is no.

Source address or interface: The interface or IP address of the router to use as a source address for the probes.

Type of service [0]: Specifies the Type of Service (ToS). The default is 0.

Set DF bit in IP header? [no]: Specifies whether or not the Don't Fragment (DF) bit is to be set on the ping packet. If yes is specified, the Don't Fragment option does not allow this packet to be fragmented when it has to go through a segment with a smaller maximum transmission unit (MTU), and you will receive an error message from the device that wanted to fragment the packet. The default is no.

Validate reply data? [no]: Specifies whether or not to validate the reply data. The default is no.

Data pattern [0xABCD] Specifies the data pattern. Different data patterns are used to troubleshoot framing errors and clocking problems on serial lines. The default is [0xABCD].

Loose, Strict, Record, Timestamp, Verbose[none]: IP header options. This prompt offers more than one option to be selected. They are:

    Verbose is automatically selected along with any other option.

    Record is a very useful option because it displays the address(es) of the hops (up to nine) the packet goes through.

    Loose allows you to influence the path by specifying the address(es) of the hop(s) you want the packet to go through.

    Strict is used to specify the hop(s) that you want the packet to go through, but no other hop(s) are allowed to be visited.

    Timestamp is used to measure roundtrip time to particular hosts.

The default is none.

Sweep range of sizes [n]:Allows you to vary the sizes of the echo packets that are sent. The default is no.


Each exclaimation point (!) denotes receipt of a reply. A period (.) denotes that the network server timed out while waiting for a reply.

Success rate is 100 percent

Percentage of packets successfully echoed back to the router. Anything less than 80 percent is usually considered problematic.

round-trip min/avg/max = 1/2/4 ms
Round-trip travel time intervals for the protocol echo packets, including minimum/average/maximum (in milliseconds).

Important Points on Ping Command

1) Extended Ping works only on Cisco's platform.

2) To ping to broadcast address use Linux Ping use -b option.

3) Using Cisco Extended Ping or Linux Ping the source address can be changed.

4) Use -f option of Linux for flood ping.

5) QoS can be set using any of above ping command of OS.

6) TTL  value can be set by using Windows Ping command (- i option ) or Linux Ping command ( -t ).

7)  Linux Ping command can be used for PATH MTU discovery using option -M.

8) HostList can be given in windows ping command.

9) User-to-User Latency can be taken using Linux Ping Command -U option.

10) Timestamp for IP can be set using Linux command -T.

11) Using Linux -p command we can specify up to 16 ``pad'' bytes to fill out the packets sent.

Send me feedback/comments on

"Keep Learning , Keep sharing"

What is Time to Live ( TTL ) value in IP? TTL Value how it is used ? Tutorial on TTL ( Time to Live)

TTL is one of the most basic field on networking. Every person who has some passion to know about networks should know about this field.

The TTL is a 8 bit field present in IP header it is defined in RFC 791.

 Time to Live:  8 bits

This field indicates the maximum time the datagram is allowed to remain in the internet system.  If this field contains the value zero, then the datagram must be destroyed.  This field is modified in internet header processing.  The time is measured in units of seconds, but since every module that processes a datagram must decrease the TTL by at least one even if it process the datagram in less than a second, the TTL must be thought of only as an upper bound on the time a datagram may exist.  The intention is to cause undeliverable datagrams to be discarded, and to bound the maximum datagram lifetime.

Few Important things about TTL ( Time to Live)

1) Time to Live is measured in seconds. Its the time not the counter.the value of 1 means 1 second.

2) The two main uses of TTL : 
  •   To discard the TCP Segment or to limit the life of TCP segment ( TCP RFC 793)
  •   To prevent Routing Loop or to terminate the routing loops 
3)  It is set by the sender to the maximum time the data-gram is allowed to be active in the system.

4) This Field is decreased by every router in the path to destination network.

5) The Router should accept the data-gram even if the TTL value is "0" 

6) Only when the Router has to forward the datagram to next hop and the TTL value is found to be "zero" the router should drop the packet.

7) The router can not originate a packet with TTL value as "0"

Now answer following questions :

1) Why there is no protocol like Spanning tree protocol in Layer 3?

2) How to prevent loops in Layer 3 ?

3) Lets say we have Host PC1 at my place in India and Host PC2 at Alaska USA. Both have public IP and in between we have 500 different router. Please give a command to test the connectivity of both the PC's.

4) What is default TTL value for windows XP machine and Linux Fedora machine ?

Send your answers to Its very simple questions but i have asked them all and got wrong answers every time i ask it in interviews :-)

"Keep Learning , Keep sharing "

Thursday, 15 December 2011

How to schedule daily back of TestLink ( Test Management Tool )

We use Test Link Test Management Tool for all our Test cases management, Assignment of testcases and see the status of testing of any project.

Once the PC had crashed on which the server was running. Luckily it was some hardware problem and we were able to recover everything.  It made us think of taking daily backups, in case if something happens again.

Human nature is really very funny, we live like we are going to be here on Earth for long and we do everything , once somebody dies the realities  comes to our mind but stays there for one or two days and again we are back to normal "immortal" thinking.

Well this small piece of philosophy is because we never thought of taking backups until it was required.

So we started taking backup daily by writing a small piece of code :

1) Create backup.bat file 
Save below code in backup.bat file

REM [at] echo off

for /f "tokens=1" %%i in ('date /t') do set DATE_DOW=%%i

for /f "tokens=2" %%i in ('date /t') do set DATE_DAY=%%i
for /f %%i in ('echo %date_day:/=-%') do set DATE_DAY=%%i
for /f %%i in ('time /t') do set DATE_TIME=%%i
for /f %%i in ('echo %date_time::=-%') do set DATE_TIME=%%i

"C:\xampp\mysql\bin\mysqldump" --user=urusername --password=urpassword --databases databasename > "%DATE_DAY%_%DATE_TIME%_backupTestLink.sql"

save this file in "C:\xampp\mysql\backup\daily-backup\" Folder . "daily-backup" Folder is created by me to store these backups.

2) Start window scheduler to run this file at specific time.
               Go to -> Start-> Setting->Control Panel->scheduled Tasks-> Add scheduled Tasks-> Browse and select the file (backup.bat) , Perform this task-> Daily -> set the time-> enter username and password
and Finish.

The schedular will run at specific interval to create a backup.

3) But this still generates the backup at local PC, if something happens everything will be gone. So

Map one network folder ( another server which has shared folder ) .

Go to My computer -> Tools-> Map network drive -> give drive name ( automatically it takes the next letter. Browse the folder ( the network folder ) click finish.

Now in above script in the end put one copy command to copy the file to server folder

" copy C:\xampp\mysql\backup\daily-backup\%DATE_DAY%_%DATE_TIME%_backupTestLink.sql  Y:\TestLink-Backup "

Now the generated backup file will be present in both local as well as network server PC.

You can mail me on for any other methods/ideas.

" Keep Learning , Keep sharing "

Tuesday, 13 December 2011

What are the Ports of Root Bridge called in Spanning tree Protocol?

This is really interesting question i came across, asked by my junior whom i was explaining the STP protocol.

It has not mentioned explicitly anywhere but  we can call them "designated ports" and definitely not "root ports".

As Root ports cannot exist on root bridge, only non -root bridges can have root ports.

Designated ports exist on the segment  that connect any switch to root bridge through the lowest cost . So through this port only the down link switch is getting connected to the root bridge.

Hope it is clear.

Keep Learning , Keep Sharing !!!

Script to Do continuous FTP from windows client to FTP server

This is to put continuous loop to ftp server which can be Linux FTP server or windows based FTP server like Fillezilla.

First Method to start continuous FTP loops to FTP server:

On Client:

1) Make one TXT file which contains the following information:

open ftpserveripaddress
put filename

Save it as ftpputloop.txt

2) Open Command prompt and go to the directory in which the file is saved.

Give below command :

c:\> for /L %i IN (1,1,99999999999) DO ftp -s:ftpputloop.txt

This command will continuously gets repeated and do FTP put.

You can do similar for ftp get also.

Sunday, 11 December 2011

How to run Continous Telnet from windows PC to Linux Telnet Server

Note : The Telnet server should be working properly in Linux.

To run continuous Telnet on Linux Server , create a file "telnetloop" file in linux:

The file should have following information:

while true
ls -laR

Now change the permission of the file using command "chmod +x telnetloop"

From windows machine now do telnet to the Linux machine, login with username and password.

Now run the script using command ./telnetloop

Wednesday, 7 December 2011

What to do if Telnet is not working for Root, How to telnet as Root user ?

In our lab we need to run telnet using root. Well in real environment its not good idea but for lab purpose we wanted it. Even though we enabled Telnet server and on local PC the telnet was working, remotely it was not allowing. After some online "googling"  the issue got resolved by commenting following line in remote file:

 open :  vi /etc/pam.d/remote

#auth       required

Why we hate to share our knowledge ?

Yesterday i came across a classic case of " I know but i won't tell" type of people. I met this person and he said that i have spent hours understanding them why i should tell you? And i thought " Typical Indian Mentality" Well I live in India and I am an Indian ,so i felt hurt from my own comments, and it let me think " Why we Indians does not want to share our knowledge". I have interacted with other countries professionals and they seem to be understanding and never fear to share their knowledge.

I did some analysis and came out with three categories of people:

1)  First category are of those who says that they know the answer but actually they does not know the answer.

2) Second category are of those people who had struggled a lot in their life to reach the position in which they are now , and they think that by sharing their knowledge with others they will be left behind.

3) Third are really genius and intelligent people who thinks that "others" should do proper research or at-least try to find the answer on their own first, before asking them.

My classic case comes in second category and i could map almost all cases in one of these categories.

My view with proper disclaimers :-)

" Sharing your knowledge with others does not decrease you knowledge but increases it by leaps and bounds" When we share/ discuss with others we come across many questions which helps us to understand the issues and the topics more clearly.

Body will go but the mind/ thoughts/ knowledge shared by each one of us will remain forever in one form or the other.

So "Keep Sharing and Keep Learning "

Monday, 5 December 2011

What is difference between Throughput Test and Frame Loss test ( RFC 2544 and RFC 1242)

Yesterday i came across this question  while some were performing these tests.  We know that for any networking device the "Throughput" is very important. The throughput claimed by vendor to vendor is different so there is one RFC which guides the method to be used to measure the throughput . The RFC is 1242 (Benchmarking Terminology for Network Interconnection Devices) and RFC 2544 (Benchmarking Methodology for Network Interconnect Devices)

The RFC 1242 gives all the definitions  or the terminology for the devices and the 2544 RFC explains the method to be used to measure some of the key parameters. In all it covers below tests:

1) Throughput
2) Latency

3) Frame Loss
4) Back to Back
5) System Recovery

6) Reset

I would recommend everyone who is performing anything related to performance tests should go through these RFC's.

One important point is the trail duration for which the tests is to be run. The trail duration varies and i have seen using very less trial duration and quoting the values. The RFC recommends trail duration of 60 second for tests which uses binary search like throughput tests and frame loss tests. If you use less trail duration obviously you will get more throughput which may not be accurate.

Ok so now back to both the tests . Lets see what is throughput and frame loss of the device as per RFC 1242 and RFC 2544:

Throughput: The maximum rate at which none of the offered frame 
are dropped by the device.

Frame Loss Rate: Percentage of frames that should have been forwarded
                by a network device under steady state (constant)
                load that were not forwarded due to lack of

26.1 Throughput

   Objective:  To determine the DUT throughput as defined in RFC 1242.

   Procedure:  Send a specific number of frames at a specific rate
   through the DUT and then count the frames that are transmitted by the
   DUT. If the count of offered frames is equal to the count of received
   frames, the fewer frames are received than were transmitted, the rate
   of the offered stream is reduced and the test is rerun.

   The throughput is the fastest rate at which the count of test frames
   transmitted by the DUT is equal to the number of test frames sent to
   it by the test equipment.

26.3 Frame loss rate

   Objective:  To determine the frame loss rate, as defined in RFC 1242,
   of a DUT throughout the entire range of input data rates and frame

   Procedure:  Send a specific number of frames at a specific rate
   through the DUT to be tested and count the frames that are
   transmitted by the DUT.  The frame loss rate at each point is
   calculated using the following equation:

          ( ( input_count - output_count ) * 100 ) / input_count

   The first trial SHOULD be run for the frame rate that corresponds to
   100% of the maximum rate for the frame size on the input media.
   Repeat the procedure for the rate that corresponds to 90% of the
   maximum rate used and then for 80% of this rate.  This sequence
   SHOULD be continued (at reducing 10% intervals) until there are two
   successive trials in which no frames are lost. The maximum
   granularity of the trials MUST be 10% of the maximum rate, a finer
   granularity is encouraged.
So if you Observe that both are saying almost similar thing, we need to
find a rate where there is no frame loss. 
Both uses binary search to find the rate. ( depends on vendors test devices ) 
Both gives you result where no frame loss is observed. 

so what is the difference between the two ?

The difference is only in the interpretation of the result and the way the 
tests is performed. I could find following differences :
1) The trial duration for throughput tests should be 60 sec(recommended),
2) Frame loss test is based on configurable total no of frame transmitted at max rate.
   Throughput test the calculation of frames is based on the rate configured. 

3) Generally Frame loss rate and passed throughput rate will be same with very 
 less difference and it is because on the duration for which the tests are run.
4) Frame loss test can give you results, which tells that at that particular rate 
what is the frame loss. 
5) Frame Loss test comes when there are routing priorities,sequenced flow is 
 important and congestion is present in network. 
In  Normal scenarios The results for both the tests are same.

Monday, 28 November 2011

What is difference between Limited Broadcast address and Directed Broadcast address

We all know broadcast address . It is the address used to address all in the same LAN ( Local Area network).
In broadcast we have two types : Limited broadcast and Directed broadcast. What is the difference between the directed broadcast and the Limited broadcast ?

Limited broadcast is the broadcast limited to a single LAN and which is to be received by all. It is sent to reserved Class E , IP address The destination MAC address for such frames will be FF:FF:FF:FF:FF:FF.  The router simply drop the Limited broadcast address and does not forward it.

Directed Broadcast address is the local subnet broadcast address. If the subnet is , the directed broadcast address will be , which will be heard by all in the same subnet hosts. The router will receive such packet and process it.The  destination mac address will still be FF:FF:FF:FF:FF:FF, as it is to be received by all hosts.

DHCP packets are Limited broadcast packets and NBNS uses directed broadcast packets.

What is the Maximum Ethernet Frame Size supported by Non -VLAN switch

I can across this question and it left me thinking. I searched in Net and could not find any satisfactory answer. What will be the maximum Ethernet frame size allowed to be passed from any Non- Vlan switch? Before answering this question Lets refresh some basics.

We Know that the MTU of the Ethernet is 1500. So anything above 1500 should not be allowed. This does not include header so lets see how much with header .

We have 14 bytes of Ethernet header = 6 byte source MAC address + 6 byte destination Mac address+ 2 Byte protocol type

So total byte excluding CRC will be 1500 + 14 byte ==1514 bytes

Lets say we take example of ICMP packet.

For any ICMP packet this 1500 byte includes === IP header 20 byte + ICMP header 8 bytes + 1472 data

This you can verify by using ping command on your PC

ping -t -l 1472

If your Ethernet interface MTU is 1500 if you give 1473 the packets will be fragmented by the PC . This can be seen in wireshark.

So now total is ==== 14 ( Ethernet header) + IP header 20 byte + ICMP header 8 bytes + 1472 data + 4 byte CRC ===1518 Byte including header

OK this was without VLAN , now we have VLAN 4 bytes so :

Total allowed Ethernet frame with VLAN should be 1518+4 ==1522 bytes

So to accommodate this some changes has been done in standard which is known as 802.1ac-1998. This states that

Section : Framing

a) Maximum Frame Size. The receiving CSMA/CD sublayer is not required to enforce the frame size
limit, but it is allowed to truncate frames longer than maxUntaggedFrameSize octets and report this
event as an (implementation-dependent) error. A receiving CSMA/CD sublayer that supports tagged
MAC frames (see 3.5) may similarly truncate frames longer than (maxUntaggedFrameSize + qTag-
PrefixSize) octets in length, and report this event as an (implementation-dependent) error.

This states that if an interface receives a frame more than the size limit it can drop the frame.

So if a switch does not support the vlan it can drop the received frame if the size is above the maxUntaggedFrameSize i.e. 1518 bytes in our case.

And if it supports the VLAN frame it can drop the frame above the (maxUntaggedFrameSize + qTag-PrefixSize) i.e. 1522 bytes.

Also a Non Manageable switch does not mean that it cannot forward or support VLAN . I have seen non manageable switch which can support Jumbo frames also. So it all depends on Vendors how they implement and how much maximum allowed Ethernet size they support.

Thursday, 17 November 2011

Spanning tree Protocol : Difference between Port Priority and Path Cost

When you are working on Spanning tree protocol you know you are trying to make your network more predictable and trying to avoid loops even though redundant links are there.

One of the Questions always asked and is most confusing is " What is difference between STP Port Path cost and Port priority  ? " and " How STP Port path cost and Port Priority should be used ?".

The answer seems difficult to understand but once you do it. you know what it means.

Both the parameters are to be used to determine which of the interface should go in forwarding state.

The behavior and affect of both are different.

Cost is used on local switch to elect the root port of the device. The cost is accumulated up to the root bridge from each interface, and the least cost path to the root bridge becomes the root port on the local bridge.

Here, remember if you change any of the bridges path cost the whole switches in the topology are getting affected, because now again all the local switches has to recalculate the path cost for each port and decide for the designated port and the root ports.

Now for the Downstream switch the priority works. It is only applicable for the two directly connected switches and if you change priority on the local switch A, the Switch B connected in the down link direction will get affected. Higher the priority the less preferred the port.

Lets say         Switch A-------P1-------Switch B

Switch A and B are connected to each other with 2 ports so as to form a loop. Lets say Switch A becomes the root bridge, so both its ports will be in forwarding mode. Now for Switch B lets say P2 goes to blocking mode. So to make P1 in blocking mode and P2 in forwarding mode following things can be done:

1) Using Path Cost: Change Path cost in Switch B, P2 port and make it less than the P1 of Switch B..

2) Using Priority : Change priority in Switch A, P2 port and make it less than the P1 of Switch A.

Happy Learning !!!!

Wednesday, 16 November 2011

Test Link : 1.8.5 How to Print Images/ attach images in requirement document or in Microsoft word

We are using TestLink Test Management tool, version 1.8.5  for over a year now and we saw the problem that when we print the document in MSWORD the images are lost. It will not show the images but a blank space will be left in the document.

Again I searched the forum and found one link , i asked the the question and got the answer. these Guys are really good :-)

So i modified as per the suggestion and it worked fine below is the modification code:

Go to

/TestLink_1.8.5.1/lib/results/printDocument.php , insert it on line 249 Before 250 $generatedText .= renderEof();

# change relative image paths to absolute image paths
# src="/  => src="http(s)://

# fetch protocol and domainname
   $url_host = "https://".$_SERVER["HTTP_HOST"];
   $url_host = "http://".$_SERVER["HTTP_HOST"];
   $url_host = $_SERVER["HTTP_HOST"].":".$_SERVER["SERVER_PORT"];
if(substr($url_host, -1)!='/'){
   $url_host.= '/';

$xPattern = "/src=\"\//si";
$xValue = "src=\"".$url_host;
$generatedText = preg_replace($xPattern, $xValue, $generatedText);
save it .

It should work fine. May be in newer version this bug should be fixed.

Below are links:

Forum Link:

Monday, 14 November 2011

How to change the Test case Title Length in Test Link ( Test Management Tool)

To use Test Link one of the blockers was to increase the Title size of the Test cases. Default Test Case in TestLink Title Size was 100,and as we have to send the Test Plan to external teams/ customers for review, it was a blocking point. No body wants to read the full test case and they wanted everything in title only, so we had to modify it.

If you are happy with the limit dont modify it, as developers dont recommend to modify these settings. Do it at your own risk and according to your requirement.

After digging through forums I have changed following things to increase the TestLink Test case Title Size . It is working in Version 1.8.5.

1) Go to http://localhost/xampp -> Your TestLink Server IP
2) Go to phpmyadmin-> or go to ur database
3) Select you datebase table
4) Search nodes_hierarchy table-> inside that search for "name"
5) Edit the field and increase the value from 100 to 255
6) save
7) Modify testlink/gui/templates/input_dimensions.conf
    Search and increase the value to 255
8) Save

Try giving more title length and it should work fine.

Review of Test Management Tool Testlink

We are using Testlink version 1.8.5 for quite some time (almost a year). We have almost 8000+ test cases. When we started it was like no body wanted to use it and everyone was so comfortable in using excel sheets that even if they were told to use it, they will first update the results in Excel and then unwillingly do it in test link. Even Managers were more comfortable in using excel with all those formulas to know the current status of work done.

But slowly we pushed it, one person by person. When slowly they started using it and once all the test cases are uploaded in the test link, life was easy. Managers got used to immediately knowing the status of work progress and today after one year no body wants Excel, everything  is done in Testlink. Test case Creation, Assignment , execution, report generation, review of test cases , almost everything can be done using Testlink.

I think for small to medium size company who have QA groups can benefit most from this Test Management Tool  Testlink as it is completely free and they have active members in forum who replies almost immediately to the queries.
Related Posts Plugin for WordPress, Blogger...