# net.eth0 |SIOCADDRT: File exists ERROR

## InvisibleRasta

hello guys i jsut migrated to openrc.  after emerging that i have been getting a [!!] at boot. this is the error:

```
net.eth0        |dhcpcd[5967]: eth0: checking for 192.168.0.3

net.eth0        |dhcpcd[5967]: eth0: leased 192.168.0.3 for 86400 seconds

net.eth0        |dhcpcd[5967]: forked to background, child pid 6061

 [ ok ]

net.eth0        | *     received address 192.168.0.3/24

 [ ok ]

net.eth0        | *   Adding routes

net.eth0        | *     default via 192.168.0.1 ...

net.eth0        |SIOCADDRT: File exists

 [ !! ]

netmount        | * Mounting network filesystems ...

 [ ok ]

ntpd            | * Starting ntpd ...

 [ ok ]

local           | * Starting local

rc default logging stopped at Fri Apr  8 02:35:23 2011
```

ill paste some outputs:

```
# rc-update show

                local | default                              nonetwork

             mount-ro |                             shutdown

                 ntpd | default

                 fsck |                        boot

         termencoding |                        boot

               net.lo |                        boot

                dmesg |                sysinit

                 root |                        boot

             bootmisc |                        boot

             netmount | default

                  gpm | default

                devfs |                sysinit

            alsasound |                        boot

              hwclock |                        boot

                 dbus | default

            savecache |                             shutdown

           localmount |                        boot

                 udev |                sysinit

            killprocs |                             shutdown

            g15daemon | default

             hostname |                        boot

              modules |                        boot

          consolefont |                        boot

           vixie-cron | default

              urandom |                        boot

               procfs |                        boot

              keymaps |                        boot

                 mtab |                        boot

             net.eth0 | default

            syslog-ng | default

       udev-postmount | default

                 swap |                        boot

               sysctl |                        boot

        device-mapper |                        boot
```

this is what i added to rc.conf

```
c_hotplug="!net.*"
```

----------

## tuner23

Hy,

can you show your /etc/conf.d/net ?

And what says route -n 

Often it helps to start the init-script with set -x and look where the error came from.

```
 # vim /etc/init.d/net.lo

....

## enable verbose output

set -x

...

## disable verbose output

set +x 

```

Mostly the route is already set, or it does not know where to set the route..

greets.

----------

## InvisibleRasta

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

0.0.0.0         192.168.0.1     0.0.0.0         UG    2      0        0 eth0

127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo

192.168.0.0     0.0.0.0         255.255.255.0   U     2      0        0 eth0

this is my conf.d/net

dns_domain_lo="homenetwork"

routes_eth0=( "default via 192.168.0.1" )

config_eth0=( "dhcp" )

----------

## tuner23

Hmm..

Don't know where it comes from, but this

0.0.0.0 192.168.0.1 0.0.0.0 UG 2 0 0 eth0 

is your default gw.

I think the network should already work. 

maybe the netmask in your /etc/conf.d/net is defined as 0.0.0.0

or something similar?

It's while you try to pass a route multiple times like (examples, don't know if syntax is correct..)

route add -n 0.0.0.0 dev eth0

route add -n 0.0.0.0 dev eth0

or maybe with subnet:

route add -n 0.0.0.0 dev eth0

route add -n 255.0.0.0 dev eth0

If you post your /etc/conf.d/net i can maybe help.

----------

## InvisibleRasta

i alredy posted it:

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

dns_domain_lo="homenetwork"

routes_eth0=( "default via 192.168.0.1" )

config_eth0=( "dhcp" )

----------

## tuner23

oh, yes..

sorry^^

So i think your dhcp-server already defines the default route and

a second definition is not necessary.

try commenting the route-line out and look if the route exist.

don't know the difference how openrc is handling the dhcp roules..

----------

