Showing posts with label Testing. Show all posts
Showing posts with label Testing. Show all posts

Thursday, 17 May 2012

Development to Testing, is it good career move ?

I have seen people thinking over and over again about this question.

The reason for this change can be

1) Too much work pressure. They need to work on Saturday and Sundays. Evryday its like 12-14 hrs they spend in office.

2) Not good team member/ manager/lead

3) Marriage and or Children : AS they are getting married or planning to have babies they think of moving to testing.

Reasons stopping them (Myth)  :

1) Good salary ( Most cases the only reason !!!)

2) The pride they feel when they are into development.

So is it a good decision to move from development to testing? Yes and NO. IT always depends again on few factors. Every individual is different and so every situation is. So you should think about few things before making move:

1) IS it something you wants to move away from work pressure ? 


   The fact can be stated like: Lets say the developer works 15 days in a month, give the code to tester , the tester tests the code in a week and developer will again fix the code in a week. So effectively if you see the developer works for 3 weeks in a month and tester only one week. But this one week the tester has to work very hard to break the code. So if the developer put X % effort in writing code the tester has to put 2X% effort to break the code. So the remaining 3 weeks will be spent by the tester in analyzing standards, learning about tools, knowing about use cases etc.
     The developer will always be in pressure to make the code and for tester it is always break the code.

 Generally for breaking the code there is no set time lines but for making code it is , so developer will always be tensed and working.

 If you want to move away from that pressure "Testing" is the job for you.


2)   Are you running from your boss?
      If you want to change because of your team/ lead or manager, then may be this is not the right move for you. In QA or in development there are "Best Managers" and "Worst Managers" , whom you are reporting or whom will report you dont know, both departments has its own share of both types of managers.
    Better will be, for you, is to involve your managers' manager and  let him know what is happening.

3) Marriage or Children : Yes , please move to testing. "Family" and  "Money" both are important. Once money gone you can earn it again but "Family" gone , you can never get back. So you should see if you are spending good time with your kid and family members. To work once-twice on weekends is ok but if it is a routing you should look for change. It can be either company change or career change to testing.

4)  Salary difference: Salary in company to company varies, but in general, for product based company the salary of testers are equivalent to developers. For services companies still there is difference but its closing fast. Now for same experience, the salary for tester and developer is almost same.

5) Pride and EGO issues : I have seen QA people getting more respect than development people. Its all about knowledge, if you have good knowledge of your subject, you will get respect. It does not matter whether you are in development or testing.

So if you are sure and know the reason don't think too much . Try to make "Testing as Career" , it is worth.

Believe me !!!!



   

 


Thursday, 10 May 2012

What is the career path for experienced tester ?

This  is something i have been asking myself for quite sometime. What is career path for experienced tester ? Every year so many people are getting graduated and looking for jobs.

Still, in India its more like getting job is priority rather than thinking about questions like development or testing. Here i see a pattern, if you are good ( percentage 75 % or more ) after finishing college, first priority is development, if you didn't get job in first year , you look for testing jobs. Still no job, ok lets do some testing course. Finally, join somewhere.

Testing, as a career is still not  popular , and sometimes i am surprised, when they compare testing job with "Data operator jobs".  Anyway, that's another topic altogether.

Well, in my case i started career in JAVA, got SCJP, very popular in 2000, joined some company as software engineer and worked there looking for codes. It was more like when you are in development you know everything about your module, but if i ask some basic question about full system, you don't have an answer. Exceptions are always there, but this is general pattern i see.if you ask the same question to tester, he can tell you from different ways , explain perfectly what you are looking for. So my views, my personal view is "Testers" has more knowledge about the system as a whole rather than a "Developer". Slowly i got chance and i moved to testing.

Now, it is a beautiful journey, testing new things, new protocols , new  devices, but now what? after almost 12 + years i have mentored many people, saw them moving to development. Many people moving from dev to testing ( surprisingly numbers of people moving to testing is more than the number of people moving from testing to dev, as i know) .

Now, every year intern join, within a year or two they can do almost the same things which you will do. So, how do you differentiate yourself? What options do you have when you move up the ladder ?

Well, we have many options !!!

1) Become a manager and manage people. : In India becoming manager is one option which is true as you become senior.

2) Contribute more towards open source projects.

3) Mentor new people.

4) Start a website and write about your experience.

5) Learn more things, new things . Learning never stops and technology evolves very fast.


Wednesday, 11 April 2012

OpenSource or community projects for testing ?

It is good to join any open source projects. Once you know basics there are hundreds of projects there, find one or two and join them. It helps in many ways:

1)You know how others are testing their standards, their way of testing , new tools.

2) Its improve your communication skills, when you interact with others , you learn " to listen others", " what you say and think may not be always correct", " what you write and you meant can be given entirely different meaning by different people"

3) It improves your self confidence.

For development side or coding side there are number of projects but for manual testing, I think there is limited scope but still if you are willing to, you can find one and join one and more importantly contribute in them.

Some of good online testing platform which will help you are :

1) utest:  They have a large community of testers and one can join them depending on their skill set. As there are many people in there looking for projects , i think for newcomers it is difficult to get first project.You need to be over enthusiastic with proper skill set and you may get started on this. Try your luck.

To be true i joined them 3 months back but never got projects, may be my skill set not matching with requirements or may be i m not following them very keenly :-)

http://www.utest.com/

2) Bugpub: For this you should have linked in profile through which you can request to join them. Also you should report at-least one public app or website bug.

http://bugpub.com/

In above two you get paid if you execute projects.

Others open source projects:

1) Mozilla Firefox : They have testing session on each Friday, you can join them and participate in their beta releases. http://www.mozilla.org/en-US/contribute/

2) Ubuntu:  https://wiki.ubuntu.com/Testing

3) MeGo : http://wiki.meego.com/Contributing_to_MeeGo

4) Fusesource:  http://fusesource.com/community/why/

6) Testlink: http://www.teamst.org/index.php/howto-contribute

the best way to get linked is , participate in that which you use on daily basis in home or office. If you use Mozilla on daily basis first try to know more and more about it by joining its community and participating in forum. Once you are comfortable in using it ask for contribution in any form in which you are comfortable.

It is always about having patience because millions of people are out there and the person who has started it will be apprehensive first , but if you are serious and it shows in your communication in forum or community they will accept it sooner or later.

So keep trying and keep learning.


Tuesday, 10 April 2012

Common capture filter expressions used in wireshark

In Wireshark we have two type of filters : display filters and capture filters.

Capture filters common filter strings are:

1) No Multicast traffic : "not multicast"

2) No Broadcast : "not broadcast"

3) only arp : "arp"

4) only ip : "ip"

5) port 550 : "port 550"

6) traffic to and from 10.0.0.1 : "host 10.0.0.1"

7) traffic from mac address 00:00:00:11:22:33: "ether host 00:00:00:11:22:33"

8) pppoe : "ether proto 0x8863 and  ether proto 0x8864"

9) source subnet 10.0 : src net 10.0

10) dns traffic ; "port 53"

Types of Wireshark filters and common filters for wireshark

In Wireshark we have two types of filters

1) Display filter which is the main filter in Wireshark Window and can be seen below:


2) Capture filter -> which we can get in options


In options we can see the capture filter


The syntax for each type of filter is different and one filter string may not work for another.

In Capture filter, before starting the capture the filter string is defined and is used only to capture those packets which are matching with the filter.

In Display filter the filter string only apply the filter and show the results, but it will capture all type of packets.

For common types of filter expression, i have made separate posts please go through them.

Which type of filter we should use ?

Well, i have seen many people using only display filters.There could be different reasons like people are not aware of capture filters or as it capture only specific packets the filter should be proper.

My say : Use capture filter if you know which traffic you want to analyze as it saves time and is not cluttered. 







Common Wireshark display filters used for testing.

Wireshark is one of the great tool to analyse traffic. If you want to understand about any protocol you should use Wireshark often and see into details of each packet.

