# 2 networking questions

## ee99ee2

I need this added to my routing table on boot:

```
route add -net 10.0.0.0/24 gw 192.168.1.4 eth1

route add -net 10.1.0.0/24 gw 192.168.1.4 eth1
```

How do I have it automaticly add that?

Also, eth0 is DHCP, while eth1 is static. Even though eth0 gets DNS servers from the DHCP information, I need to specify other DNS servers that I use in /etc/resolv.conf manually. How can I get DHCP not to change my /etc/resolv.conf file?

-ee99ee2

----------

## delta407

You can specify other random boot-up commands in /etc/conf.d/local.start, though you might be better off adding routing information into /etc/init.d/net.eth1. (Just put the add code in the start command and the remove code in the stop command, everything should be peachy.)

man dhcpcd:

 *Quote:*   

> -R     Prevents dhcpcd from replacing existing /etc/resolv.conf file.

 

From /etc/conf.d/net:

 *Quote:*   

> # For passing options to dhcpcd use dhcpcd_eth?

 

So just add "dhcpcd_eth1='-R'" and to /etc/conf.d/net and you should be good.

----------

## ee99ee2

Yay! Thank you! It worked great!

----------

