* [sisyphus] systemd-networkd dns configuration
@ 2015-09-02 8:00 Eugene Prokopiev
2015-09-02 8:57 ` Eugene Prokopiev
2015-09-02 13:17 ` Денис Смирнов
0 siblings, 2 replies; 11+ messages in thread
From: Eugene Prokopiev @ 2015-09-02 8:00 UTC (permalink / raw)
To: ALT Linux Sisyphus discussions
Здравствуйте!
На свежем сизифе имею такую сетевую конфигурацию:
# cat /etc/systemd/network/trunk.network
[Match]
Name=enp4s0
[Network]
VLAN=enp4s0.791
# cat /etc/systemd/network/tx.netdev
[NetDev]
Name=enp4s0.791
Kind=vlan
[VLAN]
Id=791
# cat /etc/systemd/network/tx.network
[Match]
Name=enp4s0.791
[Network]
DNS=10.7.0.2
Domains=tx.local
Address=10.7.1.13/24
Gateway=10.7.1.1
Она успешно применена:
# networkctl status
● State: routable
Address: 10.7.1.13 on enp4s0.791
Gateway: 10.7.1.1 (CISCO SYSTEMS, INC.) on enp4s0.791
DNS: 10.7.0.2
Domain: tx.local
Но в resolv.conf при этом какая-то ерунда:
# cat /etc/resolv.conf
# Generated by resolvconf
# Do not edit manually, use
# /etc/net/ifaces/<interface>/resolv.conf instead.
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 2001:4860:4860::8888
nameserver 2001:4860:4860::8844
Как исправить?
--
WBR,
Eugene Prokopiev
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [sisyphus] systemd-networkd dns configuration
2015-09-02 8:00 [sisyphus] systemd-networkd dns configuration Eugene Prokopiev
@ 2015-09-02 8:57 ` Eugene Prokopiev
2015-09-02 13:17 ` Денис Смирнов
1 sibling, 2 replies; 11+ messages in thread
From: Eugene Prokopiev @ 2015-09-02 8:57 UTC (permalink / raw)
To: ALT Linux Sisyphus discussions
Вспомнил (и нашел в архиве), что некогда мы это уже разбирали.
Если из /etc/systemd/resolved.conf выкинуть некоторые (обычно
полезные) compile time defaults (а именно FallbackDNS), то
/var/run/systemd/resolve/resolv.conf уже получается вполне годным.
Апстрим предлагает просто сделать /etc/resolv.conf на
/var/run/systemd/resolve/resolv.conf, но у нас вместо этого есть:
# systemctl status altlinux-openresolv.service
● altlinux-openresolv.service - Update openresolv data from systemd-resolved
Loaded: loaded (/lib/systemd/system/altlinux-openresolv.service;
enabled; vendor preset: enabled)
Active: active (exited) since Ср 2015-09-02 11:40:03 MSK; 8min ago
Process: 453 ExecStart=/bin/sh -c /sbin/resolvconf -a
systemd-networkd < /run/systemd/resolve/resolv.conf (code=exited,
status=0/SUCCESS)
Main PID: 453 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/altlinux-openresolv.service
Однако:
# /bin/sh -c /sbin/resolvconf -a systemd-networkd <
/run/systemd/resolve/resolv.conf
/sbin/resolvconf: line 73: cannot create temp file for here document:
Нет такого файла или каталога
и даже:
# resolvconf -h
/sbin/resolvconf: line 73: cannot create temp file for here document:
Нет такого файла или каталога
Поэтому из /run/systemd/resolve/resolv.conf в /etc/resolv.conf вообще
ничего не попадает, попадает только из /etc/systemd/resolved.conf (а
там домен прописать невозможно).
--
WBR,
Eugene Prokopiev
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [sisyphus] systemd-networkd dns configuration
2015-09-02 8:00 [sisyphus] systemd-networkd dns configuration Eugene Prokopiev
2015-09-02 8:57 ` Eugene Prokopiev
@ 2015-09-02 13:17 ` Денис Смирнов
2015-09-03 5:26 ` Sergey
1 sibling, 1 reply; 11+ messages in thread
From: Денис Смирнов @ 2015-09-02 13:17 UTC (permalink / raw)
To: sisyphus
[-- Attachment #1: Type: text/plain, Size: 667 bytes --]
On Wed, Sep 02, 2015 at 11:00:55AM +0300, Eugene Prokopiev wrote:
> Но в resolv.conf при этом какая-то ерунда:
## cat /etc/resolv.conf
## Generated by resolvconf
## Do not edit manually, use
## /etc/net/ifaces/<interface>/resolv.conf instead.
> nameserver 8.8.8.8
> nameserver 8.8.4.4
> nameserver 2001:4860:4860::8888
> nameserver 2001:4860:4860::8844
> Как исправить?
Это не ерунда, а гуглевские DNS (ipv4/ipv6), которые прибиты в
systemd-resolved гвоздями. И даже при получении через DHCP или еще откуда
чего-нибудь другого -- это он анонсировать будет. Отрывать, вроде, через
man resolved.conf
--
С уважением, Денис
http://mithraen.ru/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [sisyphus] systemd-networkd dns configuration
2015-09-02 13:17 ` Денис Смирнов
@ 2015-09-03 5:26 ` Sergey
2015-09-03 5:42 ` Eugene Prokopiev
0 siblings, 1 reply; 11+ messages in thread
From: Sergey @ 2015-09-03 5:26 UTC (permalink / raw)
To: sisyphus
On Wednesday 02 September 2015, Денис Смирнов wrote:
> которые прибиты в systemd-resolved гвоздями.
Дожили... Мне кажется, эти гвозди следует оторвать.
--
С уважением, Сергей.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [sisyphus] systemd-networkd dns configuration
2015-09-03 5:26 ` Sergey
@ 2015-09-03 5:42 ` Eugene Prokopiev
2015-09-03 12:00 ` Mikhail Efremov
0 siblings, 1 reply; 11+ messages in thread
From: Eugene Prokopiev @ 2015-09-03 5:42 UTC (permalink / raw)
To: ALT Linux Sisyphus discussions
3 сентября 2015 г., 8:26 пользователь Sergey <a_s_y@sama.ru> написал:
> On Wednesday 02 September 2015, Денис Смирнов wrote:
>
>> которые прибиты в systemd-resolved гвоздями.
>
> Дожили... Мне кажется, эти гвозди следует оторвать.
Я выше писал, что это не гвозди, а некоторые (нередко полезные)
compile time defaults (а именно FallbackDNS), и если они не нравятся
(мне и LLMNR=yes не нравится), то их можно исправить прямо в
/etc/systemd/resolved.conf. Там же написано, что /etc/resolv.conf
стоит сделать симлинком на /var/run/systemd/resolve/resolv.conf, но у
нас /etc/chroot.d/resolv.conf не в состоянии это пережить и в итоге
как минимум ping перестает работать.
Вместо симлинка у нас сейчас предполагается использовать
altlinux-openresolv.{service,path}, но тут меня посещают сомнения
насчет того, действительно ли в случае использования systemd-networkd
есть какая-нибудь польза от openresolv? Может вместо прямого вызова
resolvconf стоило бы сделать скрипт, который при отсутствии resolvconf
просто скопирует /var/run/systemd/resolve/resolv.conf в
/etc/resolv.conf?
Хотя моей проблеме, описанной выше, это не поможет: у меня
altlinux-openresolv.{service,path} просто не отрабатывают при
изменении /var/run/systemd/resolve/resolv.conf.
--
WBR,
Eugene Prokopiev
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [sisyphus] systemd-networkd dns configuration
2015-09-03 5:42 ` Eugene Prokopiev
@ 2015-09-03 12:00 ` Mikhail Efremov
0 siblings, 0 replies; 11+ messages in thread
From: Mikhail Efremov @ 2015-09-03 12:00 UTC (permalink / raw)
To: sisyphus
On Thu, 3 Sep 2015 08:42:12 +0300 Eugene Prokopiev wrote:
> Вместо симлинка у нас сейчас предполагается использовать
> altlinux-openresolv.{service,path}, но тут меня посещают сомнения
> насчет того, действительно ли в случае использования systemd-networkd
> есть какая-нибудь польза от openresolv?
Чем systemd-networkd отличается от других желающих писать что-то в
resolv.conf? И почему при его использовании других таких желающих не
может быть?
> Может вместо прямого вызова
> resolvconf стоило бы сделать скрипт, который при отсутствии resolvconf
> просто скопирует /var/run/systemd/resolve/resolv.conf в
> /etc/resolv.conf?
Такой скрипт есть, называется resolvconf. Это и делает
altlinux-openresolv.service, собственно. Если нужна именно замена на
переданный resolv.conf, а не merge, то openresolv так тоже умеет.
К тому же resolvconf еще и update_chrooted вызовет, и локальный
ДНС-сервер настроит при необходимости.
--
WBR, Mikhail Efremov
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2015-09-03 12:00 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-02 8:00 [sisyphus] systemd-networkd dns configuration Eugene Prokopiev
2015-09-02 8:57 ` Eugene Prokopiev
2015-09-02 13:02 ` Eugene Prokopiev
2015-09-02 13:20 ` Денис Смирнов
2015-09-02 13:33 ` Eugene Prokopiev
2015-09-03 5:29 ` Eugene Prokopiev
2015-09-02 17:07 ` Mikhail Efremov
2015-09-02 13:17 ` Денис Смирнов
2015-09-03 5:26 ` Sergey
2015-09-03 5:42 ` Eugene Prokopiev
2015-09-03 12:00 ` Mikhail Efremov
ALT Linux Sisyphus discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
public-inbox-index sisyphus
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sisyphus
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git