18.04 networking
Tom H
tomh0665 at gmail.com
Tue May 1 11:48:11 UTC 2018
On Tue, May 1, 2018 at 4:27 AM, Compdoc at hotrodpc.com
<compdoc at hotrodpc.com> wrote:
> On May 1, 2018 12:14:56 AM MDT, Tom H <tomh0665 at gmail.com> wrote:
>>
>> 1) I don't use this feature but, AFAIK, it's "dns-nameservers" not
>> "dns-nameserver".
>>
>> 2) "dns-nameservers" will be a no-op if resolvconf isn't installed and
>> active.
>>
>> [ Did you use the d-i-based installer or the default live installer?
>> The latter uses netplan to set up the network via networkd and
>> ifupdown isn't installed by default. ]
>
> Right, dns-nameservers no longer works because of netplan, and I want
> to learn to use that since it's the default. But I have multiple nics
> and one will be a bridge for use with KVM, so need to find proper
> examples of how to set that up.
>
> I'll have time to investigate further later today. Thanks.
You're welcome.
I've just installed a test Ubuntu server using the live installer and
set "192.168.1.111" as a static address:
root at host:~# cat /etc/network/interfaces
# ifupdown has been replaced by netplan(5) on this system. See
# /etc/netplan for current configuration.
# To re-enable ifupdown on this system, you can run:
# sudo apt install ifupdown
root at host:~# cat /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
ethernets:
enp0s3:
addresses:
- 192.168.1.111/24
gateway4: 192.168.1.1
nameservers:
addresses:
- 8.8.8.8
search: []
optional: true
version: 2
root at sophia:~# cat /run/systemd/network/10-netplan-enp0s3.network
[Match]
Name=enp0s3
[Link]
RequiredForOnline=no
[Network]
Address=192.168.1.111/24
Gateway=192.168.1.1
DNS=8.8.8.8
root at host:~# cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 127.0.0.53
root at host:~# systemd-resolve --status
Global
DNSSEC NTA: 10.in-addr.arpa
16.172.in-addr.arpa
168.192.in-addr.arpa
17.172.in-addr.arpa
18.172.in-addr.arpa
19.172.in-addr.arpa
20.172.in-addr.arpa
21.172.in-addr.arpa
22.172.in-addr.arpa
23.172.in-addr.arpa
24.172.in-addr.arpa
25.172.in-addr.arpa
26.172.in-addr.arpa
27.172.in-addr.arpa
28.172.in-addr.arpa
29.172.in-addr.arpa
30.172.in-addr.arpa
31.172.in-addr.arpa
corp
d.f.ip6.arpa
home
internal
intranet
lan
local
private
test
Link 2 (enp0s3)
Current Scopes: DNS
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
DNS Servers: 8.8.8.8
The netplan configuration of a bridge looks like this (I set "stp: no"
as an example; there are other options like "ageing-time",
"forward-delay, "max-age", ...):
root at sophia:~# cat /etc/netplan/bridge0-enp0s3.yaml
network:
version: 2
ethernets:
enp0s3:
dhcp4: no
bridges:
bridge0:
interfaces:
- enp0s3
addresses:
- 192.168.1.111/24
nameservers:
addresses:
- 8.8.8.8
search: []
parameters:
stp: no
It results in:
root at host:~# cat /run/systemd/network/10-netplan-bridge0.netdev
[NetDev]
Name=bridge0
Kind=bridge
[Bridge]
STP=false
root at host:~# cat /run/systemd/network/10-netplan-bridge0.network
[Match]
Name=bridge0
[Network]
Address=192.168.1.111/24
DNS=8.8.8.8
root at host:~# cat /run/systemd/network/10-netplan-enp0s3.network
[Match]
Name=enp0s3
[Network]
Bridge=bridge0
LinkLocalAddressing=no
[ From the perspective of using other distributions and lessening the
number of settings that you have to remember, you're probably better
off learning the networkd syntax ]
More information about the ubuntu-users
mailing list