Can ping linux itself, but can't ping others

Can ping linux itself, but can't ping others

Post by Tom East » Fri, 02 Jun 2000 04:00:00



CH,


>Hi,
>  I have a really weird problem with my linux (slackware), which I
>couldnt figure it out why. My linux network seems to work fine. I can
>ping/telnet/ftp within the linux box itself using hostname and ip, but I
>just can't access any machines outside the linux box.

>My linux network settings as:
>Hostname: acernote
>ip addr     : 192.168.0.1
>netmask   : 255.255.255.0
>I have a win95 machines (192.168.0.9) connect to my linux thru a
>cross-cable

># ping acernote      <--- no problem. I got replies
># ping 192.168.0.1 <-- not problem, got replies too
># telnet acernote   <-- no problem. got a login prompt
># telnet 192.168.0.9   <--  PROBLEM !. I dont get any replies from the
>win95 machine

>The win95 machine network is working fine. From the win95, I did a 'ping
>192.168.0.8', but there are no replies.

Did you mean 192.168.0.8 or 192.168.0.1?

Quote:>What really puzzles me is, if I can ping the linux box using the
>hostname and ipadd using eth0, then the network card should be working
>fine. But then, why can't I ping any other machines just outside the
>linux box? I know my nic is working fine, 'cos it gives me now prob
>under win95.

>Please advise. Any help is greatly appreciated. Thanks.

Almost certainly, your ethernet adapter isn't working -- most likely,
it's not configured correctly.

a) What kind of card is it.
b) What does your /etc/conf.modules (or /etc/modules.conf) file look like?
c) What does lsmod show?
d) What does the output of "ifconfig" look like?
e) What does the output of "route -n" look like?
f) What does "cat /proc/interrupts" show?
g) What does "cat /proc/ioports" show?

-Tom
--
Tom Eastep             \  Eastep's First Principle of Computing:
ICQ #60745924           \  "Any sane computer will tell you how it

Shoreline, Washington USA \___________________________________________

 
 
 

Can ping linux itself, but can't ping others

Post by Ng, Choon Hoo » Wed, 07 Jun 2000 04:00:00


Apologize for the slow reply. got pretty busy with work. Okay, the details are
as below:


> CH,


> >Hi,
> >  I have a really weird problem with my linux (slackware), which I
> >couldnt figure it out why. My linux network seems to work fine. I can
> >ping/telnet/ftp within the linux box itself using hostname and ip, but I
> >just can't access any machines outside the linux box.

> >My linux network settings as:
> >Hostname: acernote
> >ip addr     : 192.168.0.1
> >netmask   : 255.255.255.0
> >I have a win95 machines (192.168.0.9) connect to my linux thru a
> >cross-cable

> ># ping acernote      <--- no problem. I got replies
> ># ping 192.168.0.1 <-- not problem, got replies too
> ># telnet acernote   <-- no problem. got a login prompt
> ># telnet 192.168.0.9   <--  PROBLEM !. I dont get any replies from the
> >win95 machine

> >The win95 machine network is working fine. From the win95, I did a 'ping
> >192.168.0.8', but there are no replies.

> Did you mean 192.168.0.8 or 192.168.0.1?

Oops, yes, i meant "From the win95, I did a 'ping 192.168.0.1', but there are
no replies.

Quote:

> >What really puzzles me is, if I can ping the linux box using the
> >hostname and ipadd using eth0, then the network card should be working
> >fine. But then, why can't I ping any other machines just outside the
> >linux box? I know my nic is working fine, 'cos it gives me now prob
> >under win95.

> >Please advise. Any help is greatly appreciated. Thanks.

> Almost certainly, your ethernet adapter isn't working -- most likely,
> it's not configured correctly.

It could be. In fact, I thought so too, but then I can ping the linux itself
using domainname and ipaddr (not the 127.0.0.1), then it must working. So, how
do we explain that then??

Quote:

> a) What kind of card is it.

It is a Linksys 10BaseT PCMCIA (EC2T) NIC

Quote:> b) What does your /etc/conf.modules (or /etc/modules.conf) file look like?

alias net-pf-4 off
alias net-pf-5 off

Quote:

> c) What does lsmod show?

