-->
Page 247
bits it takes to compose the network and subnet address, you can figure out how many bits are in the netmask.
For example, if you are in the network 192.168.42.0 (equal to 11000000.10101000. 00101010.00000000) and you don't need to subnet at all, you would see that it takes 24 bits to make the netmask. Hence, the netmask for this network is 255.255.255.0 (equal to 11111111.11111111.11111111.00000000 in binary).
Let's say that you do want to subnet the network, and want to break this down into 8 subnets, each with 32 addresses. Remember that for each subnet, you need one network address and one broadcast address. Hence, each subnet would really only be able to contain 30 addresses. Table 13.2 shows how to determine the netmask based on how many subnets you have.
Table 13.2. Subnet netmasks.
Subnets | Hosts on the Subnet | Netmask | |
2 | 126 | 255.255.255.128 | (11111111.11111111.11111111.10000000) |
4 | 62 | 255.255.255.192 | (11111111.11111111.11111111.11000000) |
8 | 30 | 255.255.255.224 | (11111111.11111111.11111111.11100000) |
16 | 14 | 255.255.255.240 | (11111111.11111111.11111111.11110000) |
32 | 6 | 255.255.255.248 | (11111111.11111111.11111111.11111000) |
64 | 2 | 255.255.255.252 | (11111111.11111111.11111111.11111100) |
Although it is entirely possible to encode your netmask such that the subnet part of the address does not consume the bits in the suggested order, figuring out each host's address becomes very tricky and cumbersome. It is not a recommended practice.
After you have the network mask determined, it is very easy to determine the broadcast address.
Begin by taking the network address along with the subnetwork component. In your sample network, this would be 192.168.42.0. Because you need 24 bits (the first three dotted numbers) to identify the network, hold those bits constant and make the remainder bits all 1. This turns the sample address into 192.168.42.255.
If you're quick with figures, you might have realized that IP numbers have 32 bits, thereby providing us with 4+ billion possible IP addresses. Quite a few addresses, isn't it? In fact, we should be set for a long time!
Page 248
Not quite. Because of the way addresses are segmented between classes A, B, C, and reserved and because of the problem with liberal policies on IP address assignment early in the Internet's life, we're quickly running out of available IP addresses. Between every new movie having a new IP address for its domain name and network connectivity becoming cheap enough for small businesses, it is predicted that we will run out of IP addresses not too long after the year 2000.
Luckily, a solution has been developed to cope with this. IPv6 is the successor to the current IPv4 standard. (IPv5 was an experimental real-time stream protocol.) IPv6 addresses many of the problems of IPv4, such as inadequate address space, no security, an overly complex structure, no support for a large number of options, and no special tags indicating the type of service in use.
IPv6 solves the address space problem by expanding the address field to 128 bits. The idea behind this was that the address space should allow for an inefficient scheme of address assignment (similar to the idea behind class A, B, and C addresses in IPv4) but still allow for billions of possible hosts on each subnetwork.
A resolution for the security issue was something else that was designed into IPv6. With commerce on the Internet growing at phenomenal rates, the need for security mechanisms needed to be integrated into the network protocol itself instead of letting it remain above the protocol. Authentication and privacy were serious considerations in IPv6's design.
Multimedia has also been taking the Internet by storm. Entertainment services are looking to broadcast their services in real-time audio and video. By tagging the packets of data with a datatype field, the routers across the Internet know to give priority to those packets needing real-time transmission. (If this subject interests you, look into the RSVP protocol at http://www.ietf.org.)
The last major revision with IPv6 was to simply include the information needed in each packet of data. This allows routers to be able to process more packets per second without needing to use faster (and more costly) hardware.
As of this writing, Red Hat Linux doesn't support IPv6 because most people are sticking with IPv4 for their connectivity needs. There is an IPv6 package available for Linux if you are interested in experimenting with it or possibly joining the 6Bone, a small network of IPv6 systems on the Internet. (Check out the site at http://www-6bone.lbl.gov/6bone.)
If you're planning to join the Internet with your new Linux box for the first time, you will need to have two things:
Page 249
Often, your ISP will assist you with all of the steps involved in getting your machine connected, but it is always a good idea to know the steps involved.
The easiest way to join the Internet is to have an existing account on someone else's network. A good start would be the ISP you're planning to join. This will give you an opportunity to evaluate its services and determine if its connection to the Internet is fast enough for your needs. (See information on the traceroute command later in this chapter in the section "The Software of DNS" to help you determine the quality of your connection.)
When you've decided to go with a particular ISP, the ISP will need to set up its machines to respond to connection requests for your desired domain name. (Note that your ISP doesn't need to provide content, just the name service.) With your ISP ready to handle the domain, you begin your registration with the InterNIC.
The InterNIC is an organization that keeps track of all the domain names allocated and their corresponding IP address ranges. Whenever a new site wants to have its own domain name, it must be allocated from the InterNIC. If the new site also needs an IP range allocated to it, the InterNIC will take care of that as well. (Typically, the InterNIC will allocate IP ranges to ISPs, and the ISPs will pass them on to you.)
Not too long ago, you could simply ask the InterNIC to allocate a domain name, and it would do it. However, with the recent boom of commercialization, the rules have changed so that you must have an ISP responding to your desired domain name before InterNIC will allocate the domain. (In other words, you cannot request my-new-domain.com without having a server ready to respond to requests made on that domain.) Along with each new domain is an annual fee of $100.
To request a new domain name, visit the InterNIC's Web site at http://www.internic.net. You will have to work with your ISP when doing this. It can take up to one week for the InterNIC to process your request and allocate the domain name.
When your new domain name is allocated and the InterNIC has announced it to all of the nameservers across the Internet, your site will be ready to accept connections.
If you are using a network card to join a network, configuring it is a straightforward task. This section shows how to use the netcfg, ifconfig, and route commands to do this.
NOTE |
All the commands used in this section must be run as the root user because they change kernel parameters. Some of these programs can be run as a normal user for gaining status information; I point out these programs. |