Networking - Subnetting - Discussion

Discussion Forum : Subnetting - Subnetting (Q.No. 16)
16.
If a host on a network has the address 172.16.45.14/30, what is the subnetwork this host belongs to?
172.16.45.0
172.16.45.4
172.16.45.8
172.16.45.12
Answer: Option
Explanation:
A /30, regardless of the class of address, has a 252 in the fourth octet. This means we have a block size of 4 and our subnets are 0, 4, 8, 12, 16, etc. Address 14 is obviously in the 12 subnet.
Discussion:
5 comments Page 1 of 1.

Haseeb said:   6 years ago
If I have /30 pool of ip address in that total 4 IP's are present. Then, 1 IP for wan, 2nd for gateway, 3rd and 4th for use.

It's right or wrong? Please explain this.
(1)

Hina ayoub said:   4 years ago
First to convert network address and given CIDR into binary.

Network address :172.16.45.14=10101100.00010000.00101101.00001110.

CIDR:30 = 255.255.255.252 = 11111111.11111111.11111111.1100.

Now perform bit wise AND operation ( 1+1=1,1+0 or 0+1=0,0+0=0).

10101100.00010000.00101101.00001100= 172.16.45.12.

So, option (D) is correct.
(1)

Chandra said:   10 years ago
Explain clearly.

KnownStranger said:   9 years ago
@Chandra.

It is has a CIDR value=30 and also class C subnet in B. For class C CIDR will be 24, so 30-24=6 and the mask will be.

255.255.255.252 (1111 1100 (6 1's is from 30-24=6 so 6 1's)).

So the change in fourth octet and the increment will be 256-252=4. So 0 4 8 12 16.

So the range will be,

172.16.45.0 172.16.45.3.

172.16.45.4 172.16.45.7.

172.16.45.8 172.16.45.11.

172.16.45.12 172.16.45.15. Goes on.

Now see the question it is 172.16.45.14 so it falls in 172.16.45.12 to 172.16.45.15 subnet.

Manu Ratheesh said:   9 years ago
Given IP address is 172.16.45.14/30 => NID is 30 bits and HID is last 2 bits.

Subnet mask = 255.255.255.252 (Subnet Mask is obtained by replacing all NID bits by 1 and all HID bits by 0).

In order to get the subnetwork address or network address or subnet id, you just perform the bit wise AND between the subnet mask and the IP address, i.e, (255.255.255.252) AND (172.16.45.14) = 172.16.45.12. Option (D).

Post your comments here:

Your comments will be displayed after verification.