# Static Routing

## NeddySeagoon

Hi,

I've migrated to Gentoo from RedHat, which I've been using since RH 6.1.  Everything has gone well so far.

I've got to the point where I need to customise startup things and I want to do it so that next time I do emerge sync, emerge world, it doesn't break.

What I want to do (to start with)  is add a static route  as in:-

route add -net 192.168.0.0 gw 192.168.100.6 netmask 255.255.255.0

so that it happens on boot.

Does Gentoo provide a link to run your own script at boot time such that updates won't break it?

Regards,

NeddySeagoon

----------

## slartibartfasz

this should happen automatically when your eth interface is started via the script in /etc/init.d/net.eth0, which reads information from /etc/conf.d/net.

to execute commands on booting take a look at /etc/conf.d/local.start

----------

## NeddySeagoon

slartibartfasz,

My default route to the outside world comes up fine, I have two network segments at home, one 100MHz full duplex on the 192.168.100.0 net and a coax segment on 192.168.0.0. One machince sits on both networks at 192.168.x.6

In additon to the default route I need a static route to the coax segment. 

I'll put the route add command in /etc/conf.d/local.start.  Thanks, that will do nicely.

Neddyseagoon

----------

