LinuxForum.Fans
Тема

Не стартует DHCP server

Автор: pavlar 27 сообщений 7009 просмотров
#263963

Не cтартует и в /etc нет директории dhcp3 в Убунту 10.04 которая естьв наличии в инструкциях по настройке http://sudouser.com/ustanovka-i-nastrojka-dhcp-servera.html

text
                                                                                                                  
nol@bear:~$ sudo apt-get install dhcp3-server                                                                                                                          
Reading package lists... Done                                                                                                                                          
Building dependency tree                                                                                                                                               
Reading state information... Done
The following packages were automatically installed and are no longer required:
  aspell-en libxcb-aux0 libgtk2.0-common libatk1.0-0 liblaunchpad-integration1 libxfixes3 libcanberra-gtk-module libenchant1c2a xsltproc notification-daemon
  libgail18 libmpfr4 libgstreamer0.10-0 aspell libxcb-event1 libicu44 libvorbisfile3 zenity libppl7 libavahi-common-data glib-networking libproxy0 python-libxml2
  python-gtksourceview2 libtdb1 hunspell-en-us docbook-xml gconf2 libwnck-common libxslt1.1 libnotify1 libcloog-ppl0 libsoup2.4-1 hicolor-icon-theme
  liblaunchpad-integration-common libelfg0 libdatrie1 fontconfig libwnck22 gedit-common libxcb-atom1 libxfont1 libgconf2-4 libgmpxx4ldbl libxres1
  libstartup-notification0 libhunspell-1.2-0 cpp libpango1.0-0 libgtksourceview2.0-common libppl-c2 libcups2 libgtksourceview2.0-0 libgtk2.0-bin libxft2
  launchpad-integration dictionaries-common gnome-doc-utils libxcomposite1 libice6 libthai0 libpython2.7 libidl0 libcanberra-gtk0 gnome-user-guide libasound2
  libatk1.0-data gconf2-common libtiff4 libfontenc1 libjasper1 libjpeg62 yelp xfonts-utils libcanberra0 libthai-data libgdk-pixbuf2.0-0 libavahi-client3 liborbit2
  x11-common sgml-data libsm6 cpp-4.5 libxdamage1 libxml2-utils libwebkitgtk-1.0-common yelp-xsl libwebkitgtk-1.0-0 dbus-x11 libxi6 libvorbis0a libxcursor1
  xfonts-encodings libavahi-common3 libxt6 libxinerama1 libgstreamer-plugins-base0.10-0 defoma libxrandr2 python-gtk2 x-ttcidfont-conf libaspell15 libgtk2.0-0
  libmpc2 libltdl7 libogg0
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  isc-dhcp-server
Suggested packages:
  isc-dhcp-server-ldap
The following NEW packages will be installed:
  dhcp3-server isc-dhcp-server
