Networking Forums

Networking Forums > Computer Networking > Linux Networking > how to connect two machines?

Reply
Thread Tools Display Modes

how to connect two machines?

 
 
Dan Jacobson
Guest
Posts: n/a

 
      07-22-2005, 09:35 PM
I connect the RJ-45 cable between two machines.
On machine 1 I do ifconfig eth0 192.168.0.1
On machine 2 I do ifconfig eth0 192.168.0.2
At this point on machine 2
$ ping 192.168.0.1
should work and visa versa, but why not?
The Linux Ethernet HOWTO doesn't say.
 
Reply With Quote
 
 
 
 
johnny bobby bee
Guest
Posts: n/a

 
      07-22-2005, 11:11 PM
Dan Jacobson wrote:
> I connect the RJ-45 cable between two machines.


try using a crossover cable:
http://www.homenethelp.com/web/expla...-crossover.asp


--
Let's not complicate our relationship
by trying to communicate with each other.
 
Reply With Quote
 
Keith Keller
Guest
Posts: n/a

 
      07-23-2005, 02:30 AM
On 2005-07-22, johnny bobby bee <(E-Mail Removed)> wrote:
> Dan Jacobson wrote:
>> I connect the RJ-45 cable between two machines.

>
> try using a crossover cable:
> http://www.homenethelp.com/web/expla...-crossover.asp


....or use a switch or hub.

--keith

--
kkeller-(E-Mail Removed)
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom
see X- headers for PGP signature information

 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      07-23-2005, 02:35 AM
Dan Jacobson wrote:

> I connect the RJ-45 cable between two machines.
> On machine 1 I do ifconfig eth0 192.168.0.1
> On machine 2 I do ifconfig eth0 192.168.0.2
> At this point on machine 2
> $ ping 192.168.0.1
> should work and visa versa, but why not?
> The Linux Ethernet HOWTO doesn't say.


Did you use a crossover cable? It's required for 10 & 100 Mb ethernet.

 
Reply With Quote
 
Tommy Willoughby
Guest
Posts: n/a

 
      07-23-2005, 03:00 AM
Dan Jacobson wrote:
> I connect the RJ-45 cable between two machines.
> On machine 1 I do ifconfig eth0 192.168.0.1
> On machine 2 I do ifconfig eth0 192.168.0.2
> At this point on machine 2
> $ ping 192.168.0.1
> should work and visa versa, but why not?
> The Linux Ethernet HOWTO doesn't say.


In order for this to work the cable must be a crossover cable, which is
wired differently than regular networking cables.

--
mail: teeuu at qwest dot net
 
Reply With Quote
 
Amadeus W. M.
Guest
Posts: n/a

 
      07-23-2005, 05:33 AM
On Sat, 23 Jul 2005 05:35:35 +0800, Dan Jacobson wrote:

> I connect the RJ-45 cable between two machines.
> On machine 1 I do ifconfig eth0 192.168.0.1
> On machine 2 I do ifconfig eth0 192.168.0.2
> At this point on machine 2
> $ ping 192.168.0.1
> should work and visa versa, but why not?
> The Linux Ethernet HOWTO doesn't say.


As has been said, use a crossover cable if you go directly from one to
another, usual network cables if you go through a router/hub.

Moreover, both machines must know what to do with the packets, so you
must set up routes to each other in the routing table. E.g. on
192.168.0.2 do something like

route add -host 192.168.0.1/32 eth0

etc.


 
Reply With Quote
 
Amadeus W. M.
Guest
Posts: n/a

 
      07-23-2005, 05:38 AM
On Sat, 23 Jul 2005 01:33:53 -0400, Amadeus W. M. wrote:

> On Sat, 23 Jul 2005 05:35:35 +0800, Dan Jacobson wrote:
>
>> I connect the RJ-45 cable between two machines.
>> On machine 1 I do ifconfig eth0 192.168.0.1
>> On machine 2 I do ifconfig eth0 192.168.0.2
>> At this point on machine 2
>> $ ping 192.168.0.1
>> should work and visa versa, but why not?
>> The Linux Ethernet HOWTO doesn't say.

>
> As has been said, use a crossover cable if you go directly from one to
> another, usual network cables if you go through a router/hub.
>
> Moreover, both machines must know what to do with the packets, so you
> must set up routes to each other in the routing table. E.g. on
> 192.168.0.2 do something like
>
> route add -host 192.168.0.1/32 eth0
>
> etc.


Oh, yeah, and try without a firewall first.
 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      07-23-2005, 10:38 AM
Tommy Willoughby wrote:

> In order for this to work the cable must be a crossover cable, which is
> wired differently than regular networking cables.


Except for gigabit.

 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      07-23-2005, 10:41 AM
Amadeus W. M. wrote:

> Moreover, both machines must know what to do with the packets, so you
> must set up routes to each other in the routing table. E.g. on
> 192.168.0.2 do something like
>
> route add -host 192.168.0.1/32 eth0


That shouldn't be necessary, as both computers are on the same subnet. When
both the source and destination, are on the same subnet, the computer uses
the sends the packets directly to the destination.

 
Reply With Quote
 
Roby
Guest
Posts: n/a

 
      07-23-2005, 12:06 PM
Dan Jacobson wrote:

> I connect the RJ-45 cable between two machines.
> On machine 1 I do ifconfig eth0 192.168.0.1
> On machine 2 I do ifconfig eth0 192.168.0.2
> At this point on machine 2
> $ ping 192.168.0.1
> should work and visa versa, but why not?
> The Linux Ethernet HOWTO doesn't say.


If /etc/sysctrl.conf includes
net/ipv4/icmp_echo_ignore_all=1
then the nic will not respond to a ping.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't connect two machines simultaneously Wilhelm Hummer Wireless Networks 5 05-21-2007 10:11 PM
can't browse or connect to machine, can connect to ALL other machines sklett Windows Networking 3 11-16-2006 11:03 PM
WINDOWS 98 MACHINES NO LONGER CONNECT TO SERVER 2003 AJO Windows Networking 2 06-27-2006 07:07 PM
Need to drop firewall for Win machines to connect via Samba. olczyk Linux Networking 2 12-16-2005 07:54 PM
Unable to connect machines on Home Network Anonymous Network Routers 2 07-13-2005 03:45 AM



1 2 3 4 5 6 7 8 9 10 11