@Andrey_OM
Sysadmin

Как настроить dhcp на ubuntu 18.04?

Привет! ребята помагите сделать так чтобы из внешний локальной проходил интернет во внутрению сеть
Дано:
- Virtualbox (последний)
- Ubuntu 18.04 LTS (client)
- Ubuntu Server 18.04 (dhcp)

Настройки dhcp:
dhcpd.conf
dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#
# Attention: If /etc/ltsp/dhcpd.conf exists, that will be used as
# configuration file instead of this file.
#

# option definitions common to all supported networks...
#option domain-name "pupyshev";
#option domain-name-servers ns1.example.org, ns2.example.org;

default-lease-time 600;
max-lease-time 7200;

# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;
# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
#log-facility local7;

# No service will be given on this subnet, but declaring it helps the
# DHCP server to understand the network topology.
#
#subnet 192.168.1.89 netmask 255.255.255.0 {
#}
# This is a very basic subnet declaration.

#subnet 10.254.239.0 netmask 255.255.255.224 {
# range 10.254.239.10 10.254.239.20;
# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
#}

# This declaration allows BOOTP clients to get dynamic addresses,
# which we don't really recommend.

#subnet 10.254.239.32 netmask 255.255.255.224 {
# range dynamic-bootp 10.254.239.40 10.254.239.60;
# option broadcast-address 10.254.239.31;
# option routers rtr-239-32-1.example.org;
#}

# A slightly different configuration for an internal subnet.
subnet 10.0.1.0 netmask 255.255.255.0 {
authoritative;
range 10.0.1.2 10.0.1.10;
# option domain-name-servers ns1.internal.example.org;
option domain-name "local.pupyshev.local";
option subnet-mask 255.255.255.0;
option routers 10.0.1.0;
option broadcast-address 10.0.1.255;
default-lease-time 600;
max-lease-time 7200;
# allocated dynamically (if possible), but the host-specific information

Настройки isc-dhcp-server:
INTERFACESv4="ets32"

Настройки: /etc/netplan
50-cloud-init.yaml:

network:
ethernets:
ens32:
addresses:
- 10.0.1.1/24
dhcp4: false
gateway4: 10.0.1.1
nameservers:
addresses:
- 10.0.1.1
search: []
ens33:
addresses:
- 192.168.1.89/24
dhcp4: false
gateway4: 192.168.1.1
nameservers:
addresses:
- 192.168.1.1
search: []
version: 2

Результат :
5c26a5bd40dd5293075245.jpeg
  • Вопрос задан
  • 541 просмотр
Решения вопроса 1
CityCat4
@CityCat4
Внимание! Изменился адрес почты!
Что Вас смущает? Невозможность перевода фразы "no subnet declarations"? Читаем документацию, пишем описание подсети, указываем необходимые параметры.

JFYI: dhcpd знает только dhcpd.conf, никакие друиге файлы его не интересуют от слова совсем.
Ответ написан
Пригласить эксперта
Ответы на вопрос 1
hint000
@hint000
у админа три руки
option routers 10.0.1.0;
- вот здесь в dhcp исправьте адрес шлюза на 10.0.1.1
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы