# I have definied eth0 but I cannot connect problem

## kazik1616

I have asrock k8nf4g mainboard with integrated network card. I configured my eth0 and when I type 

```
ifconfig -a
```

 it is visible but I cannot connect to Internet. Even when I use ping netowrk doesnt reply. I use the same configuration in Win XP and everything works fine. What to do?

----------

## Ctrl+Alt+Del

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=8#doc_chap2

The handbook explains that in great detail  :Wink: 

If you have followed that part, we need more info to help you.

what did you configure, and what part of it does seem to work and which part not?

----------

## kazik1616

cofigured but doesn't work  :Sad:  Generally earile I had configured this options using  net-setup but it wasn't work I don't know why  :Sad: 

----------

## Ctrl+Alt+Del

well net-setup is only for the installation process, not for your running system.

Anyway, since we cannot probe your mind, you will have to provide more info  :Wink: 

----------

## kazik1616

I don't know how kind of info you need, however the network card is integrated with asrock k8nf4g mainboard and I have static IP-adress. Net works properly under Windows XP with the same configuration. Morover I have the same problem with Ubuntu Linux. Which info do you want more? May it be problem on the provider side?

----------

## Ctrl+Alt+Del

-/etc/conf.d/net

-output of lspci (emerge pciutils)

-output of ifconfig

i assume you ran /etc/init.d/net.eth0 start to start your nic??

----------

## kazik1616

My ifconfig:

```
eth0      Link encap:Ethernet  HWaddr 00:13:8F:74:F1:5B  

          inet addr:150.254.142.44  Bcast:150.254.142.255  Mask:255.255.255.192

          inet6 addr: fe80::213:8fff:fe74:f15b/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000 

          RX bytes:5361 (5.2 Kb)  TX bytes:0 (0.0 b)

          Interrupt:19 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  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)

```

my  ~/etc/conf.d/net:

```
# This network configuration was written by net-setup

iface_eth0="150.254.142.44 broadcast 150.254.142.255 netmask 255.255.255.192"

gateway="eth0/150.254.142.1"

```

and my lspci:

```
00:00.0 RAM memory: nVidia Corporation C51 Host Bridge (rev a2)

00:00.1 RAM memory: nVidia Corporation C51 Memory Controller 0 (rev a2)

00:00.2 RAM memory: nVidia Corporation C51 Memory Controller 1 (rev a2)

00:00.3 RAM memory: nVidia Corporation C51 Memory Controller 5 (rev a2)

00:00.4 RAM memory: nVidia Corporation C51 Memory Controller 4 (rev a2)

00:00.5 RAM memory: nVidia Corporation C51 Host Bridge (rev a2)

00:00.6 RAM memory: nVidia Corporation C51 Memory Controller 3 (rev a2)

00:00.7 RAM memory: nVidia Corporation C51 Memory Controller 2 (rev a2)

00:02.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)

00:03.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)

00:04.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)

00:05.0 VGA compatible controller: nVidia Corporation C51G [GeForce 6100] (rev a2)

00:09.0 RAM memory: nVidia Corporation MCP51 Host Bridge (rev a2)

00:0a.0 ISA bridge: nVidia Corporation MCP51 LPC Bridge (rev a2)

00:0a.1 SMBus: nVidia Corporation MCP51 SMBus (rev a2)

00:0b.0 USB Controller: nVidia Corporation MCP51 USB Controller (rev a2)

00:0b.1 USB Controller: nVidia Corporation MCP51 USB Controller (rev a2)

00:0d.0 IDE interface: nVidia Corporation MCP51 IDE (rev a1)

00:0e.0 IDE interface: nVidia Corporation MCP51 Serial ATA Controller (rev a1)

00:10.0 PCI bridge: nVidia Corporation MCP51 PCI Bridge (rev a2)

00:10.2 Multimedia audio controller: nVidia Corporation MCP51 AC97 Audio Controller (rev a2)

00:14.0 Bridge: nVidia Corporation MCP51 Ethernet Controller (rev a1)

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

```

I also ran my eth0.

----------

## Ctrl+Alt+Del

you were given that adress by your isp? or are you trying to make a local network?

----------

## kazik1616

I got it from my ISP. I am only unsure of my broadcast.

----------

## Ctrl+Alt+Del

in that case i'd suggest calling your isp's helpdesk  :Smile: 

they should know it

ohh and no offense but you should read http://www.catb.org/~esr/faqs/smart-questions.html sometime  :Wink: 

----------

## kazik1616

The broadcast is ok  :Smile: 

On nvidia page I found audio and network driver to this mainboard and it is written it is under Linux, but what we see the net is configured. Morover they need the kernel sources. May it be that or the problem is different?

----------

## think4urs11

 *kazik1616 wrote:*   

> 
> 
> ```
> # This network configuration was written by net-setup
> 
> ...

 

These settings don't match!

Most probably it should be (given the netmask is correct)

150.253.142.44 br 150.253.142.63 nm 255.255.255.192

explanation:

netmask 255.255.255.192 gives a network with 64 possible addresses (26 bit network, 6 bit host)

x.y.z.0 - x.y.z.63  (network: .0   broadcast: .63   usable addresses: .1 - 62)

x.y.z.64 - x.y.z.127  (network: .64   broadcast: .127   usable addresses: .65 - 126)

x.y.z.128 - x.y.z.191  (network: .128   broadcast: .191   usable addresses: .129 - 190)

x.y.z.192 - x.y.z.255  (network: .192   broadcast: .255   usable addresses: .193 - 254)

----------

## kazik1616

I tried it. Doesn't work  :Sad:  Morover when my friend installed gentoo in the same network he had the same broadcast as me. I think broadcast isn't important.

----------

## mbar

I have the exact same mainboard  :Smile:  The point is, its NIC doesn't work well with forcedeth driver in kernel, it cannot obtain IP address from DHCP server. You can check your log and see "blah blah timed out waiting for valid DHCP response" or something similar. It won't work ATM no matter what you do.

You have to install NVIDIA binary eth driver, use this ebuild:

```
# Copyright 1999-2005 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

inherit eutils linux-mod

PKG_V="pkg1"

NV_V="${PV/1.0./1.0-}"

AMD64_NV_PACKAGE="NFORCE-Linux-x86_64-${NV_V}"

DESCRIPTION="Linux kernel module for NVIDIA's nForce onboard NIC"

HOMEPAGE="http://www.nvidia.com/"

SRC_URI="http://download.nvidia.com/XFree86/nforce/amd64/${NV_V}/${AMD64_NV_PACKAGE}-${PKG_V}.run"

NV_PACKAGE="${AMD64_NV_PACKAGE}"

S=${WORKDIR}/${NV_PACKAGE}-${PKG_V}/nvnet

LICENSE="NVIDIA"

SLOT="0"

KEYWORDS="-* ~amd64"

RESTRICT="nostrip"

IUSE=""

MODULE_NAMES="nvnet(:${S})"

BUILD_PARAMS="SYSSRC=${KV_DIR}"

BUILD_TARGETS=" "

src_unpack() {

        unpack ${A}

        cd ${WORKDIR}

        bash ${DISTDIR}/${NV_PACKAGE}-${PKG_V}.run --extract-only

}

src_compile() {

        cd ${S}

        if kernel_is 2 6

        then

                rm makefile

                ln -snf Makefile.kbuild Makefile

        fi

        linux-mod_src_compile

}

src_install() {

        linux-mod_src_install

        dodoc ${S}/ReleaseNotes.html

}

pkg_postinst() {

        linux-mod_pkg_postinst

} 
```

put it as nvnet-1.0.0310.ebuild in a /usr/local/portage/net-misc/nvnet directory. Emerge nvnet then add nvnet to module autoload file. Read http://download.nvidia.com/XFree86/nforce/1.0-0310/ReleaseNotes.html

Integrated NIC works with Rescue Is Possible Live CD with inkernel driver... but its 32-bit.

----------

## kazik1616

1. What is autoload file?

2. To which system can I add it? To the old one (I don't have internet connection in it) or to installed one (after chroot command)?

----------

