ETHERNET • 275
Network communication
Modular I/O System
ETHERNET TCP/IP
Subnet mask
A subnet mask was introduced to encode the subnets in the Internet. This in-
volves a bit mask, which is used to mask out or select specific bits of the IP
address. The mask defines the subscriber ID bits used for subnet coding, which
denote the ID of the subscriber. The entire IP address range theoretically lies
between 0.0.0.0 and 255.255.255.255. Each 0 and 255 from the IP address
range are reserved for the subnet mask.
The standard masks depending upon the respective network class are as fol-
lows:
•
Class A Subnet mask:
255
.0
.0
.0
•
Class B Subnet mask:
255
.255
.0
.0
•
Class C Subnet mask:
255
.255
.255
.0
Depending on the subnet division the subnet masks may, however, contain
other values beyond 0 and 255, such as i.e. 255.255.255.128 or
255.255.255.248, etc.
Your network administrator allocates the subnet mask number to you.
Together with the IP address, this number determines which network your PC
and your node belongs to.
The recipient node, which is located on a subnet initially, calculates the correct
network number from its own IP address and the subnet mask.
Only then does it check the node number and delivers the entire packet frame,
if it corresponds.
Example of an IP address from a class B network:
IP address
172.16.233.200
10101100 00010000 11101001 11001000
Subnet mask:
255.255.255.128
11111111 11111111 11111111 10000000
Net-ID:
172.16.00
10101100 00010000 00000000 00000000
Subnet-ID:
0.0.233.128
00000000 00000000 11101001 10000000
Host-ID:
72
00000000 00000000 00000000 01001000
Attention
Specify the network mask defined by the administrator in the same way as the
IP address when installing the network protocol.