One of the most important design decisions of an Internet engineer
is the assignment of IP addresses, 32-bit numbers that identify
Internet hosts. These numbers are placed in the IP packet header
and are used to route packets to their destination. Several
things should be kept in mind about IP address assignment:
A basic concept of IP addressing is that initial prefixes
of the IP address can be used for generalized routing
decisions. For example, the first 16 bits of an address
might identify Acme Company, the first 20 bits identify
the Acme's Jonestown office, the first 26 bits identify
a particular Ethernet in that office, and the entire 32
bits identify a particular host on that Ethernet.
Prefix-based addressing has its origins in IP Address
Classes, and has evolved into Subnetting and CIDR.
IP addresses are assigned on a per-interface basis, so a host
might possess several IP addresses if it has several interfaces.
For example, a host with both Ethernet and serial interfaces
would have an IP address for each. This is an important consequence
of prefix-based addressing. An IP address doesn't really
refer to a host, it refers to an interface.
If a host is known by multiple addresses, then
every service on this host can be referred to by multiple names!
Addressing this host requires picking one
of these. Since the packet is addressed to the interface and not
the host, path information is introduced into the address. The
exact ramifications of this effect depend heavily on the network
design. In particular, careless design can result in a host
becoming reachable by one address but not by another. The
simplest solution to this problem is to select the host's most
reliable interface and advertise its IP address as the host's
primary IP address.
It is sometimes useful to configure a host with additional IP
addresses, usually to use one server to offer Web service for
several addresses. Although no real standard exists for such
virtual addresses, the typical configuration is to
assign additional addresses on an Ethernet (or other multicast
medium) and then answer ARP requests for the virtual addresses.
Special support is needed both in the server's operating system
and in the actual server software.
Many hosts, particularly user workstations,
do not need to be assigned any particular IP address,
and can be dynamically addressed.
Aside from obeying the general principles of prefix-based
addressing (i.e, hosts on a particular Ethernet must have addresses
with a particular prefix), such hosts will operate using
any IP address. Other hosts, mainly servers, must have a
particular IP address because other devices expect them
to answer at that address, and must be statically
addressed. Dynamically addressed hosts use
management protocols to obtain
their IP addresses from a server; most statically addressed
hosts are manually configured with their IP address.