An address is a data structure understood by a network which uniquely identifies the recipient within the network. Addresses in other places than computer networks: Addresses are used by the postal system to allow a postman to find a person's house; to allow a computer to uniquely identify a location in memory.
A unicast/broadcast IP address is a 32 bit value (i.e. four bytes) which is allocated to each system in the Internet. The 32-bit value uniquely identifies this system, and therefore no two systems may have the same IP address. Some systems have more than one IP address, in which case they may be reached by any of their IP addresses.
Each IP address consists of two parts, the network part (identifying the network number, or LAN broadcast domain, to which the computer is attached) and the host part (which identifies the host within the local network). This is therefore a flat allocation technique. Administrators of a specific IP network may freely allocate host addresses within their network, without co-ordination with other any other administrators in the Internet. However, they are not allowed to allocate host addresses belonging to a network number which has not been assigned to them. If they require additional addresses, they must apply for a new block of addresses (i.e. a new network number), which will not normally be consecutive with what was previously assigned.
IPv4 addresses are normally written in a format known as "dotted decimal notation". In this format, each byte of the 4 byte address is expressed as a decimal (base 10) number (i.e. 0 to 255). The four decimal numbers are separated by "dots" or "periods" as shown below:
The IPv4 address "184.108.40.206" corresponds to a hexadecimal value of 0x8107010A.
An IP address may be unicast (for a specific end system), network broadcast (for all systems on a LAN) or multicast (for a group of end systems). A network broadcast address sets the destination to the network address, and then fills each position of the host part of the address with a binary '1'. The special value '0.0.0.0' is reserved for an unknown address. This is seldom used as a packet address, and is not normally valid.
The IPv4 network address is identified as the bit-wise logical AND of the 32-bit IPv4 address with another 32-bit quantity, the netmask. All systems with the same network number share the same netmask (sometimes called a "subnet mask"). This has a bit with a logical '1' for each bit that is a part of the network number, and a logical '0' for each bit which is a part of the host number. The netmask may be written in dotted decimal notation, or alternatively as a hexadecimal number:
e.g. a 24-bit network number has a netmask which may be written as 255.255.255.0, this is identical to 0xFFFFF00.
Hence, the IP address 220.127.116.11 with a netmask of 255.255.255.0 indicates the network number is 18.104.22.168.
A 24-bit network number leaves a host part of 8 bits. That is a network with space for 254 hosts. (Remember the host number "0" is reserved for the network itself, and the all one's host address is reserved for use as the network broadcast address). Sometimes the netmask is represented by writing the IP address followed by as a slash ('/') with the number of bits used to form the network number. The above netmask can therfore also be represented as "/24". Here are a few more examples:
|IP address||subnet mask||network number||host part||network broadcast address|
The last two lines show the same network divided in two different ways. Since each network must have a single netmask, only one of the two different ways may be used at any one time. Furthermore, it is important that all systems connected to this network have the same netmask to operate correctly, can you figure out why?
Since IP addresses are long numbers, they are not easily remembered by humans, therefore most users instead choose to remember a logical name in place of an IP address. A system known as the DNS maps between the 32-bit IPv4 addresses and their corresponding logical names (and 128-bit IPv6 addresses when this is used). To ease reading by human users, the DNS is arranged in a hierarchical structure.
IP packet header