# Post installation net problem

## Zerodark

I finished getting the base system installed and configured so I rebooted. First the kernel loaded and got to starting up everything and the network part said there was no dhcp client installed, so I booted back to the livecd and merged dhcpcd and rebooted again. When it tried to dhcpcd it stopped for a moment, gave an error, kept moving, gave me a wierd ip and finished loading everything. I logged in, tried to ping something and nothing happened. I got the unknown host. I booted back to the livecd again and set up /etc/conf.d/net so my IP was static, and not dhcp'd. Rebooted, nothing bad happened during the load, but when I try to ping something I still get the unknown host. I have tried everything I could and I just can't figure it out. Anyone have any ideas on why I can't get it working?

----------

## d2_racing

Maybe you forgot yo copy your resolv.conf file during the installation.

----------

## sjorna

Hey,

It's been a while since I've been here, but after trying Vista, I've decided to come back to Gentoo! Yay!!

However, after installing the base system, my networking is shot to buggery.  In the LiveCD, networking is fine (and how I'm able to access the 'Net at all), but under my own kernel, this is what happens:

Using a simple config_eth0=( "dhcp" ), dhcpcd fails to get an IP address. I checked the debug output, and it appeared that it was receiving the address, but not applying it.  Then I tried a manually set static IP, [config_eth0=( "10.X.X.X netmask 255.0.0.0" )] and suddenly I can ping inside my network.  I try to ping Google, and I receive a "Network Unreachable" message.

I have a suspicion that this is based in the kernel, as I have tried two computers with this (one of which was working (net wise) perfectly in Vista) and get the exact same result.

I am going to try a genkernel, then if that doesn't work, an older kernel.

My resolv.conf is

```

# Generated by dhcpcd for interface eth0

nameserver 10.X.X.X

```

This is correct for my network.

Cheers,

Sam

----------

## sjorna

Well, I tried a genkernel, as well as a vanilla-sources kernel and have had absolutely no sucess.  For the moment, until someone can have a look at this and give me some suggestions, I'm just going to use the livecd for the net and emerge some essentials (or at least fetch some packages).  At least then I'll have a GUI!

Cheers, and I hope you can help...

-Sam

----------

## defenderBG

can u post more info:

ifconfig -a

netstat -r

with nameserver 10.X.X.X u mean a real ip, right? consealing a private ip is somewhat stupid... anyway... what i mean, u don't have 10.X.X.X in ur resolv.conf, right?

----------

## guduri

 *Zerodark wrote:*   

> I finished getting the base system installed and configured so I rebooted. First the kernel loaded and got to starting up everything and the network part said there was no dhcp client installed, so I booted back to the livecd and merged dhcpcd and rebooted again. When it tried to dhcpcd it stopped for a moment, gave an error, kept moving, gave me a wierd ip and finished loading everything. I logged in, tried to ping something and nothing happened. I got the unknown host. I booted back to the livecd again and set up /etc/conf.d/net so my IP was static, and not dhcp'd. Rebooted, nothing bad happened during the load, but when I try to ping something I still get the unknown host. I have tried everything I could and I just can't figure it out. Anyone have any ideas on why I can't get it working?

 

Make sure your are using the same kernel module for bringing up your network card while using the live cd as well as when you are not. I remember having this problem when I was loading gentoo on my machine.

----------

## d2_racing

Can you post your lspci.

----------

## sjorna

Hey,

For the record - my IP address is a real address - I used to work somewhere and my boss got me into the habit of hiding IP addresses.

Following are my ifconfig -a, netstat -r, emerge --info, and my kernel config (using gentoo-sources).

emerge --info

```

Portage 2.1.3.19 (default-linux/x86/2007.0/desktop, gcc-4.1.1, glibc-2.5-r0, 2.6.23-gentoo-r3 i686)

=================================================================

System uname: 2.6.23-gentoo-r3 i686 AMD Sempron(tm) 2400+

Timestamp of tree: Mon, 17 Dec 2007 00:46:01 +0000

app-shells/bash:     3.2_p17

dev-lang/python:     2.4.3-r4

dev-python/pycrypto: 2.0.1-r6

sys-apps/baselayout: 1.12.9

sys-apps/sandbox:    1.2.18.1-r2

sys-devel/autoconf:  2.61

sys-devel/automake:  1.10

sys-devel/binutils:  2.16.1-r3

sys-devel/gcc-config: 1.3.14

sys-devel/libtool:   1.5.22

virtual/os-headers:  2.6.17-r2

ACCEPT_KEYWORDS="x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=i686 -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-O2 -march=i686 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://public.planetmirror.com/pub/gentoo/ ftp://ftp.planetmirror.com/pub/gentoo/ http://mirror.pacific.net.au/linux/Gentoo ftp://mirror.pacific.net.au/linux/Gentoo http://mirror.isp.net.au/ftp/pub/gentoo/ ftp://mirror.isp.net.au/pub/gentoo/ ftp://ftp.swin.edu.au/gentoo http://ftp.swin.edu.au/gentoo "

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"

USE="X acl acpi alsa arts berkdb bitmap-fonts cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread encode esd fam firefox fortran ftp gdbm gif gpm gstreamer hal iconv ipv6 isdnlog jpeg kde kerberos ldap mad midi mikmod mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp oss pam pcre pdf perl png pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl ssl svg tcpd tiff truetype truetype-fonts type1-fonts unicode vorbis win32codecs x86 xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

```

