Each network that runs TCP/IP must have a unique network number. Everymachine on the network must have a unique IP address. You must understandhow IP addresses are constructed before you register your network and obtainits network number. This section describes IPv4 addresses. For informationon IPv6 addresses, see IPv6 Addressing.
The IPv4 address is a 32-bit number that uniquely identifies a networkinterface on a machine. An IPv4 address is typically written in decimal digits,formatted as four 8-bit fields that are separated by periods. Each 8-bit fieldrepresents a byte of the IPv4 address. This form of representing the bytesof an IPv4 address is often referred to as the dotted-decimal format.
The bytes of the IPv4 address are further classified into two parts:the network part and the host part. The following figure shows the componentparts of a typical IPv4 address, 129.144.50.56.
Figure 5–3 Parts of an IPv4 Address
Network Part
The network part specifies the unique number that is assigned to yournetwork. The network part also identifies the class of network that is assigned.In Figure 5–3, the network part occupies two bytes of theIPv4 address.
Host Part
This is the part of the IPv4 address that you assign to each host. Thehost part uniquely identifies this machine on your network. Note that foreach host on your network, the network part of the address is the same, butthe host part must be different.
Subnet Number (Optional)
Local networks with large numbers of hosts are sometimes divided intosubnets. If you choose to divide your network into subnets, you need to assigna subnet number for the subnet. You can maximize theefficiency of the IPv4 address space by using some of the bits from the hostnumber part of the IPv4 address as a network identifier. When used as a networkidentifier, the specified part of the address becomes the subnet number. Youcreate a subnet number by using a netmask, which is a bitmask that selectsthe network and subnet parts of an IPv4 address. Refer to Creating the Network Mask for IPv4 Addressesfor details.