Saturday, August 9, 2014

Things to take care when you are leaving your job

You have decided to leave your job to join another company. You are all excited but do you know what all you need to take care before you leave your current company. I am sure you would be thinking 'There is not much and I have taken care of everything' but please take a look at below mentioned points to be sure.

 

Medical Insurance

Usually, we do not worry about Medical Insurance as most of the company provides it for all employees. But when you join a new company, Medical Insurance provider also changes. It means your medical history is not carry forward in the new company. This becomes a problem if you ever need to take Medical Insurance for yourself or your family from outside as not only the premium will be very high but lot of things won't be covered in first 4 to 5 years. So if you have been in your present company for more than couple of years, it is better to continue the Medical Insurance to make sure that your medical history is maintained. Before leaving, you should talk to the Medical Insurance provider and take a policy such that your medical history from your current company is still maintained.

Term Insurance

Again, this is something companies take for their employees but it may not be sufficient. So before joining a new company, you should find out about the 'Term Insurance' and take more if you think its not good enough.

Tax Related Documents

Your tax related documents would have been given to you but you may not have stored them thinking that they are available with the company. So before leaving your current company, it is a good idea to download all the Form-16 and Salary Forms.

Promotion and Performance related documents

You have received multiple promotions, recommendations and special mention of your performance, it is a good idea to download them. These can be used to substantiate your viewpoint. I am sure it will also bring in a smile when you look at these in future.

Ask for recommendations 

You have done a good job in your current company and so you should ask for recommendations from your juniors, peers, seniors and most surely from your manager. You should also offer to provide recommendations to your juniors if they want.

Take a vacation

You should take a vacation before you join the next company. I am sure you would want to prove your worth and won't take/get a vacation for first couple of months. You should spend this time with friend, family and unwind yourself.


I am sure there are lot of other things which you should take care. Some of them are very obvious. I have tried to compile those things which are not very obvious and people generally miss. Let me know if you have any such thing which you think are not that obvious and I will try to update this list.

Wednesday, June 4, 2014

IGMP Group and Group-and-Source Specific Query

Sometime back I decided to explain IGMP internals in multiple post. I started with an introduction and then covered General Query messages. This post explains the IGMP group and group-and-source specific query messages.

IGMP querier router sends out IGMP group specific query to check if there is any host interested in the specified group.

Similarly IGMP querier sends out IGMP group and source specific query to check if there is any host interested in receiving multicast traffic for the specified group and source combination.

In both the cases, if any host is still interested, it will respond with its current-state record.

Now let us use figure - 1 to discuss these operations in more details. We will discuss Group-and-Source specific query as Group specific query is pretty much same. Router R1 and R2 both are running IGMP on their interface connected to the LAN. Router R1 is elected as Querier. Router R1 is also the DR for the Multicast Routing Protocol so R1 will create multicast forwarding state.


Handling Join Message by Routers:

Let us assume that host PC-1 joins a channel (S,G), it sends an IGMPv3 join message. Router R1 receives this join message, creates local state and also creates multicast forwarding state for the channel. Router R2 also receives this join message and create local states for this channel.  As explained in here, this state is kept alive until host leaves this channel.

Now let us assume that another host PC-2 is also interested in (S,G), it sends an IGMPv3 join. Router R1 receives this join message and updates the local state information. Router R1 need not update the multicast forwarding state. Similarly router R2 also updates the local state. Please note routers usually just maintain the group, source and interface information and does not maintain which host had joined what channel.

Handling Leave Message by Routers:

After some time,  PC-1 sends a leave message for (S,G). Both Router R1 and R2 receives this leave message. As router R1 does not know how many hosts were interested in this channel, it sends out a Group-and-Source specific query. Why Group-and-Source specific query? That is because the leave has come for a specific Group and Source.

Router R1 will lower down the source timer to LMQI (Last Member Query Interval) for this source and group combination and send out a Group-and-Source specific query. This query is sent every LMQT (Last-Member-Query-Time) seconds for robustness count times (Let us assume robustness count for LAN interfaces is 2) irrespective of whether a host respond before the next query is sent.