Some of the common used display filters  with Wireshark are :

1)  arp traffic use filter as  "arp"

2)  ftp traffic use filter as "ftp"

3)  For DHCP traffic use "bootp"

4) For traffic whose src is  10.0.0.1 : "ip.src==10.0.0.1"

5) For traffic whose destination is 10.0.0.1 : "ip.dst==10.0.0.1"

6) For those packets whose ip length is more than 200 bytes : " ip.len>200"

7) Not to capture netbios traffic :"!netbios"

8) Vlan traffic : "vlan"

9) no tcp : "!tcp"

10) Arp and icmp only : "arp || icmp"

11) ip only :"ip"

12) Only dns :  "dns"

13) For traffic to and from 10.0.0.1 :  "ip.addr==10.0.0.1"

14) Telnet traffic: " tcp.port== 23"

15) Rip : "rip"

16) PPPoE related : "pppoes" "pppoe" "ppoed"

17) Snmp : "snmp"

18) SIP : "sip" 

Wednesday, 28 March 2012

How to install Windows PPPoE Server (RasPPPoE)


How to install Windows PPPoE Server

To use PPPoE Server on windows is easy. We can use RASPPPoE Server from http://www.raspppoe.com/ to download the installation file. It will work for Almost all win flavours other then WIN Vista. We have used PPPoE Server on Linux Pcs generally but due to some limitation like ping size 9000 and above some Linux PPPoE server won't allow. We have to use Win PPPoE server. Why is it so with Linux servers still we need to investigate.

Steps to configure win PPPoE server.

1) Download package from http://www.raspppoe.com/

2) If you are running Windows 2000, right-click the My Network Places icon on your desktop and select Properties to bring up the Network and Dial-up Connections window.

3) If you are running Windows XP/2003, click the Start button, select Control Panel, then click Network and Internet Connections and then click the Network Connections control panel icon to bring up the Network Connections window.

4)Go to the menu and select View then Details to get a detailed view of the network connections on your machine.

5) You should find one or more Local Area Connection objects. Locate the one for the network adapter connected to your broadband modem (you should be able to tell by the name in the Device Name column), right-click it and select Properties.
In the properties dialog box, click the Install... button.
In the Select Network Component Type window, select Protocol and click the Add... button. (Note: It could take a few seconds for the following window to come up.) In the Select Network Protocol window, click the Have Disk... button.

6) In the Install From Disk window, either type the name of your temporary installation directory or click the Browse... button to navigate to it (it does not matter which of the INF files you select, Windows will automatically pick the right one later). Then click the OK button. ( Point it to the directory where you have unzipped the raspppoe files)

7) A new window opens, offering the PPP over Ethernet Protocol for installation. Click OK to start installing the protocol.
During installation, a window titled Digital Signature Not Found (Windows 2000) or Hardware Installation (Windows XP/2003) may come up several times (typically four times per installed network adapter), warning you that the driver has no digital signature or Windows Logo. Make sure you click "Yes" (Windows 2000) or "Continue Anyway" (Windows XP/2003) every time you are prompted to allow successful installation of the protocol.


8) Back at the Local Area Connection Properties window, click Close to close the window. Note: If you have a network adapter dedicated to your broadband modem, it is recommended that you first clear the checkboxes for all other components listed and leave only PPP over Ethernet Protocol checked.

9) If you have more than one network adapter in your system, you may want to disable the PPP over Ethernet Protocol for all adapters but the one your broadband modem is actually connected to. To do this, bring up the properties of each network adapter you want to disable the protocol for and clear the checkbox next to PPP over Ethernet Protocol in the listed components. BEWARE: If you accidentally disable the protocol for the network adapter you want to connect through, simply re-checking the checkbox, even if you do so immediately, may not be enough to make the protocol functional on that network adapter again.

10) Select properties TCP/IP of the connection and give ip address of the range of the clients.

Done and ready to use.

Please post your comments , which type of PPPoE server you use for testing purpose.

Saturday, 17 March 2012

