How to auto populate /etc/resolv.conf when using a static configuration2019 Community Moderator Electionpxe boot: problems with /etc/resolv.confForce usage of DNS server provided by DHCP?Configure multiple interfaces with different hostnames using DHCP and DNSnameservers erased after systemctl restart network.serviceCannot Intentionally break/stop DNS via /etc/resolv.conf - Always resolving no matter NS configCan not set static DNS on debianDhclient not updating /etc/resolv.confNetworkManager-configured dnsmasq failing to forward requestsFreeBSD w/ two network interfaces and different domainsDHCP DNS and Domain resolution NetworkManager

Would this string work as string?

Have the tides ever turned twice on any open problem?

How to understand 「僕は誰より彼女が好きなんだ。」

Why does Surtur say that Thor is Asgard's doom?

What favor did Moody owe Dumbledore?

How do researchers send unsolicited emails asking for feedback on their works?

Do I need an EFI partition for each 18.04 ubuntu I have on my HD?

How to test the sharpness of a knife?

Why is this tree refusing to shed its dead leaves?

PTIJ: Why do we make a Lulav holder?

How do you justify more code being written by following clean code practices?

Pre-Employment Background Check With Consent For Future Checks

Do I need to convey a moral for each of my blog post?

PTIJ: Which Dr. Seuss books should one obtain?

Why didn’t Eve recognize the little cockroach as a living organism?

Output visual diagram of picture

When did hardware antialiasing start being available?

Can other pieces capture a threatening piece and prevent a checkmate?

Is xar preinstalled on macOS?

Did Nintendo change its mind about 68000 SNES?

PTIJ: At the Passover Seder, is one allowed to speak more than once during Maggid?

Do people actually use the word "kaputt" in conversation?

How to find the largest number(s) in a list of elements, possibly non-unique?

Exit shell with shortcut (not typing exit) that closes session properly



How to auto populate /etc/resolv.conf when using a static configuration



2019 Community Moderator Electionpxe boot: problems with /etc/resolv.confForce usage of DNS server provided by DHCP?Configure multiple interfaces with different hostnames using DHCP and DNSnameservers erased after systemctl restart network.serviceCannot Intentionally break/stop DNS via /etc/resolv.conf - Always resolving no matter NS configCan not set static DNS on debianDhclient not updating /etc/resolv.confNetworkManager-configured dnsmasq failing to forward requestsFreeBSD w/ two network interfaces and different domainsDHCP DNS and Domain resolution NetworkManager










0















I'm on an IoT device running busybox with glibc. When I have a DHCP setup in /etc/network/interfaces then udhcpc atuomatically updates /etc/resolv.conf. I can see this by clearing /etc/resolv.conf and then starting udhcpc.



# udhcpc -i wlan0 --pidfile /tmp/udhpcp.pid
udhcpc: started, v1.26.2
udhcpc: sending discover
udhcpc: sending select for 172.20.53.151
udhcpc: lease of 172.20.53.151 obtained, lease time 46800
deleting routers
SIOCDELRT: No such process
adding dns 172.20.62.208
adding dns 172.20.108.123


However, when I have a static configuration setup in /etc/network/interfaces nothing updates /etc/resolv.conf. When can be done to have have a DNS server automatically added to /etc/resolv.conf when using a static IP configuration? Is this possible? Currently when this modules gets configured with a static IP no DNS hostname or IP is provided. Would it need to be provided if configured using a static IP?



Edit:



To further explain, the device gets its networks settings from an XML configuration file. This file has the four fields:



<NetworkConfig>
<IP>1.2.3.4</IP>
<NETMASK>255.255.240.0</NETMASK>
<GATEWAY>1.2.3.1</GATEWAY>
<DHCP>0</DHCP>
</NetworkConfig>


A program on the device takes this and generates a /etc/network/interfaces file, creating an entry like so if DHCP=0:



auto wlan0
iface wlan0 inet static
address 1.2.3.4
netmask 255.255.240.0
gateway 1.2.3.1


And an entry like so if DHCP=1



