I want to understand summarization. As per my understanding. summarization is based upon no of "1 bits" but doesnot subnet mask matters for summarization ?
I want to understand whether summarization depends upon submetmask or not?
To calculate a summary route, find the lowest address then the highest and then (the most important bit) recalculate using the required block size.
If you're using your first example, you wouldn't use a summary route as you're using the entire class A network range but if you wanted, you could use 10.0.0.0/8 as a summary. If we were to change that to a /24 we could end up with some networks like this:
First address = 10.1.1.0
Last address = 10.1.4.255
Now find a block size that will encompass those address ranges. Working from the third octet as the first two will not change:
10.1.0.0/21 will be our summary route using a block size of 8. 4 will be too small as this won't encompass the .4 addresses.
Don't forget that when recalculating using your block size, that you start at 0 (first subnet).
There are a lot more eloquent (and probably easier) explanations on the Cisco learning forum, but this is an easy way for me to remember and I hope this helps.
In short however, only worry about the subnet mask when finding your first and last addresses that you wish to summarize.