# 3com- eth0 config problem

## rehanmomin

Hey I'm a newbie.  I finally got gentoo to boot up but I cannot ping anything.  I am running a Dell Inspiron 8200 with a 3Com 3C920 Integrated Fast Ethernet Controller (3c905c-TX compatible).  Whenever I boot up I get an error: 

*Failed to bring eth0 up

*ERROR:  Problem starting need services.

               "netmount" was not started.

I cannot even ping to router.  I have tried to install all the network devices under the "network device - 10/100 mbs" section.  Still no luck.  I am so close to being able to bring up the desktop.  I cannot run "startx" without the internet connection.  I am able to get internet connection when I use boot from the cd.  Help would be greatly appreciated.

----------

## qwkbrnfox

Hi,

Do you have the proper module (3c59x) loaded?  ie, if you do/sbin/lsmod as root, do you see a line with 3c59x in it?

If not, try (again as root) modprobe 3c59x

/etc/init.d/net.eth0 to see if your interface comes up.  You may get an error after the modprobe.  This means that you:

a) Have not compiled the 3c59x module when you made your kernel

b) You compiled it right into the kernel, so it's there, but it's not a module.  In this case the problem is totally different.

If the above _does_ work, then try adding the line3c59x to your /etc/modules.autoload file.

----------

## rehanmomin

When I do the kernel configuratin, when I select something what is the difference between the "M" and the "*" and which one am I suppose to use?

Specifically in the network devices..

----------

## rtn

 *rehanmomin wrote:*   

> When I do the kernel configuratin, when I select something what is the difference between the "M" and the "*" and which one am I suppose to use?
> 
> Specifically in the network devices..

 

M is module

* is built into the kernel

Technically you can do either, but unless you think you'll want to unload the

module or pass the module any special parameters, then you might as well

just build it into the kernel.  I usually build all of my network needs into the

kernel, as neither of those cases above pertain to me.

--rtn

----------

## qwkbrnfox

I agree with rtn.  If that's the only network card you have, and you aren't doing anything tricky, like using pcmcia networking, then feel free to use the '*', which means compile it into the kernel.  In that case, you shouldn't have to change anything, just reboot.

If you do use the 'M', then it explicitly has to be loaded.  This is done by adding the line to the modules.autoload to do it at boot, or using modprobe, to do it after.

----------

## rehanmomin

hey qwkbrnfox ... in your first post should i do what you said after booting from the cd?  i'm not sure if i can use modprobe without booting from the cd.

----------

## rtn

You shouldn't need to boot from cd to fix a network problem in the kernel.

First, does your kernel detect your network card?

```
dmesg | grep eth
```

If not, do you need to load the module?

```
modprobe 3c59x
```

If that doesn't work either, you need to verify that the 3com Vortex/Boomerang

option is enabled under  Network Device Support --> Ethernet (10 or 100mbit)

3COM cards --> 3c590/3c900 series (592/595/597) "Vortex/Boomerang" support

--rtn

----------

## rehanmomin

i typed in modprobe 3c59x and i got the following error:

modprobe: can't locate module 3c59x

i check my kernel config file and .....3com Vortex/Boomerang 

option is enabled under Network Device Support --> Ethernet (10 or 100mbit) 

3COM cards --> 3c590/3c900 series (592/595/597) "Vortex/Boomerang" support 

is enabled in the file

----------

## qwkbrnfox

 *rehanmomin wrote:*   

> i typed in modprobe 3c59x and i got the following error:
> 
> modprobe: can't locate module 3c59x
> 
> i check my kernel config file and .....3com Vortex/Boomerang 
> ...

 

OK, it looks like you don't have 3c59x enabled as a module, which is why modprobe failed.

The fact that it's enabled in the kernel config is strange.  Did you change it (by doing a make [menu][x]config), but haven't recompiled?

If you have change the config, but haven't recompiled, follow the kernel recompiling section in the install howto, ie:

```
mount /dev/hda1 /boot

cd /usr/src/linux

make dep && make clean bzImage modules modules_install

mv /boot/bzImage /boot/bzImage.orig

cp /usr/src/linux/arch/i386/boot/bzImage /boot

```

The first line is only needed if you haven't mounted boot yet

After you do all this, you'll have to reboot.  The driver for you card should be right in the kernel, so everything should work   :Wink: 

----------

## rtn

 *rehanmomin wrote:*   

> i typed in modprobe 3c59x and i got the following error:
> 
> modprobe: can't locate module 3c59x
> 
> i check my kernel config file and .....3com Vortex/Boomerang 
> ...

 

Does dmesg report finding your card?

```
dmesg | grep eth
```

--rtn

----------

## rehanmomin

ok i got the eth0 up and running.  I can ping my router, but when i ping a website like google, i get an error: 

sendto: Network is unreachable

any suggestions?

by the way...I did this without booting from the cd

----------

## rtn

Try fixing your default route, making sure you specify the correct gateway.

```
# netstat -rn

Kernel IP routing table

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface

192.168.0.0     0.0.0.0         255.255.255.0   U        40 0          0 eth0

0.0.0.0         192.168.0.1     0.0.0.0         UG       40 0          0 eth0

```

The line you need to look for is the default route, with destination 0.0.0.0.

If the gateway address isn't correct, you can fix it manually:

```
route add default gw 192.168.0.1 (change that ip to your gateway)
```

You can also check your gateway setting in /etc/conf.d/net:

```
# tail /etc/conf.d/net

# defaults for that interface.

#

#broadcast_eth0="192.168.0.255 192.168.0.255"

#netmask_eth0="255.255.255.0 255.255.255.0"

# For setting the default gateway

#

gateway="eth0/192.168.0.1"

```

--rtn

----------

## qwkbrnfox

 *rehanmomin wrote:*   

> ok i got the eth0 up and running.  I can ping my router, but when i ping a website like google, i get an error: 
> 
> sendto: Network is unreachable
> 
> any suggestions?
> ...

 

Good news!  What did you have to do?

I imagine that your router is set up for dhcp, so all ip allocatation, gateway, and dns stuff _should_ be taken care of automagically.

Does your /etc/conf.d/net file have the following line:iface_eth0="dhcp"

Note that there is no # at the start of the line.  Add or modify the line to look like the above, then restart the interface with:/etc/init.d/net.eth0 restart

Does this help?

----------

## rtn

err just as an fyi, my post doesn't take into account dhcp since I don't use it.

If you use dhcp you should probably follow the post above this one instead of

trying to staticly setting your default route.   :Embarassed: 

--rtn

----------

## rehanmomin

Awesome, it works!!!

My router does have a dhcp and the rest of the good stuff.  I did what you said and went to /etc/conf.d/net and deleted the # before the iface_eth0="dhcp" and I am able to ping other websites.

qwkbrnfox asked how I got the eth0 to work.  What I did was, I booted up with the cd and typed in /sbin/lsmod.  I saw my ethernet card.  In parenthesis it said that it was being "unused".  I typed in "net-setup eth0" and checked back with /sbin/lsmod.  I saw that "unused" had dissapeared.  I then chrooted in gentoo and recompiled my kernel. I rebooted and the change worked.

Thank you for all of your help qwkbrnfox and rtn.

----------

## error26

 *Quote:*   

> qwkbrnfox asked how I got the eth0 to work. What I did was, I booted up with the cd and typed in /sbin/lsmod. I saw my ethernet card. In parenthesis it said that it was being "unused". I typed in "net-setup eth0" and checked back with /sbin/lsmod. I saw that "unused" had dissapeared. I then chrooted in gentoo and recompiled my kernel. I rebooted and the change worked. 

 

Can this be? It sounds not sensible to me but I am a rookie and have the same problem. I have started eth0 manually before installing gentoo.

----------

## error26

i tried sbin/lsmod

there is not a single module inside

modprobe 3c59x

gives back:  ..... unresolved symbol _mmx_memcpy...

dmesg | grep eth0 gives back nothing

a kernel issue?

thanks!

----------

## error26

compiling 3c59x into kernel [*] helped

----------

