The IP address is an address assigned to every computer (also includes routers and switches and other devices) on the Internet to uniquely define them. No two computers can use the same IP address. However, one computer (or device) may have several IP addresses. A simple example would be a computer that serves as a host for multiple services in which case each service may have one or more IP addresses.
Your ISP (Internet Service Provider) may have a pool of addresses which is assigned dynamically as each person logs on. This address then becomes your address while connected. Once you disconnect that address goes back into the pool. This is called dynamically assigned IP addresses. You never know what your will be until after connecting and it is quite unlikely to be the same next time you connect. In contrast when given a static IP address you have the same address always. This address is yours whether you are connected to the net or not. Of course, no one can find the IP address or the web page located on your computer unless you are connected.
The IP address consist of 32 bits often shown as 4 octets. For simplicities sake we normally use the dotted decimal approach to describe the addresses in this form 212.240.225.204. This would actually appear this way in the binary form 11010100 11110000 11100001 11001100
These addresses contains some key information. The first bits in the first octet always provides information as to what type of network the address belongs.
If the first bit is a zero (decimal this would mean the first three digits from 0-127) then we have a class A network. This makes the first 8 bits the network address and the next 24 bits host addresses
If the first two bits are 10 then we have a Class B network (decimal 128-191). This makes the first 16 bits network addresses and the next 16 bits host addresses.
If the first three bits are 110 then we have a class C network (decimal 192-223). This makes the first 24 bits network addresses and the next 8 host addresses. In the example above we can see that the first bits are 110 and furthermore the decimal notation in the first octet is 212 thus this represents an address in a class C network.
If the first for bits are 1110 we have a class D. This is used for multicasting and is not supported on NT as an example and is not used as network addresses. The decimal value would be 224-239. IF the first bits are 1111 we have a class E network decimal 240-255. These addresses are experimental and not used. Neither Class D or E network addresses can be used thus any further discussion is limited to Class A,B and C.
Some basic ground rules for IP addresses:
The first decimal set in the network address cannot be 255 ( all 1's ). This becomes broadcast.
The first decimal in a network address cannot be 0 (all zeroes). This is becomes the local host and cannot be routed.
The network address with the first decimal 127 has special meaning and cannot be used. This is called the loopback. It is reserved for internal functions.
Network address must be unique to the Internet
A host Address must be Unique within a network
All bits 1 cannot be used for a host address. This is interpreted as a broadcast rather than a host address.
All bits 0 cannot be used for a host address. This means this network only.
After looking at all of the above and including above restrictions the end result is that we have the following:
Class A : There are 126 networks each with 16,777,214 hosts addresses
Class B: There are 16384 networks each with 65534 host addresses
Class C: There are 2097152 networks each with 254 host addresses
Netmask: This is used to define what is network bits vs what is host bits and allows for subnetting. Subnetting itself is nothing more than using some of the host bits for network addresses thus adding networks but reducing the available hosts addresses for the network.
Class of Network A B C
Net mask 255.0.0.0 255.255.0.0 255.255.255.0
The word mask derives from the fact that when applying this number to an IP address it masks out all bits for which the netmask is 1 as a network address leaving the rest as host addresses. This is quite important to understand when starting to look at subnetting. Since 255 has 8 bits all 1s then the above states that for a class A network the first 8 bits represents the network address (in reality 7 since the first bit in a Class A always have to be a Zero). Similar for a class B the first 16 bits (really 14 because the first two is fixed at 10) are masked as Network addresses because with a netmask of 255.255.0.0 the first 16 bits are 1s. Similarly for a class C network the first 24 bits (really 21 because the first three bits must be 110) are masked as network address because the netmask is 255.255.255.0 which means the first 24 bit in the netmask is 1.
The netmask is not really required to determine whether it is a Class A , B or C address since the status of the first 3 bits will define this. However, the NT as an example requires a netmask for all IP addresses. When starting to subnet, the MASK are required to define the network.
NOTE: When thinking about networking remember that the system is set up to look for any IP address on the the same network (or subnet) as being local (does not have to be physically local but must reside on the same network). All packages destined for other addresses needs to be sent through a Gateway <router> and be resolved through some means as to how to reach them. There are several ways this may be done and it varies with the size of the network and also geographical expansion.
NOTE: If you make your own network, remember IP addresses are assigned by Internic (USA) and needs to be unique. The best place to obtain a subnet or a class C network is through your Internet Service Provider (or a subnet maybe- but if using an NT as a multihomed computer to provide routing from your internal network to the Internet then the IP address used for routing to the Internet must be on a different (sub)network from your internal (sub)network) . That way you can get some guarantees that the addresses you are getting is routable. If you really want to just pick some (OK for internal only networks) why not use the ones assigned for that:
The Internet Assigned Numbers Authority (IANA) has reserved the following three address blocks of IP space for private Internet. These are not routable on the Internet. However, if used on an internal network these internal computers will be able to access Internet resources VIA mediating Gateways such as proxy servers.
For information on CIDR - Classless Internet Domain Routing
See RFC 1918 for more information or try my page on CIDR link below.
Reserved space:
10.0.0.0 to 10.255.255.255
172.16.0.0 to 172.31.255.255
192.168.0.0 to 192.168.255.255
Copyrighted All rights reserved
Last revised: June 07, 1999.