# dhcpcd fails to add host route

## rini17

I have added host route to dhcp server to a public address W.X.Y.Z:

```
option classless-routes code 121 = array of unsigned integer 8;

option classless-routes 32,W,X,Y,Z,172,27,227,7,0,172,27,227,1;
```

and it works on all machines except gentoo box, with following errors in the log. Any idea why?

```
[dhcpcd] eth0: leased 172.27.227.10 for 86400 seconds

[dhcpcd] eth0: adding route to 172.27.227.0/24

[dhcpcd] eth0: adding host route to W.X.Y.Z via 172.27.227.7

[dhcpcd] if_route (ADD): Network is unreachable

[dhcpcd] eth0: adding default route via 172.27.227.1

```

----------

## Juippisi

Not a network expert, sorry. But you could try looking what versions of dhcpcd other working distros and gentoo are using, how they were built (configure options) and whether if it is openrc-systemd related.

Also if you updated to (faulty) version 7.0.5 of dhcpcd, try updating to 7.0.5b.

----------

## sping

We had the exatc same problem -- static route passed by server and message .. 

```
if_route (ADD): Network is unreachable
```

. A downgrade to .. 

```
=net-misc/dhcpcd-6.11.5
```

 .. fixed the issue.

----------

## UberLord

Static routes work fine for me.

As the OP has a DHCP server setup, could you please email me your exact server config to roy@marples.name please so I can diagnose it?

----------

## UberLord

Possibly fixed here:

https://roy.marples.name/git/dhcpcd.git/commit/?id=d3753a8676f88ddf4a29218904dbe2701c948157

----------

