# Network Problems

## Marwin

I've installed Gentoo now but i have a problem with the network.

I can't ping any other computer.

I've installed support for my network-card in the kernel, and i've done those command-lines:

ifconfig eth0 192.168.0.51 broadcast 192.168.0.255 netmask 255.255.255.0

route add -net default gw 192.168.0.1 netmask 0.0.0.0 metric 1

But, i can't ping.. Why?

(Sorry for my english  :Smile: )Last edited by Marwin on Mon Oct 28, 2002 4:47 pm; edited 1 time in total

----------

## pjp

Is your IP static, or via DHCP?  Editing /etc/conf.d/net is probably an easier method.  Have you made any changes to that file?

----------

## Marwin

 *kanuslupus wrote:*   

> Is your IP static, or via DHCP?  Editing /etc/conf.d/net is probably an easier method.  Have you made any changes to that file?

 

I can do both. But i'm running static now.

----------

## securiteaze

It may be me, but i think there is a problem with your netmask.

 *Quote:*   

> ifconfig eth0 192.168.0.51 broadcast 192.168.0.255 netmask 0.0.0.0 
> 
> route add -net default gw 192.168.0.1 netmask 0.0.0.0 metric 1
> 
> 

 

Is 0.0.0.0 a valid netmask?

Wouldn't a netmask of 255.255.255.0 be more appropriate?

Try this:

```
ifconfig eth0 192.168.0.51 broadcast 192.168.0.255 netmask 255.255.255.0 

route add -net default gw 192.168.0.1 netmask 255.255.255.0 metric 1
```

----------

## Marwin

 *securiteaze wrote:*   

> It may be me, but i think there is a problem with your netmask.
> 
>  *Quote:*   ifconfig eth0 192.168.0.51 broadcast 192.168.0.255 netmask 0.0.0.0 
> 
> route add -net default gw 192.168.0.1 netmask 0.0.0.0 metric 1
> ...

 

But i think we could skipp the route-command because I can't ping any computer.

Any other suggestions?

(Sorry for my english  :Smile: )

----------

## rac

 *Marwin wrote:*   

> But i think we could skipp the route-command because I can't ping any computer.

 

You did notice that the netmask was different in securiteaze's suggestion for the ifconfig command as well, right?

----------

## Marwin

ohh, sorry. I wrote wrong.

ifconfig eth0 192.168.0.51 broadcast 192.168.0.255 netmask 255.255.255.0

That's my ifconfig.

But it still won't work  :Sad: 

If I boot from the CD, then I can ping any other computer in the network.

But if i start from the HDD, no connection with the subnet.

----------

## Sicario

ifconfig eth0 192.168.0.51 netmask 255.255.255.0 up

route add default gw 192.168.0.1

But have loaded the NIC module at startup¿

----------

## klieber

Is your NIC up and running?  If you do:

```
ifconfig eth0
```

Do you get a line that looks something like:

```
UP BROADCAST NOTRAILERS RUNNING  MTU:1500  Metric:1
```

If you don't see that line, your NIC isn't installed properly.  Look at dmesg for startup error messages.

