다른 호스트 이름, 동일한 구성

다른 호스트 이름, 동일한 구성

홈 네트워크에서 Pi-hole을 실행하기 위해 두 개의 Ubuntu 20.04 서버를 설정했습니다. 하나는 Raspberry Pi 4에서 실행되고 다른 하나는 가상으로 실행됩니다. 둘 다 Ubuntu Server 20.04를 실행합니다.

lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS

내 문제는 네트워크 검색을 수행할 때 그 중 하나에는 정규화된 이름이 표시되고 다른 하나에는 호스트 이름만 표시된다는 것입니다.

IP 스캐닝에 Angry IP Scanner를 사용할 때와 마찬가지로:

IP             HOSTNAME
192.168.1.1    pihole-1
192.168.1.2    pihole-2.domain.com

원인은 무엇입니까? 그들이 모두 이름을 읽게 할 수 있는 방법이 있나요?

#:hostname --fqdn
pihole-1

#:hostnamectl
   Static hostname: pihole-1
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 2e1eaf
           Boot ID: e04d31
    Virtualization: oracle
  Operating System: Ubuntu 20.04.2 LTS
            Kernel: Linux 5.4.0-72-generic
      Architecture: x86-64

127.0.0.1 localhost
127.0.1.1 pihole-1

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
hostname --fqdn
#:pihole-2

$hostnamectl
   Static hostname: pihole-2
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 2065184
           Boot ID: b3ed805
    Virtualization: oracle
  Operating System: Ubuntu 20.04.2 LTS
            Kernel: Linux 5.4.0-72-generic
      Architecture: x86-64

127.0.0.1 localhost
127.0.1.1 pihole-2

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

감사해요

관련 정보