HostedDB - Dedicated UNIX Servers

-->
Internet Security Professional Reference:Understanding TCP/IP
Previous Table of Contents Next


However, the selection of the type of subnets that should be chosen is determined by the maximum number of users that will be required on any subnet, and the minimum number of subnets required.

The possible network portions formed in the development of your divisions are formed by evaluating the values of the fixed portion of the last byte. Looking back to the last example, you see that to split our class C address into eight divisions, or 6 subnets, you need to fix the first three bits in the last octet. The network portions are formed through the evaluation of the non-fixed portion of the last byte. Consider the following example, which lists the bit combinations and illustrates how the class address is split into the subnets.

Network   Host
8  7  6 | 5  4  3  2  1        Decimal Values
---------------------------------------------
0  0  1 | 0  0  0  0  0              32
0  1  0 | 0  0  0  0  0              64
0  1  1 | 0  0  0  0  0              96
1  0  0 | 0  0  0  0  0             128
1  0  1 | 0  0  0  0  0             160
1  1  0 | 0  0  0  0  0             192

As shown in the preceding example, the top three bits—8, 7, and 6—are fixed in that they are used as part of the host address. This means that the available networks become the following:

Network

N.O.P.32
N.O.P.64
N.O.P.96
N.O.P.128
N.O.P.160
N.O.P.192

The standard netmask for a class C address is 255.255.255.0. For our subnetted network, the first three bytes remain the same. The fourth byte is created by setting the network portion to 1s and the host portion to zero. Looking back at the preceding example, you see what the network addresses will be. You use the same format for determining the netmask. This means that the netmasks for these subnets are the following:

Network Broadcast Netmask

N.O.P.32 N.O.P.31 255.255.255.32
N.O.P.64 N.O.P.63 255.255.255.64
N.O.P.96 N.O.P.95 255.255.255.96
N.O.P.128 N.O.P.127 255.255.255.128
N.O.P.160 N.O.P.159 255.255.255.160
N.O.P.192 N.O.P.191 255.255.255.192

The end result is that you have split this class C address into six subnetworks, thereby increasing your available address space without having to apply for an additional network address.

When looking at the netmask, it is easy to see why many administrators stick with byte-oriented netmasks—they are much easier to understand. By using a bit-oriented approach to the netmask, however, many different configurations can be achieved. Using a netmask of 255.255.255.192 on a class C address, for example, creates four subnets. The same netmask on a class B address, however, creates more than a thousand subnets!

Hostnames

Each device connected to the Internet must be assigned a unique IP address, but IP addresses can be difficult to remember. Consequently, each device is generally assigned a hostname, which is used to access that device. The network does not require the use of names, but they do make the network easier to use.

For TCP/IP to work properly, the hostname must be translated into the corresponding IP address. This can be accomplished through several different methods, including looking up the hostname in a file called the host table or resolving it through the use of the Domain Name Service (DNS).


Note:  Methods for translating the hostname into the corresponding IP address and DNS are discussed later in this chapter.

Within each organization, the hostname must be unique. The hostname consists of two pieces: the actual hostname and the TCP/IP domain. The domain is assigned by a central registry depending on the country you are in and the type of organization you are registering. The most commonly used domains are .com, .edu, and .gov for commercial, educational, and government institutions within the United States. While it is possible to obtain a domain using these outside the United States, it is best not to.

For organizations outside the United States, there may be other rules governing how domains are assigned. For example, a company in Canada named Widgets Inc. could apply for widgets.ca, where .ca denotes that the organization is in Canada. If the same company was in the United Kingdom, then the domain would likely be widgets.co.uk, indicating that it is a commercial organization within the United Kingdom.

Regarding the actual names for the given hosts, the Internet Request for Comments (RFC) number 1178 provides some excellent guidelines regarding how to name systems. Here are some guidelines you should remember:

  Use real words that are short, easy to spell, and easy to remember. The point of using hostnames instead of IP addresses is that they are easier to use. If hostnames are difficult to spell and remember, they defeat their own purpose.
  Use theme names. All hosts in a group could be named after human movements such as fall, jump, or hop, or cartoon characters, foods, or other groupings. Theme names are much easier to think up than unrestricted names.
  Avoid using project names, personal names, acronyms, or other such cryptic jargon. This type of hostname typically is renamed in the future, which can sometimes be more difficult than it sounds.


Note:  The only requirement is that the hostname be unique within the domain. A well-chosen name, however, can save future work and make the user community happier.

The hostname of your computer can be determined by using the hostname command, as shown in the following:

$ hostname
oreo.widgets.ca
$

On some TCP/IP implementations, the hostname command does not print the information as shown above, but only prints the actual name of the system. The output of hostname is the name of the system and the TCP/IP domain name.


Previous Table of Contents Next