Configuration / project engineering
5.2 Assignment of an IP address
SCALANCE W786-xPRO
Operating Instructions, Release 08/2007, C79000-G8976-C221-02
65
5.2
Assignment of an IP address
5.2.1
Structure of an IP address
Address classes to RFC 1518 and RFC 1519
IP address range
Max. number of networks
Max. number of
hosts/network
Class CIDR
1.x.x.x through 126.x.x.x 126
16777214
A
/8
128.0.x.x through 191.255.x.x 16383
65534
B
/16
192.0.0.x through 223.255.255.x 2097151
254
C
/24
Multicast groups
D
Reserved for experiments
E
An IP address consists of 4 bytes. Each byte is represented in decimal, with a dot separating
it from the previous one. This results in the following structure, where XXX stands for a
number between 0 and 255:
XXX.XXX.XXX.XXX
The IP address is made up of two parts, the network ID and the host ID. This allows different
subnets to be created. Depending on the bytes of the IP address used as the network ID and
those used for the host ID, the IP address can be assigned to a specific address class:
Subnet mask
The bits of the host ID can be used to create subnets. The leading bits represent the address
of the subnet and the remaining bits the address of the host in the subnet.
A subnet is defined by the subnet mask. The structure of the subnet mask corresponds to
that of an IP address. If a "1" is used at a bit position in the subnet mask, the bit belongs to
the corresponding position in the IP address of the subnet address, otherwise to the address
of the computer.
Example of a class B network:
The standard subnet address for class B networks is 255.255.0.0; in other words, the last
two bytes are available for defining a subnet. If 16 subnets must be defined, the 3rd byte of
the subnet address must be set to 11110000 (binary notation). In this case, this results in the
subnet mask 255.255.240.0.
To find out whether two IP addresses belong to the same subnet, the two IP addresses and
the subnet mask are ANDed bit by bit. If both logic operations have the save result, both IP
addresses belong to the same subnet, for example, 141.120.246.210 and 141.120.252.108.
Outside the local area network, the distinction between network ID and host ID is of no
significance, in this case packets are delivered based on the entire IP address.
Note
In the bit representation of the subnet mask, the "ones" must be set left-justified (there must
be no "zeros" between the "ones").