How To Connect 2 PCs at Home with an Ethernet Connection.

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
john biles
Posts: 1458
Joined: Sun 17 Sep 2006, 14:05
Location: Australia
Contact:

How To Connect 2 PCs at Home with an Ethernet Connection.

#1 Post by john biles »

Hello Everyone,
I felt that with all the help I received in setting up my Ethernet connecting at home from this Puppy Forum that I should make a "How To" as thanks to all who helped.
I'd like to thank Sage, Lobster, MarkSouth2000, Auda, muggins, flash and MU for all your help. A special thanks goes to HairyWill who gave me the final steps needed to get it going. I was about to give up.

Also if someone feels that I've left something out or made a mistake, please feel free to add / correct this "How To"

Before starting make sure each computer has a RJ45 Ethernet connection.
Normally you would find this connection on the back of your computer, it looks like a over sized phone socket. (Most computers built in the last few years come with a Ethernet connection as standard.)
If you do not have a RJ45 Ethernet connection on your computer, you will have to go out and buy an internal PCI Ethernet Card and install it.
You can find them at most computer stores and the cost is around 15-20 USD.

You will also need a "Ethernet CAT5E RJ45 Crossover Cable" (A 10 metre cable costs around 22 USD)
Note: You may be asking "Why do I need a Crossover cable when I already have a standard Ethernet cable? Why can't I use that!" The reason is that a Crossover cable has the Sent and Receive wires swapped over so when one computer is sending data, the other will receive it and visa versa. In a normal Ethernet cable the "Send" goes to "Send" so the second computer won't receive the data being sent. This isn't a problem in a Office network as there are "Hubs" and "Routers" which decode the data and resend it to the correct location.

O.K Let's connect our 2 computers together!

Plug in the Crossover ethernet Cable into the rear RJ45 Socket of each computer and your ready to begin.

Step 1 boot Up Puppy Linux on both computers. Now click on the "Setup" Icon on the Puppy Desktop.
Now click on "Connect to Internet by Cable Ethernet Interface" Button in the Puppy Wizard.

Step 2 Click on the "eth0" button. A new box will open, click on "Static IP". (The "Configuring Maually Wizard" will start)
It will ask you to enter in Some Addresses in dotted-Quad Format (a.b.c.d). What does this Mean!
Basically all you need to know is that the Standard Ethernet format for connection computers in a internal network is 4 sets of numbers separated by Dots. For Example you can have 1.1.1.1 or 255.255.255.0 it doesn't matter.
The Standard for internal Ethernet Networks is to use the following first 2 numbers 192.168.xxx.xxx
So I recommend you use this format to setup your connection.

Now click OK and enter into the first box called "Enter your IP Address" the following Number 192.168.0.2 (This is the IP address of your second computer.)
In the Second Box called "Enter your Masknet" except the default number 255.255.255.0 and press enter.
For boxes 3 and 4 leave them blank and just press OK to except the defaults.
A box will appear "NETWORK CONFIGURATION OF eth0 SUCCESSFUL" Do you want to save the configuration?
Click "Yes".

Now if all has gone well you have just sent up the first computer. Now go and repeat the above steps and setup your second computer. This time in the first box enter 192.168.0.1 in the box called "Enter your IP Address"

Just remember that each computer has to have its own IP address like a house does. If all the houses in the street have the same address number, the postman won't know where to deliver the mail.

So computer one has the IP address of 192.168.0.1 and computer two has the IP address of 192.168.0.2

I recommend you write down these numbers as you will need them later.

Now it time to see if your Ethernet connection was setup correctly.

To do this we need to "Ping" each computer to see if they are working correctly.
"Ping" sends some data down the Ethernet cable to see if the receiving computer receives it. If it does it sends a reply back.

Once again on the Puppy desktop, Click on the "Console" Icon. This will open a "Terminal" (Dos promt in Windows) for you to enter in the following line ping 192.168.0.2 to see if the second computer will respond or not.
If successful you should see something like this "64 bytes from 192.168.0.2:icmp_01 ttl=64 time=0.2ms" this will keep repeating down the screen until you close the Terminal.

If you see this your Ethernet connection is Setup correctly, If not the incorrect Ethernet card Driver may have been Setup by mistake by the Automatic Detection Wizard and you will need to setup the correct Driver yourself.
To do this you need to once again click on the "Setup" Icon on the Puppy Desktop.
Now click on "Connect to Internet by Cable Ethernet Interface" Button in the Puppy Wizard and re-open that wizard.
You will see a button called "Load Driver" you will be given the option to "AUTO PROBE ALL DRIVERS" you can except this and hope the wizard selects the correct driver this time or choose from the list Manually.
If you know the correct driver for your Ethernet card choose that driver by clicking on it the press OK. If you don't know your driver then click on the "AUTO PROBE ALL DRIVERS" and press OK, hopefully it will choose the correct driver this time. If you still have problems please read the "Help" file for more info.
Save the setting and go through the "Ping" steps in the Terminal again and see if it is all now working.
If not you may need to try different drivers even if the Model Numbers don't match as you may get luck.

If you still have no luck, post a question on this forum for help.

Your finally almost there, the question you should now be asking is "How do I transfer my Folders / Files from one computer to the other".

