Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
unable to ping eth0 or localhost
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
melinux
n00b
n00b


Joined: 25 May 2006
Posts: 59
Location: Malta

PostPosted: Tue Jan 23, 2007 8:53 am    Post subject: unable to ping eth0 or localhost Reply with quote

Hi,
I have a machine running gentoo, and suddenly since a reboot I cannot ping eth0 or localhost ie both the machine's ip and localhost (127.0.0.1) don't ping. The network card on the machine is a dec chip/tulip.
What could be the reason and how to solve it.
I've recompiled the kernel, more than once but the problem persists.

I can boot from the gentoo cd and networking works in that case.
Back to top
View user's profile Send private message
nephros
Advocate
Advocate


Joined: 07 Feb 2003
Posts: 2139
Location: Graz, Austria (Europe - no kangaroos.)

PostPosted: Tue Jan 23, 2007 10:34 am    Post subject: Reply with quote

what does "ifconfig -a" produce?

What output do you get from running "/etc/init.d/net.eth0 restart"?
_________________
Please put [SOLVED] in your topic if you are a moron.
Back to top
View user's profile Send private message
mjrosenb
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jun 2006
Posts: 115
Location: CMU

PostPosted: Tue Jan 23, 2007 10:37 am    Post subject: Reply with quote

also what's the output of route?
warning, running route may take a while
_________________
I'll be mjrosenb on #${COMPUTER_RELATED_SUBJECT}
1x i386 laptop w/ Gentoo
4x i386 desktop w/ Gentoo
2x dual proc i386 w/dragonfly bsd
1x x86-64 desktop w/ Gentoo
1x i386 desktop w/ FreeBSD
1x alpha workstation w/ Gentoo
looking for more
Back to top
View user's profile Send private message
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Tue Jan 23, 2007 3:25 pm    Post subject: Reply with quote

mjrosenb wrote:
also what's the output of route?
warning, running route may take a while

not if you run "route -n" to disable DNS-lookups
Back to top
View user's profile Send private message
melinux
n00b
n00b


Joined: 25 May 2006
Posts: 59
Location: Malta

PostPosted: Wed Jan 24, 2007 8:40 am    Post subject: Reply with quote

I've just tried a different ethernet card and I have the same results. This card shows up as eth1 now.

Meanwhile this is the output of ifconfig -a:

dummy0 Link encap:Ethernet HWaddr D2:F4:CD:0C:4C:3C
BROADCAST NOARP 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:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

eth1 Link encap:Ethernet HWaddr 00:C0:26:26:77:47
inet addr:<machines IP> Bcast:x.x.x.255 Mask:255.255.255.224
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:20478 errors:0 dropped:0 overruns:0 frame:0
TX packets:351 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1249665 (1.1 Mb) TX bytes:24826 (24.2 Kb)
Interrupt:10 Base address:0xbc00

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:194 errors:0 dropped:0 overruns:0 frame:0
TX packets:194 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:15928 (15.5 Kb) TX bytes:15928 (15.5 Kb)

Output of restarting net.eth1:
Stopping eth1
Bringing down eth1
Shutting down eth1 ... ok
Starting eth1
Bringing up eth1
<ip address> ok
Adding routes
default via <default gateway ip> ...

This is the routing table (route -n):
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
x.x.x.0 0.0.0.0 255.255.255.224 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 <default gateway ip> 0.0.0.0 UG 0 0 0 eth1


What could be wrong?
Back to top
View user's profile Send private message
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Wed Jan 24, 2007 9:09 am    Post subject: Reply with quote

what error does the ping command give?
Back to top
View user's profile Send private message
melinux
n00b
n00b


Joined: 25 May 2006
Posts: 59
Location: Malta

PostPosted: Wed Jan 24, 2007 9:46 am    Post subject: Reply with quote

If I ping 127.0.0.1,
I get
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.

--- 127.0.0.1 ping statistics ---
9 packets transmitted, 0 received, 100% packet loss, time 7999ms

(I had to press ^C)

The result is the same with pinging the ip address of the ethernet card only the time in ms is different.
Back to top
View user's profile Send private message
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Wed Jan 24, 2007 9:51 am    Post subject: Reply with quote

do you have a firewall enabled?
Back to top
View user's profile Send private message
melinux
n00b
n00b


Joined: 25 May 2006
Posts: 59
Location: Malta

PostPosted: Wed Jan 24, 2007 9:58 am    Post subject: Reply with quote

One of the things I tried before posting here was to boot the 2006.1 minimal gentoo cd and I reinstalled it.
The problem remained the same.
Back to top
View user's profile Send private message
melinux
n00b
n00b


Joined: 25 May 2006
Posts: 59
Location: Malta

PostPosted: Wed Jan 24, 2007 9:59 am    Post subject: Reply with quote

I thought of that too.
No iptables/netfilter isn't set in the kernel on the machine.
Back to top
View user's profile Send private message
melinux
n00b
n00b


Joined: 25 May 2006
Posts: 59
Location: Malta

PostPosted: Fri Jan 26, 2007 10:28 am    Post subject: Reply with quote

Any ideas why I can't ping localhost and I can't ping the network card (even when I replace the card with one of a different make)?
Back to top
View user's profile Send private message
melinux
n00b
n00b


Joined: 25 May 2006
Posts: 59
Location: Malta

PostPosted: Fri Jan 26, 2007 10:48 am    Post subject: Reply with quote

I went to /proc/sys/net/ipv4
and noticed icmp_ignore_all was set to 1.

I edited this to 0 and now I can ping everything.

I'm not sure where this got set in the kernel or somewhere else.
I guess I'll do a search again this time on this.
Edit: didn't get any results. that's odd.
Back to top
View user's profile Send private message
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Fri Jan 26, 2007 10:49 am    Post subject: Reply with quote

melinux wrote:
Any ideas why I can't ping localhost and I can't ping the network card (even when I replace the card with one of a different make)?

can you ping something else on your network? can that something else ping you?
Back to top
View user's profile Send private message
melinux
n00b
n00b


Joined: 25 May 2006
Posts: 59
Location: Malta

PostPosted: Fri Jan 26, 2007 10:54 am    Post subject: Reply with quote

Hi, like I said above, now I found a quick fix at least.
Enabling that kernel setting (icmp_ignore_all was set to 1, I changed it to 0) allows me to ping everything I want now..

Though I think rebooting will mean I'll have to reset it. I'll have to add it to a script probably as I don't think this is covered in sysctl.conf...
If anyone has any idea where to set it permanently, that would be great.
Once I have that info I'll mark the thread as solved...
Back to top
View user's profile Send private message
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Fri Jan 26, 2007 11:10 am    Post subject: Reply with quote

melinux wrote:
Hi, like I said above, now I found a quick fix at least.

sorry:
nielchiano: Posted: Fri 2007-01-26 11:49:42
melinux: Posted: Fri 2007-01-26 11:48:45
melinux wrote:
Though I think rebooting will mean I'll have to reset it. I'll have to add it to a script probably as I don't think this is covered in sysctl.conf...
If anyone has any idea where to set it permanently, that would be great.

just add it to sysctl.conf?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum