Hosts and networks
IP addressing is based on the concept of hosts and networks. A host is essentially anything on the network that is capable of receiving and transmitting IP packets on the network, such as a workstation or a router. It is not to be confused with a server: servers and client workstations are all IP hosts.The hosts are connected together by one or more networks. The IP address of any host consists of its network address plus its own host address on the network. IP addressing, unlike, say, IPX addressing, uses one address containing both network and host address. How much of the address is used for the network portion and how much for the host portion varies from network to network.
An IP address is 32 bits wide, and as discussed, it is composed of two parts: the network number, and the host number [1, 2, 3]. By convention, it is expressed as four decimal numbers separated by periods, such as “184.108.40.206” representing the decimal value of each of the four bytes. Valid addresses thus range from 0.0.0.0 to 255.255.255.255, a total of about 4.3 billion addresses. The first few bits of the address indicate the Class that the address belongs to:
|Class||Prefix||Network Number||Host Number|
|A||0||Bits 0-7||Bits 8-31|
|B||10||Bits 1-15||Bits 16-31|
|C||110||Bits 2-24||Bits 25-31|
The bits are labeled in network order, so that the first bit is bit 0 and the last is bit 31, reading from left to right. Class D addresses are multicast, and Class E are reserved. The range of network numbers and host numbers may then be derived:
|Class||Range of Net Numbers||Range of Host Numbers|
|A||0 to 126||0.0.1 to 255.255.254|
|B||128.0 to 191.255||0.1 to 255.254|
|C||192.0.0 to 254.255.255||1 to 254|
Any address starting with 127 is a loop back address and should never be used for addressing outside the host. A host number of all binary 1’s indicates a directed broadcast over the specific network. For example, 220.127.116.11 would indicate a broadcast over the 200.1.2 network. If the host number is 0, it indicates “this host”. If the network number is 0, it indicates “this network” . All the reserved bits and reserved addresses severely reduce the available IP addresses from the 4.3 billion theoretical maximum. Most users connected to the Internet will be assigned addresses within Class C, as space is becoming very limited. This is the primary reason for the development of IPv6, which will have 128 bits of address space.