Sample Packet Capture for different Networking Protocols ( Layer 2- Layer 7)

Sample Packet Capture for different Networking Protocols ( Layer 2- Layer 7)

When we have to test new embedded system protocols or any other networking protocols it is very necessary that we should have sample packet capture file. If you want to learn about any protocol  you should know the definition of that protocol, how it works and also we should see it working at packet level also . We should see sample Packet captures of that protocols.

It is easy if we read and go thought the packet through the sample packet capture file . Some protocols packet capture are easy to generate we can use wireshark on computer and capture it. Lets say you are reading about ARP protocol , then you should actually open the wireshark in you pc and capture the ARP Packet and see its fields and then read through RFC or any standard. It is always good to see, understand and read. Only theory does not help in long way.

Lets say you are reading about OSPF or RIP protocol, for you to prepare setup and generate these packets are difficult then you can download sample capture files and study them.

I have found few great sites which i use regularly to study about protocols . They have given many sample packet capture file s to download and use it.

Use these sites for your understanding of networking protocols. Also if you come across any other packet captures which is not yet uploaded you can upload into these sample packet capture websites for everyone to use it.

The sites are :

http://packetlife.net/captures/

http://wiki.wireshark.org/SampleCaptures

http://www.colasoft.com/support/packet_files.php  ( You need to download their capsa network analyzer to view them )

Please post in comments if you know any other such sites.

Protocol Level Tests: What is Protocol Testing?

Protocol Level Tests

In networking Domain we have many types of protocols and we need to test basic functionality of all protocols. When we say " Protocol level tests" we mean the networking protocols which comes in Layer 2-7. Layer 1 is physical layer and to test it we need specilized hardware devices.
In L2-L7 we have many protocols which we can tests. Some of the protocols which is required by router, modem, switches and bridges are given below . I will be adding how to test them and the general guidelines to test these protocols. When I am referring to layers they are layers of OSI model.  For who does not know or new to protocols or embedded system tests , the OSI layer is basically a model which has divided all the fuctions of communication systems into layers. This was done for interoperibility and understanding purposes. We have TCP/IP model as well which talks in terms of 4 layers which are mapped to OSI layers for understanding purposes.
We have protocols which resides in respective layers are given and categorised below. The important one are mentioned below :
Layer 1 - Physical layer-Actual Physical meduim , RS-232, RJ45, T1, E1, 10BASE-T, 100BASE-TX, POTS,DSL, 802.11a/b/g/n PHY ( This is where hub works, basically hub doesn't have any intelligence it just forwards data received on one port to all other ports )
Layer 2- Data Link Layer- MAC and LLC Layer ,  802.3 (Ethernet), 802.11a/b/g/n MAC/LLC, 802.1Q (VLAN), ATM,FDDI, Fibre Channel,HDLC, ISL, PPP, CRC, STP, RSTP  ( This is the Layer in which Bridge and Switches works, they read the MAC address of the data received and map it  with the port on which it is received.)
ARP in between Layer 2 and 3 , it help in getting MAC address for corresponding Ip address.
Layer 3 - Network Layer - IP, IPsec, ICMP, IGMP, OSPF
Layer 4 - Transport Layer - TCP, UDP
Layer 5 - Session Layer -NetBios, L2TP, PPTP
Layer 6 - Presentation Layer - MIME, SSL
Layer 7 - Application Layer - SIP, DNS,FTP,HTTP,NFS,SNTP,SMTP,SNMP,Telnet,DHCP,RTP,SSL,SSH,HTTPS,TFTP 

Test Plan coverage: What Should be included in a test Plan

How to Write Test Plans


Test Plans should be based on functionality and the feature to be tested. It can cover following things :

1) Configuration test cases

2) Functionality Test cases

3) Standard Based/ RFC based test cases

4)  Negative test cases

5) Performance related test cases

6) Stress Test cases

7) Logs related test case

8) Statistics Related test cases

9) User interface related test cases

10) Inter Feature test cases ( Lets say VLAN test plan is to be written and in this section we can add DHCP server related test cases, a combination of two or more  features)

