# interfaces bootup

## saluo

I installed the latest gentoo and I have a problem with startup the interface when the system starts up.

Always worked net.eth0 in default but this time it does not work

Do you somehow changed the way of improving the interfaces?

My config:

 *Quote:*   

> 
> 
> cat /etc/conf.d/net
> 
> ```
> ...

 

Nowhere do I see a clear answer as how to improve the interfaces in OpenRC

The system installs by handbook

----------

## BillWho

saluo,

Is  192.168.1.1 your router address   :Question: 

Try:

```
config_eth0="192.168.1.102 netmask 255.255.255.0 brd 192.168.1.255"

routes_eth0="default via 192.168.1.1"

```

Good luck   :Wink: 

----------

## saluo

this addres is empty

when trying to run it manually in the order of the interface starts, and when the system start does not produce bringing up net.eth0

Configuration is correct

----------

## khayyam

saluo .. 

does net.eth0 show as being set in your default run-level? You can check with the following:

```
rc-config list default
```

If not then .. add it

```
rc-update add net.eth0 default
```

Sorry if these are obvious, but its often best to start with the obvious and work from there.

Nothing has changed recently with regard to openrc, so why it would at one point be in default and thereafter not, I can't really say.

Hopefully the above fixes it ...

best ... khay

----------

## saluo

When I run 

```
rc-update show default
```

 I see net.eth0 in default runlevel.

When I run manually net.eth0 script bringing up eth0, but when the system starts up  eth not bringing up.

Sorry for my english

----------

## khayyam

 *saluo wrote:*   

> When I run rc-update show default I see net.eth0 in default runlevel. When I run manually net.eth0 script bringing up eth0, but when the system starts up eth not bringing up.

 

saluo ... I assume that /etc/init.d/net.eth0 runs at boot time, correct? What's in /etc/conf.d/net (if anything)? Is your ethernet driver built as a module?

 *saluo wrote:*   

> Sorry for my english

 

No problem ... its certainly better than my Polish :)

best ... khay

----------

## saluo

Driver for ethernet is in kernel. 

Yes, I added a net.eth0 the boot time in default runlevel

"rc-update add net.eth0 default"

net.eth0 is link symbolik to net.lo

My config /etc/conf.d/net

config_eth0="192.168.1.1"

----------

## khayyam

 *saluo wrote:*   

> Yes, I added a net.eth0 the boot time in default runlevel

 

saulo ... yes, I know, I asked if it "runs" .. ie: "Starting net.eth0 ... [OK]" (its not important .. I'll assume it does) 

 *saluo wrote:*   

> My config /etc/conf.d/net:
> 
> config_eth0="192.168.1.1"

 

OK, well 192.168.1.1 would generally be a router address (its the first address in the subnet) ... also your not providng a 'route'. I'm not sure why this would work subsequent to boot as there is too little information provided. If your router provides DHCP then you can leave /etc/conf.d/net empty (and it will default to configuring the interface via dhcp .. but you will need a dhcp client installed, like net-misc/dhcpcd). If you need to configure the interface manually then the following example should give you the basics.

```
config_eth0="192.168.1.15/24"

routes_eth0="default via 192.168.1.1"

dns_servers_eth0="192.168.1.1"
```

This assumes that the router/gateway is 192.168.1.1 and the same machine is providng DNS services. The IP assigned to your machine would be 192.168.1.15.

HTH & best ... khay

----------

## saluo

Already set up your network on gentoo with static addresses, or raise my vlan interfaces with the "null" and to always work, but on another gentoo

The problem is that net.eth0 script is not run during system boot time, because when I manually run net.eth0 works.

----------

## khayyam

 *saluo wrote:*   

> The problem is that net.eth0 script is not run during system boot time, because when I manually run net.eth0 works.

 

saluo ... I've asked this before but haven't recieved an answer: when you say "not run" you mean "/etc/init.d/net.eth0 isn't executed" OR "it runs but doesn't configure then interface as expected". When I say "run" I mean exectued, ie: "Starting net.eth0 ... [OK]".

There is obviously nothing wrong with the script itself if you can run it subsequently and the interface is configured, this leaves the configuration (/etc/conf.d/net) and I'd suggested you change this as it seems to me that 192.168.1.1 would be the gateway address, but I'm none the wiser.

So, why not try as I'd suggested?

best ... khay

----------

## saluo

I wrote that does not start at boot but when I runing /etc/init.d/net.eth0 script start.

192.168.1.1 is not a router, dhcp or another host in my subnet. THIS ADDRESS IS FREE

Driver for ethernet is in kernel, not module.

I know it is possible to run a script when the system starts, but it is not a solution to the problem

I reinstall system again.

Thanks for your help

----------

