Jump to content

Linux Network?


Niloc

Recommended Posts

I have a Laptop and a Desktop computers, both with Ubuntu 5.1, the Desktop also has Windows 2000 pro.

I would like to connect the two computers with a network. I searched the Web but the answer I came up with is that I need a 'crossover' cable. I have connected computers together before and all I used was an ordinary ethernet cable can I use this for the Linux/Linux connection? How?

Link to comment
Share on other sites

Normally you do need a cross cable to connect computer to computer 'unless' at least one card has auto-detect of polarity (rather rare). Another option is to buy a small 4 port ethernet hub or switch (about 800 baht) and plug them both into it using standard (straight) ethernet cable.

Link to comment
Share on other sites

If you want to share files then you need to use Samba on the linux side (probably already installed with Ubuntu). Read the instructions for modifying the configuration file of samba. Be sure you have setup IPs (different ones) on both machines. If you mean something else when you say 'talk to each other', post the details.

Link to comment
Share on other sites

Well I was not sure if I have Samba or not so I downloaded it from the site, tried to unpack it and it gave me a typical Linux 'I can't do it and I am not going to tell you why' error so I still don't know if I have Samba or not, the help files don't mention it but the various utilities all suggest the network is there, giving me names, IP addresses, and Domains so I feel I am almost within touch!!

All I want to do is transfer files, up until now I have been burning them to a disc to get them across but that is pretty hard on CD's...

Colin

Link to comment
Share on other sites

I am not sure what you are really asking... you said both computers have Linux and then said something about Windows. Which do you want to do? You certainly do not need samba to exchange files between two Linux machines. Here is the shortest sequence of steps to transfer some files between typical modern Linux PCs, assuming ssh and sshd have been installed and sshd is active:

1. connect the ethernet ports and validate that you get a "link" indicator, e.g. an LED on the ethernet socket lights up as it would during normal connections to a switch or router

2. configure the OS to use the ethernet ports

a. choose an IP network such as 192.168.1.0

b. choose two address, one per computer such as 192.168.1.1 and 192.168.1.2

c. as root, configure both computers to enable the interface: "ifconfig eth0 192.168.1.x up "

(where "x" is 1 or 2, different on each machine)

3. verify that the machines can reach each other: ping 192.168.1.x

(where "x" is 1 or 2, referring to the OTHER machine's address)

hit ctl-c when you see some good replies

4. use scp to transfer some files. here is how to copy several files to a destination directory on the other host:

scp file1 file2 ... fileN 192.168.1.x:some/path/to/a/directory/.

(where "x" again is the 1 or 2 address of the OTHER machine)

5. disable the network on each host

ifconfig eth0 down

This requires that you are able to login to the other machine via ssh, and will probably prompt you for the password on the remote host.

Link to comment
Share on other sites

Well I was not sure if I have Samba or not so I downloaded it from the site, tried to unpack it and it gave me a typical Linux 'I can't do it and I am not going to tell you why' error so I still don't know if I have Samba or not, the help files don't mention it but the various utilities all suggest the network is there, giving me names, IP addresses, and Domains so I feel I am almost within touch!!

All I want to do is transfer files, up until now I have been burning them to a disc to get them across but that is pretty hard on CD's...

Colin

LOL I know how you feel - I tried messing around with Samba for a while too, couldn't make it see things my way.

I just use a 2G USB drive now...

yeh yeh, I know, I should give it another try one of these days...

Link to comment
Share on other sites

Thanks for the sympathy jeffrosner, I found out elsewhere that I do need a 'crossover' cable or a hub as tywais says, I used this cable on a Win2K to Win2K system and it worked perfectly, why??

I never got my printer to work under Ubuntu (Canon Lasershot 1210), maybe it will go with Ununtu on one and Win2K on the other?

Link to comment
Share on other sites

Without a crossover cable, one of the computers would have to have a network card that is smart enough to notice that the signals are reversed, and then internally switch itself to reverse which wires it sends and receives data on... this is a feature of the ethernet controller hardware and not the operating system. (That's why my instructions started with verifying that you actually get a link light LED showing when the hardware is connected.)

Link to comment
Share on other sites

Thanks AU, I do not get the LED's flashing when I connect, maybe I would be better off buying a new network card than a crossover cable or a hub as has been suggested? Should the LEDs flash when I connect to the internet also?

Link to comment
Share on other sites

I cannot say for sure without seeing documentation for your hardware. Look at the hardware itself, right at the point where you insert the ethernet cable, i.e. it is built into the connector itself. Usually, there will be an LED that lights to indicate the status of that connection on the PC. On my IBM laptop and my Dell PC, the link LED even lights if the computer is "off" (turned off but still attached to the power outlet).

If you have a router, switch, or hub, I'd recommend connecting to that and watching for lights just to familiarize yourself with how your hardware behaves. There is often a continuously lit LED to indicate a 10 or 100 speed link, and it may change color depending on speed. The LED may also blink "randomly" or there may be a second LED that blinks to indicate traffic is passing over the cable.

Most devices would have all lights off when there is no cable present. This is the same way it would look if you connected a straight cable when you needed a cross-over cable (or vice versa). It will act like it is disconnected. I have found this to be a real time-saver when I am trying to troubleshoot problems myself...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.





×
×
  • Create New...