LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   networking Linux to Linux (https://www.linuxquestions.org/questions/linux-networking-3/networking-linux-to-linux-225392/)

NLR 09-02-2004 05:09 PM

Do This:

Main computer:
ifconfig eth0 down
ifconfig eth0 192.168.0.1 netmask 255.255.255.0
ifconfig etho up

Second computer
ifconfig eth0 down
ifconfig eth0 192.168.0.2 netmask 255.255.255.0
ifconfig eth0 up

Next

Main computer:
ping 192.168.0.2

Second computer
ping 192.168.0.1

Post the results

Andrew

NLR 09-02-2004 05:09 PM

:) I win!

mgrist 09-02-2004 05:21 PM

Ok pinged the second computer from the main computer:
I think I got it right but I had to add -b
[mlg@localhost mlg]$ ping -c4 127.255.255.255 -b
WARNING: pinging broadcast address
PING 127.255.255.255 (127.255.255.255) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.096 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.028 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.027 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.027 ms

--- 127.255.255.255 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2999ms
rtt min/avg/max/mdev = 0.027/0.044/0.096/0.030 ms

mgrist 09-02-2004 05:23 PM

Quote:

Originally posted by NLR
:) I win!
Yes you did, good for me, I mean you. Thankyou!!
I'm going to ping the other machine and see what happens.

NLR 09-02-2004 05:27 PM

Your pinging a broadcast address, which means it pings every computer in that segment (or in this case the either network)... And the main computer is what is answering, so again the main computer is pinging the main computer....

Did you run the commands in my above post? because the ip address 127.255.255.255 is invalid, anything in the 127.x.x.x rage is consider its self.

Andrew

NLR 09-02-2004 05:29 PM

Are you connected to a switch/router or are you connecting all of your computers directly into the main computer?

Andrew

mgrist 09-02-2004 05:36 PM

Quote:

Originally posted by NLR
{ Sorry you posted before me }

You pinged your main computer from your main computer. That output shows that you pinged the IP address 127.0.0.1, that is a loopback address and it how a computer refers to its self.

In simple terms your computer pinged itself. You need to do a ifconfig on your other machine and find where it says inet addr: under eth0 and ping that IP address from your main computer.

Are you using Ethernet? Are you using IPv4 or IPv6?

Andrew

Last question first I'm using ethernet, I think? I've not run across the other two that I know of.

This is the eth0 from my main computer, whats the ip address?

eth0 Link encap:Ethernet HWaddr 00:40:05:86:66:C6
inet6 addr: fe80::240:5ff:fe86:66c6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2412 (2.3 Kb) TX bytes:2088 (2.0 Kb)
Interrupt:18 Base address:0xec00

mgrist 09-02-2004 05:38 PM

Quote:

Originally posted by NLR
Your pinging a broadcast address, which means it pings every computer in that segment (or in this case the either network)... And the main computer is what is answering, so again the main computer is pinging the main computer....

Did you run the commands in my above post? because the ip address 127.255.255.255 is invalid, anything in the 127.x.x.x rage is consider its self.

Andrew

I havn't got there yet my friend, had to leave the desk for a minute. I'm going to do it now

NLR 09-02-2004 05:40 PM

I have to go for a few hours.... Help when I get back... Sorry

mgrist 09-02-2004 05:40 PM

Quote:

Originally posted by NLR
Are you connected to a switch/router or are you connecting all of your computers directly into the main computer?

Andrew

Just doing these two computers for now, and I have the crossover between them. Once I get it done I'll work on adding the others through a router.

mgrist 09-02-2004 05:57 PM

Quote:

Originally posted by NLR
I have to go for a few hours.... Help when I get back... Sorry

That's cool, I'll be here.

I've pinged the second computer from the first and it's still writing, I'm up to icmp_seq=300 Was didn't use anything except ping, just as you wrote it was I suppose to put another argument like -c4 or something. Don't assume I know better:D :D :D I actually get around pretty good in these things but it takes me some screw up first..
I'm going to ask questions on this endevor so it doesn't take so long.
I'm up past 500 pings I'm guessing I need to find a way to stop the pinging:confused:

mgrist 09-02-2004 06:13 PM

I did it again the assummed right way from main to second computer:
I'll ping from the second to the main in a minute, have to do the phone thing real quick
PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data.
64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=0.095 ms
64 bytes from 192.168.0.2: icmp_seq=2 ttl=64 time=0.097 ms
64 bytes from 192.168.0.2: icmp_seq=3 ttl=64 time=0.103 ms
64 bytes from 192.168.0.2: icmp_seq=4 ttl=64 time=0.095 ms

--- 192.168.0.2 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3000ms
rtt min/avg/max/mdev = 0.095/0.097/0.103/0.010 ms

Peacedog 09-02-2004 06:29 PM

great you got the boxes pinging, now take a look at this

http://easyfwgen.morizot.net/gen/

it's a script generator for iptables, which is what you'll need to get nat going so your second machine can gain internet access.
good luck.

mgrist 09-02-2004 06:38 PM

My floppy drive just went out on the second machine, now of all times. I was using it to copy to so I could get the info on the net. Both machines are pinging each other. The second machine pinged the main computer with similar resuls as the other way around went. If you need to see those results just holler. I'm probably going to put anpther floppy in, I've got plenty, don't know if I've ever had a floppy go bad before.
I'm off to the newest link

mgrist 09-02-2004 07:00 PM

I replaced the floppy and I'm back in business. Here's the results from the second ping:

PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=0.118 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=0.100 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=0.103 ms
64 bytes from 192.168.0.1: icmp_seq=4 ttl=64 time=0.095 ms

--- 192.168.0.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2999ms
rtt min/avg/max/mdev = 0.095/0.104/0.118/0.008 ms


All times are GMT -5. The time now is 10:15 AM.