Library Table of Contents Index Previous Next Comments

How /etc/exports works

Exporting resources to subnets from /etc/exports

Reasons for exporting to a subnet  Top

Exporting to a subnet has the same effect as exporting to individual hosts on that subnet, but it gives you the convenience of not having to list individual host names in the /etc/exports file. If all hosts on the same subnet should mount the same resources, export the resources to the subnet.

Format of the export target  Top

The following table describes the format of the export target if you want to export a resource to a subnet.

Information specified

Format

Network address and number of leading 1 bits in the subnet mask

dotted_ip/num_bits

dotted_ip is an IP address or an IP subnet.

num_bits is the number of leading 1 bits of the subnet mask.

Examples

If you want to export to IP addresses of the form 123.45.67.x with 24 leading 1 bits in the subnet mask, specify the following export target:

123.45.67.0/24

If you want to export to IP addresses of the form 123.45.x.y with 16 leading 1 bits in the subnet mask, specify the following export target:

123.45.0.0/16

In these examples, you can omit the "0" from the dotted_ip field.

Network address and subnet mask

"[network] dotted_ip [netmask] netmask"

dotted_ip is an IP address or an IP subnet.

netmask is the netmask specified with four octets.

Examples

If you want to export to IP addresses of the form 123.45.67.x with a netmask of 255.255.255.0, use either of these values as the export target:

"123.45.67 255.255.255.0" 
"network 123.45.67 netmask 255.255.255.0" 

Exporting a resource to a subnet  Top

To export a resource to a subnet, complete the following step.

Step

Action

1

Type the following entry in the /etc/exports file:

path_name -access=subnet_address[:subnet_address:...]
Example
/vol/vol0/home -access=123.45.67/24
Result

Hosts with IP addresses in the form of 123.45.67.x can mount the /vol/vol0/home directory as read-write.

Note
You can specify additional access restrictions when exporting to subnets, just as you do when exporting to hosts. See Specifying access restrictions in /etc/exports for more information about how to specify access restrictions.

Library Table of Contents Index Previous Next Comments