0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
Need to get 406 kB of archives.
After this operation, 1,073 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main isc-dhcp-server i386 4.1.1-P1-15ubuntu9.3 [401 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main dhcp3-server all 4.1.1-P1-15ubuntu9.3 [4,984 B]
Fetched 406 kB in 0s (1,012 kB/s)  
Preconfiguring packages ...
Selecting previously deselected package isc-dhcp-server.
(Reading database ... 61294 files and directories currently installed.)
Unpacking isc-dhcp-server (from .../isc-dhcp-server_4.1.1-P1-15ubuntu9.3_i386.deb) ...
Selecting previously deselected package dhcp3-server.
Unpacking dhcp3-server (from .../dhcp3-server_4.1.1-P1-15ubuntu9.3_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Setting up isc-dhcp-server (4.1.1-P1-15ubuntu9.3) ...
Generating /etc/default/isc-dhcp-server...
 * Starting ISC DHCP server dhcpd                                                                                                                                       * check syslog for diagnostics.
                                                                                                                                                                [fail]
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.
Setting up dhcp3-server (4.1.1-P1-15ubuntu9.3) ...
#263977

А у вас репы нормально настроены. Я не знаток Убунты но почему у Вас на убунту 10.04 ставятса пакеты от убунты 9.3

"pavlar" написал:
Do you want to continue [Y/n]? y Get:1 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main isc-dhcp-server i386 4.1.1-P1-15ubuntu9.3 [401 kB] Get:2 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main dhcp3-server all 4.1.1-P1-15ubuntu9.3 [4,984 B] Fetched 406 kB in 0s (1,012 kB/s) Preconfiguring packages ... Selecting previously deselected package isc-dhcp-server. (Reading database ... 61294 files and directories currently installed.) Unpacking isc-dhcp-server (from .../isc-dhcp-server_4.1.1-P1-15ubuntu9.3_i386.deb) ... Selecting previously deselected package dhcp3-server. Unpacking dhcp3-server (from .../dhcp3-server_4.1.1-P1-15ubuntu9.3_all.deb) ... Processing triggers for man-db ... Processing triggers for ureadahead ... ureadahead will be reprofiled on next reboot Setting up isc-dhcp-server (4.1.1-P1-15ubuntu9.3) ...
#263984

У меня оказывается даже не 10 а 11 версия. Я её два года как сервер без графикик поставил и больше туда не смотрел потому что работает без соя а теперь dhcp надо прикрутить Значит не заметил когда обновил до 11 :)

text
nol@bear:~$ sudo uname -r
[sudo] password for nol: 
2.6.38-8-generic-pae
nol@bear:~$ sudo  cat /etc/issue.net
Ubuntu 11.04

А чего репы 9? Не знаю. Я ста вил сразу 10

text
# 

# deb cdrom:[Ubuntu-Server 11.04 _Natty Narwhal_ - Release i386 (20110426)]/ natty main restricted

#deb cdrom:[Ubuntu-Server 11.04 _Natty Narwhal_ - Release i386 (20110426)]/ natty main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://us.archive.ubuntu.com/ubuntu/ natty main restricted deb-src http://us.archive.ubuntu.com/ubuntu/ natty main restricted

## Major bug fix updates produced after the final release of the ## distribution. deb http://us.archive.ubuntu.com/ubuntu/ natty-updates main restricted deb-src http://us.archive.ubuntu.com/ubuntu/ natty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ natty universe deb-src http://us.archive.ubuntu.com/ubuntu/ natty universe deb http://us.archive.ubuntu.com/ubuntu/ natty-updates universe deb-src http://us.archive.ubuntu.com/ubuntu/ natty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://us.archive.ubuntu.com/ubuntu/ natty multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ natty multiverse deb http://us.archive.ubuntu.com/ubuntu/ natty-updates multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ natty-updates multiverse

## Uncomment the following two lines to add software from the 'backports' ## repository. ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features.

#264053

Может она не полность обновилась. Сделайте бекап и поробуйте запустить обновление. Но это на боевом сервере стрёмный вариант. *CRAZY*
Я этого вам не говорил. *CRAZY*

#264063
kisil написал:
Может она не полность обновилась. Сделайте бекап и поробуйте запустить обновление. Но это на боевом сервере стрёмный вариант. *CRAZY*
Я этого вам не говорил. *CRAZY*

Ну у меня это шлюз с NAT небольшой сетки Так что теряться вроде особенно нечему

#264070

Сделал апдейт, удалил dhcp сервер, потом снова установил но опять та же байда

text
nol@bear:~$ sudo apt-get remove dhcp3-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  isc-dhcp-server
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  dhcp3-server
0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
After this operation, 69.6 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 49195 files and directories currently installed.)
Removing dhcp3-server ...
nol@bear:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  isc-dhcp-server
0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
After this operation, 1,004 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 49191 files and directories currently installed.)
Removing isc-dhcp-server ...
 * Stopping ISC DHCP server dhcpd                                                                                                                               [fail] 
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Processing triggers for man-db ...
nol@bear:~$ sudo apt-get install dhcp3-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  isc-dhcp-server
Suggested packages:
  isc-dhcp-server-ldap
The following NEW packages will be installed:
  dhcp3-server isc-dhcp-server
0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B/406 kB of archives.
After this operation, 1,073 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
Selecting previously deselected package isc-dhcp-server.
(Reading database ... 49178 files and directories currently installed.)
Unpacking isc-dhcp-server (from .../isc-dhcp-server_4.1.1-P1-15ubuntu9.3_i386.deb) ...
Selecting previously deselected package dhcp3-server.
Unpacking dhcp3-server (from .../dhcp3-server_4.1.1-P1-15ubuntu9.3_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up isc-dhcp-server (4.1.1-P1-15ubuntu9.3) ...
 * Starting ISC DHCP server dhcpd                                                                                                                                       * check syslog for diagnostics.
                                                                                                                                                                [fail]
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.
Setting up dhcp3-server (4.1.1-P1-15ubuntu9.3) ...
#264076
"pavlar" написал:
Starting ISC DHCP server dhcpd * check syslog for diagnostics. [fail] invoke-rc.d: initscript isc-dhcp-server, action "start" failed. Setting up dhcp3-server (4.1.1-P1-15ubuntu9.3) ...

Ну так что смотрите в syslog как тут написано на предмет наличия ошыбок с запуском dhcp

#264103
Показать
Jul 10 10:32:08 bear dhcpd: Internet Systems Consortium DHCP Server 4.1.1-P1
Jul 10 10:32:08 bear dhcpd: Copyright 2004-2010 Internet Systems Consortium.
Jul 10 10:32:08 bear dhcpd: All rights reserved.
Jul 10 10:32:08 bear dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Jul 10 10:32:08 bear init: apport pre-start process (1393) terminated with status 1
Jul 10 10:32:08 bear init: apport post-stop process (1412) terminated with status 1
Jul 10 10:32:08 bear cron[1416]: (CRON) STARTUP (fork ok)
Jul 10 10:32:08 bear cron[1416]: (CRON) INFO (Running @reboot jobs)
Jul 10 10:32:08 bear dhcpd: Internet Systems Consortium DHCP Server 4.1.1-P1
Jul 10 10:32:08 bear dhcpd: Copyright 2004-2010 Internet Systems Consortium.
Jul 10 10:32:08 bear dhcpd: All rights reserved.
Jul 10 10:32:08 bear dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Jul 10 10:32:08 bear dhcpd: Wrote 0 leases to leases file.
Jul 10 10:32:08 bear dhcpd:
Jul 10 10:32:08 bear dhcpd: No subnet declaration for eth0 (194.44.31.236).
Jul 10 10:32:08 bear dhcpd: ** Ignoring requests on eth0. If this is not what
Jul 10 10:32:08 bear dhcpd: you want, please write a subnet declaration
Jul 10 10:32:08 bear dhcpd: in your dhcpd.conf file for the network segment
Jul 10 10:32:08 bear dhcpd: to which interface eth0 is attached. **
Jul 10 10:32:08 bear dhcpd:
Jul 10 10:32:08 bear dhcpd:
Jul 10 10:32:08 bear dhcpd: No subnet declaration for eth1 (192.168.1.1).
Jul 10 10:32:08 bear dhcpd: ** Ignoring requests on eth1. If this is not what
Jul 10 10:32:08 bear dhcpd: you want, please write a subnet declaration
Jul 10 10:32:08 bear dhcpd: in your dhcpd.conf file for the network segment
Jul 10 10:32:08 bear dhcpd: to which interface eth1 is attached. **
Jul 10 10:32:08 bear dhcpd:
Jul 10 10:32:08 bear dhcpd:
Jul 10 10:32:08 bear dhcpd: Not configured to listen on any interfaces!

Как прописывать эти интерфейсы в конфиге у мен там вообще всё закомментировано у меня подсетка eth1 192.168.1.1 а eth0 194.44.31.236

Показать
max-lease-time 7200;

# 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 10.152.187.0 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.5.5.0 netmask 255.255.255.224 {
# range 10.5.5.26 10.5.5.30;
# option domain-name-servers ns1.internal.example.org;
# option domain-name "internal.example.org";
#264110
"pavlar" написал:
Jul 10 10:32:08 bear dhcpd: Not configured to listen on any interfaces!

Ищите конфиг в /etc и правте его.

#264115

Вроде нашел
https://help.ubuntu.com/community/dhcp3-server
Но вся фишка в том что у меня не создалась директория /etc/dhcp3/ есть только /etc/dhcp а в директории /etc/default/ тоже нет dhcp3-server в ней вообще нет dhcp

#264120

Прописал в /etc/dhcp/dhcp/conf сети Но опять ругается

text
/etc/dhcp/dhcpd.conf line 33: subnet 194.44.31.236 netmask 255.255.255.240: bad subnet number/mask combination.
subnet 194.44.31.236 netmask 255.255.255.240 
                                         ^
Configuration file errors encountered -- exiting
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.
Setting up dhcp3-server (4.1.1-P1-15ubuntu9.3) ...

А у меня в /etc/network/interfaces

text
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface auto lo iface lo inet loopback

# The primary network interface auto eth0 iface eth0 inet static address 194.44.31.236 netmask 255.255.255.240 network 194.44.31.224 broadcast 194.44.31.239 gateway 194.44.31.226 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 194.44.31.226

@ The secobdary network interface auto eth1 iface eth1 inet static address 192.168.1.1 netmask 255.255.255.0 network 192.168.1.0

#264125

Вроде стартовал после того как я прописал

text
# DHCP server to understand the network topology.

subnet 194.44.31.224 netmask 255.255.255.240 { #} # A slightly different configuration for an internal subnet. subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.1 192.168.1.200;

#264132

Но когда я на компьютере 192.168.1.2 ставлю режимDHCP то сети не видно Может и на 194.44.31.236 Надо гдето в конфигах dhcp прописать?
lДа и демон не работает

text
nol@bear:~$ sudo /etc/init.d/dhcp3-server stop
sudo: /etc/init.d/dhcp3-server: command not found
nol@bear:~$ sudo /etc/init.d/dhcp3-server start
sudo: /etc/init.d/dhcp3-server: command not found
#264140

Оказывается ничего не стартует ошибка синтаксиса

text
For info, please visit https://www.isc.org/software/dhcp/
/etc/dhcp/dhcpd.conf line 12: expecting left brace.
subnet 194.44.31.224 netmask 255.255.255.240;
                                             ^
/etc/dhcp/dhcpd.conf line 15: range declaration not allowed here.
  range 

Не знаю что править ?

text
dns-update-style none;

option domain-name "example.org"; option domain-name-servers ns1.example.org, ns2.example.org;

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

log-facility local7;

subnet 194.44.31.224 netmask 255.255.255.240;

subnet 192.168.1.0 netmask 255.255.255.0; range 192.168.1.1 192.168.1.200;

#264153

А если вот так

[console] dns-update-style none;

option domain-name "example.org";
option domain-name-servers192.168.1.1;

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

log-facility local7;

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.1 192.168.1.200;
}[/console]

#264157
kisil написал:
А если вот так

[console] dns-update-style none;

option domain-name "example.org";
option domain-name-servers192.168.1.1;

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

log-facility local7;

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.1 192.168.1.200;
}[/console]

