GNU/Linux >> Tutoriales Linux >  >> Ubuntu

¿Ubuntu 18.04 no reconoce los nombres de host del enrutador?

Anteriormente tenía instalado Xubuntu 16.04 y reconocía los nombres de host establecidos por mi enrutador (Tomato).

Por ejemplo, tengo una computadora con el nombre mate en la red con una IP estática de 192.168.2.202 , y anteriormente podía hacer esto:

$ host mate                                                               
mate has address 192.168.2.202

Pero ahora me sale esto:

$ host mate
Host mate not found: 2(SERVFAIL)

Esta vez hice una instalación de escritorio mínima, así que me pregunto si me falta algún paquete.

EDITAR:

$ cat /var/run/systemd/resolve/resolv.conf:
nameserver 192.168.2.1
$ cat /var/run/NetworkManager/resolv.conf
nameserver 127.0.0.53
$ netstat -antup
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:5000            0.0.0.0:*               LISTEN      3421/VBoxHeadless   
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      663/systemd-resolve 
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      950/sshd            
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      737/cupsd              
tcp6       0      0 :::5900                 :::*                    LISTEN      3421/VBoxHeadless   
tcp6       0      0 :::22                   :::*                    LISTEN      950/sshd            
tcp6       0      0 ::1:631                 :::*                    LISTEN      737/cupsd           
udp    14784      0 0.0.0.0:52712           0.0.0.0:*                           2092/VirtualBox     
udp     8704      0 0.0.0.0:53789           0.0.0.0:*                           2092/VirtualBox     
udp     9536      0 0.0.0.0:5353            0.0.0.0:*                           730/avahi-daemon: r 
udp    19648      0 0.0.0.0:55126           0.0.0.0:*                           2092/VirtualBox     
udp     8704      0 0.0.0.0:39114           0.0.0.0:*                           2092/VirtualBox     
udp    13248      0 0.0.0.0:41109           0.0.0.0:*                           2092/VirtualBox     
udp        0      0 0.0.0.0:57555           0.0.0.0:*                           730/avahi-daemon: r 
udp     3648      0 0.0.0.0:59213           0.0.0.0:*                           2092/VirtualBox     
udp     8064      0 0.0.0.0:59519           0.0.0.0:*                           2092/VirtualBox     
udp     3648      0 0.0.0.0:48795           0.0.0.0:*                           2092/VirtualBox     
udp     3648      0 0.0.0.0:48900           0.0.0.0:*                           2092/VirtualBox     
udp    36096      0 127.0.0.53:53           0.0.0.0:*                           663/systemd-resolve 
udp    37120      0 0.0.0.0:68              0.0.0.0:*                           1066/dhclient       
udp    15424      0 0.0.0.0:33008           0.0.0.0:*                           2092/VirtualBox     
udp     3648      0 0.0.0.0:49597           0.0.0.0:*                           2092/VirtualBox     
udp    14464      0 0.0.0.0:33395           0.0.0.0:*                           2092/VirtualBox     
udp        0      0 0.0.0.0:631             0.0.0.0:*                           828/cups-browsed    
udp    19840      0 0.0.0.0:49883           0.0.0.0:*                           2092/VirtualBox     
udp    14592      0 0.0.0.0:33614           0.0.0.0:*                           2092/VirtualBox     
udp6       0      0 :::51356                :::*                                730/avahi-daemon: r 
udp6   49344      0 :::5353                 :::*                                730/avahi-daemon: r 
$ 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 6 (vboxnet2)
      Current Scopes: none
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

Link 5 (vboxnet1)
      Current Scopes: none
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

Link 4 (vboxnet0)
      Current Scopes: none
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

Link 3 (wlp4s1)
      Current Scopes: none
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

Link 2 (eno1)
      Current Scopes: DNS
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
         DNS Servers: 192.168.2.1

Mi enrutador es 192.168.2.1

EDICIÓN 2:

Usando dig muestra que el enrutador informa correctamente el nombre de host.

$ dig @192.168.2.1 mate    
; <<>> DiG 9.11.3-1ubuntu1.1-Ubuntu <<>> @192.168.2.1 mate
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47046
;; flags: qr aa rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;mate.              IN  A

;; ANSWER SECTION:
mate.           0   IN  A   192.168.2.202

;; Query time: 0 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Mon Jun 18 18:53:26 PDT 2018
;; MSG SIZE  rcvd: 38

Pero si no menciono específicamente la IP DNS del enrutador, no la encuentro.

$ dig mate             
; <<>> DiG 9.11.3-1ubuntu1.1-Ubuntu <<>> mate
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 65394
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;mate.              IN  A

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Mon Jun 18 19:06:13 PDT 2018
;; MSG SIZE  rcvd: 33 

Entonces parece que, aunque aparece en /var/run/systemd/resolve/resolv.conf no se está utilizando. ¿Cómo soluciono esto?

Relacionado:Ubuntu 18.04:¿Cómo crear una interfaz de red dumthe persistente?

Respuesta aceptada:

Esto parece estar relacionado con este problema:

https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1624320

En una instalación nueva, /etc/resolv.conf está vinculado a /run/systemd/resolve/stub-resolv.conf en lugar de /run/systemd/resolve/resolv.conf .

Actualizarlo según https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1624320/comments/8 lo arregló.


Ubuntu
  1. Actualizar de Ubuntu 13.10 a Ubuntu 14.04

  2. Actualizar de Ubuntu 13.04 a Ubuntu 13.10

  3. Cómo actualizar a Ubuntu 15.10 desde Ubuntu 15.04

  4. ¿Suspender no funciona después de actualizar a Ubuntu 14.04 desde 13.10?

  5. ¿R 3.5.0 no funciona en Ubuntu 18.04?

Cómo actualizar a Ubuntu 19.10 desde 19.04 (Guía)

Actualizar de Ubuntu 14.04 a Ubuntu 14.10

Guía detallada para actualizar a Ubuntu 16.04 desde Ubuntu 14.04

Cómo actualizar de Ubuntu 16.10 a Ubuntu 17.04

El inicio de sesión automático no funciona en Ubuntu 17.10

Cómo actualizar de Ubuntu 20.04 a Ubuntu 22.04