# Issues with nameserver and default route

**URL:** <https://forums.suse.com/t/issues-with-nameserver-and-default-route/253>\
**Category:** RancherOS\
**Created:** [August 18, 2015, 2:47pm UTC](https://forums.suse.com/t/issues-with-nameserver-and-default-route/253 "2015-08-18T14:47:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiboro](https://avatars.discourse-cdn.com/v4/letter/k/7993a0/32.png) [@kiboro](https://forums.suse.com/u/kiboro)\
**Post date:** [August 18, 2015, 2:47pm UTC](https://forums.suse.com/t/issues-with-nameserver-and-default-route/253/1 "2015-08-18T14:47:59Z")

</div>

I’m just getting started with RancherOS under KVM/Qemu. Looks ideal for what I need but I’m having some network issues.

Firstly it’s not getting the default route or nameservers from dhcp. It is getting an IP address and even a static route though. This works with normal VMs. My subnet in dhcpd.conf is this:

```
subnet 10.20.13.0 netmask 255.255.255.0 {
       option domain-name-servers 10.20.13.10,10.20.15.10;
       option domain-name "domain.com";
       option routers 10.20.13.1;
       range 10.20.13.150 10.20.13.250;
       option rfc3442-classless-static-routes 24, 10, 20, 11, 10, 20, 13, 9;
       option ms-classless-static-routes 24, 10, 20, 11, 10, 20, 13, 9;
       ignore-client-uids true;
}

```

So I would expect a default route of 10.20.13.1 and the nameservers to be 10.20.13.10 and 10.20.15.10. However:

```
[rancher@ld3-rancheros-3 conf]$ cat /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
domain pibenchmark.com

[rancher@ld3-rancheros-3 conf]$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.20.11.0 10.20.13.9 255.255.255.0 UG 203 0 0 eth0
10.20.13.0 * 255.255.255.0 U 203 0 0 eth0
172.17.0.0 * 255.255.0.0 U 0 0 0 docker0
172.18.0.0 * 255.255.0.0 U 0 0 0 docker-sys

```

As you see it’s got the static route but not the default. I’ve also tried to set the nameserver in rancher.yml but without success.

```
[rancher@ld3-rancheros-3 conf]$ sudo cat rancher.yml
network:
  dns:
    domain: pibenchmark.com
    nameserver: 10.20.13.10

```

Can anyone point me in the right direction?

---

<div class="post-metadata">

**Author:** ![kiboro](https://avatars.discourse-cdn.com/v4/letter/k/7993a0/32.png) [@kiboro](https://forums.suse.com/u/kiboro)\
**Post date:** [August 18, 2015, 4:42pm UTC](https://forums.suse.com/t/issues-with-nameserver-and-default-route/253/2 "2015-08-18T16:42:24Z")

</div>

Ah, managed to get there. I was slightly off with rancher.yml. This works:

```
network:
  dns:
    nameservers:
      - 10.20.13.10
      - 10.20.15.10
    search:
      - domain.com
      - domain.net
    domain: domain.com
  interfaces:
    eth0:
      dhcp: true
      gateway: 10.20.13.1
```

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [September 8, 2015, 5:30pm UTC](https://forums.suse.com/t/issues-with-nameserver-and-default-route/253/3 "2015-09-08T17:30:27Z")

</div>


