Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung | ||
admin_grundlagen:dns [2013/04/19 09:34] ingo_wichmann [Ubuntu 12.04] |
admin_grundlagen:dns [2024/10/09 13:23] (aktuell) ingo_wichmann |
||
---|---|---|---|
Zeile 5: | Zeile 5: | ||
==== Dauerhaft ==== | ==== Dauerhaft ==== | ||
- | ''/etc/HOSTNAME'' ( SuSE ) | + | ''/etc/hostname'' ( Debian, CentOS 7, ab SLES 12 ) |
- | + | ||
- | ''/etc/hostname'' ( Debian ) | + | |
<file> | <file> | ||
notebook13 | notebook13 | ||
Zeile 13: | Zeile 11: | ||
(( FQDN wird aus ''hostname'' und ''/etc/hosts'' bzw. ''/etc/resolv.conf'' gebildet )) | (( FQDN wird aus ''hostname'' und ''/etc/hosts'' bzw. ''/etc/resolv.conf'' gebildet )) | ||
- | ''/etc/sysconfig/network'' : ( RedHat ) | + | ''/etc/sysconfig/network'' : ( CentOS (bis CentOS 6) ) |
<file> | <file> | ||
HOSTNAME=notebook13.linuxhotel.de | HOSTNAME=notebook13.linuxhotel.de | ||
+ | |||
</file> | </file> | ||
+ | |||
+ | ==== Mit systemd ==== | ||
+ | |||
+ | hostnamectl set-hostname notebook13 | ||
===== DNS Client ===== | ===== DNS Client ===== | ||
Zeile 42: | Zeile 45: | ||
nameserver 192.168.1.6 | nameserver 192.168.1.6 | ||
</file> | </file> | ||
+ | {{:admin_grundlagen:resolveconf.png?400|}} | ||
- | ==== Ubuntu 12.04 ==== | ||
- | //noch nicht fertig// | ||
- | DNS Client Einstellungen: | ||
- | |||
- | ''/etc/resolv.conf'' nicht anfassen | ||
- | |||
- | ''/etc/network/interfaces'' : | ||
- | <file> | ||
- | iface eth0 inet dhcp | ||
- | dns-nameservers 141.1.1.1 | ||
- | </file> | ||
- | |||
- | ''/etc/dhcp/dhclient-enter-hooks.d/resolvconf'' | ||
- | |||
- | siehe | ||
- | man resolvconf | ||
===== Testen ===== | ===== Testen ===== | ||
Clientseitig Namensauflösung testen: | Clientseitig Namensauflösung testen: | ||
- | getent hosts $(hostname) | + | getent ahosts $(hostname) |
- | getent hosts $(hostname -f) | + | getent ahosts $(hostname -f) |
- | getent hosts 192.168.1.219 | + | getent ahosts 192.168.1.219 |
Nameserver abfragen: | Nameserver abfragen: | ||
Zeile 69: | Zeile 57: | ||
+ | ====== systemd-resolved ====== | ||
+ | [[systemd-resolved]] | ||