Computer Science - Networking - Discussion
Discussion Forum : Networking - Section 1 (Q.No. 42)
42.
With an IP address of 100, you currently have 80 subnets. What subnet mask should you use to maximize the number of available hosts?
Discussion:
18 comments Page 1 of 2.
Anirban Roy Mukherjee said:
6 years ago
So it's a network of 100.
That is 100.X.X.X, then subnet mask must be 255.X.X.X..
It cannot change the first octet that's given fixed. Now we need to create 80 subnets. 2^6 < 80 < 2^7 and we need to borrow 7 bits to create 2^7 that is 128 subnets. Since 100 is a class A network. Some ppl will say to borrow bits from 1st octet but then, in that case, it's supernetting, and it is often used in route summarization. Default mask of class A is 255.0.0.0 so if we borrow from host part our job is done, we cannot supernet 100.X.X.X as it will change subnet bits of 100 and it will change. So final subnet mask must be 255.254.0.0...
And why are you guys subtracting 2 from subnet mask because of network id and broadcast id. These are supposed to be subtracted from each subnet. Like, in this case, we got 2^17 hosts per subnet.. from them 2 addresses are reserved for this purpose for each subnet. So no of the host is 2 per subnet is (2^17)-2. And no of the subnet is 128.
According to me, it's 255.254.0.0.
That is 100.X.X.X, then subnet mask must be 255.X.X.X..
It cannot change the first octet that's given fixed. Now we need to create 80 subnets. 2^6 < 80 < 2^7 and we need to borrow 7 bits to create 2^7 that is 128 subnets. Since 100 is a class A network. Some ppl will say to borrow bits from 1st octet but then, in that case, it's supernetting, and it is often used in route summarization. Default mask of class A is 255.0.0.0 so if we borrow from host part our job is done, we cannot supernet 100.X.X.X as it will change subnet bits of 100 and it will change. So final subnet mask must be 255.254.0.0...
And why are you guys subtracting 2 from subnet mask because of network id and broadcast id. These are supposed to be subtracted from each subnet. Like, in this case, we got 2^17 hosts per subnet.. from them 2 addresses are reserved for this purpose for each subnet. So no of the host is 2 per subnet is (2^17)-2. And no of the subnet is 128.
According to me, it's 255.254.0.0.
Nikhita said:
7 years ago
just follow these steps:
1. Determine class
2. Convert subnet mask into binary
3.Draw great divide
4. Count by the power of 2.
Example in this case we have given ip address 100 .as this belongs to class A ..so we can represent it like this 255.0.0.0...now convert it into binary notation like 11111111.00000000.00000000.00000000.
Now we were given a number of subnets which is 80 ..as we know in subnetting we always borrow bits from the host portion of the address. Every bit that u borrow from host position of address have combination like if u borrow 1 bit it has two combinations like (0,1) and if u borrow 2 bits it has 4 combinations like (00,01,10,11) and so on ..choose the bits which are closer or greater than 80..so now we can represent it as 11111111.1111111/0 .00000000.00000000.
Now if you count it by the power of 2 it will be 254..but they are asking " What subnet mask should you use to maximize the number of available hosts?". so in this case in order to maximize the host we have to cut down on subnet bits which have been borrowed i.e "7" so we will take our one bit back i.e 2 now just deduct this value from calculated value i.e 254-2=252.
1. Determine class
2. Convert subnet mask into binary
3.Draw great divide
4. Count by the power of 2.
Example in this case we have given ip address 100 .as this belongs to class A ..so we can represent it like this 255.0.0.0...now convert it into binary notation like 11111111.00000000.00000000.00000000.
Now we were given a number of subnets which is 80 ..as we know in subnetting we always borrow bits from the host portion of the address. Every bit that u borrow from host position of address have combination like if u borrow 1 bit it has two combinations like (0,1) and if u borrow 2 bits it has 4 combinations like (00,01,10,11) and so on ..choose the bits which are closer or greater than 80..so now we can represent it as 11111111.1111111/0 .00000000.00000000.
Now if you count it by the power of 2 it will be 254..but they are asking " What subnet mask should you use to maximize the number of available hosts?". so in this case in order to maximize the host we have to cut down on subnet bits which have been borrowed i.e "7" so we will take our one bit back i.e 2 now just deduct this value from calculated value i.e 254-2=252.
(1)
Ruby Sharma said:
7 years ago
For 80 subnet.
=>2^n-2>=80.
Therefore n=7 as 2^7-2>=80.
=>covert 7bit(00000000) from left to right 0's into 1's.
Now it will be 11111110.
Its Decimal equivalent is 254.
=>2 address is reserved for subnet address and broadcasting address.
Therefore 254-2 = 252.
=>2^n-2>=80.
Therefore n=7 as 2^7-2>=80.
=>covert 7bit(00000000) from left to right 0's into 1's.
Now it will be 11111110.
Its Decimal equivalent is 254.
=>2 address is reserved for subnet address and broadcasting address.
Therefore 254-2 = 252.
(2)
Rubysharma said:
7 years ago
We know masking means to cover and usually written for ip like this (255.255.255.X) , here 255 masks all 3 first Decimal digit. Now ip 100 is given so it will now be written as (255.255.255.100). Now it's Binary equivalent is (11111111.11111111.11111111.01100100).
Now we know for masking we use continuous 1's or 0's to cover IP number (like 255 for any first three digits of ip address), so we rewrite above Binary number as (11111111.11111111.11111111.11111100) {here 01100100 is covered/masked by 11111100}
Now Decimal equivalent of it is (255.255.255.252).
So, 252 mask the IP 100.
Now we know for masking we use continuous 1's or 0's to cover IP number (like 255 for any first three digits of ip address), so we rewrite above Binary number as (11111111.11111111.11111111.11111100) {here 01100100 is covered/masked by 11111100}
Now Decimal equivalent of it is (255.255.255.252).
So, 252 mask the IP 100.
Ankit Jaiswal said:
7 years ago
In order to have 80 subnets we need 7 additional bits, and in that case, the subnet mask would be 255.254.0.0.
But if it is " Classless addressing", then we can count the 7 bits required for 80 subnets starting from the LSB of the first octave and in that case, the required subnet mask would be 255.252.0.0.
But if it is " Classless addressing", then we can count the 7 bits required for 80 subnets starting from the LSB of the first octave and in that case, the required subnet mask would be 255.252.0.0.
Shewangizaw Bogale said:
9 years ago
That the subnet mask should be 254.
Subhash.B said:
9 years ago
See here total no of IP address is 100 * 80 =8 000 but this is not in power of 2 so nearest will be 8192 = 2 pow 13.
Now we can consider all the subnet as a single subnet having at max IP address 8192.
So to have this much IP address we need 13 bit in total so it will go in 2nd octate of address from right.
So the subnet mask must be (255.255.224.0) = (11111111.11111111.11100000.00000000).
Now we can consider all the subnet as a single subnet having at max IP address 8192.
So to have this much IP address we need 13 bit in total so it will go in 2nd octate of address from right.
So the subnet mask must be (255.255.224.0) = (11111111.11111111.11100000.00000000).
Shiva said:
9 years ago
As some of the users have pointed out that subnet mask should be 255.254.0.0.
I also think the answer should be same.
I also think the answer should be same.
Raj said:
10 years ago
Hi @Dipanjan.
Can you please explain it more clearly about classless addressing?
Can you please explain it more clearly about classless addressing?
DIPANJAN said:
10 years ago
What is meant by an IP Address of 100?
Does it means The IP Address is 100.0.0.0?
And if it is so, then in order to have 80 subnets we need 7 additional bits, and in that case the subnet mask would be 255.254.0.0.
But if it is CLASS LESS addressing, then we can count the 7 bits required for 80 subnets starting from the LSB of the first octave and in that case the required subnet mask would be 255.252.0.0.
Does it means The IP Address is 100.0.0.0?
And if it is so, then in order to have 80 subnets we need 7 additional bits, and in that case the subnet mask would be 255.254.0.0.
But if it is CLASS LESS addressing, then we can count the 7 bits required for 80 subnets starting from the LSB of the first octave and in that case the required subnet mask would be 255.252.0.0.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers