You are not logged in.

#1 2021-01-02 20:45:15

bWF0a3Vr
Member
Registered: 2021-01-02
Posts: 15

How is name resolution working in this context (no DNS)?

I am learning about networking and decided to connect two raspberry pi hosts (both running Arch Linux ARM) via an Ethernet cable (private network). I assigned each host an IP address and brought the Ethernet interfaces up. Pinging each other via the IP address works.

I tried to ping by the host name, which, to my surprise, worked. Both hosts have an empty hosts file (/etc/hosts). I researched and found Zero-configuration networking might be responsible for resolving the names. Since Arch Linux uses systemd as it's init system, the link states that Systemd implements both mDNS and LLMNR in systemd-resolved (https://en.wikipedia.org/wiki/Zero-conf … ng#Systemd). However I disabled systemd-resolved (as well as systemd-networkd, which is responsible for DHCP).

(Only) The following services are running on both machines:

  UNIT                               LOAD   ACTIVE SUB     DESCRIPTION                                             
  dbus.service                       loaded active running D-Bus System Message Bus                                 
  getty@tty1.service                 loaded active running Getty on tty1                                           
  haveged.service                    loaded active running Entropy Daemon based on the HAVEGE algorithm             
  kmod-static-nodes.service          loaded active exited  Create list of static device nodes for the current kernel
  serial-getty@ttyS1.service         loaded active running Serial Getty on ttyS1                                   
  sshd.service                       loaded active running OpenSSH Daemon                                           
  systemd-journal-flush.service      loaded active exited  Flush Journal to Persistent Storage                     
  systemd-journald.service           loaded active running Journal Service                                         
  systemd-logind.service             loaded active running User Login Management                                   
  systemd-random-seed.service        loaded active exited  Load/Save Random Seed                                   
  systemd-remount-fs.service         loaded active exited  Remount Root and Kernel File Systems                     
  systemd-sysctl.service             loaded active exited  Apply Kernel Variables                                   
  systemd-timesyncd.service          loaded active running Network Time Synchronization                             
  systemd-tmpfiles-setup-dev.service loaded active exited  Create Static Device Nodes in /dev                       
  systemd-tmpfiles-setup.service     loaded active exited  Create Volatile Files and Directories                   
  systemd-udev-trigger.service       loaded active exited  Coldplug All udev Devices                               
  systemd-udevd.service              loaded active running Rule-based Manager for Device Events and Files           
  systemd-update-utmp.service        loaded active exited  Update UTMP about System Boot/Shutdown                   
  systemd-user-sessions.service      loaded active exited  Permit User Sessions                                     
  user-runtime-dir@0.service         loaded active exited  User Runtime Directory /run/user/0                       
  user@0.service                     loaded active running User Manager for UID 0

Could someone explain to me how the hosts are able to communicate with each other via their host names? No hosts entries and no DNS nor DHCP protocols are active (as far as I am aware).

Thank you.

Offline

#2 2021-01-02 20:52:02

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: How is name resolution working in this context (no DNS)?

This forum is for arch linux (x64) support only. We have no idea how arch for raspberry pi is configured. You will get better help at https://archlinuxarm.org/forum/.

You could always try to capture the network traffic during name resolution with wireshark.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#3 2021-01-02 20:57:30

bWF0a3Vr
Member
Registered: 2021-01-02
Posts: 15

Re: How is name resolution working in this context (no DNS)?

I'm sorry. Thanks for the hint. You are absolutely right.

Offline

#4 2021-01-02 21:00:34

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: How is name resolution working in this context (no DNS)?

Systemd services can be started on demand by other services.

Please post

$ find /etc/systemd -type l -exec test -f {} \; -print | sort
$ timedatectl status 

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2021-01-02 22:17:20

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: How is name resolution working in this context (no DNS)?

"run*ning*" is not the same as "ran at some point in the past"
Eg. if the configured DNS server is your router and you utilized some transient dhcp client to establish the lease, the hostname might have been transmitted this way (part of dhcp protocol) and is now used by the DNS resolver in your router.

Likewise you might just have added static leases in your router, linked them to MACs and equipped them w/ domain names (just reusing the hostnames)

Try "dig <somehostname>"…

Offline

Board footer

Powered by FluxBB