# Problem: Cannot ping my default gateway

## vkorenev

I am migrating to Gentoo from RedHat 9.0.

I have compiled driver for RTL8139 into the kernel (not as a module).

I have done all network configuration steps from the installation guide.

But I cannot ping my default gateway from my Gentoo installation.

My Gentoo ifconfig output:

```
eth0      Link encap:Ethernet  HWaddr 00:80:48:16:12:5D  

          inet addr:10.3.11.7  Bcast:10.255.255.255  Mask:255.0.0.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:281 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:100 

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

          Interrupt:17 Base address:0x4000 

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:16 errors:0 dropped:0 overruns:0 frame:0

          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:1656 (1.6 Kb)  TX bytes:1656 (1.6 Kb)

```

My Gentoo route output:

```
Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

10.0.0.0        *               255.0.0.0       U     0      0        0 eth0

loopback        localhost       255.0.0.0       UG    0      0        0 lo

default         10.1.1.1        0.0.0.0         UG    1      0        0 eth0

```

Can anybody give me any ideas?

----------

## Mnemia

It looks like your Ethernet card isn't receiving or sending any traffic. What is the output of running

```

mii-tool

```

as root?

This can tell you if your Ethernet card has successfully negotiated a physical link.

----------

## To

 *vkorenev wrote:*   

> My Gentoo route output:
> 
> ```
> Kernel IP routing table
> 
> ...

 

you have destination 10.0.0.0

and localhost 10.1.1.1

on your /etc/conf.d/net try this:

```
iface_eth0="1.1.1.1 broadcast 10.1.1.255 netmask 255.255.255.0"
```

Tó

----------

## vkorenev

```
# mii-tool

eth0: negotiated 100baseTx-FD, link ok
```

The same on my working RedHat installation.

----------

## vkorenev

 *To wrote:*   

> you have destination 10.0.0.0
> 
> and localhost 10.1.1.1

 

No, my host IP is 10.3.11.7

Narrowing of the network mask didn't help me.

----------

## jayjay

What is the routing table of your default gateway computer, 

does it have the right network mask for the network?

Can your default gate ping your computer?

Did your RH installation have the same IP?

Cheers 

JJ

----------

## vkorenev

 *jayjay wrote:*   

> What is the routing table of your default gateway computer, 
> 
> does it have the right network mask for the network?
> 
> Can your default gate ping your computer?
> ...

 

I have no access to my gateway. But my IP is the same. Since everything is working on RH, I think that gateway is OK.

----------

## kashani

I'd check the redhat settings and make sure you've got the right gateway, subnet, and broadcast. That's the most likely culprit as gateways that are also NAt/firewall devices tend to drop packets that aren't coming from where they think they should be coming from. 

kashani

----------

## Tazz_ZA

any firewalling set on this box ?

 *vkorenev wrote:*   

> I am migrating to Gentoo from RedHat 9.0.
> 
> I have compiled driver for RTL8139 into the kernel (not as a module).
> 
> I have done all network configuration steps from the installation guide.
> ...

 

----------

## vkorenev

 *kashani wrote:*   

> I'd check the redhat settings and make sure you've got the right gateway, subnet, and broadcast. That's the most likely culprit as gateways that are also NAt/firewall devices tend to drop packets that aren't coming from where they think they should be coming from.

 

The only difference I have found is that my network adapter uses IRQ#17 on Gentoo and IRQ#11 on RH. But I get no error messages.

IP address, gateway, subnet, broadcast are identical. I even tried to recompile the kernel and to compile the driver as a module.

BTW, I cannot ping any computer in my subnet, not only the gateway. I can ping only localhost and my own IP address.

----------

## vkorenev

I have not set up any firewalls. I just did everything from setup guide beginning from stage1. Now I even recompiled gentoo-sources 2.4.20 kernel without grsecurity patch. Are there any firewalls installed by default?

 *Tazz_ZA wrote:*   

> any firewalling set on this box ?

 

----------

## Mnemia

No, there aren't any firewalls installed by default. You're using a static IP address, correct? Are you sure that your IP doesn't conflict with any other computers on your subnet? Can your computer successfully use ARP to resolve the hardware addresses of other computers on your subnet? Try running 

```

arp

```

as root after attempting a ping of the gateway and see if you can see its hardware address.

----------

## Tazz_ZA

Ok, try this (easy under X)

In one window "ping" the gateway and in another run "tcpdump -i eth0" tcpdump should show the traffic on eth0 and we should be able to see what is going on...

(You could add a "| grep -i icmp" to the tcpdump command)

 *vkorenev wrote:*   

> I have not set up any firewalls. I just did everything from setup guide beginning from stage1. Now I even recompiled gentoo-sources 2.4.20 kernel without grsecurity patch. Are there any firewalls installed by default?
> 
>  *Tazz_ZA wrote:*   any firewalling set on this box ? 

 

----------

## ITiger

try removing your loopback device from your routing table:

```
route del -net loopback gw 127.0.0.1 netmask 255.0.0.0 metric 0
```

cya.

itiger.

----------

## vkorenev

ARP is not working:

```
# arp

Address                  HWtype  HWaddress           Flags Mask            Iface

10.1.1.1                         (incomplete)                              eth0

10.1.1.3                         (incomplete)                              eth0

10.1.1.2                         (incomplete)                              eth0

# tcpdump

22:21:05.182841 arp who-has 10.1.1.1 tell forge

22:21:05.182847 arp who-has 10.1.1.1 tell forge

22:21:05.182850 arp who-has 10.1.1.1 tell forge
```

Why this can occur?

----------

## swgeckoman

I have the same problem, I'm thinking that I have an IP conflict, but I'm still sorting through it

----------

## vkorenev

I have recompiled my kernel with the options from my RH9 kernel and it helped me.

 *swgeckoman wrote:*   

> I have the same problem, I'm thinking that I have an IP conflict, but I'm still sorting through it

 

----------

## ben

Well lately there have been a lot of problem with ACPI affecting network card. So it may be a good idea to boot with boot acpi=off, or to turn ACPI off in the BIOS.

If this solve this problem, I would suggest to the moderators to make a sticky note somewhere about this kind of problem

HTH

Ben

----------

