0

I'm new to networks and I was watching this video on Cybrary on Subnetting. The example h explained goes like this:

Q. Subnetting 192.168.1.10/27 with subnet mask 255.255.255.0

  1. He said 24 bits are for network address and 8 for the host (understood)
  2. He said that he'll be using 3 bits (the 3 most significant bits out of 8 bits of host address) and he used this formula : 2n which is equal to the number of subnets (he put n = 3)
  3. He said that 5 bits are unused and he used: 2n - 2 (plugged n = 5) which is equal to the number of hosts in each subnet.
  4. In the end he had 8 subnets each having 30 hosts which makes a total of 240 IP addresses + 8 broadcast + 8 network

I lost him after point 1. I didn't really understand why he said he'll be using 3 bits. Is it because the network is subnetted by a number (27) more than 16 and less than 32? So if it was subnetted by 50 he would have used the 2 most significant bits and left 6 unused bits? I would then have 4 subnets each having 62 hosts making a total of 248 IP addresses + 4 network + 4 broadcast.

Am I correct in the way I understood this?

0

1 Answer 1

0

The answer is in the question.

You provided 192.168.1.10/27. This is a Class C subnet, because the first octet (192) falls in the range of 192-223.

A Class C subnet has a default mask of /24, or 255.255.255.0. In Binary, the first 24 bits are 1, the last 8 bits are 0.

Since the original question used a /27 on a CLass C address, that means 3 bits were borrowed from the CLass C default mask (/24) to get to /27. That is where he "got" the 3 borrowed bits.

The "3 bits" are arbitrary. Had his original question included the address 192.168.1.10/28, then he would be borrowing 4 bits. Had he chosen 192.168.1.10/29, then he would be borrowing 5 bits.

Had he chosen the address 130.168.1.10/27, then he would be borrowing 11 bits. Because this is a Class B address, with a default mask of /16, and to get from /16 to /27 requires 11 bits.


That said, I highly recommend reading the thread linked by @Ron Maupin for more detail on the process of Subnetting.

Also, the concept of "classes" in IP address is archaic. No one in the real world uses them anymore. It only persists because of Cisco's insistence of leaving it in all its training and certification material.

3
  • Thanks a lot! Yes the thread referred to by @Ron Maupin helped too. Commented May 23, 2016 at 16:37
  • I had one more doubt. The number of subnets that a network can support comes from the host bits that are borrowed yes? So if I borrow n bits from the host address I can have 2^n subnets? Commented May 23, 2016 at 16:38
  • @NikhilHegde Yes. This is how binary works. Think of it like this, if you only borrow one bit, that one bit can only ever be a 1 or a 0 (total of two -- 2^1 = 2). If you borrow two bits, that two bits can only ever be: 00 01 10 11 (total of 4 -- 2^2 = 4). If you borrow three bits: 000 001 010 011 100 101 110 111 (total of 8 -- 2^3 = 8), on so on.
    – Eddie
    Commented May 23, 2016 at 16:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.