-2

I have couple of questions related to IP addressing.

The public IP for a company is 190.28.0.0. 

a)This is a class B address, right? CIDR value is /16?

b)If the company wants to have 8 subnets, how do I find the subnet mask?

c)What is the maximum number of hosts?

d)What are the IP ranges for the 8 subnets?
Peter
  • 406
  • 3
  • 16
RinW
  • 111
  • 3
  • 1
    The internet is classless. You cannot tell the size of a subnet given only an address. – Ricky Jul 09 '15 at 06:42

1 Answers1

1

In classful networks the class is determined by the leading four bits in the ip-address. B-networks start with 10 (binary). So, in fact 190.28.0.0 is a Class B network. https://en.wikipedia.org/wiki/Classful_network

When it comes to CIDR you can say nothing about the size of a network from just 190.28.0.0. But 190.28.0.0/16 tells me there is 16 bits in the network part of the address and the remaining 16 are host bits.

Since ip-address calculations are performed in binary, to find a netmask that will divide a /16 into 8 subnets you do the calculation 2^x = 8 (looking for how many digits you need in a binary number to have 8 combinations) which is 3. So, a /16 can be divided into 8 /19.

000
001
010
011
100
101
110
111

If you divide your network into eight /19 you have 32-19 bits remaining for hosts. To find the number of hosts you calculate 2^(32-19) = 8192. But remember that the first and the last address are reserved for network and broadcast-addresses. That gives you 8190 usable IP-addresses.

To find the ranges you set the host part of the address to all zeros to find the network address (first address) and to all ones to find the broadcast address (last address)

Edit (Working example)

The ip 190.28.0.0 is 10111110.00011100.00000000.00000000 in binary.

Let say i choose the subnet 010 to get a /19 network.

This gives me the network address 10111110.00011100.01000000.00000000 which translates to 190.28.64.0.

To find the broadcast address of the same network we set all remaining bits to 1: 10111110.00011100.01011111.11111111 which translates to 190.28.95.255

You can then do the same calculations for all eight subnets i mentioned above.

Peter
  • 406
  • 3
  • 16
  • Hello Peter, I'm sorry if I confused you but in the question a) I asked of the CIDR value is 16 since the last two octets are 0, not that the CIDR is /16. – RinW Jul 09 '15 at 05:48
  • 1
    No, those two are not connected. You can have a network called 190.28.0.0/24 – Peter Jul 09 '15 at 06:27