You are not logged in.

#1 2010-01-18 16:24:41

sfabius
Member
Registered: 2007-07-07
Posts: 153

[solved]Local connection using ethernet switch

I would like to simply connect a laptop to a desktop to do some file transfers using unison.
I do not a router or ip masquerading or anything like that. I just want the two to talk to each other. I have a spare trendnet gigabit switch (TEG-S5) which I can use for this purpose. All the support sites I find focus on getting to the internet, so my searching for an answer to this simple task has proved fruitless. Thanks for your help.

Last edited by sfabius (2010-01-18 18:08:51)

Offline

#2 2010-01-18 17:20:13

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: [solved]Local connection using ethernet switch

Connect the two with a cross over cable.
Set a static address on each machine.  Make sure the addresses are unique and are on the same subnet.

Something like 'ifconfig eth0 192.168.0.100' on one machine.  Then use 192.168.0.101 for the other machine.
Windows machines use a similar command called 'ipconfig'

programs such as ssh, ftp, firefox, etc... all allow the use of ip addresses in place of domain names.

If you want to use domain names, one can add entries to your host file.


You might consider using avahi.  It provides network discovery and self-assignment of IP addresses.

[edit]  You did not mention dhcpd.  You could set dhcpd on one of the machines to manage a local subnet.  That way, both machines could obtain a dynamic address from the dhcp daemon.  You would still need to determine the IP addresses in order to communicate unless you configure something to manage domain names (avahi, dns, host files) [/edit]

Last edited by ewaller (2010-01-18 17:25:14)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2010-01-18 17:36:03

sfabius
Member
Registered: 2007-07-07
Posts: 153

Re: [solved]Local connection using ethernet switch

Thanks, but I don't have a crossover cable -- as I said I do have a switch/hub, and would like to use that. Do I use the same procedure or need to do something different? I have tried the ifconfig commands but can't seem to connect.

Offline

#4 2010-01-18 17:55:52

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: [solved]Local connection using ethernet switch

Yes, that should work. 
There could be a routing problem (I always fight with that).  What does 'ping' report?

You might need to do something like 'route <addapter name> add default gw <IP address of other computer> '
No guarantees on the syntax -- I am on a Windows box sad and cannot check it.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2010-01-18 18:08:32

sfabius
Member
Registered: 2007-07-07
Posts: 153

Re: [solved]Local connection using ethernet switch

It was the firewall. Now I can ping the two machines after I turned it off. I use firestarter to do the firewall; I haven't figured out how to edit rules to allow the local traffic, but I am looking into it. Will make this solved.

Offline

Board footer

Powered by FluxBB