Astra linux avahi daemon

Avahi-daemon

Материал из Пингвиньи радостей

Содержание

Статья о системе обнаружения сервисов в локальной сети Avahi-daemon

Avahi-daemon это система обеспечивающая обнаружение сервисов в локальной сети.
Это означает, что после подключения компьютера к локальной сети, мгновенно становятся доступными сетевые принтеры, появляется возможность увидеть, какие разделяемые ресурсы имеются в сети и так далее. Avahi является реализацией протокола Zeroconf, который позволяет пользователям создавать IP-сети без специальных конфигурационных служб типа DNS-серверов.

Установка

Обычно в современных дистрибутивах Avahi-daemon устанавливается автоматически. Если этого не произошло то
Пакет присутствует в хранилище пакетов debian.
Для установки пакета

  • в командной строке: следует выполнить команду # apt-get install avahi-daemon
  • в графическом режиме: воспользоваться специализированной программой управления пакетами

После установки пакет готов к использованию.

Некоторые часто используемые команды

Настройка

Файлы конфигурации Avahi-daemon находятся в каталоге /etc/avahi/.

Для установки имени хоста, с которым avahi-daemon пытается зарегистрироваться в сети

Для ограничения работы avahi-daemon только на одном сетевом устройстве

Отказ от сервиса

В некоторых случаях, например на рабочей станции с установленным DNS-сервером Bind, возможно правильнее будет отказаться от использования Avahi-daemon.

  • полностью удаляя пакет
  • или временно отключая его как запускаемую службу

Источник

avahi-daemon

The Avahi mDNS/DNS-SD daemon

SYNOPSIS

DESCRIPTION

The Avahi mDNS/DNS-SD daemon implements Apple’s Zeroconf architecture (also known as «Rendezvous» or «Bonjour»). The daemon registers local IP addresses and static services using mDNS/DNS-SD and provides two IPC APIs for local programs to make use of the mDNS record cache the avahi-daemon maintains. First there is the so called «simple protocol» which is used exclusively by avahi-dnsconfd (a daemon which configures unicast DNS servers using server info published via mDNS) and nss-mdns (a libc NSS plugin, providing name resolution via mDNS). Finally there is the D-Bus interface which provides a rich object oriented interface to D-Bus enabled applications.

Читайте также:  Msvcr100 dll что это за ошибка как исправить windows 10 64 bit windows

