# [solved]static route to a device using /etc/conf.d/net

## guid0

Everything is almost exactly how I want it but I would like to make things Gentoo network configuration compliant 

How do I incorporate a static route to a device like:

```
route add -host 192.168.0.48 dev tap0
```

into a valid /etc/conf.d/net configuration line?

The net.example does not seem to hold any clues (for me at least) on how to deal with this.

Tnx in advance,

guid0Last edited by guid0 on Thu Nov 04, 2010 6:29 pm; edited 1 time in total

----------

## NeddySeagoon

guid0,

The baselayout2 example is:-

```
routes_eth0="default via 192.168.100.1

             192.168.10.0/24 via 192.168.100.1"
```

baelayout1 needs soem extra () brackets.  I don't have a baselayout1 box to look at.

----------

## guid0

Hi NeddySeagoon,

Thanks for looking into this. I guess im using baselayout-1..   Unfortunately I cannot test right now (bedtime  :Wink: ) but i am not sure this will get me:

```

test1 ~ # route

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

192.168.0.48    *               255.255.255.255 UH    0      0        0 tap0

```

but instead will get me:

```

test1 ~ # route

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

192.168.0.0    192.168.100.1    255.255.255.0 UH    0      0        0 eth0

```

which is not what im after.

----------

## guid0

solved by adding:

```
routes_tap0=("192.168.0.48")
```

in /etc/conf.d/net  :Smile: 

----------