Router R2 will do the state calculation based on RFC 3376 but will not lower down the source timer as it is not a querier.

Handling Query Message by Hosts and Routers:

Query sent by router R1 is received by hosts as well as other non-querier routers.

When Router R2 receives this query, it lowers down its own source timer to LMQI (Last Member Query Interval) for this channel (S,G).

Now PC-1 does not send any response while PC-2 starts an internal timer to send a response within Maximum-Response-Time as it still wants to receive traffic for this channel (S,G). Once the timer fires, PC-2 sends out a current state record for channel (S,G) (i.e. a message suggesting that PC-2 is still interested in receiving multicast traffic for channel (S,G)).

Handling Current State Record Message by Routers:

Router R1 receives this current state record and update the source timer for this channel (S,G).

Similarly, Router R2 receives this current state record and update the source timer for this channel (S,G).

Please note that during all these operations, multicast data was continuously forwarded on LAN.

Handling LMQT Timer Fires:

If you would recall, router R1 will need to resend this Group-and-Source specific query one more time. But now that Router R1 knows that PC-2 is still interested in receiving traffic for this channel (S,G), it sets the suppress router-side processing flag for this channel. So when the Group-and-Source specific query is sent out, Router R1 does not lower the source timer.

But how does router R1 communicates this to router R2 because as described above, as soon as Router R2 sees the Group-and-Source specific query, it will lower down its source timer.

Same suppress router-side processing flag is passed in the query message and router R2 does not lower its source timer for the channel (S,G) because this flag is set.

Some Home Work:

Am I kidding? No. If you want to learn something new, you must always do some home work.
I have described Group-and-Source specific query and Group specific query is exactly same. Please try to find out the differences between the two type of queries and post your findings in the comment section.

Summary:

In this blog post, we looked at IGMP Group and Group-and-Source specific queries. If you have any doubts on any specific part, please leave me a comment. In next blog post, I will explain IGMP Snooping and Proxying  in more detail.

An introduction to IGMP

Now that we know why do we need multicast and how multicast addressing works, let us look at how hosts/receivers indicate their interest in receiving contents for a given multicast group.

As described in my earlier post on multicast addressing, Applications/Servers uses a IP Multicast Address (Class D address) as the destination address in the IP data packet while sending out the contents.

Let me take a simple test. Please take a look at figure 1 below, what do you think who all will receive the multicast traffic sent by the Multicast Server?

Did you say 'all-of-them'? If yes, you got it wrong. None of them will receive the multicast traffic as they did not indicated their interest in receiving the multicast traffic.

So how do receivers indicate their interest? They use a simple protocol known as IGMP (Internet Group Management Protocol). IGMP has two parts. One part runs in the hosts (receivers) which is used to indicate host's interest while other part runs in routers which is used to collect the interests of all local hosts.  IGMP runs directly on top of IP protocol and so is unreliable in nature. Routers running IGMP sends queries and all hosts send their current multicast state in the form of IGMP reports.

In a LAN environment, when a host indicate its interest in a IP multicast address, its corresponding ethernet MAC gets configured in the NIC to receive multicast data traffic. So if you look back at figure-1 and if PC-1 has indiacated its interest in the group, only PC-1's NIC will be configured and so only PC-1 will receive the multicast traffic.

Let me give you a little run down on the two parts of IGMP.

Host part:

Host part, as the name suggest, runs in a host. When the host is interested in receiving traffic for a multicast group or a combination of group and source, it sends out an unsolicited IGMP membership report.

Host usually sends two memberrship report messages. This is to make sure that the routers receive at least one. Can you guess why is this done?

As I mentioned IGMP is unreliable and this is one of the simplest way to make sure that all routers receive at least one of the report. Now you will ask, what if both the reports are lost? I will say 'good thinking'. To just take care of such a scenario, this count, known as 'robustness count' can be configured. So if you think your network can loose two reports, configure this as three or so on. If you are increasing this count, you must know that there will be more control packets on the network.