Module                  Size  Used by
pcnet_cs                7572   1
8390                    5888   0  [pcnet_cs]
ds                      5676   2  [pcnet_cs]
i82365                 22480   2
pcmcia_core            39080   0  [pcnet_cs ds i82365]
bsd_comp                3568   0  (unused)
ppp                    20428   0  [bsd_comp]
slip                    7188   0  (unused)
slhc                    4300   0  [ppp slip]
lp                      5648   0  (unused)

Quote:

> d) What does the output of "ifconfig" look like?

eth0      Link encap:Ethernet  HWaddr 00:E0:98:08:11:26
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          Interrupt:5 Base address:0x300

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:3924  Metric:1
          RX packets:24 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0

Quote:> e) What does the output of "route -n" look like?

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo

Quote:

> f) What does "cat /proc/interrupts" show?

           CPU0
  0:      84020          XT-PIC  timer
  1:       1299          XT-PIC  keyboard
  2:          0          XT-PIC  cascade
  5:          0          XT-PIC  pcnet_cs
  6:         37          XT-PIC  floppy
  8:          1          XT-PIC  rtc
 12:       1212          XT-PIC  PS/2 Mouse
 13:          1          XT-PIC  fpu
 14:          7          XT-PIC  ide0
NMI:          0

Quote:

> g) What does "cat /proc/ioports" show?

0000-001f : dma1
0020-003f : pic1
0040-005f : timer
0060-006f : keyboard
0070-007f : rtc
0080-008f : dma page reg
00a0-00bf : pic2
00c0-00df : dma2
00f0-00ff : fpu
01f0-01f7 : ide0
02f8-02ff : serial(auto)
0300-031f : pcnet_cs
0378-037a : parport0
03c0-03df : vga+
03e0-03e1 : i82365
03f0-03f5 : floppy
03f6-03f6 : ide0
03f7-03f7 : floppy DIR
03f8-03ff : serial(auto)

Appreciate your help. Thanks.

Rgds,
  CH

- Show quoted text -

> -Tom
> --
> Tom Eastep             \  Eastep's First Principle of Computing:
> ICQ #60745924           \  "Any sane computer will tell you how it

> Shoreline, Washington USA \___________________________________________


 
 
 

Can ping linux itself, but can't ping others

Post by Tom Easte » Wed, 07 Jun 2000 04:00:00



>> > >What really puzzles me is, if I can ping the linux box using the
> > >hostname and ipadd using eth0, then the network card should be working
> > >fine. But then, why can't I ping any other machines just outside the
> > >linux box? I know my nic is working fine, 'cos it gives me now prob
> > >under win95.

> > >Please advise. Any help is greatly appreciated. Thanks.

> > Almost certainly, your ethernet adapter isn't working -- most likely,
> > it's not configured correctly.

> It could be. In fact, I thought so too, but then I can ping the linux itself
> using domainname and ipaddr (not the 127.0.0.1), then it must working. So, how
> do we explain that then??

All that means is that the driver is loaded -- it doesn't meant that the
card is working! The packets are actually sent via "lo"....

- Show quoted text -

Quote:

> > a) What kind of card is it.

> It is a Linksys 10BaseT PCMCIA (EC2T) NIC

> > b) What does your /etc/conf.modules (or /etc/modules.conf) file look like?

> alias net-pf-4 off
> alias net-pf-5 off

> > c) What does lsmod show?

> Module                  Size  Used by
> pcnet_cs                7572   1
> 8390                    5888   0  [pcnet_cs]
> ds                      5676   2  [pcnet_cs]
> i82365                 22480   2
> pcmcia_core            39080   0  [pcnet_cs ds i82365]
> bsd_comp                3568   0  (unused)
> ppp                    20428   0  [bsd_comp]
> slip                    7188   0  (unused)
> slhc                    4300   0  [ppp slip]
> lp                      5648   0  (unused)

> > d) What does the output of "ifconfig" look like?

> eth0      Link encap:Ethernet  HWaddr 00:E0:98:08:11:26
>           inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:100
>           Interrupt:5 Base address:0x300

> lo        Link encap:Local Loopback
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           UP LOOPBACK RUNNING  MTU:3924  Metric:1
>           RX packets:24 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0

> > e) What does the output of "route -n" look like?

> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> 192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
> 127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo

> > f) What does "cat /proc/interrupts" show?

>            CPU0
>   0:      84020          XT-PIC  timer
>   1:       1299          XT-PIC  keyboard
>   2:          0          XT-PIC  cascade
>   5:          0          XT-PIC  pcnet_cs
>   6:         37          XT-PIC  floppy
>   8:          1          XT-PIC  rtc
>  12:       1212          XT-PIC  PS/2 Mouse
>  13:          1          XT-PIC  fpu
>  14:          7          XT-PIC  ide0
> NMI:          0

> > g) What does "cat /proc/ioports" show?

> 0000-001f : dma1
> 0020-003f : pic1
> 0040-005f : timer
> 0060-006f : keyboard
> 0070-007f : rtc
> 0080-008f : dma page reg
> 00a0-00bf : pic2
> 00c0-00df : dma2
> 00f0-00ff : fpu
> 01f0-01f7 : ide0
> 02f8-02ff : serial(auto)
> 0300-031f : pcnet_cs
> 0378-037a : parport0
> 03c0-03df : vga+
> 03e0-03e1 : i82365
> 03f0-03f5 : floppy
> 03f6-03f6 : ide0
> 03f7-03f7 : floppy DIR
> 03f8-03ff : serial(auto)

Ok -- I'm not familiar with this driver but "man 4 pcnet_cs" provides some
things to try. I notice that in /proc/interrupts, there have been no
interrupts on irq 5 which is assigned to the NIC. Try pinging and see if
the count remains at zero; if it does, then add the following to your
/etc/conf.modules:

        option pcnet_cs irq_list=9,10,11 pc_debug=1

Use cardctl to stop the card, eject and re-insert the card and retest. If
it still doesn't work, see if there are any helpful messages in your log.

-Tom
--
Tom Eastep             \  Eastep's First Principle of Computing:
ICQ #60745924           \  "Any sane computer will tell you how it

Shoreline, Washington USA \___________________________________________

 
 
 

Can ping linux itself, but can't ping others

Post by Jonas Utterstro » Thu, 08 Jun 2000 04:00:00




> > >I have a win95 machines (192.168.0.9) connect to my linux thru a
> > >cross-cable

Are you sure that you have a cross-cable? I had the same problem as you
until I switched cable. :(
Also check your /var/log/messages for possible errors and warnings in
eth0.

Quote:

> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref
Use Iface
> 192.168.0.0     0.0.0.0         255.255.255.0   U     0      0
0 eth0
> 127.0.0.0       0.0.0.0         255.0.0.0       U     0      0
0 lo

Weird, my route -n does not have 127.0.0.0
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0
eth0
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0
eth0

This is how I set up my network (config for ifup):
iface lo inet loopback
iface eth0 inet static
        address 192.168.0.2
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1

I am not sure if having a gateway is necessary in your case.
If you have access to a real network, I strongly recommend that you try
to temporarily set up your computer against it.

Hope this helps,

/Jonas U

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

1. Canned "ping"

    Within a ksh script, I would like to first determine whether or not
a remote
host is alive before I attempt other network access to it, (file reads
or writes).
The ping command seems to be the logical solution, but if I have to wait
for
the ping command to fail due to network time-out to indicate that the
remote
host is not available I've gained nothing over just letting my other
network
access commands time-out.

    Is there a way to execute ping wrapped in a timer - such as in a
subprocess
that gets killed by it's parent if it doesn't end within a practical
time interval?
It seems to me that that should work, but what I'm really looking for is

someone who would share code that has already been written.

    Much appreciated.

2. CMS Tape Drives

3. D-link DE220 can PING his own IP, but can't PING others'

4. Accessing ms-dos floppy on Solaris 2.4 x86

5. Can I prevent pinging from others and still ping others?

6. how to change the partition size?

7. Can't ping local host but can ping others

8. Need quick-'n'-dirty syntax lesson in csh

9. It's not bad canned meat...

10. Win98 can ping Linux, but Linux can't ping Win98 box

11. W98 can ping Linux; Linux can't ping W98??

12. A pings B, B pings C, C cannot ping A