On Wed, 2016-03-23 at 14:23 +0000, Moberg, Patrik wrote:
What is the best practise when using Connman to achieve manual
configuration of DNS when using DHCP based services? The goal is to
regardless of which service that is online always use a manual DNS.
Each service that needs to use different nameservers than what can be
obtained from DHCP needs to have its Nameservers.Configuration attribute
set via D-Bus at runtime or have the 'Nameservers' attribute specified
in its provisioned .config file. There is no global override for all
services as that is a very special case not necessarily applicable to
the majority of users.
With auto connect disabled, I have tried to set
“Nameservers.Configuration” (via d-bus) to an IP address prior to the
service being connected (connect done via d-bus as well). The service
then looks ok with the proper IP address in “Nameservers” for the
This can be done at runtime via D-Bus. If it doesn't work as expected,
there's a bug and we'll fix it.
However the routing table is then unexpectedly populated. For
example, the default gateway entry has destination set to IP in
“Nameservers.Configuration”, with gateway set to DHCP DNS IP address,
and netmask 255.255.255.255.
A host route entry is created for all nameservers and the DHCP server.
This to ensure there exists is a route to the nameservers even without a
default gateway assigned, and also that the DHCP server can be reached
should DHCP proxies be used in the network so that the DHCP server can
be located outside of the subnet. One or more of these functions can
then again be handled by the default gateway.
Check the IP addresses involved for these functions and post the routing
table here if it still looks weird. In that case please also state which
version of ConnMan this is.