# Linux to Linux networking

## My_World

Now this has really got me frustrated...

Everywhere on the net there is quite a large amount of documentation on smb networking, but I find myself in another pickle and so far I could find no answers to my problem...

I have abosolutely no intterest in smb browsing, where I struggle is browsing local Linux shares over the network!!

I have done the LiSA setup on all my boxes, but I still can't get a stable network up and running, sometimes the network shares is up and I can browse the other boxes, but most of the time it's down.

Now I know Linux has a reputation in the networking bussiness, so what in the world am I doing wrong here?

/etc/lisarc

SecondWait = -1

SearchUsingNmblookup = 0

DeliverUnnamedHosts = 0

FirstWait = 30

MaxPingsAtOnce = 256

UpdatePeriod = 300

PingAddresses = 192.168.0.0-192.168.0.255

AllowedAddresses = 192.168.0.1-10

BroadcastNetwork = 192.168.0.1/255.255.255.0

PingNames =

and

# /etc/init.d/lisa start

 * Starting lisa...                                                                      [ ok ]

#

But if I click on the LAN browsing in Konqueror, nothing comes up.

Just for the record, internet sharing is running smoothly on all PC's, so the network is up.

Where must I start, what must I do, where must I read? ANYTHING that will help me with this please!!

----------

## stim

Before I start, I must say that I might not be much help. I have found that browsing smb shares (which you ARE doing by the sounds of it) does not always work. I don't know why.

My solution is this: avoid Microsoft technology at all costs. It was never meant for the *nix evironment and doesn't slot in well. If you have no interest in networking with windows, why are you using samba/lisa. I would suggest using NFS or something similar. Unfortunately everyone else on my network here uses Winblows, so I have no experience with NFS, so there may be disadvantages that are not clear to me. But from my (limited) experience with linux networking, the general concensus seems to be avoid smb if you are not using windows.

Hope that is at least of some use.

----------

## mmealman

For linux to linux NFS is definately the way to go.

Compile in support for NFS into your kernel and then emerge nfs-utils on both machines. On the server edit /etc/exports to share out the directories you want to be able to mount remotely.

See "man exports" for details on this file and I've posted my own exports file below for you to inspect:

```

# /etc/exports: NFS file systems being exported.  See exports(5).

/home/mmealman      192.168.1.10(rw,no_root_squash,sync)

/home/httpd/proto   192.168.1.10(rw,no_root_squash,sync)

/usr/local/lib/php  192.168.1.10(rw,no_root_squash,sync)

```

192.168.1.10 is my workstation machine.

When you've edited your exports start up /etc/init.d/nfs

On your client machine add lines to your /etc/fstab to remotely mount your NFS server shared. Mine looks like the below:

```

# NFS Mount

fall:/home/mmealman             /home/mmealman/fall             nfs     rsize=8192,wsize=8192,timeo=14,intr     0 0

fall:/home/httpd/proto          /home/mmealman/proto            nfs     rsize=8192,wsize=8192,timeo=14,intr     0 0

fall:/usr/local/lib/php         /home/mmealman/proto_libs       nfs     rsize=8192,wsize=8192,timeo=14,intr     0 0

```

fall in the above being my server at 192.168.1.1 and they will automount when my machine boots up.

The nice thing about nfs is that it fully supports Linux's file permissions and user accounts. One gotcha though is to make sure that your userids map from the server to your client. User mmealman on both of my boxes is user 1000.

There are more complex nfs systems that can map different userids back and forth between machines, but it's simpliest to avoid having to do this.

----------

## syadnom

NFS is certainly the way to go.

Not only does NFS support *nix user accounts and permissions, but it also allows you to access them on bootup.

you can't mount an smb share and then use that as your /, but you can with nfs.  grub supports NFS so you can say

root=server:/machine/rootdirectory

this way you can boot from a floppy and have your entire install available.

-

for most people this is useless, but for me it is great.  I have  a 10k rpm scsi aray(raid5, 11 drives, 182GB) and Gigabit Ethernet.  I boot a few machines this way and performance is quite good.  In fact better than having a harddrive installed in the machine in many cases, just have TCP/IP over head to deal with, the Gigabit ethernet does 125MByte/sec, better than ATA100  :Smile: 

-

