# baselayout-1.12.0_pre17 & eth0 - [SOLVED]

## t0nik

After upgrade to baselayout-1.12.0_pre17 && etc-update && reboot, my eth0 (i have two NIC - forcedeth/eth0 & sky2/eth1) can't set IP by udhcp or manual (eth1 successfully statically set) becase:

 *Quote:*   

> 
> 
> ```
> RTNETLINK answers: File exists
> ```
> ...

 

What is it?

I've tryed 

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

/etc/init.d/net.eth0 restart

ifconfig eth0 down

ip addr add  10.4.61.92/24 dev eth0
```

always return same error   :Crying or Very sad: 

Some boot messages:

```
...

 * Starting eth0

 *   Bringing up eth0

 *     dhcp

 *       Running udhcpc ...

udhcpc[5172]: udhcpc (v0.9.9-pre) started

udhcpc[5172]: Sending discover...

udhcpc[5172]: Sending select for 10.4.61.92...

udhcpc[5172]: Lease of 10.4.61.92 obtained, lease time 43200              [ !! ]

 *     Trying fallback configuration

 *     10.4.61.92

RTNETLINK answers: File exists                                            [ !! ]

 * Starting eth1

 *   Bringing up eth1

 *     10.110.110.1                                                       [ ok ]

 * Starting lo

 *   Bringing up lo

 *     127.0.0.1/8                                                        [ ok ]

 *   Adding routes

 *     127.0.0.0/8 ...                                                    [ ok ]

 * Initializing random number generator ...                               [ ok ]

INIT: Entering runlevel: 3

 * Starting metalog ...                                                   [ ok ]

 * Loading iptables state and starting firewall ...                       [ ok ]

 * Starting dnsmasq ...                                                   [ ok ]

 * Starting gpm ...                                                       [ ok ]

 * Loading lm_sensors modules...

 *   Loading i2c-isa ...                                                  [ ok ]

 *   Loading it87 ...                                                     [ ok ]

 * Initializing sensors ...                                               [ ok ]

 * Starting eth0

 *   Bringing up eth0

 *     dhcp

 *       Running udhcpc ...                                               [ !! ]

 *     Trying fallback configuration

 *     10.4.61.92

RTNETLINK answers: File exists                                            [ !! ]

 * Starting portmap ...                                                   [ ok ]

 * Mounting nfsd filesystem in /proc ...                                  [ ok ]

 * Mounting RPC pipefs ...                                                [ ok ]

 * Starting idmapd ...                                                    [ ok ]

 * Starting NFS statd ...                                                 [ ok ]

 * Exporting NFS directories ...                                          [ ok ]

 * Starting NFS daemon ...                                                [ ok ]

 * Starting NFS mountd ...                                                [ ok ]

 * Starting rsyncd ...                                                    [ ok ]

 * Starting vixie-cron ...                                                [ ok ]

 * Starting local ...                                                     [ ok ]
```

Emerge info:

```
~># emerge --info

Portage 2.1_pre7-r5 (default-linux/amd64/2005.1, gcc-3.4.6, glibc-2.4-r1,

2.6.16.2 x86_64)

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

System uname: 2.6.16.2 x86_64 AMD Athlon(tm) 64 Processor 3000+

Gentoo Base System version 1.12.0_pre17

dev-lang/python:     2.4.2-r1

sys-apps/sandbox:    1.2.17

sys-devel/autoconf:  2.13, 2.59-r7

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2

sys-devel/binutils:  2.16.1-r2

sys-devel/libtool:   1.5.22

virtual/os-headers:  2.6.11-r3

ACCEPT_KEYWORDS="amd64 ~amd64"

AUTOCLEAN="yes"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=k8 -O3 -ffast-math -funroll-all-loops -fpeel-loops -ftracer

-funswitch-loops -funit-at-a-time -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env

/usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config

/usr/share/X11/xkb /usr/share/config /var/qmail/control"

CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild

/etc/terminfo /etc/env.d"

CXXFLAGS="-march=k8 -O3 -ffast-math -funroll-all-loops -fpeel-loops -ftracer

-funswitch-loops -funit-at-a-time -pipe"

DISTDIR="/home/distfiles"

FEATURES="autoconfig distlocks metadata-transfer noinfo sandbox sfperms strict"

GENTOO_MIRRORS="http://distfiles.gentoo.org

http://distro.ibiblio.org/pub/linux/distributions/gentoo"

LANG="ru_RU.UTF-8"

LC_ALL=""

MAKEOPTS="-j2"

PKGDIR="/home/packages"

PORTAGE_TMPDIR="/home"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/local/portage"

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

USE="amd64 7zip X a52 aac alsa audiofile avi bash-completion bdf beepmp berkdb

bitmap-fonts bittorrent blender-game bzip2 cairo cdda cddb cdio cdparanoia

codecs crypt css cups dpms dri droproot dts dv dvd dvdr dvdread edl eds emboss

encode exif expat extensions extrafilters faad fb fbcon ffmpeg firefox flac

flash fmod foomaticdb fortran freetype gdbm gif gimp gimpprint glut gpm

graphviz gstreamer gtk gtk2 iconv idn ieee1394 image imagekits imagemagick imap

imlib ipv6 irda irmc isdnlog jabber java javascript jit jp2 jpeg jpeg2k kde

kipi ladspa lcms libcaca live lm_sensors lzo lzw lzw-tiff mad matroska mikmod

mime ming mixer mjpeg mng moneyplex motif mozsvg mp3 mpeg mpeg4 mplayer mysql

mythtv ncurses net nethack network nls nptl nptlonly nsplugin ntlm nvidia odbc

ogg oggvorbis opengl oracle pam pdflib perl playlist png povray ppds pppd

