Online Book Reader

Home Category

Managing NFS and NIS, 2nd Edition - Mike Eisler [178]

By Root 331 0
file disagrees with the NIS ipnodes map.

Mismatched IPv4 addresses between the hosts and ipnodes maps will lead to inconsistent behavior between IPv6-aware or -enabled applications and IPv6-unaware applications, because they obtain their address information from different sources. If the hosts database contains the correct information but the ipnodes database is corrupted, then IPv6-unaware applications will work correctly, while the IPv6-aware and -enabled applications will experience problems. The reverse is true when the corrupted information is in the hosts database.

Subnetwork masks

The second ifconfig in the boot process installs proper masks and broadcast addresses if subnetting is used to divide a larger IP address space. Default subnetwork masks and broadcast addresses are assigned based on IP address class, as shown in Table 13-3.

Table 13-3. Default broadcast addresses

Address Class

Network Address

Network Mask

Broadcast Address

Class A

x.0.0.0

255.0.0.0

x.255.255.255

Class B

x.y.0.0

255.255.0.0

x.y.255.255

Class C

x.y.z.0

255.255.255.0

x.y.z.255

The NIS netmasks map contains an association of network numbers and subnetwork masks and is used to override the default network masks corresponding to each class of IP address. A simple example is the division of a Class B network into Class C-like subnetworks, so that each subnetwork number can be assigned to a distinct physical network. To effect such a scheme, the netmasks NIS map contains a single entry for the Class B address:

131.40.0.0 255.255.255.0

Broadcast addresses are derived from the network mask and host IP address by performing a logical and of the two. Any bits that are not masked out by the netmask become part of the broadcast address, while those that are masked out are set to all ones in Solaris (other systems may set them to all zeros).

Network numbers are matched based on the number of octets normally used for an address of that class. IP address 131.40.52.28 has a Class B network number, so the first two octets in the IP address are used as an index into the netmasks map. Similarly, IP address 89.4.1.3 is a Class A address; therefore, only the first octet is used as a key into netmasks. This scheme simplifies the management of netmasks. By listing the network number to be partitioned, you do not have to itemize all subnetworks in the netmasks file.

Continuing the previous example, consider this ifconfig:

ipnodes excerpt:

131.40.52.28 mahimahi

netmasks map:

131.40.0.0 255.255.255.0

ifconfig line:

ifconfig hme0 mahimahi netmask +

Resulting interface configuration:

% ifconfig hme0

hme0: flags=1000843 mtu 1500 index 2

inet 131.40.52.28 netmask ffffff00 broadcast 131.40.52.255

Using a plus sign (+) as the netmask instead of an explicit network mask forces the second ifconfig to read the NIS netmasks map for the correct mask. The four-octet mask is logically and-ed with the IP address, producing the broadcast network number. In the preceding example, the broadcast address is in the ones form. Note that the network mask is actually displayed as a hexadecimal mask value, and not as an IP address.

A more complex example involves dividing the Class C network 192.6.4 into four subnetworks. To get four subnetworks, we need an additional two bits of network number, which are taken from the two most significant bits of the host number. The netmask is therefore extended into the next two bits, making it 26 bits instead of the default 24-bit Class C netmask:

Partitioning requires:

24 bits of Class C network number

2 additional bits of subnetwork number

6 bits left for host number

Last octet has 2 bits of netmask, 6 of host number:

11000000 binary = 192 decimal

Resulting netmasks file entry:

192.6.4.0 255.255.255.192

Again, only one entry in netmasks is needed, and the key for the entry matches the Class C network number that is being divided.

You use variable length subnetting when using Classless IP addressing. You specify how many bits of the IP address to

Return Main Page Previous Page Next Page

®Online Book Reader