LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-11-2009, 01:26 AM   #1
michalng
Member
 
Registered: Dec 2005
Distribution: Debian KDE / Fluxbox
Posts: 222

Rep: Reputation: 46
Connecting 2 linux computer back to back with cross cable.


I have a laptop (192.168.1.101) and a desktop (192.168.1.102) both connected wirelessly to my router.

Wanted to transfer large (~20Gb) of information from laptop to desktop using a cross-cable connecting to their eth0.

Understand that I can setup samba or ssh and transfer through wireless, but was hoping to get it done through a physical connection (faster ?)

Any advise how I can do it?
 
Old 02-11-2009, 01:43 AM   #2
hallamigo
Member
 
Registered: Feb 2004
Location: Utah, USA
Distribution: Debian
Posts: 230

Rep: Reputation: 31
I've got two computers that I have connected via NFS (basically mapping a drive of one to the other) - faster than SSH or Samba, so I'm told. Here are my notes on how I set it up on Debian. ("server" is one computer that is sharing its directory, "client" is the other)
Code:
# From the server (192.168.0.74):
sudo apt-get install nfs-kernel-server nfs-common portmap
sudo vi /etc/exports
# add the following, swap out your dir2share and client's IP
/home/dir2share 192.168.0.75(rw)
# close, then run:
sudo exportfs -a

# From the client (192.168.0.75), swap out your directories and IPs here too:
sudo apt-get install nfs-common portmap
mkdir -p /home/clientuser/servermapped
sudo mount 192.168.0.74:/home/dir2share /home/clientuser/servermapped
Hope that makes some sense.
 
Old 02-11-2009, 01:44 AM   #3
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
just connect the two machines setup ip addresses using ifconfig and use rsync to copy the files across, you will need ssh enabled on the destination for rsync to work.

Alternatively you can use netcat to copy the file across.
 
Old 02-11-2009, 01:55 AM   #4
michalng
Member
 
Registered: Dec 2005
Distribution: Debian KDE / Fluxbox
Posts: 222

Original Poster
Rep: Reputation: 46
Quote:
Originally Posted by datopdog View Post
just connect the two machines setup ip addresses using ifconfig ......
datopdog
Can i make use of the existing ip address assigned by the wireless router, connect these 2 computers with a cross cable and get them detected by one another?


hallamigo,
thanks for the tip, will try out as a last resort.
wanted to get this done with minimum addons
 
Old 02-11-2009, 01:57 AM   #5
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
You can put the two on a dummy network as to not confuse the kernels routing mechanisms.
 
Old 02-11-2009, 02:06 AM   #6
hallamigo
Member
 
Registered: Feb 2004
Location: Utah, USA
Distribution: Debian
Posts: 230

Rep: Reputation: 31
Haha, yeah, I should have specified the long term vs. short term solution. I use the NFS setup so my wife and I can have everything on one computer and just map the other computer over.
 
Old 02-11-2009, 02:46 AM   #7
michalng
Member
 
Registered: Dec 2005
Distribution: Debian KDE / Fluxbox
Posts: 222

Original Poster
Rep: Reputation: 46
Quote:
Originally Posted by datopdog View Post
You can put the two on a dummy network as to not confuse the kernels routing mechanisms.
Appreciate if you can explain a little in detail, you are looking at a computer newbie here
 
Old 02-11-2009, 04:11 AM   #8
camh
Member
 
Registered: Feb 2005
Distribution: Slack/Debian
Posts: 163
Blog Entries: 2

Rep: Reputation: 33
I think he means to have them on a completely separate network from your wireless LAN.

Either way, link up your 2 NICs with your crossover and give each computer an ip that is different from your other network(s) eg.
Code:
ifconfig eth0 172.16.1.x netmask 255.255.0.0
where 'x' is a unique number for each machine. Test the connection by pinging the other machine. If it works, you're good. You can then use whatever method you want to transfer the files. I prefer FTP, since security is not an issue in this case (if you are paranoid, disconnect from the wireless network first) and it is usually the quickest to set up.

eg. (assuming ubuntu/debian)

Code:
user@laptop$ sudo apt-get install proftpd
From there you can FTP to the laptop from the desktop machine, using your user credentials and retrieve the files.

After you're done, simply remove proftpd from the laptop.
Code:
user@laptop$ sudo apt-get remove proftpd && sudo apt-get autoremove
 
Old 02-11-2009, 07:00 AM   #9
michalng
Member
 
Registered: Dec 2005
Distribution: Debian KDE / Fluxbox
Posts: 222

Original Poster
Rep: Reputation: 46
camh,

followed your advise and everything works out. thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Blue Jeans Cable Strikes Back - Response to Monster Cable LXer Syndicated Linux News 0 04-15-2008 08:30 PM
Connecting 2 Redhat linux pc's using cross cable luckyally Linux - Networking 3 07-27-2007 04:24 PM
If I load Linux on to a computer will i be able to switch back? tsunamidave Linux - Newbie 9 01-07-2007 06:02 PM
how can I download (back up) sql database on the linux server to my local computer? jenny1668 Linux - General 5 07-15-2006 01:50 AM
Connecting two linux boxes via cross cable ElPuello Linux - Networking 4 11-10-2004 10:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration