Книга: Fedora™ Unleashed, 2008 edition

TCP/IP Addressing

TCP/IP Addressing

To understand networking with Linux, you need to know the basics of TCP/IP addressing. Internet IP addresses are assigned (for the United States and some other hosts) by the American Registry for Internet Numbers, available at http://www.arin.net/. The agency assigns Internet service providers (ISPs) one or more blocks of IP addresses, which the ISPs can then assign to their subscribers.

You will quickly recognize the current form of TCP/IP addressing, known as IPv4 (IP version 4). In this method, a TCP/IP address is expressed of a series of four decimal numbers — a 32-bit value expressed in a format known as dotted-decimal format, such as 192.168.120.135. Each set of numbers is known as an octet (eight ones and zeros, such as 10000000 to represent 128) and ranges from 0 to 255.

The first octet usually determines what class the network belongs to. There are three classes of networks, as follows:

Class A — Consists of networks with the first octet ranging from 1 to 126. There are only 126 Class A networks — each composed of up to 16,777,214 hosts. (If you are doing the math, there are potentially 16,777,216 addresses, but no host portion of an address can be all zeros or 255s.) The "10." network is reserved for local network use, and the "127." network is reserved for the loopback address of 127.0.0.1.

NOTE

Notice that zero is not included in Class A. The zero address is used for network-to-network broadcasts. Also, note that there are two other classes of networks, Classes D and E. Class D networks are reserved for multicast addresses and are not for use by network hosts. Class E addresses are deemed experimental, and thus are not open for public addressing.

Class B — Consists of networks defined by the first two octets, with the first ranging from 128 to 191. The "128." network is also reserved for local network use. There are 16,382 Class B networks — each with 65,534 possible hosts.

Class C — Consists of a network defined by the first three octets, with the first ranging from 192 to 223. The "192." network is another that is reserved for local network use. There are a possible 2,097,150 Class C networks of up to 254 hosts each.

No host portion of an IP address can be all zeros or 255s. These addresses are reserved for local network broadcasts. Broadcast messages are not typically seen by users. IP addresses with all zeros in the host portion are reserved for network-to-network broadcast addresses

These classes are the standard, but a netmask also determines in what class your network is. The netmask determines what part of an IP address represents the network and what part represents the host. Common netmasks for the different classes are as follows:

Class A — 255.0.0.0

Class B — 255.255.0.0

Class C — 255.255.255.0

Because of the allocation of IP addresses for Internet hosts, it is now impossible to get a Class A network. It is also nearly impossible to get a Class B network (all the addresses have been given out, but some companies are said to be willing to sell theirs), and Class C network availability is dropping rapidly with the current growth of Internet use worldwide. See the following sidebar.

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.

Оглавление книги

Оглавление статьи/книги

Генерация: 0.043. Запросов К БД/Cache: 0 / 0
поделиться
Вверх Вниз