Networking - Subnetting - Discussion

Discussion :: Subnetting - Subnetting (Q.No.1)

1. 

Your router has the following IP address on Ethernet0: 172.16.2.1/23. Which of the following can be valid host IDs on the LAN interface attached to the router?

  1. 172.16.1.100
  2. 172.16.1.198
  3. 172.16.2.255
  4. 172.16.3.0

[A]. 1 only
[B]. 2 and 3 only
[C]. 3 and 4 only
[D]. None of the above

Answer: Option C

Explanation:

The router's IP address on the E0 interface is 172.16.2.1/23, which is 255.255.254.0. This makes the third octet a block size of 2. The router's interface is in the 2.0 subnet, and the broadcast address is 3.255 because the next subnet is 4.0. The valid host range is 2.1 through 3.254. The router is using the first valid host address in the range.

Salim said: (Dec 11, 2012)  
How many network will divide by this subnet mask ?

How you know the number of host to each subnet will be from 2.1 to 3.254 ?

Muhammad Rahman said: (Apr 2, 2013)  
If the range is like
.
.
172.16.2.253
172.16.2.254
172.16.2.255
172.16.3.0
172.16.3.1
172.16.3.2
.
.
How come 172.16.3.0 is not a valid address ?

Vikash_Jaiswal said: (May 16, 2013)  
As given, router's IP address as 172.16.2.1/23 ;

it means last 9 bits (32-23) of binary form of 172.16.2.1 are responsible for deciding host ID.

When you make those last 9 bits 0 then u will get address as
172.16.2.0 and when you make those last 9 bits as 1 then you will get address as 172.16.3.255 ;

But 172.16.2.0 is used for network-ID (as 0 in last) and
172.16.3.255 is used for host-ID (as 255 in last).

So, rest of IPs will be vallid IPs for hosts.

Adhie said: (Jun 21, 2013)  
the option C is broadcast address and the others is host address.
that given address is class B (from 1st octet 172).

So here is sub network addr:

172.16.0.0
172.16.2.0
...
172.16.254.0

Rajesh Badariya said: (Aug 28, 2013)  
But as we always say that first and last ip is for networkk and host id than here why we are not considering 172.16.2.255 and 172.16.3.0.

Please tell since this network is divided into two bock then how?

Aswathy said: (Apr 2, 2014)  
I think the valid host IDs are between 172.16.0.1 to 172.16.1.254.

And broadcast address is 172.16.1.255.

Aishwarya Mishra said: (Jul 26, 2014)  
The valid host id is from 172.16.2.0 to 172.16.3.254 [excluding 172.16.2.1(as this is itself routers id)].

And the broadcast add is 172.16.3.255 [here we are making all the last nine bits as 1.].

Santhosh said: (Jul 27, 2014)  
The valid host id is from 172.16.2.0 to 172.16.3.254 [excluding 172.16.2.1(as this is itself routers id)].

And the broadcast add is 172.16.3.255.

Varun Tyagi said: (Mar 6, 2015)  
2 is the block size.

So 0, 2, 4, 6 is N.ID.

0.1, 0.2, 0.3 to 1.254 are host.

Similarly.

2.1, 2.2, 2.3, 2.4 to 2.254, 2.255, 3.1, 3.2 to 3.254 are host.

But 3.255 are B.id and 4.0 n.id.

Gabe said: (Apr 25, 2015)  
Don't know if it helps but 172.16.1.100 and 172.16.1.198 are kinda off from the default gateway 172.16.2.1/23 notice that to there?

Felix said: (May 9, 2015)  
The valid host range will be (172.16,2.1-172.16.3.254).

The network address : 172.16.2.0.

The broadcast address: 172,16.3.255.

The network 172.16.2.0 will ends 172.16.2.55 then it will become 172.16.3.0 which is still on the range of the network.

Davit said: (Jun 5, 2015)  
00000000.00000000.0000000|0.00000000.
76543210.76543210.7654321|0.76543210.
1.255.

IP starts from 2.1 and ends with 3.254. So we can't use these numbers. It means we can use 172.16.2.1 - 172.16.3.254. I think so:x.

Neeraj said: (Nov 27, 2015)  
172.16.2.0 NID.
172.16.2.1 FIRST VALID HOST.
172.16.2.255.
172.16.3.1.
172.16.3.255.
172.16.4.1.
172.16.4.254 LAST VALID HOST.
172.16.4.255 BROAD CAST.

172.16.3.0 it's not a valid address.

Between in these option valid address is 172.16.2.255

Akira said: (Feb 1, 2016)  
Can you please explain this from the scratch?

Nikhil said: (Feb 29, 2016)  
How did we get the subnet mask as 255.255.254.0?

Nirmal said: (May 9, 2016)  
@Nikhil.

Because 7 bits are opened in the third octet.

Jot Singh said: (Jul 26, 2016)  
Guys What I think is.

Block size is 2(256-254:FROM LAST NON-ZERO OCTET IN SUBNET MASK).
So the subnets would be divided by a factor of 2.

Starting from
172.16.0.0-172.16.1.255(including a network address and broadcast address).

