LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-17-2024, 09:36 AM   #1
Doug Burton
LQ Newbie
 
Registered: Apr 2024
Posts: 2

Rep: Reputation: 0
NFS, or lack thereof


Good day everyone. Just a brief note about me, I've been using MX-Linux 23 now and have been using MX-Linux for about 3 years. Before that I dabbled in Linux for many years, but my primary system was Windows.

For the most part I am able to get things done by using Google to search for whatever it is I'm trying to accomplish, but every now and then I run into a problem I can't quite figure out. One such item is NFS.

I have basically 3 systems on my local network of the 10.0.0.0 range and I would like to be able to share folders or drives on the network and being as all run basically the same system (MX-Linux) I thought this should be easy.

I first tried using Samba, but decided after several failed attempts that it might be easier to use a method like NFS being as it is for Linux systems. I did my usual Google search and came up with a dummies link How to Share Files with NFS on Linux Systems. I thought this should be a good way to do it as it proudly proclaimed only 2 basic steps were involved. I should have known better at this point because it's never as easy as they say.

My first problem was the lack of an explanation on setting up a line in the exports file to export the folder I wanted to share. This was the problem area:

If you want to give access to all hosts on a LAN such as 192.168.0.0, you could change this line to

/home 192.168.0.0/24(rw,sync)


I understand the /home is the folder I wish to share on the exporting system and 192.168.0.0 is the IP address user range I wish to have access, but no place in the article was the /24 after the IP address mentioned.

So once again I went off in search in Googleland and found a explanation of sorts under a Fedora article which read:

IP networks — Allows the matching of hosts based on their IP addresses within a larger network. For example, 192.168.0.0/28 allows the first 16 IP addresses, from 192.168.0.0 to 192.168.0.15, to access the exported file system, but not 192.168.0.16 and higher.

Great, now I know that the /28 limits the number in the IP range of addresses, but how does 28 correspond to 16 IP addresses?

I realize that part of the problem with Linux is it's infinite configurability, but there needs to be a simple way to do something that applies to us simple users.

For the record I have a 10Tb hard drive coming which I want to eventually setup as NFS shared so my other systems on the local network can access it to read and write to. As I said, all of my systems are running the same OS (MX-Linux) and they all use the same user and password. I thought this would make it easier to share, but I guess not.

I do have a 3Tb hard drive setup on another networked computer running FreeNAS and it works flawlessly. I can read and write to it from any other computer on my network. I considered installing the new 10Tb drive into this computer, but it's been so long since I set it up I figure I have forgotten how I did it. Once things work I tend to forget how I got it working and just use it.

Also this is an older HP system and I fear the 10Tb drive may not work with the older hardware. Besides that I wanted the new drive to be local on the system I use the most and just accessible to the other computers on the network.

So this is my problem. Is there a fairly easy way to establish this, keeping in mind there are no worries about security, I live alone and no one else uses my computers. Perhaps a link to an article that explains it for us simple users? Any and all help sincerely appreciated...

Doug
 
Old 04-23-2024, 10:59 AM   #2
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 783

Rep: Reputation: 250Reputation: 250Reputation: 250
This has to do with network masks, so look those up if you want to learn about them. To get you setup quickly, if you have 10.0.0.1, 10.0.0.2, 10.0.0.3, etc then you'd use
Code:
/home 10.0.0.0/24(rw,sync)
Make sure rpcbind, nfsd & friends are running, and check from the remote system(s) with showmount -e (the NFS server address). Samba will work as well, but NFS might be simpiler as there's no complex smb.conf file to mess with.
 
Old 04-23-2024, 12:18 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,725

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
Look at the output of the command:
ip a

You should see something similar to:
Code:
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:65:05:b6 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.0/24 brd 10.0.0.255
The /24 is the subnet which corresponds in this case to 255.255.255.0 which means the number of available addresses is from 10.0.0.1 to 10.0.0.254.

https://mxlinux.org/wiki/networking/nfs/

mx automatically configures the firewall so if you have not turned it off or allowed nfs traffic then you will not be able to connect. The same goes for samba.

Another option for sharing files between computers is using sftp from the file browser. No configuration files.
 
Old 04-23-2024, 01:25 PM   #4
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,610

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
Quote:
Originally Posted by Doug Burton View Post
Great, now I know that the /28 limits the number in the IP range of addresses, but how does 28 correspond to 16 IP addresses?
If you write an IP address in binary, you get 32 bits (for IPv4).

The /number is a number of bits which are the same for the addresses in the range.

So with a mask of 28 bits, that leaves 32-28 = 4 bits left over - i.e. 4 bits with which indicate the addresses.

With 4 bits of binary, you can have 0000 up to 1111 which is decimal 0 to 15, or 16 distinct addresses.

Similarly, a mask of 24 bits leaves 32-24 = 8 bits left over, a full byte, which can represent 256 addresses.


As michaelk suggests, the output of "ip address" should provide an acceptable value for your network - it doesn't matter using /24 even if you only have 3 devices on the network (unless you have devices which you need to exclude).


Last edited by boughtonp; 04-23-2024 at 01:31 PM.
 
Old 04-24-2024, 08:31 AM   #5
Doug Burton
LQ Newbie
 
Registered: Apr 2024
Posts: 2

Original Poster
Rep: Reputation: 0
Sorry everyone, I do appreciate your replies, but they came a little late for me. I found the MX Linux forum and posted much the same query. One of their first suggestions was to use the MX Samba Config app to setup my shares and this worked very well indeed. So now I have the 10Tb hard drive, a 2Tb USB SSD drive and my /home folder all shared and accessible on the 2 other systems on my local network. The NFS info is appreciated, but for now at least I can access my shares as desired.
Thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to find correct distro for my box and my skill (or lack thereof) wolvinedragon Linux - Newbie 22 09-25-2009 12:39 AM
LXer: GnuCash - Keep Your Cash (or lack thereof) in Order LXer Syndicated Linux News 2 07-04-2009 07:31 PM
Update speed (or lack thereof)... buccaneere Linux - Software 9 02-12-2009 07:48 AM
LXer: Firefox security (Really Windows Security or Lack Thereof - ED) LXer Syndicated Linux News 1 10-18-2008 09:32 PM
Gnome toolbar, or lack thereof Fantus Linux - Newbie 6 08-28-2003 06:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration