# Internet connection

## Azerix

hello,

i have a beginer probleem. I have instald gentoo but i dont have internet conection. Idid what the book sayt

 *Quote:*   

> # This is basically the ifconfig argument without the ifconfig $iface 
> 
> # 
> 
> #iface_eth0="192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0" 
> ...

 

I have a DHCp conection true a router and its static. I have sercht in forums.gentoo and there r more who had the same probleem.

Kan any one help me?

----------

## barbar

 *Azerix wrote:*   

> 
> 
> I have a DHCp conection true a router and its static

 

I am not sure what you mean. Does your router assign an IP adress via dhcp, or is the ip set statically?

what is the ip of your router? what happens when you assign your pc an ip within the same segment?

----------

## Dark_Hunter

please make an

 *Quote:*   

> ifconfig

  and an  *Quote:*   

> route

  and show us the output.

----------

## Azerix

Yes , i get the IP adress via dhcp. And when i boot my gentoo i get this

 *Quote:*   

> Bringing eth0 up via DHCP........              [!!]

 

After booting i login as a root, i try ifconfig and i get this info

 *Quote:*   

> link ancap:Local Loopback
> 
>            inet addr:127.0.0.1 Mask:255.0.0.0
> 
>            cetera........

 

This what i get when i do route:

 *Quote:*   

> Kernel 
> 
> IP routing table
> 
> Destination    Gateway  Genmask   FLAgs Matric  REF  USE  Iface
> ...

 

I have 4 computers , one of theme i use as router, i share internet via that computer.

----------

## barbar

Is there no eth0 entry in the ifconfig output?

if not then you get no ip via dhcp.

Did you get an ip via dhcp during installation?

Try to assign an IP manually (ifconfig eth0 $IP). Use an IP in the same segment as your router.

----------

## Azerix

During gentoo instalation i had a internet conection and after instalation i hade no more internet conection.

----------

## barbar

What networkcard do you use? (check with lspci)

Is the right module compiled and loaded? (check with lsmod)

----------

## Azerix

I have no probleem with networkcard, its 3com. De only probleem i get at boot is DHCP i get local ip -127.0.0.0. Do i have to instal DNS?

----------

## barbar

No you do not need a dns server for your task.

What happens when you run 

```
/etc/init.d/net.eth0 start
```

----------

## Azerix

 *barbar wrote:*   

> No you do not need a dns server for your task.
> 
> What happens when you run 
> 
> ```
> ...

 

 *Quote:*   

>   * WARNING:"net.eth0" has alredy been strated

 

----------

## NeddySeagoon

Azerix,

Since you don't get any ethN interfaces in your 

```
ifconfig 
```

output, your network card module is not loaded.

This thread tells you how to find it https://forums.gentoo.org/viewtopic.php?t=268054&highlight=

----------

## Azerix

 *Quote:*   

> 
> 
> Your network is not working because the kernel module for you network card is not loaded. It may no even be built. 
> 
> Find it like this. Boot the liveCD and issue teh lsmod command. 
> ...

 

what do you meen with issue teh Ismod command, wich command is that? When i type Ismod, i get command not found.

----------

## NeddySeagoon

Azerix,

lsmod is included in all the liveCDs and your built system.

It should be in /sbin as symbolic link to /bin/lsmod.

It shows you which kernel modules are loaded.

How did you boot when you tried to execute lsmod?

----------

## Azerix

I booted from Livecd, thats all

----------

## ian!

 *Azerix wrote:*   

> what do you meen with issue teh Ismod command, wich command is that? When i type Ismod, i get command not found.

 

Not 'Ismod' (i). It's 'lsmod' (L).

----------

## Azerix

oeps  :Smile:  Administratro is right its Ismod with L

----------

## Azerix

I booted from cdrom i type lsmod and i get the module names:

 *Quote:*   

> 
> 
> 3c59x
> 
> serial
> ...

 

And then jst like you sayt in this topic https://forums.gentoo.org/viewtopic.php?t=268054&highlight= "boot normaly, so i boot with out CD and issue the lsmod, after that i type 

 *Quote:*   

> modprobe \3c59x

  than i get the mesage

 *Quote:*   

> module could not found

 

Is that normal?

----------

## NeddySeagoon

Azerix,

Thats bad news. That means the 3c59x module has not been made.

Do the following

```
cd /usr/src/linux

make menuconfig
```

Find the 3c59x setting under 

```
Device Drivers

-> Networking support 

   -> Networking support

      -> Network device support

         -> Ethernet (10 or 100Mbit)

            -> 3COM cards
```

Choose 3c590/3c900 series (592/595/597) as a module (M)

Save the config as you exit.

Do 

```
make modules

make modules_install
```

Its that easy to add modules to your kernel. Now you may modprobe it. 

No reboot required. No kernel reinstall required either.

If you had said (Y) instead of (M) then you must do the full kernel install again.

----------

## barbar

 *Azerix wrote:*   

> 
> 
>  *Quote:*   modprobe \3c59x  than i get the mesage
> 
>  *Quote:*   module could not found 
> ...

 

Maybe it is just a typo. Try

```

modprobe 3c59x
```

----------

## NeddySeagoon

barbar,

Well spotted - the "\" should not be there

----------

## Azerix

oke its done, i have done everethynk what you sait netwerkaart is installd. 

But in other topic https://forums.gentoo.org/viewtopic.php?t=268054&highlight= you sait

after ifconfig

 *Quote:*   

> 
> 
> As soon as eth0 shows, you have your module name. 
> 
> Add the name to the right file in /etc/modules.autoload.d/ to get it to load automatically. 
> ...

 

Do i have to add  the name to modules.autoload.d file?

And what do you meen with  *Quote:*   

> If you had said (Y) instead of (M) then you must do the full kernel install again?
> 
> 

 

----------

## Azerix

I hav now a new probleem. when my gentoo boots i get the folowing message:

 *Quote:*   

> 
> 
> Please make sure that /etc/conf.d/net has $ifconfig_eth0 set
> 
> (or $iface_eth0 for old-style configuration)

 

----------

## NeddySeagoon

Azerix,

There is an error in your /etc/conf.d/net file.

If you use dhcp to get an IP address it should be OK.

Look in  /etc/conf.d/net.example 

to see how it should be set.

----------

## Azerix

I dont have net.example file in /etc/conf.d/ directory.  i only have net file.  :Sad: 

----------

## NeddySeagoon

Azerix,

You have one of the older network setups then.

Please post your net file.

----------

## Azerix

this ismy conf.d/net file:

 *Quote:*   

> # /etc/conf.d/net:
> 
> #$header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18$
> 
> # This is basically the ifconfig argument without the ifconfig $iface 
> ...

 

the only think hat changed is de IP adress that i gave 192.168.0.12

----------

## NeddySeagoon

Azerix,

You either use dhcp to get an IP address, in which case you want 

```
iface_eth0="dhcp" 
```

dhcpcd_eth0="192.168.0.12" asks the dhcp server to allocate 192.168.0.12 if its free and is an option in addition to the iface_eth0= statement.

or if you use a staic IP address, its 

```
iface_eth0="192.168.0.12 broadcast 192.168.0.255 netmask 255.255.255.0" 
```

If you are using statically assisned IPs you will need  

```
gateway="eth0/192.168.0.1"
```

or whatever the IP of your gateway is.

----------

## Azerix

No I have 4 PC one of them i use as a router, filesharing, internet sharing. With other words as a server. all other PC get static Ip adress, so i have to use static. I wil try this one 

iface_eth0="192.168.0.12 broadcast 192.168.0.255 netmask 255.255.255.0"

----------

## NeddySeagoon

Azerix,

That will be OK as long as its free and in teh right subnet,

You will also need the gateway line, or you will not reach the internet.

----------

## Azerix

and what if i use staticly IP, what do i have to change exaxtly in /etc/config.d/net file? Couse i have now other probleem, when i change this section of conf.d/net file, 

 *Quote:*   

> 
> 
> *iface_eth0="192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0"

 

to

 *Quote:*   

> 
> 
> *iface_eth0="192.168.0.12 broadcast 192.168.0.255 netmask 255.255.255.0"

 

i get this message at boot:

 *Quote:*   

> *Bringing eth0 up (192.168.0.12)            [ok]
> 
> SIOCSIFADDE :No such device
> 
> eth0: unknown interface: No smuch device
> ...

 Last edited by Azerix on Sun Dec 19, 2004 11:03 pm; edited 1 time in total

----------

## NeddySeagoon

Azerix,

Here is an old style /etc/conf.d/net from one of my boxes, commenst and everything

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

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 19:39:22 azarah Exp $

# Global config file for net.* rc-scripts

# This is basically the ifconfig argument without the ifconfig $iface

#

iface_eth0="192.168.100.10 broadcast 192.168.100.255 netmask 255.255.255.0"

#iface_eth1="207.170.82.202 broadcast 207.0.255.255 netmask 255.255.0.0"

# For DHCP set iface_eth? to "dhcp"

# For passing options to dhcpcd use dhcpcd_eth?

#

#iface_eth0="dhcp"

#dhcpcd_eth0="..."

# For adding aliases to a interface

#

#alias_eth0="192.168.0.3 192.168.0.4"

# NB:  The next is only used for aliases.

#

# To add a custom netmask/broadcast address to created aliases,

# uncomment and change accordingly.  Leave commented to assign

# 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.100.1"
```

Put your own IP addesses into the lines that are not comments. There are only two.

----------

## Azerix

I get this message at boot: 

 *Quote:*   

> 
> 
> *Bringing eth0 up (192.168.0.12) [ok] 
> 
> SIOCSIFADDE :No such device 
> ...

 

This is how my conf.d/net file looks like:

 *Quote:*   

> 
> 
> # /etc/conf.d/net: 
> 
> #$header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18$ 
> ...

 

----------

## NeddySeagoon

Azerix,

You  must uncomment this line

```
#iface_eth0="192.168.0.12 broadcast 192.168.0.255 netmask 255.255.255.0" 
```

although I think you spotted that.

```
SIOCSIFADDE :No such device 
```

means that there is no eth0 to bring up.

Is it listed in ifconfig?

Is its module being loaded - look in lsmod ?

----------

## Azerix

when i try lsmod i get no module listed, none, and when i do ifconfig also no  module listed. 

 *Quote:*   

> 
> 
> You must uncomment this line 
> 
> Code: 
> ...

 

i did that too and now i get onther mesaage at boot:

 *Quote:*   

> 
> 
> Please make sure that /etc/conf.d/net has $ifconfig_eth0 set 
> 
> (or $iface_eth0 for old-style configuration)

 

----------

## krinn

 :Smile: 

Type that, reboot, all ok

```

echo 3c59x >> /etc/modules.autoload.d/kernel-2.6

echo 3c59x >> /etc/modules.autoload.d/kernel-2.4

```

If you know your kernel version you can discard the other kernel line, if you don't know, type both lines, it will not do anything bad anyway...

THE SIOCSIFADDE message is because your are bringing up eth0 up while your module isn't load (and so 3com card isn't running), previous lines will ask gentoo to autoload 3com module for you

ps: if you wish load it by hand it's "modprobe 3c59x"

----------

## Azerix

 *Quote:*   

> 
> 
> THE SIOCSIFADDE message is because your are bringing up eth0 up while your module isn't load (and so 3com card isn't running), previous lines will ask gentoo to autoload 3com module for you 
> 
> ps: if you wish load it by hand it's "modprobe 3c59x"
> ...

 

I know, when i do modrpobe and after that ipconfig i stil dont get IP, i get only local IP. 

I did what you sait but stil is not working, at boot i get same probleem,

echo 3c59x >> /etc/modules.autoload.d/kernel-2.4.26-r6

 *Quote:*   

> 
> 
> Please make sure that /etc/conf.d/net has $ifconfig_eth0 set 
> 
> (or $iface_eth0 for old-style configuration)

 

----------

## barbar

Hi Azerix,

it seems we are back at the beginning. But since you can assign a static IP we can assume that the right kernel module is loaded. (Can you get access to the internet?)

You said that a PC is acting as server (dhcp, file- ,internetsharing). And that you have 3 other clients attached to the server.

What happens when you shutdown the other clients. Does dhcp work?

Could it be that your server (network) can not handle the traffic?

Or did you stumble over this bug:

https://forums.gentoo.org/viewtopic.php?t=256613

If so follow UberLord's advice and change 

```
dhcpcd -z to dhcpcd -kin /etc/init.d/net.eth0
```

----------

## Azerix

I askt frend of myn, and he sait that i have to install DHCP client. i dont know of he is correct.

----------

## barbar

If you followed the Handbook you should have emegerged dhcpcd (see http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=9)

If you have not emerged dhcpcd then you should

```
emerge dhcpcd
```

I strongly recommend stick to the handbook and do every step according to the handbook. It is well worth the reading and makes your life (gentoo installation) a lot easier.

----------

## Azerix

i installd DHCP client, and i chaged the init.d file dhcpcd -z to dhcpcd -k, And now i get the same probleem  *Quote:*   

> 
> 
> Bringing eth0 up via DHCP....[!!]
> 
> 

 

An evrytime when reboot and i do lsmod i dont get any modules listed, even if i try this code, after reboot i do lsmod again and i stil dont get any modules listed.

 *Quote:*   

> 
> 
> echo 3c59x >> /etc/modules.autoload.d/kernel-2.4.26-r6
> 
> 

 

Maby i have to reinstal the kernel.  :Confused: 

----------

## barbar

 *Azerix wrote:*   

> i installd DHCP client, and i chaged the init.d file dhcpcd -z to dhcpcd -k, And now i get the same probleem  *Quote:*   
> 
> Bringing eth0 up via DHCP....[!!]
> 
>  
> ...

 

There is a typo: It should be 

```
echo 3c59x >> /etc/modules.autoload.d/kernel-2.4
```

Do you use genkernel. Than do not forget 

```
modules-update
```

After that remove the file 

```
/etc/modules.autoload.d/kernel-2.4.26-r6 
```

. It could mess up the loading of modules at starttime. Make sure you have 

```
/etc/modules.autoload.d/kernel-2.4
```

 with the entry

```
3c59x
```

----------

## Azerix

IT WORKS , THANKS BARBAR   :Very Happy:  AND  TANKS ALL WHO HELPT ME

----------

## barbar

 *Azerix wrote:*   

> AND  TANKS ALL WHO HELPT ME

 

Please, christmas is near. Do not give war toys as presents  :Very Happy: 

----------

## Azerix

lol  :Laughing: 

----------

## Andréas

Time to get my CoD up and running to take those TANKS out  :Laughing: 

----------

