You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
# Задание 4
|
|
|
|
|
|
|
|
|
|
Настройте DNS сервер на виртуальной машине. Пример адреса DNS - `1.1.1.1`.
|
|
|
|
|
|
|
|
|
|
1. Узнайте статус сервиса `systemd-resolved`
|
|
|
|
|
```
|
|
|
|
|
# systemctl status systemd-resolved
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
2. Активируйте `systemd-resolved`, если он не активирован (disabled)
|
|
|
|
|
```
|
|
|
|
|
# systemctl enable systemd-resolved
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
3. Запустите `systemd-resolved`, если он не запущен (inactive, dead)
|
|
|
|
|
```
|
|
|
|
|
# systemctl start systemd-resolved
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
4. Для настройки DNS `ens18` машины `stud1-net1` добавьте поле `DNS` в `/etc/systemd/system/ens18.network`.
|
|
|
|
|
```
|
|
|
|
|
[Match]
|
|
|
|
|
Name=ens18
|
|
|
|
|
|
|
|
|
|
[Network]
|
|
|
|
|
Address=192.168.0.2/24
|
|
|
|
|
Gateway=192.168.0.1
|
|
|
|
|
DNS=1.1.1.1
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
5. Перечитайте конфигурацию сети
|
|
|
|
|
```
|
|
|
|
|
# networkctl reload
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
6. Проверьте доступность адреса по имени
|
|
|
|
|
```
|
|
|
|
|
stud@stud1-2v1$ ping yandex.ru
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
7. В случае проблемы, проверьте, что `systemd-networkd` запущен, `systemd-resolved` запущен, DNS настроен.
|
|
|
|
|
```
|
|
|
|
|
# systemctl status systemd-networkd
|
|
|
|
|
# systemctl status systemd-resolved
|
|
|
|
|
# resolvectl status
|
|
|
|
|
```
|