Online Book Reader

Home Category

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

By Root 505 0
use for the network, and how many to use for the host by setting the appropriate netmask entry. The format of the netmask entry is the same as before, however, there should be an entry for each subnet defined. ifconfig uses the longest possible matching mask. Say your engineering organization has been given control of the 131.40.86.0 network (addresses 131.40.86.0 -> 131.40.86.255). You decide to partition it into four separate subnetworks that map the four groups in your organization: Systems Engineering, Applications Engineering, Graphics Engineering, and Customer Support. You plan to use a single system to serve as your gateway between the four separate subnets and the enterprise network. Your enterprise network address is 131.40.7.22, and is therefore connected to the 131.40.7.0 enterprise network. In order to partition the 131.40.86 address space into four separate subnets, you need to use the two upper bits of the last octet to identify the network. Table 13-4 shows the distribution of the IP addresses to the different networks.

Table 13-4. Network assignment

Organization

Address Range

Subnetwork

Systems Eng

131.40.86.0 -> 131.40.86.63

131.40.86.0

Applications Eng

131.40.86.64 -> 131.40.86.127

131.40.86.64

Graphics Eng

131.40.86.128 -> 131.40.86.191

131.40.86.128

Customer Support

131.40.86.192 -> 131.40.86.255

131.40.86.192

The last octet of the address will have two bits of netmask and six of host number:

11000000 binary = 192 decimal

The resulting netmask: 255.255.255.192

The resulting netmasks file is:

131.40.0.0 255.255.255.0

131.40.86.0 255.255.255.192

131.40.86.64 255.255.255.192

131.40.86.128 255.255.255.192

131.40.86.192 255.255.255.192

The first entry indicates that the Class B network 131.40.0.0 is subnetted. The next four entries represent the four variable-length subnets for the classless addresses for the different groups. Addresses 131.40.86.0 through 131.40.86.255 have a subnet mask with 26 bits in the subnet fields and 6 bits in the host field. All other addresses in the range 131.40.0.0 through 131.40.255.255 have a 24 bit subnet field. The IP address assignments for the five network interfaces are shown in Table 13-5.

Table 13-5. Assigning addresses to interfaces

Interface

Subnetwork Range

Broadcast

Sample IP Address

hme0

131.40.7.0 Backbone

131.40.7.255

131.40.7.22

hme1

131.40.86.0 -> 131.40.86.63

131.40.86.63

131.40.86.1

hme2

131.40.86.64 -> 131.40.86.127

131.40.86.63

131.40.86.65

hme3

131.40.86.128 -> 131.40.86.191

131.40.86.63

131.40.86.129

hme4

131.40.86.192 -> 131.40.86.255

131.40.86.63

131.40.86.193

For example, the server would direct network traffic to the hme0 interface when communicating with IP address 131.40.7.78, since it is part of the 131.40.7.0 subnet; hme1 when communicating with 131.40.86.32, since it is part of the 131.40.86.0 subnet; hme2 when communicating with 131.40.7.78, and so on.

ifconfig only governs the local machine's interface to the network. If a host cannot exchange packets with a peer host on the same network, then it is necessary to verify that a datagram circuit to the remote host exists and that the remote node is properly advertising itself on the network. Tools that perform these tests are arp and ping.

IP to MAC address mappings

Applications use IP addresses and hostnames to identify remote nodes, but packets sent on the Ethernet identify their destinations via a 48-bit MAC-layer address. The Ethernet interface on each host only receives packets that have its MAC address of a broadcast address in the destination field. IP addresses are completely independent of the 48-bit MAC-level address; several disjoint networks may use the same sets of IP addresses although the 48-bit addresses to which they map are unique worldwide.

You can tell who makes an Ethernet interface by looking at the first three octets of its address. Some of the most popular prefixes are shown in Table 13-6. Fortunately, newer diagnostic tools such as ethereal know how to map the prefix number to the vendor of

Return Main Page Previous Page Next Page

®Online Book Reader