Categories
Welcome Center
Education & Development
Discussions
Certification Preparation
Recent Posts
Groups
Free Resources
Ebooks
Free Workshops
Trending Certifications Infographic
Infosec Training
IT & Security Training
Live Boot Camps
Security Awareness Training
About Infosec Institute
Home
Certification Preparation
Cisco
CCST & CCNA (Entry-level & Associate)
Finding the network address of a random class B IP address
Cat5
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.
Find more posts tagged with
Save $250 on 2025 certification boot camps from Infosec!
Book now with code EOY2025
Button
Comments
leonlimsg
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
iwannaknowIT
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
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Best Of
INFOSEC Boot Camps
$250
OFF
Use code
EOY2025
to receive $250 off your 2025 certification boot camp!
BROWSE BOOT CAMPS