Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments

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 enter 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 on the subnet mask.

Examples

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

10.45.67.0/24

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

10.45.0.0/16

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.

Example

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

10.45.67 255.255.255.0
network 10.45.67 netmask 255.255.255.0

Network address and subnet mask for multiple subnets

Example

If you want to export to subnets 10.45.67 and 10.45.68 with a netmask of 255.255.255.0, you could export them with the following entries:

network 10.45.67.0 netmask 255.255.255.0
network 10.45.68.0 netmask 255.255.255.0

Note that all four IP octets are required when exporting to subnets using this format.

Example

The prior example could also be exported using the following syntax:

10.45.67/24
123.45.68/24

Note that all four IP octets are not required for /etc/exports entries that use this format. You can use both formats shown in the examples above within the same exports file.

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 -ro=subnet_address[:subnet_address:...]

Example

/vol/vol0/home -ro=10.45.67/24

Result

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

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 Page (Alt-p) Next Page (Alt-n) Comments