ifconfig -a

```

eth0      Link encap:Ethernet  HWaddr 00:0B:6A:C7:CD:A1  

          inet addr:10.1.1.5  Bcast:10.255.255.255  Mask:255.0.0.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000 

          RX bytes:6085 (5.9 Kb)  TX bytes:3580 (3.4 Kb)

          Interrupt:16 Base address:0xee00 

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: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)

```

netstat -r

```

Kernel IP routing table

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface

10.0.0.0        *               255.0.0.0       U         0 0          0 eth0

loopback        *               255.0.0.0       U         0 0          0 lo

```

Just for the record, my network is a DSL router with DHCP enabled, sitting on IP 10.1.1.8.  I haven't had any other troubles with the net configuration.  Like I said before, from looking at dhcpcd debug output, it seems my computer is receiving an IP address from DHCP, but it is not being applied to the card.

My net config for this is as follows.

```

config_eth0=( "10.1.1.5 netmask 255.0.0.0" )

```

I know that this IP is free (no conflicts) because this is what my computer has had ever since I got the modem, and there have been no other computers added to the network receiving the same IP.

Kernel Config

[edit]

I've removed my kernel config and put a link to it on my ISP userspace to reduce post size.

http://users.tpg.com.au/sjorna/config-2.6.23-gentoo-r3

[/edit]

My network card is an on-board VIA Rhine II, for which I have built the driver into the kernel.  This is the first time I have troubles like this installing Gentoo.

I appreciate the help greatly!

Cheers,

-Sam

----------

## sjorna

Hey,

is anyone able to help me?  I can't think of anything else it could be!? I copied my resolv.conf, emerged dhcpcd, configured my net with both dhcp and tried manual config...  It's almost like the protocols for communicating on the Internet are not installed, but I can't figure where they would be installed from - I did everything in the kernel config the same as when I've previously done it...

If anyone has any ideas, then please help, 'cause I'm stumped!

Regards,

Sam

----------

## sjorna

I noticed that I didn't have any routes set in my net config, so my /etc/conf.d/net now reads:

```

config_eth0=( "10.1.1.5 netmask 255.0.0.0" )

routes_eth0=( "default via 10.1.1.8" )

```

So, now when I ping outside the network, out of four pings, I get three "network unreachable"s, and one failed request.  However, I can now resolve the IP address of the site I ping.  Therefore, I have some sort of access outside my network, but am still having trouble with the Internet.

Can anyone help me?

Cheers,

Sam

----------

## Psychoman

Be carefull, I'm far from being a linux/network expert  :Wink: 

But if I remember correctly, the gentoo handbook asks us to set the ip adress as follows:

fixed ip: 10.1.1.5

netmask: 255.255.255.0

broadcast: 10.1.1.255

Have you tried this?

/etc/conf.d/net

```
config_eth0=( "10.1.1.5 broadcast 10.1.1.255 netmask 255.255.255.0" ) 

routes_eth0=( "default via 10.1.1.8" )
```

Could you also post the output of

```
iptables --list -v
```

----------

## sjorna

Hello

It seems that I have been the fool here!  After reading the previous post, I then went to try some different configurations, and then noticed my problem:

/etc/conf.d/net

```

config_eth0=( "10.1.1.5 netmask 255.0.0.0" )

routes_eth0=( "default via 10.0.0.8" )

```

Due to late-night configuration and general being-annoyed, I failed to notice that I had mis-typed my gateway address.   :Embarassed:   My gateway is 10.1.1.8!

Let this be a lesson to all: no matter how well you type, nor how good you are, even the simplest mistake can be made by all, and being simple, can cause the most disabling of problems!

However, this still leaves the issue of why dhcpcd all of a sudden doesn't work (which I believe is the problem zerodark has)...  I'll try re-compiling and what-not to see if I can narrow it down.

@Psychoman:

Just as a point of interest, most of the time, having a 10.X.X.X address with a 255.255.255.0 netmask is a bad idea for the noob, as the standard class A network (which, if they're in a dhcp'd network) has 255.0.0.0.  Just as a point of interest, as it may cause trouble to people without network experience.

Cheers, and Thanks - I'll get back with my dhcp problem.

Sam

----------

## sjorna

I figured out the problem with DHCP - By default, dhcpcd now has DUID support, however my modem doesn't support that.  I simply recompiled with the USE="vram" flag.

Cheers all,

Sam

----------