What we need to do now is create a "Shared Folder" in each computer to put Folders / Files in we want to transfer between them.
To do this we need to click on the "Console" icon again on the Desktop and Open a "Terminal" and type the following adduser -h/root/shared shared
You will then be asked to enter a password, you will need to do this twice.
All going well you should have created a folder in "root" called "shared" (You will find "root" by pressing on the "Home" icon on the desktop).
All you need to do now is open your "shared" folder and drag and drop the folders / files you want to transfer into it.
Now we need to open a ftp connection to allow us to transfer files, images, folders etc.
To do this click on "Menu" then click on "Network" and open the package called "BetaFTPD FTP Server" and press "Start ftp Server" (This computer is now ready to send data to the other computer).

Time to go over to the other computer and see if we can transfer some data at last!

We can do this 2 ways.

The first is to open the internet browser (Dillo in Puppy)
Once open enter "ftp:192.168.0.1" in the box near the top of the screen as if you were entering the address of a known internet site and press enter.
All going well you should now see the folders / files you dragged into the "shared" folder from computer one.
You will be asked to enter in the name of the folder "shared" and the password you choose while setting up the "shared" folder.

Note: At the time of writing this "How To" it appears that can only transfer one file / image at a time.
If you try and transfer a whole folder it only transfers data about that folder. I may be wrong and if I find out how to tranfer a folder, I will update this "How To".

To save a file just right click on it and click "save link target as". A box will open asking if you want to save in "My Documents" press "Save" or browse for another folder and "Save". You can now go to "my Documents" and open the transfered file.

Now the second way to tranfer a File is to click on "Menu" then click on "internet" now click on the package called "Gftp ftp client" and open it. At the top of the screen you will see the boxes Host, Port, User, and Pass.
In "Host" enter either 192.168.0.1 or 192.168.0.2 depending on which computer your using.
At the moment, don't worry about putting anything in "Port"
In "User" enter "shared" and in "Pass" enter your password.
Now at the left of the screen Click on the "2 computers" icon and you files should now appear in the righthand column. At the time of writing this "How To" this is as far as I have got with this program so for now I leave it up to you to learn how to use it.
I could have waited until I knew more but I felt it was better to get this "How To" out on the forum.

Good Luck and If this helps only one other Puppy User it will have been worth writing this "How To"

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#2 Post by MU »

Thanks for the HowTo, very nice the details about the network-cables/setup.

In gftp you can select a folder, and then click on the "->" button to transfer it with all files and subfolders.
Or select multiple files with the "shift" or "ctrl"-keys.
If it will not work, it must be an issue with betaftpd.

An alternative to FTP is this program using some included files from Samba:
http://www.murga-linux.com/puppy/viewtopic.php?t=12945
But it is new and might not work everywhere, while ftp is an old an reliable method.
I only tested it on computers connected by a router.

Mark

User avatar
richard.a
Posts: 513
Joined: Tue 15 Aug 2006, 08:00
Location: Adelaide, South Australia

#3 Post by richard.a »

Excellent article, well researched, and well expressed. Thank you :)

I would like to add a point though.

If you are networking two computers, it could very well happen later that you might network even more :) :D - even if you don't have any plans at the moment.

While you can use any old IP numbers, it is best to stay with the several blocks that are allocated for internal network usage, because otherwise you will have to reconfigure the addresses later if you expand. That can be a real pain, and time consuming, and unless you are doing it all the time, you will make mistakes and frustration will happen :(

Also, I would not use the low numbers in the last block of the IP numbers mentioned, because you may find that the router you will in all probability eventually install defaults to 192.168.0.1 - yes, you can change it then, but why create work for yourself?

As an example, I have just set up a windows network for a friend who uses dialup, and they wanted to connect together a desktop, a very old laptop that *just* runs w98se and a file storage server that runs the older version of NASlite that boots off a floppy that can be configured as either SMB or FTP. In their and my case, the SMB version was preferable.

I know they will eventually go on to a broadband connection, so I gave the server an IP of 192.168.0.100 (because I tested the desktop and laptop at my house, and that is the IP I use on my NASlite server :D

Using high numbers helps to get the fixed IP machines out of the way of the automatic allocation of dynamic IPs (DHCP) which most router/switch combinations incorporate. This saves collisions occurring later.

It made sense to use 192.168.0.99 and 192.168.0.98 for their two other machines, consecutive numbers are easier to remember than random ones. Saves them having to remember wierd ones.


While we are about it, doing some adjustments to the hosts file configuration is possibly something that should be explored too, for networking. Depending on how you use your computers, it can be useful. The hosts file is found in /etc in a linux or unix system, in \windows in a non-NT type MS system, and in \windows\system32\drivers\etc in an NT based system (note the windows directory may be winnt instead of windows).

The hosts file is effectively a place you can set up whatever local address that does not exist in real life and access it :) A nice trick lol.

For those doing more complicated things, it's a good way that you can access virtual hosts on your own network.

Not to be confused with the file called hostname which is also in linux and unix systems, which in most (not all) cases can be used to change the computer's name by which it is known on the network. That may also need to a checked in this operation.

If you are happy with the computer's name, don't go through what may turn out to be hassles in changing it :)


Richard
[i]Have you noticed editing is always needed for the inevitable typos that weren't there when you hit the "post" button?[/i]

[img]http://micro-hard.dreamhosters.com/416434.png[/img]

Post Reply