Installation guide
Network Infrastructure for EtherNet/IP™
Understanding the Basics of Network Protocols
2-9
Table 2-2 Subnet Masks
Dot-decimal Address Binary
Full Network Address
192.168.5.10 11000000.10101000.00000101.00001010
Subnet Mask
255.255.255.0 11111111.11111111.11111111.00000000
Network Portion
192.168.5.0 11000000.10101000.00000101.00000000
Subnet masks have ones in all bits except those that specify the host field. For example, the subnet mask
that specifies 8 bits of subnetting for Class A address 34.0.0.0 is 255.255.0.0. The subnet mask that
specifies 16 bits of subnetting for Class A address 34.0.0.0 is 255.255.255.0. Both of these subnet masks
are pictured in Figure 2-4. Subnet masks can be passed through a network on demand such that new
nodes can learn how many bits of subnetting are being used on their network.
As IP subnets have grown, administrators have looked for ways to use their address space more
efficiently. Traditionally, all subnets of the same network number used the same subnet mask. In other
words, a network manager would choose an eight-bit mask for all subnets in the network. This strategy is
easy to manage for both network administrators and routing protocols. However, this practice wastes
address space in some networks.
Some subnets have many hosts and some have only a few, but each consumes an entire subnet number.
Serial lines are the most extreme example because each has only two hosts that can be connected via a
serial line subnet.
On some media, such as LANs designed to IEEE Std 802®,
3
IP addresses are dynamically discovered
through the use of two other members of the Internet protocol suite:
Address Resolution Protocol
(ARP)
and Reverse Address Resolution Protocol (RARP).
ARP uses broadcast messages to determine the hardware layer Media Access Control (MAC) address
corresponding to a particular network-layer address. ARP is sufficiently generic to allow use of IP with
virtually any type of underlying media-access mechanism.
RARP uses broadcast messages to determine the network-layer address associated with a particular
hardware address. RARP is especially important to diskless nodes, for which network-layer addresses
usually are unknown at boot time.
4
2.2 User Datagram Protocol
The User Datagram Protocol (UDP) is a connectionless transport-layer protocol (Layer 4) that belongs to
the TCP/IP suite. UDP is an interface between IP and upper-layer processes. UDP protocol ports
distinguish multiple applications running on a single device from one another.
3
IEEE 802, IEEE Standard for Information Technology –Telecommunications and Information Exchange between Systems –
Local and Metropolitan Area Networks. http://standards.ieee.org/getieee802/portfolio.html
4
Information on ARP/RARP courtesy of Cisco Systems, Inc. Protocol Brief: TCP/IP. 1996.
http://www.cisco.com/warp/public/535/4.html