# [SOLVED] NFS: can't use netmask in /etc/exports

## epretorious

/etc/exports doesn't like address/netmask format. i.e.,

```
/var/nfs                172.16.1.99(async,all_squash,anonuid=65534,anongid=65534,ro)
```

...works...

```
Dec  1 23:00:04 gateway rpc.mountd: authenticated mount request from 172.16.1.99:781 for /var/nfs (/var/nfs/ms-6312)
```

...but...

```
/var/nfs                172.16.1.0/24(async,all_squash,anonuid=65534,anongid=65534,ro)
```

....fails...

```
Dec  1 23:04:06 gateway rpc.mountd: refused unmount request from 172.16.1.99 for /var/nfs (/): not exported
```

export(5) confirms that the address/netmask scheme is acceptable...

 *Quote:*   

> IP networks
> 
> You can also export directories to all hosts on an IP (sub-) network simultaneously. This is done
> 
> by  specifying  an IP address and netmask pair as address/netmask where the netmask can be speci-
> ...

 

...and so does The Linux NFS-HOWTO but I can't seem to get it to work.

What am I doing wrong?

----------

## fangorn

Try /255.255.255.0 instead of the /24.

Works perfect with me

----------

## epretorious

 *fangorn wrote:*   

> Try /255.255.255.0 instead of the /24.

 

Nope - Same failure:

```
Dec  2 11:58:51 gateway rpc.mountd: refused mount request from 172.16.1.99 for /var/nfs (/): not exported
```

Strange.    :Confused: 

----------

## fangorn

I had problems with ports when mounting linux nfs exports with AIX nfs client. Had to add "insecure" in /etc/exports line

----------

## epretorious

Restarting portmapper (`/etc/init.d/portmap restart`) resolved the issue.    :Rolling Eyes: 

----------

## tuxmin

```

/etc/init.d/nfs reload

```

would be better (no downtime)

----------

