# simple networking help

## kcy29581

hi all,

I haven't ever networked 2 Linux boxes... I've used Samba succesfully though between Linux and Windows.

I have 2 pc's, I have added them to /etc/hosts, they are both members of the same domainname. How do I browse them, either by console or Gnome? I can ping the box, I'm just after a guide explaining how to share files between the 2.

Thanks.

----------

## Kaboosh

The most popular ways are SAMBA (which you already stated are familiar with) and NFS.

TLDP.org has an outdated NFS guide (March 2000 - all that means is you may have to ad-lib in some areas).  I've got it running and it's fairly straightforward   :Smile: Last edited by Kaboosh on Thu Jun 16, 2005 12:53 am; edited 1 time in total

----------

## kcy29581

 *Kaboosh wrote:*   

> The most popular ways are SAMBA (which you already stated are familiar with) and NFS.
> 
> TLDP.org has an outdated NFS guide (March 2000 - all that means is you may have to ad-lib in some areas).  I've got it running and it's fairly straightforward  

 thanks I'll look into that in a bit. Trying to use distcc right now and just trying to see if it all works  :Smile: 

----------

## Kaboosh

I just remembered one more thing...if you are running sshd you can use scp from the command-line or a sftp:// URL in Konqueror.  I use this ad-hoc normally with other hosts I have accounts on over the internet.

Since this behaves like ftp it's not really a "remote file system" though...

----------

## kcy29581

is nfs a filesystem type, cause if it is then I think for me its useless, as all I want is to look at my existing filesystems

or have i got that wrong?

----------

## Kaboosh

 *kcy29581 wrote:*   

> is nfs a filesystem type, cause if it is then I think for me its useless, as all I want is to look at my existing filesystems
> 
> or have i got that wrong?

 

NFS is a network file system protocol...like SMB or CODA (one that I've been meaning to try)

----------

## kcy29581

 *Kaboosh wrote:*   

>  *kcy29581 wrote:*   is nfs a filesystem type, cause if it is then I think for me its useless, as all I want is to look at my existing filesystems
> 
> or have i got that wrong? 
> 
> NFS is a network file system protocol...like SMB or CODA (one that I've been meaning to try)

 protocol, right. cheers!  :Smile: 

----------

## d_adams

In a nutshell, it's something like this:

Make sure nfs is compiled into your kernel (under file systems/network file systems) and be sure to include both client and server to be able to browse either one. After you compile the kernel, reboot. Emerge nfs-utils. Edit /etc/exports to include the ip for the opposite computer. I did mine by range, ie; 192.186.1.* so any box on my internal network can access the shares. My line in /etc/exports is like this:

```
/mnt/hda5 192.168.1.*/255.255.255.0(no_root_squash,rw)
```

 This allows for root access to shares, so don't do this if you don't have a router between you and the internet.

If you want it to start on boot, do this. 

```
/etc/init.d/nfs start; rc-update add nfs default; rc-update add nfsmount default; rc-update add portmap default
```

From the server side, share the directory you want (as root) and on the client side, make a new mount directory and do the following:

```
mount 192.168.1.100:/mnt/hda5 /mnt/whatever_your_local_mount_point_is
```

Mind you, the ip address for mounting is whatever the server ip is and I just used my mount points as examples. This is not a comprehensive walkthrough, just some basic stuff. I'm sure I've forgotten something, but it will get you going in the right direction. I'm not at my box right now, so there might be a typo here or there.

Edit: checked my box just now and there was one thing missing in /etc/exports (marked in bold)

 *Quote:*   

> /mnt/hda5 192.168.1.*/255.255.255.0(sync,no_root_squash,rw)

 

Also, you might need to create/edit your /etc/hosts.allow to reflect your specific network needs, like this

```
 

# Portmapper is used for all RPC services; protect your NFS!

# (IP addresses rather than hostnames *MUST* be used here)

portmap: 192.168.1.1/255.255.255.0

lockd: 192.168.1.1/255.255.255.0

rquotad: 192.168.1.1/255.255.255.0

mountd: 192.168.1.1/255.255.255.0

statd: 192.168.1.1/255.255.255.0
```

I'm thinking I needed to create the hosts.allow file, but I'm not 100% sure. Just for reference, my transfers average about 12MB/ps on a 100 mb linksys router. It occasionally shows that it is stalled, but it's still transferring files anyways. It's gone as high as 60 MB/ps and as low as 256 KB/ps but never seems to stay there very long. I've transferred about 45 GB of data across it in the last 2 days and it hasn't really had any problems. The server box gets a little laggy doing stuff on it during transfers, but nothing bad.

----------

## kcy29581

thanks for that!  :Very Happy: 

----------