auto wlan0
iface wlan0 inet dhcp


So when trying to configure the device with a static IP, nothing updates /etc/resolv.conf and no DNS info is provided in the XML file. Is there no application which would be able to automatically updated /etc/resolv.conf? How/where does udhcpc get its dns info from?










share|improve this question



















  • 1





    A DHCP server can send the DNS servers' addresses to the client, so it can update /etc/resolv.conf. How do you get the correct configuration into /etc/network/interfaces? In a similar way you have to fill /etc/resolv.conf.

    – Bodo
    12 hours ago











  • Currently the way the module works is an XML file is sent to the module and a program parses that and updates /etc/network/interfaces. That XML file doesn't have any DNS info and my understanding is that it would need to provided this if you're using a static IP configuration.

    – dangeroushobo
    12 hours ago











  • Please edit your question to add more information instead of writing comments. To get help you should describe how your configuration mechanism works. If you use standard tools I suggest to show your scripts, input and output.

    – Bodo
    11 hours ago











  • udhcpc gets its information from the dhcp reply. If you need to not used the dhcp reply information, you'll need to manually input all of its data, including ip address, netmask, gateway, dns servers, ntp servers, etc. It sounds like your XML is not up to the task that it's been given.

    – Doug O'Neal
    10 hours ago















0















I'm on an IoT device running busybox with glibc. When I have a DHCP setup in /etc/network/interfaces then udhcpc atuomatically updates /etc/resolv.conf. I can see this by clearing /etc/resolv.conf and then starting udhcpc.



# udhcpc -i wlan0 --pidfile /tmp/udhpcp.pid
udhcpc: started, v1.26.2
udhcpc: sending discover
udhcpc: sending select for 172.20.53.151
udhcpc: lease of 172.20.53.151 obtained, lease time 46800
deleting routers
SIOCDELRT: No such process
adding dns 172.20.62.208
adding dns 172.20.108.123


However, when I have a static configuration setup in /etc/network/interfaces nothing updates /etc/resolv.conf. When can be done to have have a DNS server automatically added to /etc/resolv.conf when using a static IP configuration? Is this possible? Currently when this modules gets configured with a static IP no DNS hostname or IP is provided. Would it need to be provided if configured using a static IP?



Edit:



To further explain, the device gets its networks settings from an XML configuration file. This file has the four fields:



<NetworkConfig>
<IP>1.2.3.4</IP>
<NETMASK>255.255.240.0</NETMASK>
<GATEWAY>1.2.3.1</GATEWAY>
<DHCP>0</DHCP>
</NetworkConfig>


A program on the device takes this and generates a /etc/network/interfaces file, creating an entry like so if DHCP=0:



auto wlan0
iface wlan0 inet static
address 1.2.3.4
netmask 255.255.240.0
gateway 1.2.3.1


And an entry like so if DHCP=1



auto wlan0
iface wlan0 inet dhcp


So when trying to configure the device with a static IP, nothing updates /etc/resolv.conf and no DNS info is provided in the XML file. Is there no application which would be able to automatically updated /etc/resolv.conf? How/where does udhcpc get its dns info from?










share|improve this question



















  • 1





    A DHCP server can send the DNS servers' addresses to the client, so it can update /etc/resolv.conf. How do you get the correct configuration into /etc/network/interfaces? In a similar way you have to fill /etc/resolv.conf.

    – Bodo
    12 hours ago











  • Currently the way the module works is an XML file is sent to the module and a program parses that and updates /etc/network/interfaces. That XML file doesn't have any DNS info and my understanding is that it would need to provided this if you're using a static IP configuration.

    – dangeroushobo
    12 hours ago











  • Please edit your question to add more information instead of writing comments. To get help you should describe how your configuration mechanism works. If you use standard tools I suggest to show your scripts, input and output.

    – Bodo
    11 hours ago











  • udhcpc gets its information from the dhcp reply. If you need to not used the dhcp reply information, you'll need to manually input all of its data, including ip address, netmask, gateway, dns servers, ntp servers, etc. It sounds like your XML is not up to the task that it's been given.

    – Doug O'Neal
    10 hours ago













0












0








0


1






I'm on an IoT device running busybox with glibc. When I have a DHCP setup in /etc/network/interfaces then udhcpc atuomatically updates /etc/resolv.conf. I can see this by clearing /etc/resolv.conf and then starting udhcpc.



# udhcpc -i wlan0 --pidfile /tmp/udhpcp.pid
udhcpc: started, v1.26.2
udhcpc: sending discover
udhcpc: sending select for 172.20.53.151
udhcpc: lease of 172.20.53.151 obtained, lease time 46800
deleting routers
SIOCDELRT: No such process
adding dns 172.20.62.208
adding dns 172.20.108.123


However, when I have a static configuration setup in /etc/network/interfaces nothing updates /etc/resolv.conf. When can be done to have have a DNS server automatically added to /etc/resolv.conf when using a static IP configuration? Is this possible? Currently when this modules gets configured with a static IP no DNS hostname or IP is provided. Would it need to be provided if configured using a static IP?



Edit:



To further explain, the device gets its networks settings from an XML configuration file. This file has the four fields:



<NetworkConfig>
<IP>1.2.3.4</IP>
<NETMASK>255.255.240.0</NETMASK>
<GATEWAY>1.2.3.1</GATEWAY>
<DHCP>0</DHCP>
</NetworkConfig>


A program on the device takes this and generates a /etc/network/interfaces file, creating an entry like so if DHCP=0:



auto wlan0
iface wlan0 inet static
address 1.2.3.4
netmask 255.255.240.0
gateway 1.2.3.1


And an entry like so if DHCP=1



auto wlan0
iface wlan0 inet dhcp


So when trying to configure the device with a static IP, nothing updates /etc/resolv.conf and no DNS info is provided in the XML file. Is there no application which would be able to automatically updated /etc/resolv.conf? How/where does udhcpc get its dns info from?










share|improve this question
















I'm on an IoT device running busybox with glibc. When I have a DHCP setup in /etc/network/interfaces then udhcpc atuomatically updates /etc/resolv.conf. I can see this by clearing /etc/resolv.conf and then starting udhcpc.



# udhcpc -i wlan0 --pidfile /tmp/udhpcp.pid
udhcpc: started, v1.26.2
udhcpc: sending discover
udhcpc: sending select for 172.20.53.151
udhcpc: lease of 172.20.53.151 obtained, lease time 46800
deleting routers
SIOCDELRT: No such process
adding dns 172.20.62.208
adding dns 172.20.108.123


However, when I have a static configuration setup in /etc/network/interfaces nothing updates /etc/resolv.conf. When can be done to have have a DNS server automatically added to /etc/resolv.conf when using a static IP configuration? Is this possible? Currently when this modules gets configured with a static IP no DNS hostname or IP is provided. Would it need to be provided if configured using a static IP?



Edit:



To further explain, the device gets its networks settings from an XML configuration file. This file has the four fields:



<NetworkConfig>
<IP>1.2.3.4</IP>
<NETMASK>255.255.240.0</NETMASK>
<GATEWAY>1.2.3.1</GATEWAY>
<DHCP>0</DHCP>
</NetworkConfig>


A program on the device takes this and generates a /etc/network/interfaces file, creating an entry like so if DHCP=0:



auto wlan0
iface wlan0 inet static
address 1.2.3.4
netmask 255.255.240.0
gateway 1.2.3.1


And an entry like so if DHCP=1



auto wlan0
iface wlan0 inet dhcp


So when trying to configure the device with a static IP, nothing updates /etc/resolv.conf and no DNS info is provided in the XML file. Is there no application which would be able to automatically updated /etc/resolv.conf? How/where does udhcpc get its dns info from?







dns resolv.conf






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 11 hours ago







dangeroushobo

















asked 13 hours ago









dangeroushobodangeroushobo

151110




