Crossover cable connection between 2 computers.

Mike Shaw mdshaw89 at gmail.com
Fri Mar 13 23:25:02 UTC 2009


On Fri, Mar 13, 2009 at 6:45 PM, Steven Vollom
<stevenvollom at sbcglobal.net> wrote:
> Mike Shaw wrote:
>> Actually you don't need to mess with even setting up a DHCP server
>> unless you really need/want one.  If you just have 2 machines and 1
>> NIC per machine just plug the cable in connecting the machines, assign
>> IPs and a default route per machine from the command line and you are
>> set.  Some thing like:
>>
>> Machine 1
>> ---------------
>> % sudo /etc/init.d/networking stop
>> % ifconfig eth0 inet 192.168.1.1 netmask 255.255.255.0
>> % route add default 192.168.1.2
>> % ifconfig eth0 up
>>
>>
>> Machine 2
>> ----------------
>> % sudo /etc/init.d/networking stop
>> % ifconfig eth0 inet 192.168.1.2 netmask 255.255.255.0
>> % route add default 192.168.1.1
>> % ifconfig eth0 up
>>
>> Now you should be able to ping, ssh, ftp whatever, providing the
>> hardware is okay.  To get things back to normal just issue:
>>
>> % ifconfig eth0 down
>> % route del default
>> % sudo /etc/init.d/networking start
>>
>> on each machine and they should go back.
>>
>> l8r,
>>
>> Mike
>>
>>
> I am a bit over my head Mike.  Can I use your numbers or do I need to
> use existing numbers from my computers.  192.168.0.100 and
> 192.168.0.101.  And is this using the crossover LAN cable directly
> connected to the computers or using my router?
>

Yes you can use the above IPs provided you use them in the same spot I
used mine, i.e. you swap your 192.168.0.100 with my 192.168.1.1 and do
the same with the 192.168.10.101 and 192.168.0.101.  Otherwise you can
use my commands with the IPs provided.

The commands I gave you were primarily for using a crossover cable.
If you throw something in between it may or may not work depending on
your router.  So leave it out for the the transfer.  Removing the
router takes out one more piece that could case a problem in your
transfer.


> I have connection to the Internet with both computers;  I may have
> configuration errors, but have no way to know that.  I just typed the
> numbers for google in the address bar and pressed enter, is that the way
> to ping an address.  When I googled about ping, people talked about
> pinging, but now how to ping.  Generally they were there to solve other
> problems.  This is what happened:  The server at 216.239.39.99 is taking
> too long to respond.  It timed out.
>

hmmmmm.  Well looks like you need to review the following:

http://en.wikipedia.org/wiki/Ping

The above should help clear up ping and the world of ICMP.  There are
wiki more pages let alone books if you want to dive deeper into
things.


> My mounting of partitions is so screwed up that it is amazing that I can
> use the computer.  I have worked around my problems without fixing them
> for a long time.  Those who are trying to help me are trying to figure a
> way to solve my problem without losing my data.  No success yet.  I got
> the crossover cable to try to make a direct connection to find that I
> probably need the same things working that I would need using my router.
>
> If I use your command formula and my numbers, what should I expect to
> come on my screen?  Will it be something that shows a similar screen of
> both computers?  Will I be able to drag and drop, cut and paste, or will
> there be a formula to follow to get the data moving.  Thanks for any
> help you give.  Sorry to be a trouble.
>

None of the commands I listed will reply with anything back EXCEPT the
sudo /etc/init.d/networking commands, I believe.  If you want to check
the commands you check them like this:

To check your live networking config for interface eth0
------------------------------------------------------------------------------------
% ifconfig eth0

To check your currently set routing table
---------------------------------------------------------------
% netstat -rn

You will have to issue this on each machine seperately.  Unfortunately
unless setup a Samba server and turn on sharing.  You won't see
anything automagically in any browser.  When networking is up and
running you don't automagically get icons on your screen.  It just
doesn't work that way unless someone else has configured things to do
this.

So if the above ifconfig commands report you are UP and an IP is set
you should be part way there.  If on each machine the Gateway is
reported to be the opposite's machine IP, then you are step farther.
If you can "ping" the others IP then you have confirmed connectivity.
Next you need to decide how you are going to transfer.  On Linux,
ssh/scp/sfp possibly rsync is usually the easist since if you loaded
networking the client and hopefully the server software was loaded.
Test this by sshing to the other machine and logging in.  If you want
to do an ssh transfer graphically then Konquerer is easiest for my
money and comes standard in Kubuntu.  Just drop a fish url, i.e.
fish://192.168.1.1/, using the other machine's IP in the location bar
and you will be asked for an id and password.

l8r,

Mike




More information about the kubuntu-users mailing list