on the other hand, smb is slow.  i mean SLOW.  I can transfer files accross the Gigabit ethernet using NFS  at about 55MByte/sec to a hard drive, with the 132MByte/sec PCI being the bottleneck, but with smb, this drops to under 30MByte/sec.

----------

## furanku

I'm thinking about to migrate into the other direction (NFS->Samba). It seems to me that NFS is not very robust. At my (WEP encrypted) WLAN home-network NFS dies, when used, after a few minutes, all other services continue to run whithout a problem.

At my university our home directories are mounted via NFS. If I work in that floor with the public terminal pool (don't know what the students are doing there) NFS hangs usually 15 minutes per day. I'm not an expert to NFS, but that's what I also heard form other people: When it comes to connection quality, NFS is really bitchy.

Frank

----------

## syadnom

furanku, don't go NFS -> samba

go to another network file system, such as CODA.

their are windows drivers for CODA(actually any OS can support CODA)

CODA snipet direct from the 2.6 kernel:

support for disconnected operation (e.g. for laptops), read/write server

replication, security model for authentication and encryption,

persistent client caches and write back caching.

basically, it is SuperNFS.

I have worked a little with CODA, and it seems pretty cool.  You can always run a samba server on the system as well to make sure other machines can get access without any extra work.

----------

## qubex

What's wrong with samba? It's easy to setup, it's (fairly) secure, robust, and very mature. There are plenty of programs that will configure your shares for you (i.e. webmin or KDE sharing). Coda is nice, but for a LAN it could be overkill. So can samba for that matter, but samba is nice if you ever need to plug in a windoze client quickly. It's quick and I've never had a problem. 

Sidenote: even with LISA you will still need samba installed and running. If you are running a *nix to *nix setup, why use browsing? Setup mount points in fstab. NFS is not as secure and can be unstable. Coda is not as widely supported. 

Try it and see - emerge samba and, if you need the help, emerge webmin. If you don't like what you see, you can always un-merge them.

Edit: BTW, I have linux-to-linux networking with SMB. Just as a test, I browsed with Lisa - works like a charm, and I've never touched the setup for it. Once you get smb browsing working, Lisa will Just Work.

----------

## taskara

*gasp*

why not just run windows!  :Confused: 

----------

## mmealman

NFS unstable?   :Shocked: 

It's been around forever. For Linux to Linux networking Samba is poor, it doesn't support filesystem attributes and it doesn't support large files.

Who needs LISA when you can just boot your system with all the needed remote filesystems already mounted for you?

The only thing NFS(and samba for that matter) don't handle well is disconnects from the remote host. That's what CODA and AFS are for.

----------

## taskara

NFS is not unstable, just it's a bit cluggy... not screamingly fast in my experience.. but maybe that was me  :Wink: 

----------

## nE0

How about the ssh browsing thing.. I'm sorry I can't remember the name.. I will look that up in a minute or so

It's basicly a network connection via a secure ssh connection.. Wich means you can also use it to connect to your box via the Internet.. I'm not sure there is also a windows client for it..

How about that for linux to linux networking..  :Confused: 

----------

## Redeeman

smb is simply a bad technology, and samba is really unstable compared to NFS, i have been setting NFS up only one time, and then i didnt touch the setup anymore, and it just worked, also bootup from other machines, but smb is fucked, even though samba works partitially, NFS still OWNS it because it supports adding attributtes to the filesystem, and maintain the original permissions! very much more secure, and fits into the unix system perfect, i am also going to test CODA soon, as alot people says that its much better, even though i had no problems with NFS!   :Cool: 

----------

## furanku

So, if NFS is stable, what causes the problems I mentioned above?

On my WLAN mounted NFS-directories simply disappear when I use them for ~ 1-5 minutes. Mounting them again brings them back, but that's no solution. I can imagine that that's a problem with the WEP encryption, since it started since I installed WEP. But all other services continue to run without any problems, copying files via scp never failed. I can't find any unusual log entrys.

On our Ethernet network in the institute our NFS mounted home directories block 15 Min per day (when used on the "dirty" network floor), causing all network related apps to freeze (which can be a bash because of use of ~./history). This happens just to our Linux boxes, the other workgroups use Windows and SMB and don't have that problem. If I call our institut admin, he tells me everything's fine, the problem must be on our side. We have a windows guy in our workgroup who uses that always as a reason to suggest migrating to windows.

On this floor, our local workgroup admin (which will be me in a month...)  usually is called once in a month 'couse one of the boxes cant't mount the users home directory at boot time. So he has to give a "mount -a" as root.

These are the only expierence I've made with NFS so far, so, sorry, if I think NFS is not robust.

Is that NFS's fault or am I doing something wrong?

Frank

----------

## zhenlin

Probably NFS's fault. RPC is probably not the best way to do filesystems.

On the other hand, NFS 4 claims to be much better.

----------

## jaska

You could try SHFS, uses ssh to mount the other systems hd into yours, been using it and its been fairly decent.

----------

## furanku

Thanks for all the tips! I'll try them, when I'm through with my exam stress in a few weeks!

Frank

----------

## mmealman

 *furanku wrote:*   

> So, if NFS is stable, what causes the problems I mentioned above?
> 
> On my WLAN mounted NFS-directories simply disappear when I use them for ~ 1-5 minutes. Mounting them again brings them back, but that's no solution. I can imagine that that's a problem with the WEP encryption, since it started since I installed WEP. But all other services continue to run without any problems, copying files via scp never failed. I can't find any unusual log entrys.
> 
> On our Ethernet network in the institute our NFS mounted home directories block 15 Min per day (when used on the "dirty" network floor), causing all network related apps to freeze (which can be a bash because of use of ~./history). This happens just to our Linux boxes, the other workgroups use Windows and SMB and don't have that problem. If I call our institut admin, he tells me everything's fine, the problem must be on our side. We have a windows guy in our workgroup who uses that always as a reason to suggest migrating to windows.
> ...

 

My guess is that with the WLAN you're having mini "outages" which is causing NFS to get messed up in some way. At school it sounds like they're regularly cycling the NFS servers which is causing your outage.

When a NFS service isn't available, yeah the client doesn't handle it very well until it comes back. Though I don't know why you need to remount all the time on your WLAN. That isn't typical at all.

Really you might want to try AFS. AFS is like NFS only when the server goes down the client can still read the files. It keeps a local cache of previously read files and goes into read-only mode on those files when the server has a hiccup.

CODA works like AFS, it caches files off the server, but when the server goes down or gets interrupted it still lets you write to those files in your cache. When the server comes back up, it just syncs everything.

CODA is very cool and is becoming a popular part of the newer Linux kernels, AFS is a little more robust and mature though. I think gentoo has a AFS install guide in the docs section.

----------

## taskara

I agree with mmealman

wireless connections seem to drop out now and then, so nfs is cutting off the connection - which is actually a GOOD thing  :Wink: 

----------

## furanku

Although I should learn, I took a short look at coda and OpenAFS, coda didn't compile (looks like a gcc 3.3 issue, maybe) and the setup for boths scared me a little. Authentification, backup, protection and volume loction servers?! All to be configured... Thats quite a difference to a simple /etc/exports. Is there somewhere an easy to read HOWTO?

Whew! And I thought the high energy physics I have to learn is complicated stuff...  :Shocked: 

Anyway, thanks, I'll take another look into OpenAFS and coda later,

Frank

----------

## mmealman

You can check out http://www.gentoo.org/doc/en/openafs.xml for a bit of a howto on AFS.

----------

## dark_priest

 *mmealman wrote:*   

> 
> 
> Compile in support for NFS into your kernel 

 

WHERE in the kernel config can i find this? (i use genkernel --config)

----------

## syadnom

FileSystems, Network File Systems, NFS

----------

## dark_priest

does it matter if i do it as module or built in?

(set it to built in now)

----------

## syadnom

nope, as long as its loaded it will work.

----------

## dark_priest

sweet

i also noticed i'm 11 posts away from becoming a "tux' litle helper"   :Shocked: 

----------

## daha

i tried to use lisa with my redhat system, but noticed, that nfs is the most useful tool to share directories. samba is also quite good, though it has some minor problems. (like security when you don't know exactly what you are doing:)

----------

## dark_priest

additionally, its been written down here how NFS can be mounted at bootup...

how is this done live ?

ie: non-bootup?

----------

## mmealman

NFS just uses the mount command.

mount -t nfs fall:/home/httpd/proto /home/mmealman/proto

Or put an entry in your fstab file with a noauto option set and it won't mount at boot time but you can mount it via: mount /home/mmealman/proto

----------

## dark_priest

```

# mount -t nfs server:/website/htdocs /home/webmount

mount: fs type nfs not supported by kernel

```

does this mean my workstation doesnt support NFS or that my server doesnt?

(recompiling both kernel as i post this, but they both alreadt HAD NFS support set on built in)

anyone have a clue what's up?

----------

## mmealman

The workstation doesn't support it.

Did you compile it as a module or as a built in kernel option? If it was a module, try insmod nfs first. 

You can also cat /proc/filesystems to see what filesystems your kernel supports.

----------

## dark_priest

ok here's the weird shit...

i JUST compiled my kernel, i am ABSOLUTELY POSITIVE i did EVERYTHING that had NFS in it or even REMOTELY LOOKED LIKE IT built into the kernel.

and STILL it doesnt have NFS support  :Shocked: 

```

xenofobiq # cat /proc/filesystems

nodev   rootfs

nodev   bdev

nodev   proc

nodev   sockfs

nodev   futexfs

nodev   tmpfs

nodev   shm

nodev   pipefs

nodev   binfmt_misc

        ext3

        ext2

nodev   ramfs

        iso9660

nodev   devfs

        reiserfs

nodev   usbdevfs

nodev   usbfs

```

----------

## mmealman

Hmm, not to sound like Capt Obvious here but, are you sure you booted using the new kernel and not the old one?

As far as the options in the kernel config, NFS support is just under the File Systems -> Network File Systems -> NFS Filesystem support and NFS Server support.

I also use NFSv3 support in both the server and client.

----------

## dark_priest

i need to reboot ?  :Shocked: 

----------

## dark_priest

ok, now that ive rebooted ... (not-a-word)... i have NFS support... BUT... 

i cant overwrite or create files

is this because of some config issue in /etc/exports or because i set no rw permissions in the directory itself? (it was created as root user)

ive come a long way since the help here, this little question would finish it off

----------

## JjcampNR

After you recompile your kernel and create the new bzImage, yes you do indeed need to reboot.  However, there are a few things you need to do before you reboot:

(# = root prompt)

1)  Mount your boot partition:

# mount /boot

2)  This will backup your old kernel...just incase   :Wink: 

# mv /boot/bzImage /boot/bzImage.orig

3)  Move your new kernel into the boot partition:

# cp /usr/src/linux/arch/i386/boot/bzImage /boot

You may want to add a line into your boot loader config, so that if your new kernel does not perform as you expected you can simply reboot and go back into your old kernel to fix the problem.  Also, if you compiled anything as a module you need to remember to create and install those modules again.  On the same note, if you run an Nvidia card, or ALSA you should re-emerge those drivers before you reboot or they won't be available to you when your system comes back up.

After you do this, you should be good to go ahead and reboot into your new kernel.  

Good Luck!

Josh

----------

## JjcampNR

Oops, guess I was a little late with that post.  Sorry!

Josh

----------

## mmealman

 *dark_priest wrote:*   

> ok, now that ive rebooted ... (not-a-word)... i have NFS support... BUT... 
> 
> i cant overwrite or create files
> 
> is this because of some config issue in /etc/exports or because i set no rw permissions in the directory itself? (it was created as root user)
> ...

 

It's probably a permission thing. Let's say on the server you're exporting /myfiles

Let's say you're user 1000 on the client machine. On the server you'll want /myfiles to be owned by user 1000.

The other thing to check is to make sure in your exports you have the share options set to rw. Like:

/home/httpd/proto   192.168.1.10(rw,no_root_squash,sync)

[/b]

----------

## dark_priest

A# what does no_root_squash do?

b# how do i set the directoy to be owned by anyone ?

 (i want it acessible by my whole network, that should be possible, right?)

----------

## mmealman

 *dark_priest wrote:*   

> A# what does no_root_squash do?
> 
> b# how do i set the directoy to be owned by anyone ?
> 
>  (i want it acessible by my whole network, that should be possible, right?)

 

"man exports" has all the details on what no_root_squash is.

Setting ownership of a directory is done via chown. You can have the share accessible on your entire network.

I'd recommend emerging app-doc/howto-html and reading the NFS howto. The howto's in Linux will pretty much teach you anything you want to know(I learned pretty much everything I know about Linux from reading them).

The NFS howto will also go over how to share an export across an entire network and may explain the no_root_squash stuff a little more clearly.

----------