How to test Spanning tree protocol ( STP )

How to test Spanning tree protocol ( STP )

Spanning tree protocol is one of the most interesting protocols. It is invented by Radia Perlman, she holds more than 50 patents and presently working in Intel ( year 2011 ).

We can use some testing tools to test spanning tree protocol. The main aim of Spanning tree protocol is to stop the loop formation and disable the redundant link so that packet follows only one path.

One of the imp question asked is why we need Spanning tree protocol in bridge to stop loop formation but why not in routers? Or if someone asks you we have STP in layer 2 to stop loops what is corresponding protocol in layer 3 to stop loop formation , don't get confused as in layer 3 it is not required ! Why ? because you have TTL field in routing mode which help in discarding the packet once TTL becomes zero.

Ok back to main topic "How to test Spanning tree Protocol" .  To test Spanning tree you have following ways:

1) Use some hardware test tool

2) Use some Software based packet generator

3) Use actual devices and test it.

How to use Hardware test tools to test Spanning Tree Protocol

We have some costly hardware test tools, but if you company is implementing spanning tree protocol , the chances are you will have any of these tools in ypur lab.

1) Agilent N2X has in built Spanning tree protocol test suite which can give you convergence time and packet loss. You can build the BPDU packet using the tool and test.

2) IXIA IxNetwork is another testing tool, which can be used for testing Spanning tree protocol. Using their Spanning tree protocol emulation software all the spanning tree parameters can be verified .

3) Smartbits : We can generate different type of packets using SmartWindows and test the Spanning tree protocol.

How to use Software test tools to test Spanning Tree Protocol

We have some software test tool which can generate STP packets

 Yersinia test tool can generate Spanning tree packets but it is more like attacking the device or flooding the device with STP packets and see how device is responding .

http://www.yersinia.net/

How to test Spanning tree protocol using more than one device

If you don't have any tool to test it don't worry connect two similar devices back to back and test it. It should have two paths. One path will be blocked by STP and one will be in forward mode. For detailed test cases please refer STP test cases page.

Command: How to know MTU of Windows System

Command: How to know MTU of Windows System


For Linux it is very easy to know the MTU of the interface . We have to give command ifconfig and the interface name and it will show the mtu of the interface as well .

To know MTU in windows there is one command  "netsh" , basically its an interesting command to know various parameters.

To know MTU we can use below command but Routing and remote access service should be started otherwise you will get below error:



C:\>netsh interface ip show interface

The Routing and Remote Access Service is not currently running on the local mach
ine.
Please use 'net start remoteaccess' on the machine to start the service.


C:\>net start remoteaccess


C:\>netsh interface ip show interface

MIB-II Interface Information
------------------------------------------------------
Index:                              1
User-friendly Name:                 Loopback
GUID Name:                          Loopback
Type:                               Loopback
MTU:                                32768
Speed:                              10000000
Physical Address:
Admin Status:                       Up
Operational Status:                 Operational
Last Change:                        0
In Octets:                          0
In Unicast Packets:                 0
In Non-unicast Packets:             0
In Packets Discarded:               0
In Erroneous Packets:               0
In Unknown Protocol Packets:        0
Out Octets:                         0
Out Unicast Packets:                0
Out Non-unicast Packets:            0
Out Packets Discarded:              0
Out Erroneous Packets:              0
Output Queue Length:                0
Description:                        Internal loopback interface for 127.0.0 netw
ork

Index:                              2
User-friendly Name:                 Local Area Connection
GUID Name:                          {2E2515A4-6473-4502-B718-5A6A2FEC516B}
Type:                               Ethernet
MTU:                                1500
Speed:                              100000000
Physical Address:                   00-11-11-5C-EB-88
Admin Status:                       Up
Operational Status:                 Operational
Last Change:                        3753568741
In Octets:                          332340138
In Unicast Packets:                 330402
In Non-unicast Packets:             451241
In Packets Discarded:               0
In Erroneous Packets:               0
In Unknown Protocol Packets:        9747
Out Octets:                         50853810
Out Unicast Packets:                265788
Out Non-unicast Packets:            5886
Out Packets Discarded:              0
Out Erroneous Packets:              0
Output Queue Length:                0
Description:                        Intel(R) PRO/100 VE Network Connection - Pac
ket Scheduler Miniport

