18.04 networking

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

18.04 networking

Compdoc@hotrodpc.com
I'm installing 18.04 on a server and added a static ip to the file
/etc/network/interfaces. It works and uses the address I assigned, but
its not respecting the 'dns-nameserver' line, and the system cant reach
the web.

has the dns-nameserver directive changed now?




--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: 18.04 networking

Compdoc@hotrodpc.com
On 04/30/2018 10:15 AM, compdoc wrote:

> has the dns-nameserver directive changed now

never mind, I see that it has changed

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: 18.04 networking

Tom H-4
In reply to this post by Compdoc@hotrodpc.com
On Mon, Apr 30, 2018 at 12:15 PM, compdoc <[hidden email]> wrote:
>
> I'm installing 18.04 on a server and added a static ip to the file
> /etc/network/interfaces. It works and uses the address I assigned, but
> its not respecting the 'dns-nameserver' line, and the system cant reach
> the web.
>
> has the dns-nameserver directive changed now?

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. ]

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: 18.04 networking

Compdoc@hotrodpc.com


On May 1, 2018 12:14:56 AM MDT, Tom H <[hidden email]> 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.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: 18.04 networking

Tom H-4
On Tue, May 1, 2018 at 4:27 AM, [hidden email]
<[hidden email]> wrote:

> On May 1, 2018 12:14:56 AM MDT, Tom H <[hidden email]> 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@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@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@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@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@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@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@host:~# cat /run/systemd/network/10-netplan-bridge0.netdev
[NetDev]
Name=bridge0
Kind=bridge

[Bridge]
STP=false


root@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@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 ]

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: 18.04 networking

Tom H-4
On Tue, May 1, 2018 at 7:48 AM, Tom H <[hidden email]> wrote:

>
> root@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

I forgot "gateway4: 192.168.1.1" in "bridge0-enp0s3.yaml"!

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: 18.04 networking

Compdoc@hotrodpc.com
In reply to this post by Tom H-4
On 05/01/2018 05:48 AM, Tom H wrote:

>
> 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:
>

Great! I was just going to google it, but youve saved me a lot of time.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users