# ssh & nfs with wireless

## gcyoung

Nfs and ssh work perfectly with a wired eth0 connection on a Toshiba laptop, but the same computer hangs when I try to mount nfs directories (version 3) listed in fstab with a wireless connection (wlan0).

I can access the internet and ping all local & remote IP addresses with the wireless connection, but cannot mount nfs directories, use ssh or scp. 

I am using wpa_supplicant and /etc/init.d/net.wlan0 (from /etc/conf.d/net) to set up the wireless , and the connection seem solid in all other respects. I would suspect my settings for ssh and nfs, but they both work perfectly between three computers with cable connections.

I have the following setup for "net".

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="Dwext"

iwconfig_wlan0="mode_managed"

essid_wlan0="XXXXXXXX"

key_XXXXXXX="s:xxxxxxxxx"

config_wlan0=( "192.168.1.4 brd 192.168.1.255" )

routes_wlan0=(" defaults via 192.168.1.1" )

#

"/etc/hosts" contains IP's and hostnames of other computers. and:-

" /etc/hosts.allow" permits these machines access to  portmap,lockd,mountd,rquotad and statd.

What other configuration, setting,  or program might be needed for the wireless connection??

----------

## scouter389

What does your /etc/exports look like on the serving machine?

What errors do ssh/scp throw up? 

Does eth0 use DHCP?

I also noticed that you added an "s" to default in your route. That may cause problems but if that works then I would leave it alone

----------

## gcyoung

/etc/exports on server machine is as follows:--

"/data  192.168.1.2/5(rw,no_root_squash,no_subtree_check)"

No problems there, since it works fine with cable eth0.

The mystery for me is that everything works  fine with the cable connection, and the wireless connection is ok for internet connections. I can also ping addresses with the wireless connection, I'm just unable to mount with nfs or use ssh.

I note also that  /proc/mtab shows the disks as mounted after I have attempted a mount.  The computer justs hangs  in the console after the mount or ssh command, as if it is unable to read anything. It also hangs if set to automount at boot. I don't get any error messages.

Both eth0 and wlan0 are set to static IP's, although I have tried with dhcp with the same result. I use different IP's but I don't think that matters, since I get the same result with no cable connection. Also, there cannot be anything inherently wrong with the machine since I can get the wireless to work perfectly with an ubuntu live CD.

Incidently the 's:' is necessary to indicate an asci key, it won't work without it.

----------

## scouter389

Try defining the export as 

```
/data 192.168.1.2(rw,no_root_squash,no_subtree_check) 192.168.1.4(rw,no_root_squash,no_subtree_check)
```

This is what I do for 2 computers to share a private overlay from the rest of my machines without going on the internet for the overlay.

the following line in your /etc/confi.d.net 

```
routes_eth0=( "defaults via 192.168.1.1" )
```

should be 

```
routes_eth0=( "default via 192.168.1.1" )
```

 for no problems on that front.

----------

## gcyoung

Routes_wlan0 is set correctly, my incorrect entry above was the result of a typing error. I don't think my problem lies with the network settings, since they are the same as I have used for several years, and they have always worked with a cable "eth0" connection. It is my new use of a wireless connection which has the problem. 

It seems reasonable, therefore,  to assume that the fault must lie somewhere in my kernel configuration of the wireless, or the wpa_supplicant setttings. The disks ARE mounting, as indicated by /proc/mounts and the fact that the kernel attempts to unmount them on shutdown (and fails), but I am unable to access them. This suggests a permission problem, but since I don't get that when a disk is mounted with cable, and my UID's are the same on both machines, I have had to dismiss that possibility.

Thanks anyway scouter389, for your attempts to help, but I think I must try to read up more about how wireless works, since that is relatively new to me.

----------

## scouter389

here is a link to help configure and setup wireless. I used it to work wonders on my network.

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?style=printable&full=1#book_part4_chap4

hope this helps.

----------

## gcyoung

Just to wind this up.

I was not able to find out what was wrong. I suspect some corruption or errors in my software, So I did the drastic thing and reinstalled gentoo from scratch. Everything now works as I intended and as it is supposed to.

----------

## scouter389

Glad it is all working properly now.

----------

## jordanwb

 *gcyoung wrote:*   

> 192.168.1.2/5

 

Uh what? Surely you mean 192.168.1.0/24? The number after the slash is the number of bits used to represent the network. It seems that your network mask is 255.255.255.0 as confirmed in an earlier post:

 *gcyoung wrote:*   

> config_wlan0=( "192.168.1.4 brd 192.168.1.255" )
> 
> routes_wlan0=(" defaults via 192.168.1.1" )

 

----------

