LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   NFS questions (https://www.linuxquestions.org/questions/linux-server-73/nfs-questions-575347/)

Geminias 08-07-2007 09:41 AM

NFS questions
 
Hi, I was wondering if there was a way to automount a computer on my network?

I added this line in my fstab:
192.168.0.100:/home/justin /home/hp nfs rsize=8192,wsize=8192,timeo=14,intr 0 0

but the Internal IP is not guaranteed to be 192.168.0.100 so this won't always work :S

Question 2: I don't understand why this:

/path/to/shared/files 192.168.1.0/24(rw,no_root_squash,async)

Translates to this: "export path to all IP addresses between 192.168.1.1 and 192.168.1.254 with Read/Write access."

I mean we are looking at a "192.168.1.0/24" right? How does it mean "192.168.1.1-254" Programmers sure do some funky things with symbols...

On the same note, I accidentally mounted a shared folder of a computer with IP address 192.168.0.102 with the command:

Code:

sudo mount 192.168.102:/home/justin shared
Is this related to my first question? Or is it just the fact that 0's are disregarded in the hexidecimal format of the ip address?

raskin 08-07-2007 12:35 PM

How do you want to let computer know where is the share located? Here http://www.linuxquestions.org/questi...82#post2850082 I described how to add any sequence of commands to boot process. For example, you can run 'host' and parse output to find IP by hostname, or something like that.

About the second question.. IP addresses are tuples of four bytes. Each byte is a number in the range 0-255. So it can be written in no more than 3 decimal digits. But if you take last two bytes of an IP address, they can also be read as a number, this time from 0 to 65535. It is assumed that number is little-endian here, so preceding byte is multiplied by 256 and added to the last byte. And it is customary that computers allow specifying the end of an IP address merging bytes. So, 127.0.1.1 is the same as 127.0.257 . In your case, the third byte is zero, so 192.168.0.x = 192.168.x . Each byte is stored as 8 successive bits. When you specify a group of computers, you may say 'I want them to have common beginning of the addresses, and any end'. It makes sense as this usually means one LAN; and in general, routing on the level below ISP's is so that IP's that differ only in less significant bits are close in network sense. And to specify where the end begins you give one example and say that first n bits (in your case, 24, e.g. 3 bytes - or 3 dotted groups) must be fixed. All 0 (0) and all 1 (255 in your case) have special meaning as the end of an address, so they are excluded anyway (No host can have them).

chrism01 08-08-2007 08:53 PM

The convention is also that addresses ending in .0 mean the (sub)net itself, .255 means broadcast address ie all hosts on the (sub)net.


All times are GMT -5. The time now is 12:43 AM.