January 29th, 2012, 09:02 AM
Netid and hostid of any given IP address?
I am trying to understand how to figure out the Netid and Hostid of any given IP address (manually that is without using CMD).
I know that it has a lot to do with the class that the IP address belongs to. For example, if leftmost bit of the first octet starts with a 0, it belongs to class A.
That is where I get stuck, once I determine what class an IP address belongs to, I am unable to identify which portion of the address is dedicated to the network and the host.
Thank in advance for any help.
January 29th, 2012, 10:23 AM
To do it by hand you need to know the table:
It's not necessary to memorize the entire table, because it's not hard to figure it out on the fly and there are plenty of patterns. When you need to remember is how to identify the class of the address and the size of each class.
So if you have an address that starts with 110 you need to recognize that it's a class C address and a class C address has 24 bits in the network part of the address (including the 110). Since all addresses have 32 bits, the last 8 bits of the address must be the host part.
Wikipedia also has multiple examples like this one:
192. 0. 0. 0 = 11000000.00000000.00000000.00000000
126.96.36.199 = 11011111.11111111.11111111.11111111
January 29th, 2012, 10:33 AM
So, for example if the IP address was 188.8.131.52.
That would mean the IP address belongs to the B class since the leftmost octet starts with 10, and Class B addresses have 16 host and network bits, right?
So....class C always has 24 network bits, class B addresses always have 16 network bits, and class A always has 8 network bits? and the remaining bits are dedicated to the host?
I appreciate your help I think I get it now!