Results 1 to 10 of 10
Hey everyone,
I am very new to linux, and networking, but not computers in general.
I ultimately (as of now) want to create a file/print sharing network between 2 computers ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-15-2008 #1Just Joined!
- Join Date
- Sep 2008
- Posts
- 12
need help with basics of a simple home network
Hey everyone,
I am very new to linux, and networking, but not computers in general.
I ultimately (as of now) want to create a file/print sharing network between 2 computers each running only Ubuntu 8.04. Could anyone provide a link to some basic documentation on both the physical and software setup on how to do this?
To give you some information on how things are currently setup (NOT using wireless):
Computer 1 (which I want to be the "main computer or server, I guess)
Computer 2 (client computer)
I have a cable line for internet coming from the wall, it enters the cable modem, which has CAT6 running to my NETGEAR wireless router. The router I suppose is acting as a switch with 1 CAT6 cable running to each of computers 1 and 2. Computer 1 is using eth 1 to connect to the internet (which is working) and Computer 2 is using eth 0 to connect to the internet (which is also working). How can I make each computer "see" and recognize the other's existence so that I can set up my file sharing network between the two?
Thank you so much,
Steve
- 09-15-2008 #2
Your router has already done most of the work for you.
Open a command terminal on one of the computers, and
type the command /sbin/ifconfig
This will give you some network configuration information.
It will tell you the IP address. Go to the other computerCode:rcgreen@blue:~$ /sbin/ifconfig eth0 Link encap:Ethernet HWaddr 00:0E:A6:94:D0:B5 inet addr:192.168.15.19 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::20e:a6ff:fe94:d0b5/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:623838 errors:13 dropped:0 overruns:0 frame:25 TX packets:383363 errors:1 dropped:0 overruns:1 carrier:0 collisions:0 txqueuelen:1000 RX bytes:870013161 (829.7 MB) TX bytes:37574535 (35.8 MB) Interrupt:17 Base address:0xc000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:3465 errors:0 dropped:0 overruns:0 frame:0 TX packets:3465 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:616359 (601.9 KB) TX bytes:616359 (601.9 KB) rcgreen@blue:~$
and ping that address.
If you can ping back and forth successfully, you can addCode:rcgreen@lisa:~$ ping 192.168.15.19 PING 192.168.15.19 (192.168.15.19) 56(84) bytes of data. 64 bytes from 192.168.15.19: icmp_seq=1 ttl=64 time=5.79 ms 64 bytes from 192.168.15.19: icmp_seq=2 ttl=64 time=0.555 ms 64 bytes from 192.168.15.19: icmp_seq=3 ttl=64 time=0.641 ms 64 bytes from 192.168.15.19: icmp_seq=4 ttl=64 time=0.633 ms --- 192.168.15.19 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 2999ms rtt min/avg/max/mdev = 0.555/1.907/5.799/2.247 ms rcgreen@lisa:~$
a name to each computer's /etc/hosts file to give
them friendly names. You gave each machine a host name
when you installed the OS. Use these names.
After this, if you have no Microsoft computers, you canCode:rcgreen@blue:~$ cat /etc/hosts 127.0.0.1 localhost 127.0.1.1 blue 192.168.15.1 router 192.168.15.7 stacy 192.168.15.8 ocean 192.168.15.10 kirby 192.168.15.19 blue blue.localdomain 192.168.15.28 lisa 192.168.15.20 shelly 192.168.100.2 merlin # The following lines are desirable for IPv6 capable hosts ::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 rcgreen@blue:~$
choose an easy file sharing protocol like nfs
nfs(5): nfs/nfs4 fstab format/options - Linux man page
- 09-15-2008 #3Just Joined!
- Join Date
- Sep 2008
- Posts
- 12
Thanks for all your help. I'm starting to make sense of everything. I don't know the code to put up the output windows, so I'll tell you what I get.
I am able to successfully ping each of the two computers on the network with output similar to yours. My IPs are 192.168.1.2 and 192.168.1.6. After that I ran the "cat /etc/hosts" code, and that is where things were somewhat different. The IPv6 section is irrelevant at this point I think, but it was the same (roughly) as your posted o/p. However, the beginning of the file only lists as follows:
1st PC:
127.0.0.1 localhost
127.0.1.1 UTAEngineer
command line says controls@UTAEngineer
2nd PC:
127.0.0.1 localhost
127.0.1.1 Engineer
command line says mokrunka@Engineer
It seems that your hosts file lists the "lisa" and "blue" computers and IPs where mine should say "Engineer" and "UTAEngineer" with their IPs.
Do I need to add the names and IP addresses to this file in order for them to recognize each other on the network? It seems strange that I am able to successfully ping each machine from the other, when they are not listed in the hosts file.
Thank you very much, this has been a most useful post.
Steve
- 09-15-2008 #4
Yes, you need to edit the host files yourself. You need root
(or sudo) authority to edit the files. Just add the appropriate
names and addresses.
The command line terminal is in the Applications-->accessories
menu. From there sudo gedit should be the command to
open your text editor with the authority to edit system files.
- 09-15-2008 #5Just Joined!
- Join Date
- Sep 2008
- Posts
- 12
Thank you so much for your help rcgreen. This has helped me develop a feel for the commands and terminal window as well as some very basic networking info.
My next question is: Now that I have successfully edited the hosts files on both machines, what can I do now? What exactly have I done by doing this? And how can I share files between the machines?
Best,
Steve
- 09-16-2008 #6Just Joined!
- Join Date
- Sep 2008
- Posts
- 12
Hello again RCgreen. I seem to have set everything up including the hosts files, and the exports file, and made sure all the daemons were running.
I am able to mount a remote FS one way but not the other (eg from PC1 onto PC2 but not the inverse). When I try it the other way, I get an error: you do not have permission to access the server. I tried as root, and I believe that I did everything the same on both PCs, so I'm stumped why I can't remote mount on each one.
Thanks,
Steve
- 09-16-2008 #7
OK, what does /etc/exports say on the one that is successfully exporting its files? There must be some small difference between
the things on the two computers.
- 09-16-2008 #8
Hi,
I learned a great deal from this thread as well and I really do not want to sabotage this topic. Rcgreen, do you perhaps know what I can do to share a ppp connection to two other pc's using and not using Linux. I am using Ubuntu 8.04.
I have a router from our old DSL conn but currently we are on a new connection with a USB modem.
Thanks
- 09-16-2008 #9Just Joined!
- Join Date
- Sep 2008
- Posts
- 12
/home Engineer(rw,no_subtree_check,no_root_squash)-- This is the computer where it works.
/home UTAEngineer(rw,no_subtree_check,no_root_squash)
There are other things in the file but they are all commented out, these are the only lines of code in each file.
Very strange, I did however get brave and start playing with some other stuff one the one that is working. I can now SSH into my other PC, and use SCP in order to copy files from one to the other! Thanks for all your great advice!
Steve
- 09-16-2008 #10
About connection sharing
Ubuntu Server Guide - IP Masquerading
I can't see why one works and the other doesn't. Are you sure the daemon is running? the ps aux command should list the running
processes.


Reply With Quote