Now let us assume that all unsolicited reports are lost, how will this work? It may not work till the next query comes in.  Once the next query comes, host will generate a solicited report which router can use to update its state.

Once host does not want to receive multicast traffic, it generates a leave.

When host receives a general query, it sends out solicited membership report with all the multicast groups it is interested in.

When host receives a group or group-source specific query, it sends out membership report with this group or group-source information.

Router part:

Router part, as the name suggest, runs in a router. All routers on a LAN elect one router as querier. This router sends general queries periodically.

All the routers on a LAN does querier election and once a querier is selected, only that router sends queries. The router with the lowest IP address is selected as the querier.

When routers receives the unsolicited membership report, it creates local forwarding state and refresh this state when solicited membership reports are received.

When routers receive leave message, it does not leave the group immediately, it first send group or group-and-source specific query and if no host is interested in this group or group-and-source, router removes the local state.


Usually IGMP is configured either in IGMP Proxy mode or along with a multicast routing protocol like PIM (i.e both IGMP router part and a multicast routing protocol is enabled). In case of IGMP proxy, there is usually one single upstream router. In case of multicast routing protocol, routing protocol defines which router should handle the locally connected host membership. For example: in PIM-SM, Designated Router (DR) or the Assert Winner takes care of local host memberships. Please look at figure-2 where router R1 acts as IGMP proxy while router R2 and R3 on LAN-2 are configured with PIM-SM. In LAN-2, router R2 is DR and so handles the IGMP joins sent by R1 on upstream interface.

Whats next:

I have explained the basic IGMP functionality here. I will cover some of the finer points of IGMP in other posts. Now that we understand how IGMP works, we will next look at IGMP proxying.

If you want me to explain any specific behaviour of IGMP, please do let me know.

Sunday, April 13, 2014

Why should I vote in India?

I saw quiet a good response for my previous post on What-To-Do-With-AAP, and realized may be I should write couple of blog post on the upcoming election. So here we are with something that is very close to my heart.

Every body want us to vote this election but till now I have not seen a single person asking what should we change in our electoral system that will make sure you vote. While I have voted in all the election since I got hold of my Election Id but still I want to see some changes in our electoral system. I feel these changes will make sure people vote and vote for a better India. Here we go:

Accountability 

 
All the people who fight election is visible only for 3 months in 5 years. There is no accountability of their past performances and no punishment for their failures to do something they promised. There is no appraisal system. If you talk to them, they will say 'Janta will decide how they have performed in this election'. But here is what I wish:
  • An agenda for the whole 5 years of term.
  • Yearly Goal Settings - What they want to achieve in the coming year.
  • A yearly appraisal to find out what they had promised and how much they have achieved in the year.
  • A yearly appraisal to find out how they are working on their 5 years agenda.
Is it possible? I think yes. Can we implement this? I doubt it very much. It has to come from the candidates which is difficult. But things may change if 'Janta' starts demanding this.
 

Eligibility

 
Should their be an eligibility criteria for people to apply for becoming a MP/MLA etc.? I am sure almost all the people will say 'yes'. What should be the criteria? Apart from basic eligibility criteria, I wish it should include following:
  • A person should be between 21 to 65 years of age.
  • A person should have a graduate degree in any discipline.
  • A person should not be convicted.
Apart from the above, I strongly feel:
  • A person should fight election from the place where his election id was issued.
  • A person should not fight election from more than one constituency.
How can this be done? I think we, 'Janta' need to demand that our constitution is changed to include these eligibility criteria. Will politicians agree to this demand? I am sure they won't but we need to do this for the greater good of our country.
 

Casting your vote

 
Currently elections are fought on caste, religion and money. Somehow we, 'Janta', needs to change this. It cannot be changed overnight. We need to look at who is a better person in terms of the work he has done in the past.
 

I think we can do this

 
I think we, 'Janta', has the power to get all this implemented. Can this be done fast? Nah!  Will political parties allow this? Not a chance. We need to be patient and work towards it. How? That is something I still need to think. I will try to put down my thoughts on this in another post.
 

