LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   What's PING all about then? (https://www.linuxquestions.org/questions/linux-networking-3/whats-ping-all-about-then-94563/)

asktoby 09-19-2003 12:42 PM

What's PING all about then?
 
I'm not sure my network is set up properly.

If my IP is 192.168.1.113, should

PING 192.168.1.113

work?

I get 100% packet loss, but I don't know if I'm doing it wrong!

(p.s. Ultimately I want to share files between Mandrake and XP, but I think this is an important first thing to check?)

l1mpp1mp 09-19-2003 12:48 PM

Yes, that should work provdided that your Eth0 interface is running. If its not that could contribute to your 100% loss because the ethernet interface isnt on.

Another thing to consider type "ifconfig" in a term window. That will tell you what your IP is and if the interface is running.

Looking_Lost 09-19-2003 12:53 PM

Ping also won't work if your firewalls settings block prevent it responding and/or if icmp_echo_ignore_all = 1

asktoby 09-20-2003 11:56 AM

Well, the eth0 interface is working because I'm connected to the web right now using it via my router.

This is the result of ifconfig:

[root@localhost toby]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:06:4F:04:B4:81
inet addr:192.168.1.113 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2802 errors:0 dropped:0 overruns:0 frame:0
TX packets:2961 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:1374204 (1.3 Mb) TX bytes:356220 (347.8 Kb)
Interrupt:10 Base address:0x6800

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:72 errors:0 dropped:0 overruns:0 frame:0
TX packets:72 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4722 (4.6 Kb) TX bytes:4722 (4.6 Kb)

I should also mention that I have Mandrake 9.1's firewall running.
I'm not sure what you mean by icmp_echo_ignore_all = 1.
Could you suggest what I should try next?

Robert0380 09-20-2003 01:16 PM

sounds like a firewall problem then, for the longest i had my box setup not to recieve pings from anywhere (even itself).

asktoby 09-20-2003 01:36 PM

What should I do to make it work then? Should I poke open a port in the firewall?

I am just using Mandrake's default firewall so I can easily open ports by putting for example:
8436/tcp 4662/tcp
into mandrake control centre.

Robert0380 09-20-2003 01:39 PM

i never used Mandrake, or for that matter...a default firewall (well i used one on redhat but i didnt know what it was doing).

i assume it uses iptables, you could do the following:

iptables -A INPUT -s 127.0.0.1 -j ACCEPT

to accept all packets from itself. or
iptalbes -A INPUT -s 192.168.1.113 -j ACCEPT

asktoby 09-20-2003 02:05 PM

I tried the following advice from usenet and now find that I can PING 192.168.1.1 (my gateway) but I can't ping my own IP nor can I ping the IP of the XP machine.

What should I try next? Open a port on the firewall?

==Advice from usenet==

In /etc/sysctl.conf change the line
net.ipv4.icmp_echo_ignore_all=1
to
net.ipv4.icmp_echo_ignore_all=0
and then run
sysctl -p

asktoby 09-20-2003 02:12 PM

I tried
iptables -A INPUT -s 127.0.0.1 -j ACCEPT
iptables -A INPUT -s 192.168.1.113 -j ACCEPT

but pinging 192.168.1.113 still gets 100% packet loss.

Robert0380 09-20-2003 02:19 PM

iptables -A INPUT -p icmp -j ACCEPT


that will accept all icmp packets, if that throws and error, let me knwo also.

asktoby 09-21-2003 01:46 AM

after typing
iptables -A INPUT -p icmp -j ACCEPT
============================
Sitting at my Linux box:
I *can* ping:
192.168.1.1 (my router)
www.linuxquestions.org

I *can't* ping:
192.168.1.113 (myself, i.e. the linux box)
192.168.1.109 (the xp box)
============================
sitting at my XP box
I *can* ping
192.168.1.1 (router)
192.168.1.109 (myself, i.e. the XP box)

I *can't ping:
192.168.1.113 (the linux box)
============================
Just to re-iterate, all I am really intending upon doing is sharing files betweent the two computers, but I understand this pinging issue should be resolved first?

Tesl 09-21-2003 07:06 AM

it might seem like an odd question, but windows does odd things. Have you tried virus scanning the XP box?

i had a very similar problem lately with my connection. Right now i have an XP box connected to the internet, which is directly networked to a Linux box via a cross over cable. Its a bad setup, but for the next 2 weeks at least it does the job.

I got a virus on my XP machine and after that internet sharing screwed up, but stranger still, i couldnt even ping the machine. I still dont know why now, but after i cleaned up my XP machine i could suddenly ping it again.

god knows what that virus did, but iv had no problems since.

EDIT - actually forget that, you should still be able to ping the loopback address on Linux no matter what is wrong with XP

asktoby 09-21-2003 08:55 AM

I did have the mandrake security level set to "higher". In case that was interfering, I have reduced it to "high" using DrakSec in Mandrake Control Centre, but am still getting the same PING results as my last post.

(p.s. There's no viruses on XP by the way.)

(p.p.s Does this ping issue matter? Can I ignore it and get on with trying to network XP to Mandrake?)

asktoby 09-25-2003 03:19 PM

empty post. I can't see how to delete this, sorry!

asktoby 09-25-2003 03:30 PM

In linux I can now get success typing:

PING 192.168.1.1 (my router)
and
PING 192.168.1.113 (myself, i.e. mandrake)
BUT I get 100% packet loss from 192.168.1.109 (XP)

Similarly, XP can ping the router, and itself, but NOT linux.

Could it be a router issue? I use the popular Linksys BEFSR41 router.

What else could cause this?


All times are GMT -5. The time now is 01:18 PM.