How to modify or delete Windows default Multicast routes

How to modify or delete Windows default Multicast routes

  If you have more than one interface on your system and you want to stream video to one network, you should be aware of multicast route .
The default multicast route will be enabled by windows on all interfaces with same metric. So it is hard to tell on which interface it will send the multicast data . For it to send to specific network interface you can delete the route but as is it virtual route the Microsoft wont allow u to delete it . By simple trick you can delete it as follows:
First add the existing route as follows:
Lets say 20.1.1.20 is the network on which you want to delete the route, just add it again on same interface.
c:> route add 224.0.0.0 mask 240.0.0.0 20.1.1.20
Once it is done
c:>route delete 224.0.0.0 mask 240.0.0.0 20.1.1.20
It will delete the unwanted route and send the traffic to destined network.

DHCP Server , DHCP client and DHCP Relay FAQ

DHCP Server, DHCP Client and DHCP Relay FAQ

DHCP

DHCP is one of very interesting protocol. The more i know about this protocol, the more i really gets fascinated. And i am really surprised by how less people know about this DHCP protocol. It is used by everyone but very few people actually knows how it works. I have put this as DHCP server , DHCP Client and DHCP relay FAQ page and i want to cover all the questions related to this protocol and it will help you for your DHCP related interviews as well.


Q.1)  What standard do you refer for DHCP ?

A.1) DHCP stands for Dynamic host control protocol. And we should refer RFC 2131 to know about it. The old RFC is 1541.

Q.2) On what protocol DHCP is based on?

A.2) DHCP is based on bootstrap protocol or bootp protocol defined in RFC 951.

Q.3) What is BootP Protocol ? Tell important points .

A.3) a) Bootstrap protocol (BOOTP) allows a diskless client machine to discover its own IP address, the address of a server host, and the name of a file to be loaded into memory and executed. Here diskless refer to the devices which are in network and does not have permanent disks and uses tftp/remote file for bootup.

       b) The BOOTP protocol uses two reserved port numbers, 'BOOTP client' (68) and 'BOOTP server' (67). The client sends requests using 'BOOTP server' as the destination port; this is usually a broadcast. The server sends replies using 'BOOTP client' as the destination port; depending on the kernel or driver facilities in the server, this may or may not be a broadcast address.

Q.4) How many types of DHCP messages are present?A.4) There are in total 8 type of message :

   Sent by DHCP Server : DHCPOFFER, DHCPACK, DHCPNAK,

    Sent by DHCP Client: DHCPDISCOVER, DHCPREQUEST, DHCPDECLINE, DHCPRELEASE, DHCPINFORM

Q.5) Explain Basic message exchange between DHCP Client and DHCP Server?

A.5)   Client ->  DHCPDISCOVER
         Server -> DHCPOFFER
         Client->   DHCPREQUEST
         Server -> DHCPACK


Q.6) Explain a case in which DHCPDECLINE message will be sent.A.6) DHCPDECLINE message is sent by the DHCP client to the DHCP Server when the server assigns ip address which is already used in the network.

Q.7) When ARP is used in the DHCP sever -DHCP client message exchange?

A.7) ARP is used two times. When DHCP server gets DHCPDISCOVER message it searches in the pool pick one ip address and sends ARP request or ICMP ECHO Request packet with the picked ip address to the network. This is to check if any one is using the ip address which the DHCP Server is going to assign to the client. The second time is when the client gets the DHCPOFFER packet with the ip address mentioned in it. It sends DHCPREQUEST packet to the Server and after this send Gratious ARP request with the IP address offered by the server to the network. If it gets reply it sends DHCPDECLINE to server and does not take the ip address. If no body replies to it , the DHCP Client starts using the offered IP address.