Please do vote

 
I won't request you to vote for a specific party but I will surely request you to Vote. Please do vote this election and all future elections. Your one vote can bring the change. I am sure a day will come when some of my wishes would come true and our electoral system will be lot better than what it is today. If you have any such wishes, please do leave a comment. May be, we can make this a place to collect all such wishes and discuss how to go about implementing them.

Thursday, March 13, 2014

Struggle of heart and mind over Aam Adami Party

During Delhi Assembly election, my colleagues, friends, relatives and I had discussed numerous times whether Aam Adami Party (AAP) will be able to get more than a couple of seats. But I think we all had a nice surprise when AAP got 28 seats that is just a little short of majority. We thought that finally people have a new option which if not now, may be in future, will provide a corruption-less (or less corrupted) government.

As the BJP also did not get a clear majority, we were again surprised by 'AAP' when they decided to form the government with support from Congress. Now is not it amazing that AAP who won these many seats because of Congress, got support from them to form the government. This is why I say 'It happens only in India'. The best part I liked is that they asked all Delhiwalas before saying 'I do' to this marriage. While some of my colleagues, friends, relatives and I felt 'AAP' should not have formed the government but then we thought, may be, 'AAP' felt that they can bring out change by forming the government.

So far so good. Delhi government started doing things which they had promised in their election manifesto like free water, lower electricity charges, a phone line for handling corruption complaint etc.. I liked the last one most though not sure how much it really helped. 'AAP' tried to table their own Lokpal Bill. But because of some constitution issues (which I really do not understand), 'AAP' could not do it. So 'AAP' decided that they should not be in Government if they cannot fulfil their promise. This is something that triggered a change of heart for some of my colleagues, friends, relatives and definitely in me. We started speculating on why 'AAP' formed the government if 'AAP' did not wanted to run it? We came up with lots of different theories and one which almost every one mentioned was that 'AAP' wanted to fight the upcoming Lok Sabha Election and so they decided to dissolve the Delhi Government.


One big question which keep coming back to me is 'Why 'AAP' decided to dissolve the Delhi Government without asking Delhiwalas about it?'. While I agree that they cannot go back Delhiwalas for all the decisions they want to take but I think this is not just any decision, this is a decision which will affect Delhiwalas one way or the other.

At this time, the struggle between heart and mind started over 'AAP'. My heart goes with 'AAP' while my mind says 'Don't even think about it'. Let me put down some of the points here:
  1. We need corruption-less (less corrupted) India. (Heart)
  2. We need a party that has experience in executing a well planned strategy to provide corruption-less (less corrupted) India and unfortunately though 'AAP' wants to do this but their execution strategy does not look good. (Mind)
  3. We want a different Prime Minister. (Heart)
  4. We need a Prime Minister who speaks, has experience and has some track record that he/she can provide a good government and unfortunately while Mr. Arvind Kerjriwal can speak, he lacks in all other points. (Mind)
I compared 'AAP' with a large software development (This is what I am good at) and came up with following points:

  1. In large software development, we are very particular about Scalability. Scalability has to be thought through during design and needs to be handled every step of your development cycle. Also it is very very difficult, complex and time consuming to fix this. Some time people advise to start from scratch. Now just map this to what 'AAP' is trying to do and see for yourself what will happen in future.
  2. It is a well know fact that you should be very very careful when you are expanding your software company (or Team) because it will effect the whole company (or Team) if you are not recruiting like-minded people who understand and appreciate the vision/mission of your company (or Team). I feel 'AAP' should not be giving Lok Sabha Tickets to anyone who they think make a right candidate.
So can you help me decide whether I should listen to my Heart or my Mind? As of now, I am going with my Mind but I am open to any suggestion/argument you may have to make me go with my Heart.



Thursday, February 13, 2014

IGMP General Query message

