Subnets are used to extend the network portion of IP addresses. This allows you to divide a physical network into separate subnets. The subnet mask distinguishes the subnet from the rest of the address. If subnetting is used on the local network, the terminal must be able to discover the subnet mask.
If a bit is on in the subnet mask, the equivalent bit in the IP address is interpreted as a network bit. If a bit is off in the mask, the equivalent bit in the IP address is interpreted as part of the host address. Therefore, the subnet mask has 1s in the network and subnet portions of the address and 0s in the host portion.
Subnet masks can be written as hexadecimal numbers or as decimal IP addresses.
For example, if the network portion of a class B address is extended by one byte, the subnet mask is 255.255.255.0. The first two bytes of the address define the class B network address, the third byte defines the subnet portion, and the fourth byte defines the host address.
There are three methods for making sure the terminal can discover the subnet mask:
As an alternative to setting the subnet mask through BOOTP/DHCP or a terminal configuration parameter, the terminal can discover its subnet mask at boot time through ICMP (Internet Control Message Protocol). ICMP is included in the TCP/IP protocol family.
In this method of discovering the subnet mask, an ICMP message is sent to the broadcast address to determine the appropriate subnet mask when the terminal boots.
To discover the subnet mask through ICMP, set the boot-send-broadcast-icmp-for-subnet-mask parameter to "true." This option can produce a lot of network traffic, so you should use it only on networks with a small number of NCD terminals. This parameter is saved in NVRAM.
(Setup -> Change Setup Parameters -> Booting [TCP/IP Boot Options section] -> Send Broadcast ICMP for Subnet Mask).
Table 3-3 boot-send-broadcast-icmp-for-subnet-mask Parameter
The terminal does not use an ICMP message to determine the appropriate subnet mask.
The terminal uses an ICMP message sent to the broadcast address to determine the appropriate subnet mask.
Setting the Subnet Mask in NVRAM
Use the ip-subnet-mask parameter to set the subnet mask explicitly (Setup -> Change Setup Parameters -> IP -> Subnet Mask). This parameter takes effect immediately and is saved in NVRAM.
Table 3-4 ip-subnet-mask Parameter
|hexadecimal constant or decimal IP address||The network subnet mask|