i think they have calculated by taking 110 as last subnet 210.15.131.**110**11110 -> 210.15.31.222

The Gateway to Computer Science Excellence

First time here? Checkout the FAQ!

x

+1 vote

Given IP = 210.15.131.141 and subnet mask = 255.255.255.224. Calculate the last host of last subnet?

a) 210.15.131.222

b)210.15.131.162

c)210.15.131.202

the answer given is A, but i have a doubt since this is a class C address.. and 224=11100000

we have 3 bits for subnets that is , we will have 8 subnets from 000 to 111 .. so the last subnet will be 111.

for the host id bits .. in the last octet.. we will have 11110 .. since 11111 is for DBA .. so acc to me .. the answer should be 210.15.31.254 .

where am i going wrong ? someone pls clarify it ..

a) 210.15.131.222

b)210.15.131.162

c)210.15.131.202

the answer given is A, but i have a doubt since this is a class C address.. and 224=11100000

we have 3 bits for subnets that is , we will have 8 subnets from 000 to 111 .. so the last subnet will be 111.

for the host id bits .. in the last octet.. we will have 11110 .. since 11111 is for DBA .. so acc to me .. the answer should be 210.15.31.254 .

where am i going wrong ? someone pls clarify it ..

+1

Ya, I have came across this kind of problem

Read Bikram Sir's comment in this question

It will clear everything.

https://gateoverflow.in/1265/gate2007-67-isro2016-72

Read Bikram Sir's comment in this question

It will clear everything.

https://gateoverflow.in/1265/gate2007-67-isro2016-72

0 votes

Best answer

Given Subnet Mask = 255.255.255.224

It is a class C network, so 24 MSB belongs to Network, rest 8 belongs to Host.

Subnet Mask is all 1s for subnet and network ID part. 0's for host ID part.

So we get 3 bit for subnet, Total number of subnet = 2^{3} = 8

Now comes the main part.

--

**According to RFC 950 specification, we have to subtract the subnet with all 0's and all 1s**

Therefore, last subnet's network ID will be = 210.15.131. (110 00000)

Last subnet's Directed Broadcast Address = 210.15.131. (110 11111)

Therefore, last host of last subnet = 210.15.131. (110 11110) = 210.15.131.222

--

**According to RFC 1878 specification, we DON'T have to subtract the subnet with all 0's and all 1s**

Therefore, last subnet's network ID will be = 210.15.131. (111 00000)

Last subnet's Directed Broadcast Address = 210.15.131. (111 11111)

Therefore, last host of last subnet = 210.15.131. (111 11110) = 210.15.131.254

Which standard to follow for GATE ?

The new standard, i.e. RFC 1878

- All categories
- General Aptitude 1.3k
- Engineering Mathematics 5.2k
- Digital Logic 2k
- Programming & DS 3.7k
- Algorithms 3.2k
- Theory of Computation 4k
- Compiler Design 1.6k
- Databases 3k
- CO & Architecture 2.6k
- Computer Networks 3k
- Non GATE 1k
- Others 1.3k
- Admissions 488
- Exam Queries 436
- Tier 1 Placement Questions 18
- Job Queries 56
- Projects 9

36,203 questions

43,662 answers

124,116 comments

42,945 users