LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Networking With Red Hat - Need Help (school Project) (https://www.linuxquestions.org/questions/linux-networking-3/networking-with-red-hat-need-help-school-project-152305/)

Nukem 03-01-2004 02:46 PM

Networking With Red Hat - Need Help (school Project)
 
oK.. here is the thing. I'm taking this engineering course at school. Today we just started doing networking. My teacher put us into groups and our task is to create a network between two computers and then create a manuel of it.
We are using Red Had linux. The thing is, he is not going to go from A - Z and teach us everything. We have to find out ourselvs. If we really stuck, then he is going to help us. But not teach us.

Ok.... these are the parameters.

We can't use any routers. It has to be a direct connection from one computer to another. We should be able to share hard drive (no internet/printing). Just the hard drive. We have to be able to set it up from red hat and get it running.

But....
I just started using linux recently and havent touch the networking part yet. I use mandrake not Red Hat.
It would be really really great if someone can show me the way. I mean, if you know any websites and resources about this thing just post them here. It would be really helpful while I'm doing it myself.

Finally... thanks for taking the time to read the whole thing.

fur 03-01-2004 03:24 PM

Here are some basics that should get you started.


1.) You need a cross-over ethernet cable to connect the two computers together.

2.) Make sure both computers have a IP address that are in the same subnet.

3.) To share folders, you may want to check out Samba, NFS, sftp, or FTP.

Nukem 03-01-2004 03:25 PM

If both computers are running Linux, do I still need to configure Samba to share files?

TXJustin 03-01-2004 05:35 PM

Quote:

Originally posted by Nukem
If both computers are running Linux, do I still need to configure Samba to share files?
No. You can use NFS where you are mounting a directory from PC1 onto PC2.

You have to have the NFS service running and configured (there's a file you need to put the name of PC2 into ... but I can't recall the filename.) Then from PC2 you mount the directory ...
mount -t nfs pc1:/directoryname /mountpoint

Nukem 03-01-2004 08:44 PM

I found a tutorial by searching on google.com/linux but the NFS tutorial seems pretty complicated while Samba one looks kind of simple. Is using Samba easier than NFS?

TXJustin 03-02-2004 10:46 AM

Quote:

Originally posted by Nukem
I found a tutorial by searching on google.com/linux but the NFS tutorial seems pretty complicated while Samba one looks kind of simple. Is using Samba easier than NFS?
As with everything, easier is a relative term. It really depends on what you are trying to accomplish. Try out NFS, and if it doesn't meet your needs, it's easy to change back. Look at this piece from Linux Newbie and scroll down to the NFS section. It's amazingly easy, and will only take 60 seconds or so to setup. The one thing they don't mention is that the "host" PC must have the NFS service running (or if running, restarted) after the changes are made.

http://linux-newbie.sunsite.dk/lnag_...loppy_zipdrive

TXJustin 03-02-2004 10:52 AM

Oh, one more thing --

Since you're going to be directly connecting the two machines I'm going to assume that they will not be getting IP addresses from a DHCP server. In which case you will have to assign each an IP, say 192.168.0.1 and 192.168.0.2.

...then when you are mounting the drive, you'll want to use the IP address (otherwise it probably won't find the host computer)

...so... mount -t nfs 192.168.0.1:/directoryname

Nukem 03-02-2004 05:16 PM

Ok.... when I connect the two computers using the cable, where do I have to go to set up the IP and stuff? I seriously have no idea about networking with linux.
Tomorrow I'm going to install red hat on two mechines and I don't know what do I do after. I'm going to see if I can find some more stuff on the internet. I have done researches about this subject on the internet in past and have failed. So any links to web pages and tips are welcome.

TXJustin 03-03-2004 06:52 PM

Quote:

Originally posted by Nukem
Ok.... when I connect the two computers using the cable, where do I have to go to set up the IP and stuff? I seriously have no idea about networking with linux.
Tomorrow I'm going to install red hat on two mechines and I don't know what do I do after. I'm going to see if I can find some more stuff on the internet. I have done researches about this subject on the internet in past and have failed. So any links to web pages and tips are welcome.

If you're going to be installing fresh, the install will ask you if you want to assign an IP address, or if one will be automatically assigned. In there you can put 192.168.0.1 on one PC, and 192.168.0.2 for another.

LinuxLover 03-03-2004 10:20 PM

U can assing ip adress by the command

#netconfig

If u change the IP in a runnig box,then after changing ip do

#ifdown eth0
#ifup eth0


For sharing hard disk at two Linux U need NFS

its file is
# /etc/exports


Write the path of dir which u want to share in this file
like

/home/kashif


Restart the NFS service by the command

#service nfs restart



then at other system mount that dir by the command

#mount server1name:/home/kashif /mnt/nfs

By default you will have only read permision at this.

Nukem 03-04-2004 08:52 PM

for the command "mount server1name:/home/kashif /mnt/nfs" the server1name is the IP of the computer that the directory which you want to mount is located right? I'm going to try this tomorrow.
Thanks for the reply.


All times are GMT -5. The time now is 05:12 PM.