# nfs over wireless a no-go

## kg4ysy

I have an Atheros wireless card running to my router that's a few inches away.  I have a server wired to this router serving multiple nfs shares.  When my laptop is wired, the nfs shares work fine, but when I switch to wireless I'm lucky if they work for 20 seconds.  I have used ndiswrapper and madwifi, but I still get the same situation.  In /var/log/messages, nfs will continually say that the server is not responding and then about 20 seconds later say it's "OK."  It seems that wireless isn't stable enough or something.  Is there a solution, because I would really like to be able to use my nfs shares over wireless.  Maybe another protocol.  I'm using nfsv3 and I would just use sshfs, but I like the better integration of nfs.  I'll give sshfs a try, but I would like to have nfs working.

thx

----------

## widan

Do you have other connection problems when using the wifi, or is it just NFS ? What does "iwconfig ath0" say ? Also try with the router not so close (a too strong signal can overload the amplifiers in the receiver and get you a worse signal quality).

----------

## kg4ysy

well it doesn't work at any distance from my router, and as for other types of connection, everything else seems to be working.  madwifi works better than ndiswrapper overall, but nfs is dead on both.

iwconfig wlan0

```
wlan0     IEEE 802.11g  ESSID:"kg4ysy"  Nickname:""

          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:11:6B:25:4A:A6   

          Bit Rate:24 Mb/s   Tx-Power:18 dBm   Sensitivity=0/3  

          Retry:off   RTS thr:off   Fragment thr:off

          Encryption key:38DB-58A0-81D0-C407-xxxx-xxxx-xxxx-xxxx   Security mode:restricted

          Power Management:off

          Link Quality=58/94  Signal level=-37 dBm  Noise level=-95 dBm

          Rx invalid nwid:777052  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

```

one thing i have noticed is that the bit rate fluctuates with madwifi...is there a reason for this?  i don't think it did it with ndiswrapper.

I did notice the Rx invalid nwid is high...what is that? [edit] I read on a forum that if your access point is on the same channel as a bunch of others, there are issues.  I changed to a channel nothing is using around me and that has pretty much stopped.  Didn't fix the nfs problem though.[/edit]

thx

----------

## widan

 *kg4ysy wrote:*   

> one thing i have noticed is that the bit rate fluctuates with madwifi...is there a reason for this?

 

It tries to find the "best" bit rate depending on the conditions (ie the one that result in the minimum number of retransmissions, ...). There are several algorithms you can select when you compile it (the use flags "amrr" and "onoe"), you can try the others and see if it helps.

You can also try to lock the bitrate (to restore the adaptative behavior, just use "rate auto"):

```
iwconfig ath0 rate 24M
```

 *kg4ysy wrote:*   

> I did notice the Rx invalid nwid is high...what is that?

 

It means "invalid network ID", they're packets from another wireless network on the same frequency (or a close one, as the channels overlap somewhat).

----------

## kg4ysy

I set the frequency to one that's not being used and that has pretty much stopped the invalid stuff.  As for the bitrate, that seems pretty cool.  I have noticed that even though this bitrate fluctuates, it is much more stable than ndiswrapper.  NFS still dies though.  I don't understand. Is there anyway to up the ping to and from the nfs server so maybe it won't die?

----------

## kg4ysy

It seems that when I'm using wireless, portmap is unable to be found.  It is most definitely running.  kg4ysy-server is the server that is being connected to for the nfs shares.  Any ideas...

Mar 25 15:42:06 kg4ysy portmap: server localhost not responding, timed out 

Mar 25 15:42:06 kg4ysy lockd: cannot monitor kg4ysy-server

Mar 25 15:42:06 kg4ysy lockd: failed to monitor kg4ysy-server

----------

## widan

 *kg4ysy wrote:*   

> Mar 25 15:42:06 kg4ysy portmap: server localhost not responding, timed out

 

Are you sure it's running on the client too ? Here it complains about the local portmapper, not the one on the server. What does "rpcinfo -p localhost" say ? Does portmap appear in "ps aux" ?

----------

## kg4ysy

kg4ysy kg4ysy # rpcinfo -p localhost

```

   program vers proto   port

    100000    2   tcp    111  portmapper

    100000    2   udp    111  portmapper

    100021    1   udp  32998  nlockmgr

    100021    3   udp  32998  nlockmgr

    100021    4   udp  32998  nlockmgr
```

kg4ysy kg4ysy # ps aux | grep portmap

```

rpc      27723  0.0  0.0   1752   592 ?        Ss   20:56   0:00 /sbin/portmap

root     27843  0.0  0.0   1632   464 pts/4    R+   20:58   0:00 grep --colour=auto portmap
```

cat /var/log/messages | tail

```
Mar 25 20:57:07 kg4ysy nfs: server kg4ysy-server not responding, still trying

Mar 25 20:57:12 kg4ysy nfs: server kg4ysy-server not responding, still trying

```

This time it just tells me it isn't responding.  It mounted just fine, but as soon as I try to get a file off of the server, it dies.  It seems like a different issue this time.  It seems like I just can't hold a connection.  sshfs works just fine over this connection so it is something with nfs or portmap or something.

----------

## kg4ysy

I've noticed that the directories that have a low amount of stuff in them seem to work just fine.  These are also ones with the subtree_check enabled.  The others that don't work are no_subtree_check because they are on their own partitions.  They also have a couple gigs on the share.  Maybe this is the problem.  Too much info for this type of connection.

----------

## VanDan

Try setting different rsize / wsize settings:

```
screamer:/mnt/stuff/portage                    /usr/portage            nfs             rsize=1024,wsize=1024,noauto,user,bg
```

I have to do this on our LAN here at work. At home ( wireless ), it's even worse.

----------

## DrAgOnTuX

try the 'tcp' option

----------

