Error in network definition: unknown key dhcp4-overrides
I am trying to set up Ubuntu 18.04 LTS, which appears to be using netplan to configure networking. In this case I need to override the DNS servers provided by DHCP and use manually assigned nameservers. So I modified the netplan configuration as follows:
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp2s1:
dhcp4: yes
dhcp4-overrides:
use-dns: false
dhcp6: yes
dhcp6-overrides:
use-dns: false
nameservers:
addresses: ["fd35:2ff0:b0b9:d0c0::1:1", 192.168.255.17]
In another question, and on netplan.io, it was explained that netplan had options dhcp4-overrides
and dhcp6-overrides
which would permit this, but these don't appear to work. netplan generate
or netplan apply
gives the error:
Error in network definition //etc/netplan/01-netcfg.yaml line 6 column 6: unknown key dhcp4-overrides
How, then, can I be sure that my specified nameservers will be used, and the nameservers obtained from DHCP will never be used? I'm willing to toss netplan in the bin if necessary.
18.04 netplan
add a comment |
I am trying to set up Ubuntu 18.04 LTS, which appears to be using netplan to configure networking. In this case I need to override the DNS servers provided by DHCP and use manually assigned nameservers. So I modified the netplan configuration as follows:
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp2s1:
dhcp4: yes
dhcp4-overrides:
use-dns: false
dhcp6: yes
dhcp6-overrides:
use-dns: false
nameservers:
addresses: ["fd35:2ff0:b0b9:d0c0::1:1", 192.168.255.17]
In another question, and on netplan.io, it was explained that netplan had options dhcp4-overrides
and dhcp6-overrides
which would permit this, but these don't appear to work. netplan generate
or netplan apply
gives the error:
Error in network definition //etc/netplan/01-netcfg.yaml line 6 column 6: unknown key dhcp4-overrides
How, then, can I be sure that my specified nameservers will be used, and the nameservers obtained from DHCP will never be used? I'm willing to toss netplan in the bin if necessary.
18.04 netplan
@steeldriver That is the question I linked to above.
– Michael Hampton
4 hours ago
add a comment |
I am trying to set up Ubuntu 18.04 LTS, which appears to be using netplan to configure networking. In this case I need to override the DNS servers provided by DHCP and use manually assigned nameservers. So I modified the netplan configuration as follows:
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp2s1:
dhcp4: yes
dhcp4-overrides:
use-dns: false
dhcp6: yes
dhcp6-overrides:
use-dns: false
nameservers:
addresses: ["fd35:2ff0:b0b9:d0c0::1:1", 192.168.255.17]
In another question, and on netplan.io, it was explained that netplan had options dhcp4-overrides
and dhcp6-overrides
which would permit this, but these don't appear to work. netplan generate
or netplan apply
gives the error:
Error in network definition //etc/netplan/01-netcfg.yaml line 6 column 6: unknown key dhcp4-overrides
How, then, can I be sure that my specified nameservers will be used, and the nameservers obtained from DHCP will never be used? I'm willing to toss netplan in the bin if necessary.
18.04 netplan
I am trying to set up Ubuntu 18.04 LTS, which appears to be using netplan to configure networking. In this case I need to override the DNS servers provided by DHCP and use manually assigned nameservers. So I modified the netplan configuration as follows:
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp2s1:
dhcp4: yes
dhcp4-overrides:
use-dns: false
dhcp6: yes
dhcp6-overrides:
use-dns: false
nameservers:
addresses: ["fd35:2ff0:b0b9:d0c0::1:1", 192.168.255.17]
In another question, and on netplan.io, it was explained that netplan had options dhcp4-overrides
and dhcp6-overrides
which would permit this, but these don't appear to work. netplan generate
or netplan apply
gives the error:
Error in network definition //etc/netplan/01-netcfg.yaml line 6 column 6: unknown key dhcp4-overrides
How, then, can I be sure that my specified nameservers will be used, and the nameservers obtained from DHCP will never be used? I'm willing to toss netplan in the bin if necessary.
18.04 netplan
18.04 netplan
asked 4 hours ago
Michael HamptonMichael Hampton
1,040820
1,040820
@steeldriver That is the question I linked to above.
– Michael Hampton
4 hours ago
add a comment |
@steeldriver That is the question I linked to above.
– Michael Hampton
4 hours ago
@steeldriver That is the question I linked to above.
– Michael Hampton
4 hours ago
@steeldriver That is the question I linked to above.
– Michael Hampton
4 hours ago
add a comment |
1 Answer
1
active
oldest
votes
I'm about halfway to throwing netplan in the bin, but I have a workaround that appears to work.
Seeing that it was rendering to networkd, and that systemd-resolved was handling DNS, I just created the relevant configuration directly.
I dropped the dhcp overrides bits from netplan, leaving me with only:
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp2s1:
dhcp4: yes
dhcp6: yes
Then I created a file /etc/systemd/resolved.conf.d/dns.conf
to specify the DNS servers I needed:
[Resolve]
DNS=fd35:2ff0:b0b9:d0c0::1:1 192.168.255.17
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1120998%2ferror-in-network-definition-unknown-key-dhcp4-overrides%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I'm about halfway to throwing netplan in the bin, but I have a workaround that appears to work.
Seeing that it was rendering to networkd, and that systemd-resolved was handling DNS, I just created the relevant configuration directly.
I dropped the dhcp overrides bits from netplan, leaving me with only:
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp2s1:
dhcp4: yes
dhcp6: yes
Then I created a file /etc/systemd/resolved.conf.d/dns.conf
to specify the DNS servers I needed:
[Resolve]
DNS=fd35:2ff0:b0b9:d0c0::1:1 192.168.255.17
add a comment |
I'm about halfway to throwing netplan in the bin, but I have a workaround that appears to work.
Seeing that it was rendering to networkd, and that systemd-resolved was handling DNS, I just created the relevant configuration directly.
I dropped the dhcp overrides bits from netplan, leaving me with only:
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp2s1:
dhcp4: yes
dhcp6: yes
Then I created a file /etc/systemd/resolved.conf.d/dns.conf
to specify the DNS servers I needed:
[Resolve]
DNS=fd35:2ff0:b0b9:d0c0::1:1 192.168.255.17
add a comment |
I'm about halfway to throwing netplan in the bin, but I have a workaround that appears to work.
Seeing that it was rendering to networkd, and that systemd-resolved was handling DNS, I just created the relevant configuration directly.
I dropped the dhcp overrides bits from netplan, leaving me with only:
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp2s1:
dhcp4: yes
dhcp6: yes
Then I created a file /etc/systemd/resolved.conf.d/dns.conf
to specify the DNS servers I needed:
[Resolve]
DNS=fd35:2ff0:b0b9:d0c0::1:1 192.168.255.17
I'm about halfway to throwing netplan in the bin, but I have a workaround that appears to work.
Seeing that it was rendering to networkd, and that systemd-resolved was handling DNS, I just created the relevant configuration directly.
I dropped the dhcp overrides bits from netplan, leaving me with only:
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp2s1:
dhcp4: yes
dhcp6: yes
Then I created a file /etc/systemd/resolved.conf.d/dns.conf
to specify the DNS servers I needed:
[Resolve]
DNS=fd35:2ff0:b0b9:d0c0::1:1 192.168.255.17
answered 4 hours ago
Michael HamptonMichael Hampton
1,040820
1,040820
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1120998%2ferror-in-network-definition-unknown-key-dhcp4-overrides%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
@steeldriver That is the question I linked to above.
– Michael Hampton
4 hours ago