[back]

[home]

[next]

IPv4 Addresses

Recall that an IPv4 address is a unique number assigned to a host on a network. IPv4 addresses are 32 bits, divided into four 8-bit fields. Each 8-bit field, or octet, is represented by a decimal number between 0 and 255, separated by periods. For example, 129.148.135.151.

Each IPv4 address identifies a network and a unique host on that network. The value of the first field determines which portion of the IPv4 address is the network number and which portion is the host number. The network numbers are divided into four classes : Class A, Class B, Class C and Class D.

Class A - Very Large Networks (up to 16 Million Hosts)

If the first bit is 0, then the next seven bits are the network number and the remaining 24 bits are the host number. This allows up to 127 Class A networks.

A value of 127 in the first field is reserverd and called the loopback. A loopback refers to an interface that allows a host to send packages to itself. The loopback address in the STinG environment (almost in every environment) is 127.0.0.1.
[IPv4 Class A]

Class B - Large Networks (up to 65.000 Hosts)

If the first 2 bits are 10, then the next 14 bits are the network number and the remaining 16 bits are the host number. This allows 16.384 Class B networs.
[IPv4 Class B]

Class C - Small and Mid-Sized Networks (up to 254 Hosts)

If the first 3 bits are 110, then the next 21 bits are the network number and the remaining 8 bits are the host number. This allows up to 2.097.125 Class C networks.
[IPv4 Class C]

Class D - Multicast Address

If the first 4 bits are 1110, which makes the first field an integer value between 224 and 239, the address is a multicast address. The remaining 28 bits comprise a group identification number for a specific multicast group. An IPv4 multicast address is a destination address for one or more hosts, while a Class A, B or C address specifies the address for an individual host.
[IPv4 Class D]
Note : For a more thorough treatment of Internet Numbering, see RFC #1166.