Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-13-2005, 01:29 PM
|
#1
|
Member
Registered: Aug 2004
Location: USA - PA
Distribution: ubuntu
Posts: 63
Rep:
|
connecting two machines
i need to get some files from a laptop to my desktop and i'd like to connect them directly. i've got some ethernet cables, and a router, if that's needed for some reason. i really just want to send data directly from one machine to the other. i know very little about networking but this seems like it *should* be a simple task. i can't find directions on how to do it though. how do i do this?
|
|
|
10-13-2005, 02:30 PM
|
#2
|
Member
Registered: Oct 2005
Location: AZ
Distribution: Gentoo, Kubuntu, RHEL4.
Posts: 37
Rep:
|
Hey
You'll need a crossover cable. The router is unnecessary. What OSes on each machine?
|
|
|
10-13-2005, 02:41 PM
|
#3
|
Senior Member
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,596
Rep:
|
Actually, the router can help it you don't have crossover cables.
You can use it as a switch.
If you have a crossover cable, plug it directly to both computers.
If you don't, plug 1 cable on each computer to the router.
Let say your NIC is eth0 on each computer
on first computer, do :
# ifconfig eth0 192.168.0.1 netmask ffffff00 up
on second computer, do
# ifconfig eth0 192.168.0.2 netmask ffffff00 up
test the network :
from computer 1, do ping 192.168.0.2, see if computer 2 responds.
from computer 2, do ping 192.168.0.1, see if computer 1 responds.
transfer the files :
Let say you want to transfer /home/dede/foo.txt from computer 1 to computer 2.
from computer 1, do :
$ ftp 192.168.0.2
> put foo.txt
|
|
|
10-13-2005, 04:25 PM
|
#4
|
Member
Registered: Aug 2004
Location: USA - PA
Distribution: ubuntu
Posts: 63
Original Poster
Rep:
|
" ifconfig eth0 192.168.0.1 netmask ffffff00 up"
when i do that i get "ffffff00: Host name lookup failure"
|
|
|
10-13-2005, 06:47 PM
|
#5
|
Member
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536
Rep:
|
Quote:
when i do that i get "ffffff00: Host name lookup failure"
|
Just tried that and I get the same result. Use dotted decimal "netmask 255.255.255.0".
Also, most routers will be setup themselves to be 192.168.0.1 so I'd suggest using 192.168.0.2 and 192.168.0.3.
|
|
|
10-14-2005, 02:45 AM
|
#6
|
Senior Member
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,596
Rep:
|
Sorry I didn't check the syntax.
All apologies.
|
|
|
10-14-2005, 10:23 AM
|
#7
|
Member
Registered: Aug 2004
Location: USA - PA
Distribution: ubuntu
Posts: 63
Original Poster
Rep:
|
ok, i do all that, and i can ping each machine from the other, but when i try to ftp, it says, "connection refused."
|
|
|
10-14-2005, 10:48 AM
|
#8
|
LQ Newbie
Registered: Apr 2004
Location: Earth
Distribution: Slackware 10, FreeBSD 4.10
Posts: 19
Rep:
|
Enable an FTP server on the machine with the files you want to copy, then put those files in the root directory of the ftp server. If you've already done that then check your firewall.
|
|
|
10-15-2005, 11:41 AM
|
#9
|
Member
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536
Rep:
|
Quote:
ok, i do all that, and i can ping each machine from the other, but when i try to ftp, it says, "connection refused."
|
If you can ping them, then the network is working correctly. "connection refused" generally means that nothing is listening on the port you're trying to connect to. As makko says, it's just a question of enabling whatever services you need.
Ftp will do it, but depending on exactly what you want to do (general file sharing, backup etc), you might want to look at nfs, rsync and/or ssh/scp. Netcat (the comand is usually just called nc) will do in a pinch for an ad-hoc file transfer. If you want to mount each boxes filesystems and access them as if they were local, then nfs is generally the way to go.
|
|
|
All times are GMT -5. The time now is 05:34 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|