Limits of Current IP Addressing
The current IPv4 address scheme is based on 32-bit numbering and limits the number of available IP addresses to about 4.1 billion. Many companies and organizations (particularly in the United States) were assigned very large blocks of IP addresses in the early stages of the growth of the Internet, which has left a shortage of "open" addresses. Even with careful allocation of Internet-connected host IP addresses and the use of network address translation (NAT) to provide communication to and from machines behind an Internet-connected computer, the Internet might run out of available addresses.
To solve this problem, a newer scheme named IPv6 (IP version 6) is being implemented. It uses a much larger addressing solution based on 128-bit addresses, with enough room to include much more information about a specific host or device, such as global positioning server (GPS) or serial numbering. Although the specific details about the entire contents of the an IPv6 address have yet to be finalized, all Internet- related organizations appear to agree that something must be done to provide more addresses. It's difficult to gauge just how big the Internet actually is, but according to Internet World Stats, some 1.224 billion people use the Internet as of September 2007. Multiply that by the number of mail servers, newsgroup servers and other web servers that are attached to the web and you will quickly find that the range of addresses supplied by IPv4 is quickly running out.
You can get a good overview of the differences between IPv4 and IPv6 policies regarding IP address assignments, and the registration process of obtaining IP addresses, by browsing to http://www.arin.net/library/index.html. Read the Linux IPv6 HOWTO by browsing tohttp://tldp.org/HOWTO/Linux+IPv6-HOWTO/.
Fedora supports the use of IPv6 and includes a number of networking tools conforming to IPv6 addressing. You can configure support for IPv6 by using settings and options in the file named network
under the /etc/sysconfig
directory, along with making changes to related network configuration files, such as /etc/hosts
. Many IPv6-based tools, such as ipcalc6
, ping6
, and traceroute6
, are available for Fedora. See various files under the /usr/share/doc/initscripts
directory for more information specific to setting up IPv6 addressing with Linux and Fedora. Migration to IPv6 is slow in coming, however, because the majority of computer operating systems, software, hardware, firmware, and users are still in the IPv4 mindset. Supporting IPv6 will require rewrites to many networking utilities, portions of operating systems currently in use, and firmware in routing and firewall hardware.
Dynamic Host Configuration Protocol
As its name implies, Dynamic Host Configuration Protocol (DHCP) configures hosts for connection to your network. DHCP allows a network administrator to configure all TCP/IP parameters for each host as he connects to the network after activation of a NIC. These parameters include automatically assigning an IP address to a NIC, setting name server entries in /etc/resolv.conf
, and configuring default routing and gateway information for a host. This section first describes how to use DHCP to obtain IP address assignment for your NIC, and then how to quickly set up and start a DHCP server using Fedora.
NOTE
You can learn more about DHCP by reading RFC 2131, "Dynamic Host Configuration Protocol." Browse tohttp://www.ietf.org/rfc/rfc2131.txt.
DHCP provides persistent storage of network parameters by holding identifying information for each network client that might connect to the network. The three most common pairs of identifying information are the following:
► Network subnet/host address— Used by hosts to connect to the network at will
► Subnet/hostname— Enables the specified host to connect to the subnet
► Subnet/hardware address— Enables a specific client to connect to the network after getting the hostname from DHCP
DHCP also allocates to clients temporary or permanent network (IP) addresses. When a temporary assignment, known as a lease , elapses, the client can request to have the lease extended, or, if the address is no longer needed, the client can relinquish the address. For hosts that will be permanently connected to a network with adequate addresses available, DHCP allocates infinite leases.
DHCP offers your network some advantages. First, it shifts responsibility for assigning IP addresses from the network administrator (who can accidentally assign duplicate IP addresses) to the DHCP server. Second, DHCP makes better use of limited IP addresses. If a user is away from the office for whatever reason, the user's host can release its IP address for use by other hosts.
Like most things in life, DHCP is not perfect. Servers cannot be configured through DHCP alone because DNS does not know what addresses DHCP assigns to a host. This means that DNS lookups are not possible on machines configured through DHCP alone; there fore, services cannot be provided. However, DHCP can make assignments based on DNS entries when using subnet/hostname or subnet/hardware address identifiers.
NOTE
The problem of using DHCP to configure servers that make use of registered host- names is being addressed by Dynamic DNS which, when fully developed, will enable DHCP to register IP addresses with DNS. This will allow you, for example, to register a domain name (such as imalinuxuser.com) and be able to easily access that domain's web server without needing to use static IP addressing of a specific host. The largest hurdle to overcome is the security implication of enabling each host connecting to the system to update DNS. A few companies, such as DynDNS (http://www.dyndns.com/), are already offering Dynamic DNS services and have clients for Linux.
DHCP Software Installation
Installation of the DHCP client and server might be easiest during the initial install of Fedora, but you can also use yum
later. This section describes configuring the dhclient
and setting up and running the dhpcd
daemon.
DHCP dhclient
As previously mentioned, using DHCP for an installed NIC is easily accomplished when installing Fedora on your host (read more about installation in Chapter 1, "Installing Fedora"), and during the network step of installation, you can choose to have DHCP initiated at boot time. If you choose to do this (and choose to install the DHCP client package), the DHCP client, dhclient
, sends a broadcast message to which the DHCP server replies with networking information for your host. That's it; you're finished.
If you choose to install from source, you will have to (as root) download and install the server packages that include dhclient.
Unpack the source file, run ./configure
from the root of the source directory, run make
, and then run make install
. This should put the DHCP client binaries where they will start at the correct time in the boot process.
You can however, fine-tune how dhclient
works, and where and how it obtains or looks for DHCP information. You probably will not need to take this additional effort; but if you do, you can create and edit a file named dhclient.conf
, and save it in the /etc
directory with your settings. A few of the dhclient.conf
options include the following:
► timeout time ;
— How long to wait before giving up trying (60 seconds is the default)
Читать дальше