EDIT: Thanks for the comments. Fixed the mistakes.
How to tell which class an IP Address belongs to?
You need to break down the first octet of the IP Address (130) into binary.
If the first octet is <128 or 0b0xxxxxxx, the IP Address belongs to Class A. Range = 1 to 126.
If the first octet is >128 and <192 or 0b10xxxxxx, the IP Address belongs to Class B. Range = 128 to 191.
If the first octet is >192 and <224 or 0b110xxxxx, the IP Address belongs to Class C. Range = 192 to 223.
and so on.
To find out if it's a host or network address - you need the Subnet Mask.
What is a Subnet Mask?
A subnet mask hides, or "masks," the network part of a system's IP address and leaves only the host part as the machine identifier. A common subnet mask for a Class C IP address is 255.255.255.0
Example:
The IP Address 130.192.0.0 is a Class B IP Address and Subnet Mask is 255.255.255.0 or /24 (24 1's - 11111111.11111111.11111111.00000000). Find the Block Size and Number of hosts on the network. Also list the Subnet ID and Broadcast Address.
Block Size = 2^(32 - number of 1's in the subnet mask) = 2^8 = 256
Two IP Addresses in a subnet are reserved - Subnet ID and Broadcast Address.
- The very first IP Address in THIS subnet (130.192.0.0) will be the subnet ID - depends on the Subnet Mask.
- Generally, the very last IP Address in the subnet (130.192.0.255) is the broadcast address (it can be configured to network admin's preference).
Maximum Number of Hosts in this subnet = 2^(32 - number of 1's in the subnet mask) - 2 = 254