LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Two hosts connected by ethernet - unsuccessful (https://www.linuxquestions.org/questions/linux-networking-3/two-hosts-connected-by-ethernet-unsuccessful-403487/)

breakthestate 01-14-2006 10:58 PM

Two hosts connected by ethernet - unsuccessful
 
I'm trying to ping host X's ethernet interface from host Y's ethernet interface. Both hosts are running Pupply Linux 1.0.7 and are connected by a standard ethernet cord (RJ-45) between the two ethernet cards. Puppy Linux uses a 2.4.29 kernel and comes with iptables as well. I have not setup DNS or any sort of nameserving yet. I thought I would first just try a simple ping test. I have not yet succeeded in my goal, and I believe it may be that I'm missing something very basic, but after reading several HOWTO's, I cannot find the solution. Below is what I try directly after booting both machines:

1. Setup Host X:

1.1 Configure my wireless card with my router:
1.1.1:
Code:

iwconfig wlan0 essid "XXXXX"
1.1.2:
Code:

ifconfig wlan0 192.168.2.40 up
1.1.3:
Code:

route 

Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
192.168.2.0    *              255.255.255.0  U    0      0        0 wlan0
loopback        *              255.0.0.0      U    0      0        0 lo

1.2 Test TCP/IP configuration
1.2.1:
Code:

ping 127.0.0.1
(success)

1.2.2:
Code:

ping 192.168.2.1
(ping my router, success)

1.2.3: The wireless interface is now networked with my router.

1.3. Setup ethernet interface
1.3.1:
Code:

ifconfig eth0 192.168.3.1 up
1.3.2:
Code:

route

Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
192.168.3.0    *              255.255.255.0  U    0      0        0 eth0
192.168.2.0    *              255.255.255.0  U    0      0        0 wlan0
loopback        *              255.0.0.0      U    0      0        0 lo

2. Setup Host Y:

2.1 Configure ethernet interface
2.1.1:
Code:

ifconfig eth0 192.168.3.2 up
2.1.2:
Code:

route

Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
192.168.3.0    *              255.255.255.0  U    0      0        0 eth0
loopback        *              255.0.0.0      U    0      0        0 lo

2.2 Test TCP/IP configuration
2.2.1:
Code:

ping 127.0.0.1
(success)
2.2.2:
Code:

ping 192.168.3.1
(unsuccessful - 100% packet loss)

_________________________________

I hope to one day have the ability to ssh from host Y to host X or possibly even setup IP masquerade to share an internet connection, but after reading the IP Masquerade HOWTO, I thought I should at least try pinging between the two first. I am unsure what the actual problem is. Could it be a iptables issue? Or do I need to add some route commands? I have fooled around (extensively) with both but end up screwing things up and starting over from step one.

tredegar 01-15-2006 04:19 AM

Quote:

Both hosts are running Pupply Linux 1.0.7 and are connected by a standard ethernet cord (RJ-45) between the two ethernet cards.
This will not work.
You either need:
[Computer]-Ethernet cable-[Router/switch]-Ethernet cable-[Computer]
or
[Computer]-Ethernet crossover cable-[Computer]

breakthestate 01-15-2006 01:10 PM

Quote:

Originally Posted by tredegar
This will not work.
You either need:
[Computer]-Ethernet cable-[Router/switch]-Ethernet cable-[Computer]
or
[Computer]-Ethernet crossover cable-[Computer]

whoops :newbie:

Thank you tredegar. I read that I needed a crossover several times and just assumed that it was a standard ethernet cord. I purchased a crossover cable and now I have success. Thank you so much!


All times are GMT -5. The time now is 06:32 AM.