0

I've been trying to wrap my head around subnetting. I'm trying to find the network, usable host range, and broad cast for 42.128.188.148 /21.

So I wrote out the numbers 128, 64, etc... and lined up my binary network and host bits. As I understand it: the /21 tells we are operating on the 3rd octet from the left. So I aligned the binary, network and host bits with the number chart 128-1. It tells me there are 8 subnetworks 248 - 255; with 248 being the Network and 255 the broadcast, first host = 248(network bits) plus the 1 (host bit) = 249.

I must not be doing this right because when I plugged the original IP address and CIDR into a subnet calculator, it says the first usable host 42.128.184.1 …? Why does the last octet go to 1? Shouldn't the 3rd octet just keep going up by 1 until you reach the broadcast?

2

Your address is 42.128.188.148 and the CIDR is /21 Your subnet mask will be 255.255.248.0. When you do an AND operation between your address and the subnet mask, you obtain 42.128.184.0 which is your network address and can't be used as a host address.

        00101010.10000000.10111100.10010100  = 42.128.188.148
  AND   11111111.11111111.11111000.00000000  = 255.255.248.0
        ____________________________________
        00101010.10000000.10111000.00000000  = 42.128.184.0

The first host will be next available address of the network: 42.128.184.1.

It tells me there are 8 subnetworks 248 - 255; with 248 being the Network and 255 the broadcast, first host = 248(network bits) plus the 1 (host bit) = 249.

You have used 5 bits in the 3rd octet and 3 are left. 2^3 = 8 subnets

Now, increment the remaining bits by 1.

00101010.10000000.10111000.00000000  = 42.128.184.0     1st network
00101010.10000000.10111001.00000000  = 42.128.185.0         .
00101010.10000000.10111010.00000000  = 42.128.186.0         .
00101010.10000000.10111011.00000000  = 42.128.187.0         .
00101010.10000000.10111100.00000000  = 42.128.188.0         .
00101010.10000000.10111101.00000000  = 42.128.189.0         .
00101010.10000000.10111110.00000000  = 42.128.190.0         .
00101010.10000000.10111111.00000000  = 42.128.191.0     8th network

All the subnet addresses, subnet masks, first hosts, last hosts, and broadcast addresses will be:

1st network: 42.128.184.0  Subnet mask: 255.255.248.0
    1st host: 42.128.184.1 last host: 42.128.184.254 Broadcast address: 42.128.184.255

2nd network:  42.128.185.0   Subnet mask: 255.255.249.0
    1st host: 42.128.185.1 last host: 42.128.185.254 Broadcast address: 42.128.185.255

3rd network:  42.128.186.0  Subnet mask: 255.255.250.0
    1st host: 42.128.186.1 last host: 42.128.186.254 Broadcast address: 42.128.186.255

4th network: 42.128.187.0  Subnet mask: 255.255.251.0
    1st host: 42.128.187.1 last host: 42.128.187.254 Broadcast address: 42.128.187.255

5th network: 42.128.188.0  Subnet mask: 255.255.252.0
    1st host:42.128.188.1 last host:42.128.188.254 Broadcast address: 42.128.188.255

6th network: 42.128.189.0  Subnet mask: 255.255.253.0
    1st host: 42.128.189.1 last host: 42.128.189.254 Broadcast address: 42.128.189.255

7th network: 42.128.190.0  Subnet mask: 255.255.254.0
    1st host: 42.128.190.1 last host: 42.128.190.254 Broadcast address: 42.128.190.255

8th network: 42.128.191.0     8th network  Subnet mask: 255.255.255.0
    1st host: 42.128.191.1 last host: 42.128.191.254 Broadcast address: 42.128.191.255

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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