As we are considering E0 starting from _._.2.1.

The subnet it comes under is as 127.16.2.0(being n/w id) and the flow is as follows:
172.16.2.0 NID.
172.16.2.1 FIRST VALID HOST.
172.16.2.255.
172.16.3.0 *VALID ADDRESS(as it is not a n/w id).
172.16.3.1.
172.16.3.254 LAST VALID HOST.
172.16.3.255. BROAD CAST.

According to which it should be none of these networks.
Hope it will help you.

Akshay said: (Aug 18, 2016)  
How you guys calculate? The router's IP address on the E0 interface is 172.16.2.1/23, which is 255.255.254.0. How? Please tell me. I am new in subnets.

Anish said: (Sep 5, 2016)  
23 is a prefix length. So IPV4 has 32 bit of address.

32 - 23 = 9. Now IP address of ethernet 0 is 172.62.2.1/23.

If we want to find out first address than we have to set 9 (32 - 23 = 9) rightmost bit as zero.

10101100.00111110.00000010.00000000 = 172.62.2.1.

So, the first address is 172.62.2.1.

last address -> put 9 rightmost bit as 1.

10101100.00111110.00000011.11111111 = 172.62.3.255.

So the range = 172.62.2.1 to 172.62.3.255.

Shipukangra@Gmail.Com said: (Sep 10, 2016)  
How can be 172.168.3.0 is a host id? It is a network id.

Shahnas said: (Sep 28, 2016)  
What means of /23?

Can we take it as subnet mask? and why we want to calculate 32-23=9?

Guys! can you tell me the in IP address and subnet mask of this?

Datta Ikhe said: (Nov 24, 2016)  
Answer C is correct because;

Given IP- 172.16.2.1/23.
First IP used as Network Id: 172.16.00000010.00000000(172.16.2.0).
First Valid Host IP: 172.16.00000011.00000000(172.16.3.0).
Broadcast IP: 172.16.3.255 & NOT 172.16.2.255.

So, 172.16.2.255 is a valid Host IP.

Sundha said: (Nov 30, 2016)  
How it is. Can you explain me clearly?

Kapil said: (Dec 5, 2016)  
Can any one help me to understand subnetting?

Ansar said: (Mar 29, 2017)  
According to me, the answer will be 172.16.2.255.

Basir said: (Apr 8, 2017)  
I'm not getting this. Please anyone help it to me.

Chandni said: (Nov 7, 2017)  
Thanks for sharing this Subnetting problem, I was looking for idea for solving these kind of problems. Finally I got it.

Jaanu said: (Dec 4, 2017)  
First host - 172.16.2.1
Last host - 172.16.255.254
Valid range - 172.16.2.1 - 172.16.255.254
Broad cast - 172.16.255.255.

Is this calculate in correct? Can anyone tell me?

Waseem said: (Dec 5, 2017)  
(Q).Given ip 172.16.2.1/23

(A). by default the given IP is class B(N.N.H.H), slash notation for Class B is /16 but from given it is /23, so the converted network bits are 7 (23-16).
formula for subnets is 2^n (note:- it indicates how many parts we need to divide a N/w)

Here n represents no. of converted N/w bits
n=7
from formula 2^7=128
Formula for Hosts is 2^h-2 (note:- it indicates how many IP's consists in a N/w)

Here h represents no. of host bits
-2 represents (one is N/W IP and another one is Broadcast IP, we can't use
these 2 IP's these are default)
h=32-23
=9
from formula 2^h
2^9=512
The given IP is defaultly class B(N.N.H.H) we should vary Host bits only,N/W bits are constant in every N/W.

So the range starts from 172.16.0.0.
As we got hosts from hosts formula we should divide our N/W with 512 hosts
so the range is as bellow
(1st subnet). 172.16.0.0 to 172.16.1.255
(2nd subnet). 172.16.2.0 to 172.16.3.255
(3rd subnet). 172.16.4.0 to 172.16.5.255

From given

The given ip 172.16.2.1 belongs to 2nd subnet range, we should neglect 1st and last IP's in this range those are 172.16.2.0 and 172.16.3.255(N/W ID and Broad cast ID).

Finally the valid IP's are 172.16.2.1 to 172.16.3.254
From given option's only option C belongs to above range.. So answer is 'C'.

Sunil said: (May 6, 2018)  
Thanks for the explanation @Vikash_Jaiswal.

Mohamad Fazil M said: (May 12, 2020)  
Your router has the address 172.16.2.1/23 on the ethernet interface which IP address can be assigned to a host connected to the ethernet interface of the router and what will be that host default gateway.

Babu said: (Aug 14, 2020)  
@All.

We have to understand host range is 1 to 254,0 and 255 is network & broadcast ID REMEMBER Only first and last bits Network & Broadcast ID.

So 172.16.2.1 to 172.16.2.255 then next change 172.16.3.0 to 172.16.3.255 Because we have 2^9-2=510 hosts.

That's why 3.254 is valid one So 2.55 is not Broadcast ID.

I hope you will understand.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.