151110







  • 1





    A DHCP server can send the DNS servers' addresses to the client, so it can update /etc/resolv.conf. How do you get the correct configuration into /etc/network/interfaces? In a similar way you have to fill /etc/resolv.conf.

    – Bodo
    12 hours ago











  • Currently the way the module works is an XML file is sent to the module and a program parses that and updates /etc/network/interfaces. That XML file doesn't have any DNS info and my understanding is that it would need to provided this if you're using a static IP configuration.

    – dangeroushobo
    12 hours ago











  • Please edit your question to add more information instead of writing comments. To get help you should describe how your configuration mechanism works. If you use standard tools I suggest to show your scripts, input and output.

    – Bodo
    11 hours ago











  • udhcpc gets its information from the dhcp reply. If you need to not used the dhcp reply information, you'll need to manually input all of its data, including ip address, netmask, gateway, dns servers, ntp servers, etc. It sounds like your XML is not up to the task that it's been given.

    – Doug O'Neal
    10 hours ago












  • 1





    A DHCP server can send the DNS servers' addresses to the client, so it can update /etc/resolv.conf. How do you get the correct configuration into /etc/network/interfaces? In a similar way you have to fill /etc/resolv.conf.

    – Bodo
    12 hours ago











  • Currently the way the module works is an XML file is sent to the module and a program parses that and updates /etc/network/interfaces. That XML file doesn't have any DNS info and my understanding is that it would need to provided this if you're using a static IP configuration.

    – dangeroushobo
    12 hours ago











  • Please edit your question to add more information instead of writing comments. To get help you should describe how your configuration mechanism works. If you use standard tools I suggest to show your scripts, input and output.

    – Bodo
    11 hours ago











  • udhcpc gets its information from the dhcp reply. If you need to not used the dhcp reply information, you'll need to manually input all of its data, including ip address, netmask, gateway, dns servers, ntp servers, etc. It sounds like your XML is not up to the task that it's been given.

    – Doug O'Neal
    10 hours ago







1




1





A DHCP server can send the DNS servers' addresses to the client, so it can update /etc/resolv.conf. How do you get the correct configuration into /etc/network/interfaces? In a similar way you have to fill /etc/resolv.conf.

– Bodo
12 hours ago





A DHCP server can send the DNS servers' addresses to the client, so it can update /etc/resolv.conf. How do you get the correct configuration into /etc/network/interfaces? In a similar way you have to fill /etc/resolv.conf.

– Bodo
12 hours ago













Currently the way the module works is an XML file is sent to the module and a program parses that and updates /etc/network/interfaces. That XML file doesn't have any DNS info and my understanding is that it would need to provided this if you're using a static IP configuration.

– dangeroushobo
12 hours ago





Currently the way the module works is an XML file is sent to the module and a program parses that and updates /etc/network/interfaces. That XML file doesn't have any DNS info and my understanding is that it would need to provided this if you're using a static IP configuration.

– dangeroushobo
12 hours ago













Please edit your question to add more information instead of writing comments. To get help you should describe how your configuration mechanism works. If you use standard tools I suggest to show your scripts, input and output.

– Bodo
11 hours ago





Please edit your question to add more information instead of writing comments. To get help you should describe how your configuration mechanism works. If you use standard tools I suggest to show your scripts, input and output.

– Bodo
11 hours ago













udhcpc gets its information from the dhcp reply. If you need to not used the dhcp reply information, you'll need to manually input all of its data, including ip address, netmask, gateway, dns servers, ntp servers, etc. It sounds like your XML is not up to the task that it's been given.

– Doug O'Neal
10 hours ago





udhcpc gets its information from the dhcp reply. If you need to not used the dhcp reply information, you'll need to manually input all of its data, including ip address, netmask, gateway, dns servers, ntp servers, etc. It sounds like your XML is not up to the task that it's been given.

– Doug O'Neal
10 hours ago










0






active

oldest

votes











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f507015%2fhow-to-auto-populate-etc-resolv-conf-when-using-a-static-configuration%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f507015%2fhow-to-auto-populate-etc-resolv-conf-when-using-a-static-configuration%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.