# DHCP routing



## HD Scania (Sep 22, 2018)

At tea hours yesterday I experience an error that `pkg` says no route to host, then I’ve changed different routing addresses, every off them are failed.
My `/etc/rc.conf`
`ue0` is my USB ethernet 

```
ifconfig_ue0=DHCP
defaultreoute=""
gateway_enable=NO
```
My `/etc/resolv.conf`

```
nameserver 8.8.8.8
```
My `/etc/hosts`

```
8.8.8.8   trident-hbsd   trident-hbsd.hd.scania
```


----------



## Martin Paredes (Sep 22, 2018)

Try `service netif restart` and `service routing restart`


----------



## SirDice (Sep 24, 2018)

Remove `defaultrouter` completely if you use DHCP. You're now setting it explicitly to "". You can remove `gateway_enable="NO"` too, it's the default.

And don't set /etc/resolv.conf by hand, it's going to be overwritten by DHCP.


----------