My last post An introduction to igmp explained what IGMP is and how it works. I kept that post simple, small and easy to follow. I had decided to explain each IGMP part in greater details in separate posts. So with this post, we will look at IGMP General Query message. Let us use the latest version of IGMP (i.e IGMPv3) in this discussion. Also please note that all the values that are available as configuration are added in 'Italic'.

A router uses General Query to collect and update group membership information for the hosts.

General Query Message contents

General queries are sent to All-Host-Multicast IP Address (224.0.0.1). IP protocol field in the IP header is set to 2 (Protocol number for IGMP). A router-alert IP option is added just after the IP header. IGMP header contains following fields:

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |  Type = 0x11  | Max Resp Code |           Checksum            |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                         Group Address                         |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     | Resv  |S| QRV |     QQIC      |     Number of Sources (N)     |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                       Source Address [1]                      |
     +-                                                             -+
     |                       Source Address [2]                      |
     +-                              .                              -+
     .                               .                               .
     .                               .                               .
     +-                                                             -+
     |                       Source Address [N]                      |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

A router sets following fields in the IGMP header:
  • Type is set to 0x11
  • Max-response-code is calculated based on the configured value of 'maximum-response-time'.
  • 'checksum' is calculated by initializing the checksum field with 0.
  • Group-Address is set to 0.0.0.0
  • Reserved field is set to 0
  • S flag is set to 0
  • QRV is set to the configured 'robustness-count' value.
  • QQIC is set to the configured 'query-interval'
  • Number-of-sources is set to 0
 

General Queries during initialization

During initialization, a router sends 'Startup Query Count' number of General Queries every 'Startup Query Interval'. 'Startup Query Interval' and 'Startup Query Count' is usually configured by the administrator. Router declares itself the querier on the LAN. The Startup General Queries help in quickly collecting the group membership information. Each router usually adds a small random delay before it sends out the first Startup query. This helps in avoiding the General Query implosion on the LAN. Once the required number of General Queries are sent, router moves to the steady-state where it sends periodic General Query every 'Query Interval'.

General Queries after initialization

Querier router periodically sends General Query every 'Query Interval'. So in steady-state, there should be only one router sending out General Queries.

General Query processing in Hosts

All multicast capable Hosts receive the General Query. A host generates a group membership report with current state of all the groups it has joined, within the maximum-response-time. Hosts generate multiple group membership reports are generated if all the group information does not fit in one single packet. Please note that host will pass the maximum possible information for a group in one single packet. Take a hypothetical case, for example, a host has requested multicast traffic for a specific group from 400 different sources. All these sources for this group cannot be sent in one single membership report message so host adds the maximum possible sources (366 as per RFC 3376) in the message. Host also makes sure that it uses the same set of sources in each of its membership report message.

General Query processing in Routers

All IGMP enabled routers receive general query of other routers and run querier election. Following processing is done:
  • If this router is currently a querier:
    • If the source IP address of the received general query is lesser than the current querier address:
      • The router that sent this general query is selected as querier. Current router starts a other-querier-present-timer and stops generating General Query message.
    •  Else
      • Continue to act as querier.
  • If this router is not a querier:
    • If the source IP address of the received general query is lesser than the current querier address:
      • Update the current querier address with source IP address.
    • Update other-querier-present-timer.
When other-querier-present-timer fires, this router assumes the role of querier and start sending out General Queries.

Summary

I hope the above explanation would clarify your doubts about IGMP General Query. If you still have any questions, please leave me a comment. I will surely update the text to answer it. In my next post, I will explain Group and Group-and-Source specific queries.

Tuesday, December 10, 2013

A promotion you would never want

On fateless morning of 21th November I lost my Dad. He was very sick when we admitted him in a Delhi Hospital. He was immediately admitted to ICU. I was pretty confident that its a matter of days when we will go back with him. But on the fourth day, I was told that he is no more.

I was not sure what to do. My cousin brothers were with me and together we took care of all the things in Delhi and later in my native Ramnagar. Lots of relatives and friends came to pay their condolences. Most of the talks were that me and my big brother now have bigger responsibilities.

I was just looking at this like a promotion which I never wanted.