Upon startup avahi-daemon interprets its configuration file /etc/avahi/avahi-daemon.conf and reads XML fragments from /etc/avahi/services/*.service which may define static DNS-SD services. If you enable publish-resolv-conf-dns-servers in avahi-daemon.conf the file /etc/resolv.conf will be read, too.

OPTIONS

Specify the configuration file to read. (default: /etc/avahi/avahi-daemon.conf)

Daemonize after startup. Implies —syslog.

Log to syslog instead of STDERR. Implied by —daemonize.

Increase verbosity to debug level.

Don’t enforce resource limits as specified in the configuration file. (See setrlimit(2) for more information)

Don’t drop root privileges after startup and don’t require daemon to be started as root. We recommend not to use this option.

Don’t chroot(2) the daemon. This option is only available when compiled with chroot() support.

Don’t change the process name while running. Unless this option is specified avahi-daemon will reflect its current state and the selected host name in the process title.

Kill an already running avahi-daemon. (equivalent to sending a SIGTERM)

Tell an already running avahi-daemon to reread /etc/resolv.conf (in case you enabled publish-resolv-conf-dns-servers in avahi-daemon.conf) the files from /etc/avahi/services/. Please note that this will not reload the /etc/avahi/avahi-daemon.conf. (equivalent to sending a SIGHUP)

Return 0 as return code when avahi-daemon is already running.

Show version information

FILES

/etc/avahi/avahi-daemon.conf: the default configuration file for avahi-daemon, avahi-daemon.conf(5) for more information.

/etc/avahi/hosts: additional static hostname mappings to publish in mDNS, see avahi.hosts(5) for more information.

/etc/avahi/services/*.service: static service definitions, see avahi.service(5) for more information.

SIGNALS

SIGINT, SIGTERM: avahi-daemon will shutdown. (Same as —kill).

SIGHUP: avahi-daemon will reload unicast DNS server data from /etc/resolv.conf and static service definitions from /etc/avahi/services/. (Same as —reload)

Читайте также:  Alt linux мой офис

SIGUSR1: avahi-daemon will dump local and remote cached resource record data to syslog.

AUTHORS

COMMENTS

This man page was written using xml2man(1) by Oliver Kurth.

Источник

Linux OS Service ‘avahi-daemon’

The avahi-daemon Linux service runs on client machines to perform network-based Zeroconf service discovery. Avahi is an implementation of the DNS Service Discovery and Multicast DNS specifications for Zeroconf Networking. User applications receive notice of discovered network services and resources using the Linux D-Bus message passing. The daemon coordinates application efforts in caching replies, helping minimize network traffic.

Avahi provides a set of language bindings, including Python and Mono. Because of its modularized architecture, Avahi is already integrated into major desktop components like GNOME’s Virtual File System or KDE’s input/output architecture. Refer http://avahi.org/ for further specifications.

The avahi RPM package provides the /usr/sbin/avahi-daemon daemon and its configuration files.

Service Control

To manage the avahi-daemon service on demand, use the service(8) tool or run the /etc/init.d/avahi-daemon script directly:

The available commands are:

Command Description
start Start the avahi-daemon daemon.
stop Stop the avahi-daemon daemon.
status Report if the avahi-daemon daemon is running.
restart Equivalent to a stop and then a start command sequence.
condrestart If the avahi-daemon daemon is currently running, this is the same as a restart command. If the daemon is not running, no action is taken. Often used in RPM package installation to avoid starting a service not already running.

To manage the avahi-daemon service at boot time, use chkconfig command:

Источник

Linux Avahi Daemon Tutorial With Examples

Avahi is an mDNS/DNS daemon, service which implements Apples’s Zeroconf mechanism. Zeroconf is also known as Rendezvous or Bonjour. Zeroconf have their main task to process.

  1. Automatic assignment of numeric network addresses
  2. Automatic distribution and resolution of hostnames,
  3. Automatic location of network services such as printing devices.
Читайте также:  Postgresql отличие от sql server

Installing Avahi

Avahi-daemon can be installed with yum and apt like below.

Installing Avahi

Starting Avahi

After installing avahi as we know avahi works as daemon generally. We will start the avahi daemon. Using init scripts following command can be issued. Keep in mind that avahi requires root privileges as we can see from the following screenshot it asks for the root password.

Starting Avahi

Another way to start avahi-daemon is by using systemctl command like below. with the avahi service name avahi-daemon. The avahi service current status can be seen too

Starting Avahi

Stopping Avahi

Stopping avahi in the init system can be done with the following command. Stopping avahi service requires root privileges too.

Stopping Avahi

Enable Avahi Daemon

Avahi daemon can be enabled to start automatically in the system start with the systemctl command like below.

Disable Avahi Daemon

Avahi daemon can be disabled to start automatically in the system start with the following command.

Disable Avahi Daemon

Configuration Files

Avahi configuration files reside in /etc/avahi . Avahi daemon configuration file is named avahi-daemon.conf . There is a different type of configuration abilities with this file.
Avahi server hostnames and IP addresses are stored in hosts file. Services are stored in services directory as XML file.

Add Host

Adding host to the DNS service of avahi is like adding host Linux hosts file. Add the following line into the host file like in the screenshot and then restart avahi daemon.

Add Host

Add Service

Adding services is harder than adding hosts. There is an XML configuration file used to describe services and this file will be put into /etc/avahi/services/ . The following service configuration file defines FTP file which is served from tcp 21 port.

Add Service

Источник

Поделиться с друзьями
КомпСовет
Adblock
detector