Options
Finding the network address of a random class B IP address
![Cat5](https://us.v-cdn.net/6030959/uploads/userpics/navatar296493_1.gif)
in CCNA & CCENT
If I get a test question asking for the network address of a random IP that's a class B address, what's an easy way to get this? I have no problem with class C, but it's been a while since I've done class Bs.
Let me rephrase - I'm given a class B IP and told to give the network address for it.
Let me rephrase - I'm given a class B IP and told to give the network address for it.
Comments
-
Options
leonlimsg Member Posts: 10 ■□□□□□□□□□
Compare that given address with its subnet mask in binary format. For example, you are given 172.16.128.1 and subnet mask is 255.255.224.0 or /19.
Convert to binary format:
172.16.128.1 -> 1010 1100.0001 0000.1000 0000.0000 0001
255.255.224.0 ->1111 1111.1111 1111.1110 0000.0000 0000
Compare the binary. Perform AND operation.
1010 1100.0001 0000.1000 0000.0000 0001
1111 1111.1111 1111.1110 0000.0000 0000
1010 1100.0001 0000.1000 0000.0000 0000
Covert back to number
1010 1100.0001 0000.1000 0000.0000 0000 -> 172.16.128.0
Hence the network address for 172.16.128.1/19 is 172.16.128.0 -
Options
iwannaknowIT Member Posts: 111
Find the interesting octet in the mask
e.g. 255.255.224.0
3rd octet is the one of interest and there are 3 binary 1's borrowed from the total 16 remaining binary 0's
128-64-32-16-8-4-2-1
1 - 1 - 1 0-0-0-0-0
Each subnet provides a total of 30 USABLE addresses,with network subnets being 0-32-64-96-128-160-192-224
So e.g. 172.32.55.7 netmask 255.255.224.0 would fall in the 172.32.32.0 subnet..............
Disregard the poor spacing in the binary 1's and 0's placement