# `NestGen2.Network`
[🔗](https://github.com/integration-technology/nest_gen2_sdk/blob/v0.6.6/lib/nest_gen2/network.ex#L1)

Name resolution that doesn't depend on Nest's connection manager.

Nest's `/etc/resolv.conf` points at `127.0.0.1`, a DNS proxy inside `connmand`.
If that process stops, nothing resolves (and a statically linked VM can't use
the device's own resolver anyway). The SDK instead points Erlang's own DNS
client (`inet_res`) at real servers when it starts, and stops it re-reading
resolv.conf:

  * the `:nameservers` setting, if given (a list of IPv4 tuples), else
  * non-loopback servers from `/etc/resolv.conf`, else
  * the default gateway.

# `configure_dns`

```elixir
@spec configure_dns() :: [:inet.ip4_address()]
```

Configures Erlang's resolver; returns the nameservers used.

# `gateway`

```elixir
@spec gateway() :: :inet.ip4_address() | nil
```

The default gateway's IPv4 address, or nil.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
