Nonroutable IP addresses

Every machine that is directly connected to the Internet must have a public IP address, commonly known as a routable address. A routable address is one that a connection can be made to from anywhere on the TCP/IP network, in this case, the Internet. For example, any web site you visit that is on the Internet has a routable address. If it were non-routable, packets would not be able to be routed to it. Each IP address class has its own non-routable address, which can be used in a private IP network (one that is not on the Internet). Non-routable addresses are commonly used in an organization or a home network that is not directly connected to the Internet. It is customary (and cost effective, as routable IP addresses cost money!) to have a Network Address Translation (NAT) box that acts as a gateway to the Internet for your non-routable addresses.

There is one very special address that you will find on every TCP/IP host, and that is 127.0.0.1. The address is commonly referred to as the loopback address and is a virtual network that exists only on your local machine. The loopback address is used for testing a TCP/IP network and is useful if you want to test whether or not your network services are working. It also helps any process that needs to communicate over TCP/IP to a service locally on the machine because that process can use the loopback address. The loopback address is not linked to a physical network device, but to a logical lo (loopback) device on your system. If you type ifconfig on the command line of your SUSE host, you will see the loopback device listed with an address of 127.0.0.1. Uses of the loopback device will become apparent when we talk about implementing network services later in Part III of this book.

As each class of IP network has its own non-routable address space (see Table 6-5), you can base how you would use those private addresses in your organization (or at home) on how network assignments work in the routable space of that class.

Network Address Translation

NAT is a technology that allows you to "hide" your private IP network from the Internet. All traffic, whether it is to a web server or a mail server or so forth is seen by the Internet to come from your NAT box. The NAT box then does the reverse translation when the server you are communicating with needs to send you data back and will change the destination IP address to that of your private machine. The web/mail server you are communicating with has no idea that the request is coming from a private address and sends all requests back to the routable address of your NAT box. We talk about constructing a NAT box in Chapter 23.

Table 6-5: Non-Routable Classed Networks

Class

Non-Routable Addresses

A

10.0.0.0-10.255.255.255

B

172.16.0.0-172.31.255.255

C

192.168.0.0-192.168.255.255

If your organization needed a flat IP address space, you could assign a non-routable Class A address range to all of your internal machines. However, this is usually wasteful and a network manager's nightmare because there is no logical distinction between departments or machine use. One way to combat this is via subnetting, which is the subject of the next section of the chapter.

It is common that if you have a small to medium organization, you could set up your network as in Figure 6-3. This would use the networks 192.168.0.0, 192.168.1.0, 192.168.2.0, and 192.168.3.0. As these are using a subnet mask of 255.255.255.0 (the default for a Class C network), these networks are seen from a networking standpoint as being separate entities.

192 Addressing Non Routable
Figure 6-3: Network layout with Class C non-routable addresses

You can use any network layout you feel comfortable with, but you should always use a pen and paper to design the logical layout before even touching a network cable. Any mistakes in the early stages of designing a network will come back to haunt you as your network grows.

Continue reading here: Subnetting

Was this article helpful?

+2 0