Q.7) What is the lease time?

A.7) The lease time is given by the DHCP Server to the DHCP Client. It is the duration in which the DHCP client can use the ip address assigned by the server. The clients renews it when 50 % of the time remains. Lets say DHCP server has assigned ip address 193.169.10.50 to the client for lease time 1 hr .After 30 min the DHCP client will send DHCP Request for the renewal of the lease time. It the server is present the time will extend to again 1 hr from the time it requested to renew the lease. Lets say 3.00-4.00 is its previous lease time. When at 3.30 it asks to renew the time will be extended from 3.30 to 4.30. Lets say DHCP server is not reachable in that case still the client can use the IP address and wait for 87.5 % of the time . After this time again it will send DHCPREQUEST to the server. If it gets reply it extends the  lease time again for one hr from the time it requested . If it did not get reply again it is allowed to use the IP address up to the lease time. Once the lease time expires it has to re initiate the whole process.

Q.8) Do DHCP server maintain the Lease time database ? Do they retain the database if we reboot the Server?


A.8) Yes, they maintain the lease time database and that is why if the client request the ip address it will first see its database and if matching MAC address entry is there it will assign the same ip address to the client.
Generally database will not be persistent and will get deleted if we reboot the server. But mainly it depends on Vendor implementation.

Q.9) How we can see message exchange and how we can generate all type of DHCP messages?

A.8) We need atleast one DHCP server, 2 DHCP clients and Wireshark installed to see the message exchange. Following is the scenario where you can see different DHCP message exchanges :

             For DHCP sever you can use  any of the following : windows server 2003, linux dhcpd deamon, tftpd server
              
                   DHCP client can be any windows PC. Install wireshark in both server and client.

          a) Messages 1 : DHCPDiscover, DHCPOFFER, DHCPREQUEST, DHCPACK

                            PC1 (DHCP Server )     -----------------------------  PC2 (DHCP client)                        
              
 Configure DHCP server pool in server. Connect the DHCP client PC with cross cable. Open wireshark and observe the DHCP messages. You can see all 4 messages.


        b) Message 2 :  DHCPRELEASE

            In DHCP client PC open command prompt and type ipconfig /release . You will observe DHCPRELEASE message in the server.


       c) Message 3 : DHCP DECLINE
               
             You need two clients. One static and one through DHCP server. Try to first assign ip address to dhcp client, reboot the client or just remove it from network meanwhile give the same static ip to another client. Now connect the dhcp client when the server assigns the ip address the client will do gratious arp and as static ip is already present it will send DHCPDECLINE message to the Server.

        d) Message 3: DHCPNAK

              DHCPNAK is sent by server when the requested ip address is from other subnet or when the requested ip address by the DHCP client cannot be assigned by the Server. This you can generate by changing the pool of DHCP server or by using two DHCP server. First configure pool lets say 20.0.0.1-20.0.0.10 in DHCP server. Let client get the ip address. Disconnect this server and Connect another server with IP oll as 80.0.0.1-80.0.0.10. When the client sends DHCPREQUEST it will ask for the previous ip address which is not present in pool so the server will send NAK. This can be tested using Windows 2003 server. I think in linux servers this is not implemented and it will be silent and wont send any message.

       e) Message 4 : DHCPINFORM
           This is new message added and is supported by only few servers. This message is generated by Windows XP OS and once connection is idle leave the setup for some time , you can observe this message.

Q.10) What is DHCP Relay ?

A.10) DHCP Relay is used in router as the DHCP messages are broadcast messages the router will not forward the DISCOVER message to other subnet . If you want the router to forward the messages to other subnet we can enable DHCP Relay in the router. It will simply forward the message to server and responses back to the client.
   
If you have any doubt about DHCP please ask in comments.

Now my turn for asking some question, please put your answer in comments:

1)  Why we need two ports 67,68 for DHCP? Why it was not managed using only one port like http?

2)  What is the packet size for DHCP packets?



                           

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
                resources.       

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
   sizes.

   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.