/etc/dhcp/dhcpd.conf line 1: semicolon expected.
dns-update-style none;
^
/etc/dhcp/dhcpd.conf line 4: expecting identifier after '.'
option domain-name-servers192.168.
^
Configuration file errors encountered -- exiting
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.
Setting up dhcp3-server (4.1.1-P1-15ubuntu9.3) ...

#264160
"kisil" написал:
option domain-name-servers 192.168.1.1;

тут пробела нету, пропустил

#264170
kisil написал:
[quote="kisil"]option domain-name-servers 192.168.1.1;

тут пробела нету, пропустил[/quote]

text
Setting up isc-dhcp-server (4.1.1-P1-15ubuntu9.3) ...
dhcpd self-test failed. Please fix the config file.
The error was: 
Internet Systems Consortium DHCP Server 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
/etc/dhcp/dhcpd.conf line 1: semicolon expected.
dns-update-style none;
                  ^
Configuration file errors encountered -- exiting
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.
Setting up dhcp3-server (4.1.1-P1-15ubuntu9.3) ...
#264200
"pavlar" написал:
dns-update-style none;

Попробуй закоментируй эту строчку.

#264267
kisil написал:
[quote="pavlar"]dns-update-style none;

Попробуй закоментируй эту строчку.[/quote]
Так вроде стартует

Показать
nol@bear:~$ sudo apt-get install dhcp3-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
isc-dhcp-server
Suggested packages:
isc-dhcp-server-ldap
The following NEW packages will be installed:
dhcp3-server isc-dhcp-server
0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B/406 kB of archives.
After this operation, 1,073 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
Selecting previously deselected package isc-dhcp-server.
(Reading database ... 49178 files and directories currently installed.)
Unpacking isc-dhcp-server (from .../isc-dhcp-server_4.1.1-P1-15ubuntu9.3_i386.deb) ...
Selecting previously deselected package dhcp3-server.
Unpacking dhcp3-server (from .../dhcp3-server_4.1.1-P1-15ubuntu9.3_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up isc-dhcp-server (4.1.1-P1-15ubuntu9.3) ...
* Starting ISC DHCP server dhcpd [ OK ]
Setting up dhcp3-server (4.1.1-P1-15ubuntu9.3) ...
Войдите или зарегистрируйтесь, чтобы ответить.