python qemu-fast qt quicktime readline rtc sdk sdl slang smime sms sndfile

soundtouch sox spell sql sqlite ssl stream stroke svg svgz sysfs tcltk tcpd tga

theora threads tiff timidity transcode truetype truetype-fonts type1-fonts ucs2

ucs4 unicode usb utf8 vcd vcdimager vim-pager vorbis wmf wxwindows x11vnc

xgetdefault xine xml2 xosd xpm xrandr xv xvid xvmc zlib elibc_glibc

input_devices_evdev input_devices_joystick input_devices_keyboard

input_devices_mouse input_devices_vmmouse input_devices_wacom kernel_linux

userland_GNU video_cards_dummy video_cards_fbdev video_cards_nv

video_cards_nvidia video_cards_vesa video_cards_vga video_cards_vmware"

Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS
```

```
~>$ lsmod

Module                  Size  Used by

psmouse                38736  0

nfsd                   65992  13

lockd                  49680  2 nfsd

sunrpc                148040  9 nfsd,lockd

it87                   23076  0

hwmon_vid               2560  1 it87

i2c_isa                 4416  1 it87

ipt_MASQUERADE          3264  1

iptable_nat             8004  1

ip_nat                 17324  2 ipt_MASQUERADE,iptable_nat

xt_state                2176  12

ip_conntrack           52268  4 ipt_MASQUERADE,iptable_nat,ip_nat,xt_state

nfnetlink               5640  2 ip_nat,ip_conntrack

xt_tcpudp               3584  13

iptable_filter          2880  1

ip_tables              12384  2 iptable_nat,iptable_filter

x_tables               11720  5 ipt_MASQUERADE,iptable_nat,xt_state,xt_tcpudp,ip_tables

snd_pcm_oss            50272  0

snd_mixer_oss          16384  1 snd_pcm_oss

snd_seq_oss            32640  0

snd_seq_midi_event      7232  1 snd_seq_oss

snd_seq                53888  4 snd_seq_oss,snd_seq_midi_event

snd_seq_device          7760  2 snd_seq_oss,snd_seq

nls_iso8859_1           5248  1

nls_cp437               6976  1

vfat                   12160  1

fat                    48624  1 vfat

nls_utf8                2112  1

ntfs                  189176  1

evdev                   9280  0

rtc                    12928  0

usbhid                 30852  0

snd_intel8x0           32232  0

snd_ac97_codec        103384  1 snd_intel8x0

snd_ac97_bus            2496  1 snd_ac97_codec

snd_pcm                88012  3 snd_pcm_oss,snd_intel8x0,snd_ac97_codec

snd_timer              22408  2 snd_seq,snd_pcm

snd                    54248  9 snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_seq_device,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer

soundcore               9056  1 snd

snd_page_alloc          9360  2 snd_intel8x0,snd_pcm

ohci_hcd               19908  0

sata_nv                 8196  0

libata                 55256  1 sata_nv

sky2                   35008  0

forcedeth              23364  0

nvidia               5417204  0

ohci1394               30984  0

ieee1394               91824  1 ohci1394

i2c_nforce2             6784  0

i2c_core               19736  4 it87,i2c_isa,nvidia,i2c_nforce2

ehci_hcd               29000  0

usbcore               125416  4 usbhid,ohci_hcd,ehci_hcd

```

Downgrade to baselayout-1.12.0_pre16-r3 && etc-update solved this problem!

I've posted a bug #129437

----------

## UberLord

What version of udhcp are you running?

----------

## t0nik

```
udhcp-0.9.9_pre20041216-r2
```

, but i can't set IP by hand, may be version of udhcp is not important

----------

## UberLord

Post your conf.d/net without comments please

----------

## t0nik

i will post it when i went home

----------

## t0nik

```
~>$ sed '/^$/d;/^#/d' /etc/conf.d/net.eth0

modules_eth0=( "udhcpc" )

config_eth0=(

    "dhcp"

)

dhcp_eth0="nodns"

udhcpc_eth0="-q"

fallback_eth0=(

    "10.4.61.92 netmask 255.255.255.0"

)

fallback_route_eth0=(

    "default via 10.4.61.254"

)

postup () {

    sleep 3

    if [ $(/bin/grep -c quadra\.lan /etc/resolv.conf) -gt 0 ]

        then

            GATE=`/sbin/route -n|/bin/sed -n 's/^0\.0\.0\.0[[:blank:]]*\([[:digit:]\.]*\)[[:blank:]]*.*/\1/p'`

            /sbin/route del default

            /sbin/route add -net 10.0.0.0 netmask 255.0.0.0 gw ${GATE}

            /sbin/route add -net 212.1.224.0 netmask 255.255.255.192 gw ${GATE}

            /etc/init.d/quadra.inet &

    fi

    return 0

}

postdown () {

    pkill quadra

    pkill pppd

}

```

```
~>$ sed '/^$/d;/^#/d' /etc/conf.d/net.eth1

config_eth1=(

    "10.110.110.1 netmask 255.255.255.0 broadcast 10.110.110.255"

)

```

----------

## UberLord

 *t0nik wrote:*   

> [code]~>$ sed '/^$/d;/^#/d' /etc/conf.d/net.eth0
> 
> udhcpc_eth0="-q"
> 
> 

 

That's the problem. You're asking udhcp to quit after getting a lease. Why is this?

----------

## t0nik

Becase udhcp with "-q" set IP-address & exit.

Becase udhcp each 6 hour makes "release" & change my routing table (from my postup () function) but i don't need this!

----------

## UberLord

New udhcpc.sh module attached to your bug. Please test it!

----------

## t0nik

i'll test it at home

----------

## t0nik

it FIXED

Thanks!

----------

