View previous topic :: View next topic |
Author |
Message |
jmack1010 Tux's lil' helper
Joined: 25 Jan 2004 Posts: 93 Location: University of Cincinnati, Oh
|
Posted: Fri Jan 21, 2005 7:52 pm Post subject: Linux Networking at the home |
|
|
I have resisted forever posting this topic, hoping I would figure it out; however I am so frustrated and I could really use help of someone more experienced.
My Problem:
I have a Linksys wireless router BEFW11S4 802.11b. Three roommates who I have converted to linux. Three laptops and one desktop, the desktop and two of the laptops are running Gentoo 2004.3 and one of my roommates is running Suse 9.2.
On the Gentoo boxes if I edit the /etc/hosts file to say:
127.0.0.1 themack.home.org themack localhost
192.168.1.101 thewoody.home.org thewoody
192.168.1.102 stealthy.home.org stealthy
# IPV6 versions of localhost and co
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
I can ping my roommates computers. However, once everyone reboots the ip addresses change and I have to edit the /etc/hosts file again. I know their is a file that bind ip addresses to mac addresses, but I don't know what it is and we are all using DHCP.
My next problem is even though i can ping other computers, I don't know how to share files. I have tried to setup Samba, but to no avail. I have read several mini Samba howto's but I have not been successful in my network (I must just be missing something). Since none of us are using windows, and only one of my roommates occasionaly uses it, I am not to concerned about networking with Microsoft Computers. So Samba or NFS will solve my solution.
I know that samba is suppose to be easy to setup, and I am using KDE so I thought their frontend would make networking easy, but I am at a loss because I really don't know what I am doing. However, if NFS isn't bad to set up than that would be an awesome solution too.
To break up this post, thank you for anyone that is even just reading my problem and helping me out, I truly appreciate it.
To recap:
i need to know how to bind ip addresses to mac addresses so they stay the same (unless this is unnecessary). And I need a dummy proof guide to setup basic file sharing between the computers on the network with either Samba or NFS. I would post my smb.conf, however, it is in such disarray it truly means nothing anymore.
Thank you so much for your time, if you need any more information, just let me know and I will post it for you!
Joe |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54793 Location: 56N 3W
|
Posted: Fri Jan 21, 2005 8:05 pm Post subject: |
|
|
jmack1010,
Since you are all using dhcp, you should not have IP addresses for the local network in /etc/hosts. DHCP should take care of than when you ping the PC name. You cannot ping the IP address safely because it may change.
You can request a particular IP from dhcp too and will have it assigned if its free. A bit like psudo static IPs.
To share files, look into NFS. It helps if the user names and IDs are the same on all the PCs. Be sure to use soft mounts if you try to cross mount NFS filesystems or you can get into the state where each PC is waiting for the other to boot. Samba is only needed to include Windows in the filesharing.
NFS is easy to set up, You need kernel support, an /etc/exports file that defines what is shared and who with and the daemons provided by Code: | emerge net-fs/nfs-utils |
. You can then have an entry in /etc/fstab like this:-
Code: | # <fs> <mountpoint> <type> <opts> <dump/pass>
# An NFS mount to see whats on Eccles without logging in
eccles:/home /mnt/eccles nfs bg,_netdev,rsize=8192,wsize=8192 |
Be careful what you put in /etc/exports, you probably don't want to share with the entire internet but you can if you want. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
jmack1010 Tux's lil' helper
Joined: 25 Jan 2004 Posts: 93 Location: University of Cincinnati, Oh
|
Posted: Fri Jan 21, 2005 10:06 pm Post subject: Thank You |
|
|
First and foremost thank you for your help!
I am currently at work so I cannot change my setup currently to confirm that I can set it up right. I just have a couple more questions to make sure I have everything understood.
1. When I add my shared directory to /etc/fstab is it
stealthy.home.org:/mnt/home or...
stealthy:/mnt/home
2. What exactly does this do "bg,_netdev,rsize=8192,wsize=8192"
3. in /etc/exports do I just add a username or do I have to add it under under /etc/hosts.allow like:
steathy.home.org or do I have to add more information.
4. Is it possible to see all the computers on your network?
for example can you type in nfs:/ in konqueror or something similar?
5. Finally, (i know the list has become annoying) but is it possible to share a printer under NFS?
Thank you so much again! I appreciate your all your help!
Joe |
|
Back to top |
|
|
Headrush Watchman
Joined: 06 Nov 2003 Posts: 5597 Location: Bizarro World
|
Posted: Fri Jan 21, 2005 10:24 pm Post subject: |
|
|
NFS = network file system --> no printer sharing.
(Technically you could hack into the spooler directory using a share, that kind of thing, but obviously not what you want.)
Cups has support for printer sharing.
Check out the options in CUPS and you'll be able to add a networked printer as easy as Windows.
(Directions and tools depend on your environment/desktop) |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54793 Location: 56N 3W
|
Posted: Fri Jan 21, 2005 10:32 pm Post subject: |
|
|
jmack1010,
The form of the mount command for nfs mounts is Code: | mount <machine_name>:/path/to/exported/filesystem/on/host /mountpoint/in/local/filesystem/tree | The colon seperates the machine name from the filesystem.
The filesystem type is nfs (-t nfs) regardless of the underlying filestem type onthe host doing the export.
bg,_netdev allows the mount to contine (and retry) in the background while booting continues. Essential if the exporting PC is down.
The rsize and wsize are the block sizes to read and write. the defaults are smaller, which leads to lower throughput.
Here is the /etc/exports file from Eccles
Code: | # /etc/exports: NFS file systems being exported. See exports(5).
/home 192.168.100.0/24(rw)
| This exports /home (on the PC containing this /etc/exports) to any PC on the 192.168.100.0/24 subnet as read write.
Explains a lot.
You do not use nfs for printer sharing. See this guilde for network printing http://www.gentoo.org/doc/en/printing-howto.xml at the bottom is a network printing setup.
Hint: you can nfs mount a filesystem on the PC exporting it to see if it works. Linux is network transparent. Its not a very useful thing to do but it saves getting two PCs involved until it works.
============ edit ===============
The "imported" filesystems behave as if they were part of the local filesystem tree. The only reason you can tell they are not local is because they are slow. The is no sense of seeing them like a share on a windows PC. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
jmack1010 Tux's lil' helper
Joined: 25 Jan 2004 Posts: 93 Location: University of Cincinnati, Oh
|
Posted: Wed Jan 26, 2005 7:51 pm Post subject: |
|
|
Thank you so much!
I am able to mount my shares on my other computers, but only when I assign the ip address to the computer name in /etc/hosts.
Quote: | Since you are all using dhcp, you should not have IP addresses for the local network in /etc/hosts. |
However, I was not able to mount host if I did not assign the temp. ip addresses to the computers. i guess I will have to figure out a way to resolve the addresses. Thanks again.
Joe |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54793 Location: 56N 3W
|
Posted: Wed Jan 26, 2005 8:29 pm Post subject: |
|
|
jmack1010,
At the time your host broadcasts for an IP address, you may request that it use a particular name for your host. Its an entry in /etc/conf.d/net
If you do that, the dhcp server should manage name resolution for you. You will need a line in /etc/resolv.conf that says
Code: | nameserver <IP of dhcpd server> | on each PC. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|