Assuming you *do* get that line, then have you looked at the output of ifconfig and route -n when you boot from the CD (which works) compared to when you boot from your hard drive (which doesn't work)?

--kurt

----------

## Marwin

I have that line, but it don't work.

Where do I found the output files?

----------

## klieber

 *Marwin wrote:*   

> Where do I found the output files?

 

You boot to the CD and type: "ifconfig" and "route -n" and look at the output...

--kurt

----------

## securiteaze

Can you ping yourself?

```
ping -c5 192.168.0.51 

```

If not what error do you get?

----------

## Marwin

 *securiteaze wrote:*   

> Can you ping yourself?
> 
> ```
> ping -c5 192.168.0.51 
> 
> ...

 

I can ping my self. I have change my ip to 192.168.0.100    still the same probs.

----------

## Marwin

I think I need the mii-module.

Where can I find it?

----------

## pjp

If mii is support for a NIC card, it would be in the kernel configure options under Network Support (if it is a supported card).

----------

## Marwin

 *kanuslupus wrote:*   

> If mii is support for a NIC card, it would be in the kernel configure options under Network Support (if it is a supported card).

 

well. I've modprobe:d it but it still don't work.

Any other ideas?

----------

## klieber

 *Marwin wrote:*   

> well. I've modprobe:d it but it still don't work.

 

It won't work unless you've compiled it as a module for your kernel.  Another alternative is to compile it into your kernel.

You can read the Kernel HOWTO if you're not sure how to do this.

--kurt

----------

## Marwin

 *klieber wrote:*   

>  *Marwin wrote:*   well. I've modprobe:d it but it still don't work. 
> 
> It won't work unless you've compiled it as a module for your kernel.  Another alternative is to compile it into your kernel.
> 
> You can read the Kernel HOWTO if you're not sure how to do this.
> ...

 

I know how to compile a kernel but I still can't get the network working.

I tried today to install Gentoo 1.4 but the problem is still there.

Please, help me!

If I don't get this issue solved untill the evening. I install Windows, again  :Sad: 

----------

## klieber

 *Marwin wrote:*   

> Please, help me!

 

 *klieber wrote:*   

> Assuming you *do* get that line, then have you looked at the output of ifconfig and route -n when you boot from the CD (which works) compared to when you boot from your hard drive (which doesn't work)?

 

Did you ever do this?  If you can ping yourself, but no other hosts, you probably have something hosed with your routing table, like an incorrect netmask.

--kurt

----------

## Marwin

 *klieber wrote:*   

>  *Marwin wrote:*   Please, help me! 
> 
>  *klieber wrote:*   Assuming you *do* get that line, then have you looked at the output of ifconfig and route -n when you boot from the CD (which works) compared to when you boot from your hard drive (which doesn't work)? 
> 
> Did you ever do this?  If you can ping yourself, but no other hosts, you probably have something hosed with your routing table, like an incorrect netmask.
> ...

 

Listen, I can ping the other computers, IF, i boot from the 1.2-Gentoo-CD( I can't ping the other if I boot from the 1.4CD or my HD).

And, I do the same commands when I boot from the 1.2CD like I do when I try the commands at the HD.

----------

## rac

 *Marwin wrote:*   

> Listen, I can ping the other computers, IF, i boot from the 1.2-Gentoo-CD

 

We are listening.  That is why klieber is asking you to run "ifconfig" and "route -n" in both the  :Smile:  situation (when booted from the 1.2 CD) and the  :Sad:  situation, and to compare the output.

----------

## SaintNickNorth

I've got a very similar problem - 

I installed Gentoo 1.2, got on th net with no problem, emerged kde 

with some problems, and rebooted, now badda-bing, no net!

I tried the CD boot, and still no connection.

Ifconfig shows UP and RUNNING, I think Route is correct.

----------

## klieber

 *SaintNickNorth wrote:*   

> Ifconfig shows UP and RUNNING, I think Route is correct.

 

Can you ping localhost

Can you ping your own IP address?

Can you ping your default gateway IP address?

--kurt

----------

## pilla

Let s make it simple. Copy the following to /etc/conf.d/net

```

iface_eth0="192.168.0.51 broadcast 192.168.0.255 netmask 255.255.255.0"

gateway="eth0/192.168.0.1"

```

Then, restart your computer, log in as root and run 

```

/etc/init.d/net.eth0 start

```

And then tell us if there is any error.

----------

## Marwin

 *Bloody Bastard wrote:*   

> Let s make it simple. Copy the following to /etc/conf.d/net
> 
> ```
> 
> iface_eth0="192.168.0.51 broadcast 192.168.0.255 netmask 255.255.255.0"
> ...

 

I've done that and I get no errors. And the route-command gives the output: UP RUNNING

I've done rc add net.eth0 default so that starts automaticly.

Any more suggestions?

----------

## Marwin

 *klieber wrote:*   

>  *SaintNickNorth wrote:*   Ifconfig shows UP and RUNNING, I think Route is correct. 
> 
> Can you ping localhost
> 
> Can you ping your own IP address?
> ...

 

I can do nr 1,2 but not ping my gateway(192.168.0.1)

----------

## rac

Is the cable plugged in?  Does switching cables help?

----------

## klieber

 *Marwin wrote:*   

> I can do nr 1,2 but not ping my gateway(192.168.0.1)

 

OK, two thoughts.  One, you have a messed up netmask and/or routing table.  Two, some routers (Cisco being one of them) have problems when '0' is used as one of the octets in your IP address.  (I remember hearing that that violated some RFC, but don't quote me on that -- it's been a while)  

If you can, try re-jiggering your network to get rid of the "0" in the third octet.  

However, chances are the routing table and/or netmask are the problem.  (again, compare the output of ifconfig and route -n when booted to the CD vs. the HDD to see what the diff is)

Also, as rac suggested, check the cables -- make sure they're not loose, you're not accidentally using a crossover cable, etc.

--kurt

----------

## phong

It's also a good idea to try a different hub or at least different ports on the hub.  I was having a helluva time debugging a network problem at home - then I tried just moving the network cables to different ports on the hub.  Turns out that my prehistoric (but free!) 24-port 100-BaseT-only hub was finally dying one port at a time.  'Twas rather embarrasing since it took me hours to figure out.

----------

## timbo

I've struck this problem too.

I used tomsrtbt to set up a Gentoo server and even after the first boot ifconfig says all's ok but I can't ping anything outside it ie the other machine at the end of the cable.

Tim

 :Cool: 

----------

## timbo

Well I've spend all afternoon going over this and the only difference i can see between booting with tomsrtbt is that the 3com card is on irq10 and io 0x300 and when i boot with gentoo it's on irq5 and 0x220.

Using gkrellm on this box I can see the pings from both machines but neither respond to them.

Regards

Tim

 :Cool: 

----------

## rac

 *timbo wrote:*   

> Well I've spend all afternoon going over this and the only difference i can see between booting with tomsrtbt is that the 3com card is on irq10 and io 0x300 and when i boot with gentoo it's on irq5 and 0x220.

 

Perhaps Stuck on 10BT (especially Bloody Bastard's postings) will help you.  Other things to try include compiling the driver as a module and trying to pass arguments to it on the command line, and shifting slots with it.

----------

## timbo

I've recompiled the kernel BUT........

I can load and unload the module and with say;

insmod 3c506 irq=10

ifconfig eth0 192.18.0.3 up

And it does the same thing ping send packets but nothing returns from either machine, if I reboot with tomsrtbt alls well after reassigning the ip number and setting the gw.

Any more sugestions....

Regards

Tim

 :Cool: 

----------

## pilla

Can't you set also the io ? 

Have you tried rac's suggestion? Maybe it is just the case of some misconfiguration in your network adapter. 

Another possibility is to play with BIOS (sometimes it helps, sometimes it does not)

 *timbo wrote:*   

> I've recompiled the kernel BUT........
> 
> I can load and unload the module and with say;
> 
> insmod 3c506 irq=10
> ...

 

----------

## timbo

Bloody Bastard

Reading some of the networking howtos etc they'v said that if your "unlucky" enought to have an isa nic you'll be in a world of pain....... man do i believe them.

the 3c509 driver will not allow you to change the io even though they give you a line that you can pass to the kernel with lilo.

Really odd thing is that the car works with tomsrtbt and the only difference is the io and the driver, which is my next port of call.  I've recompiled my kernel with modules instead of it in the kernel.

Regards

Tim

 :Cool: 

----------

## pilla

But have you tried the utilities that 3com distributes? They are quite handy...

 *timbo wrote:*   

> Bloody Bastard
> 
> Reading some of the networking howtos etc they'v said that if your "unlucky" enought to have an isa nic you'll be in a world of pain....... man do i believe them.
> 
> the 3c509 driver will not allow you to change the io even though they give you a line that you can pass to the kernel with lilo.
> ...

 

----------

## timbo

Bloody Bastard

Doing that as we speak... really looks like it's the io port.......

Regards

Tim

 :Cool: 

----------

## pilla

If you cannot make it work with those tools, you can also try changing values in your BIOS for that ISA. Sometimes weird things happens when PnP is being used. Maybe some reservation of that address for your NIC could help. 

Good luck.

 *timbo wrote:*   

> Bloody Bastard
> 
> Doing that as we speak... really looks like it's the io port.......
> 
> Regards
> ...

 

----------

## timbo

Well well well.......  three holes in the ground........

I was just about ready to give up, when.  I had tried the 3com utils and set the card to irq10 and io220 that I knew Gentoo was using when the card was in PnP mode but it still would not ping.

So I pulled out the modem and sound cards which I have not got to configure services for yet and low and behold away we go as simple as that.

Thanks everyone for your help much appreciated.......

Regards

Tim

 :Cool: 

----------

