Throughout most of the computer networking world, the host and interface addresses are used interchangeably, but they are not really the same thing. In fact, host addresses do not exist in IP networks:

โ€ข Each host on an interface has an independent IP address.

โ€ข Each interface is (generally) on a separate segment or in a different broadcast domain.

Many protocols and applications will use one of the available IP addresses as a unique identifier. Hosts with only one interface will have only one interface address, and that interface address may be used to identify the host.

When you read or hear the term host address in an IP networking context, it is probably describing an interface

address.

Calculating Prefixes and Subnets Using Subnet Masks The earliest use of IPv4 addresses relied on the subnet mask rather than the prefix length to differentiate the prefix from the subnet address. Figure 2-7 illustrates.

Figure 2-7 The Subnet Mask

An IPv4 address and prefix length are shown on A in Figure 2-7.

B is this same IPv4 address translated to four binary octets. C is 32 binary digits laid out as four octets, just like A. In C, the number of 1s, starting at the left, is given by the prefix length, so there are twenty-six 1s, leaving six 0s. The 1s are the network part of the address or prefix; the 0s are the subnet part of the address.

To find the prefix, use a Boolean logical AND, setting the digit in the result, D, to 1 when the digits in both B and C are 1, and setting the digit in D to 0 if the two digits do not match. The resulting four octets in D are converted back to a standard decimal IPv4 address.

The prefixโ€”and the network addressโ€”in this example is

198.51.100.64.

Seeing the address laid out in binary helps make more sense of the meaning all the all 1s and all 0s broadcast addresses. If we set the entire subnet portion of the address to 0s, the resulting IPv4 address is 198.51.100.64, so this is not only the prefix but also the first of the two broadcast addresses. Setting the subnet portion to 1s results in the last octet translating to 127, so the second broadcast address is 198.51.100.127.

Calculating Prefixes and Subnets Using a Skip Chart Converting numbers to binary, running Boolean operations, and then converting them back to decimal is time consuming; using a skip chart to calculate the prefix and broadcast addresses is much faster. Table 2-2 will be used to illustrate the process.

Table 2-2 IPv4 Networks by Prefix Length

Letโ€™s use the same addressโ€”198.51.100.70/26โ€”to calculate the prefix and broadcast address:

1.  Find the prefix length by going down the left column.

2.  Divide the number in the skip column next to the prefix length into the number in the working octet indicated in the third column. In this case, the skip is 64, and we are working in the fourth octet, so we divide 70 by 64.

3.  Ignoring any remainder, multiply the result by the number in the skip column. In this case, 64 goes into 70 one time, so we multiply 64 by 1, with a result of 64.

4.  Make the working octet the result; this is the network address. In this case, the network address is 198.51.100.64.

5.  Add the skip to the resulting number and subtract 1; this is the broadcast address. In this case, The skip minus 1 is 63, so we

add 63 to 64. The result is 127, so the broadcast address is 198.51.100.127.

Using a skip chart requires a little practice, but it is much faster. If you memorize the chart, you can probably calculate IPv4 prefixes and broadcast addresses without any paper, pen, or computer.

, ,


Leave a Reply

Your email address will not be published. Required fields are marked *

Search

About

Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown prmontserrat took a galley of type and scrambled it to make a type specimen book.

Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown prmontserrat took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.

Tags

There’s no content to show here yet.

Gallery