কেন আমি ইনস্টল করার পরে isc-dhcp-server শুরু করতে পারি না?


13

আমি এমন সিস্টেমে লিনাক্স ইনস্টল করতে এই টিউটোরিয়ালটি অনুসরণ করছি যার সিডি রিডার বা ইউএসবি বুট ক্ষমতা নেই। অবশেষে, আমি যে স্থানে ইনস্টল করতে হয়েছিল সেখানে পৌঁছেছি isc-dhcp-serverএবং আমি করেছি, সাজানো sort

Aptআমাকে বলে যে একটি আংশিকভাবে ইনস্টল করা প্যাকেজ রয়েছে। আমি দৌড়েছি sudo apt-get install -fএবং আমি নিম্নলিখিতগুলি পেয়েছি:

Job for isc-dhcp-server.service failed. See 'systemctl status isc-dhcp server.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.
dpkg: error processing package isc-dhcp-server (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
isc-dhcp-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

আমি যদি /etc/init.d/isc-dhcp-server startপ্রম্পটটি করি তবে একই বার্তার প্রথম দুটি লাইন থাকে।

থেকে আউটপুট sudo systemctl status isc-dhcp-server:

● isc-dhcp-server.service - LSB: DHCP server
   Loaded: loaded (/etc/init.d/isc-dhcp-server)
   Active: failed (Result: exit-code) since Fri 2014-12-12 13:19:25 CST; 2min 43s ago
  Process: 1677 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE)

Dec 12 13:19:23 semplice dhcpd[1684]: you want, please write a subnet declaration
Dec 12 13:19:23 semplice dhcpd[1684]: in your dhcpd.conf file for the network segment
Dec 12 13:19:23 semplice dhcpd[1684]: to which interface eth0 is attached. **
Dec 12 13:19:23 semplice dhcpd[1684]: 
Dec 12 13:19:23 semplice dhcpd[1684]: 
Dec 12 13:19:25 semplice isc-dhcp-server[1677]: Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed!
Dec 12 13:19:25 semplice isc-dhcp-server[1677]: failed!
Dec 12 13:19:25 semplice systemd[1]: isc-dhcp-server.service: control process exited, code=exited status=1
Dec 12 13:19:25 semplice systemd[1]: Failed to start LSB: DHCP server.
Dec 12 13:19:25 semplice systemd[1]: Unit isc-dhcp-server.service entered failed state.

থেকে আউটপুট sudo journalctl -xn:

-- Logs begin at Fri 2014-12-12 12:57:16 CST, end at Fri 2014-12-12 13:32:01 CST. --
Dec 12 13:31:58 semplice NetworkManager[505]: <info>   lease time 86400
Dec 12 13:31:58 semplice NetworkManager[505]: <info>   nameserver '192.168.1.254'
Dec 12 13:31:58 semplice NetworkManager[505]: <info>   domain name 'lan'
Dec 12 13:31:58 semplice dbus[518]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.ser
Dec 12 13:31:58 semplice dbus[518]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Dec 12 13:31:58 semplice nm-dispatcher[2194]: Dispatching action 'dhcp4-change' for wlan0
Dec 12 13:31:58 semplice dhclient[616]: bound to 192.168.1.65 -- renewal in 45 seconds.
Dec 12 13:31:58 semplice NetworkManager[505]: bound to 192.168.1.65 -- renewal in 45 seconds.
Dec 12 13:32:01 semplice sudo[2197]: alejandro : TTY=pts/0 ; PWD=/home/alejandro ; USER=root ; COMMAND=/bin/journalctl -xn
Dec 12 13:32:01 semplice sudo[2197]: pam_unix(sudo:session): session opened for user root by alejandro(uid=0)

এটি আমার /etc/dhcp/dhcpd.configফাইল যা উপরোক্ত টিউটোরিয়ালের উদাহরণের একটি অনুলিপি মাত্র।

/var/log/syslogদৌড়ানোর সাথে সাথে পড়া থেকে আউটপুটapt-get install -f

Dec 12 16:42:40 localhost dhclient: DHCPREQUEST on wlan0 to 192.168.1.254 port 67
Dec 12 16:42:40 localhost NetworkManager[505]: DHCPREQUEST on wlan0 to 192.168.1.254 port 67
Dec 12 16:42:40 localhost dhclient: DHCPACK from 192.168.1.254
Dec 12 16:42:40 localhost NetworkManager[505]: DHCPACK from 192.168.1.254
Dec 12 16:42:40 localhost NetworkManager[505]: <info> (wlan0): DHCPv4 state changed renew -> renew
Dec 12 16:42:40 localhost NetworkManager[505]: <info>   address 192.168.1.65
Dec 12 16:42:40 localhost NetworkManager[505]: <info>   plen 24 (255.255.255.0)
Dec 12 16:42:40 localhost NetworkManager[505]: <info>   gateway 192.168.1.254
Dec 12 16:42:40 localhost NetworkManager[505]: <info>   server identifier 192.168.1.254
Dec 12 16:42:40 localhost NetworkManager[505]: <info>   lease time 86400
Dec 12 16:42:40 localhost NetworkManager[505]: <info>   nameserver '192.168.1.254'
Dec 12 16:42:40 localhost NetworkManager[505]: <info>   domain name 'lan'
Dec 12 16:42:40 localhost dbus[518]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Dec 12 16:42:40 localhost dbus[518]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Dec 12 16:42:40 localhost nm-dispatcher: Dispatching action 'dhcp4-change' for wlan0
Dec 12 16:42:41 localhost dhclient: bound to 192.168.1.65 -- renewal in 52 seconds.
Dec 12 16:42:41 localhost NetworkManager[505]: bound to 192.168.1.65 -- renewal in 52 seconds.
Dec 12 16:43:32 localhost dhclient: DHCPREQUEST on wlan0 to 192.168.1.254 port 67
Dec 12 16:43:32 localhost NetworkManager[505]: DHCPREQUEST on wlan0 to 192.168.1.254 port 67
Dec 12 16:43:32 localhost dhclient: DHCPACK from 192.168.1.254
Dec 12 16:43:32 localhost NetworkManager[505]: DHCPACK from 192.168.1.254
Dec 12 16:43:32 localhost NetworkManager[505]: <info> (wlan0): DHCPv4 state changed renew -> renew
Dec 12 16:43:32 localhost NetworkManager[505]: <info>   address 192.168.1.65
Dec 12 16:43:32 localhost NetworkManager[505]: <info>   plen 24 (255.255.255.0)
Dec 12 16:43:32 localhost NetworkManager[505]: <info>   gateway 192.168.1.254
Dec 12 16:43:32 localhost NetworkManager[505]: <info>   server identifier 192.168.1.254
Dec 12 16:43:32 localhost NetworkManager[505]: <info>   lease time 86400
Dec 12 16:43:32 localhost NetworkManager[505]: <info>   nameserver '192.168.1.254'
Dec 12 16:43:32 localhost NetworkManager[505]: <info>   domain name 'lan'
Dec 12 16:43:32 localhost dbus[518]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Dec 12 16:43:32 localhost dbus[518]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Dec 12 16:43:32 localhost nm-dispatcher: Dispatching action 'dhcp4-change' for wlan0
Dec 12 16:43:33 localhost dhclient: bound to 192.168.1.65 -- renewal in 54 seconds.
Dec 12 16:43:33 localhost NetworkManager[505]: bound to 192.168.1.65 -- renewal in 54 seconds.
Dec 12 16:43:40 localhost dhcpd: Internet Systems Consortium DHCP Server 4.3.1
Dec 12 16:43:40 localhost dhcpd: Copyright 2004-2014 Internet Systems Consortium.
Dec 12 16:43:40 localhost dhcpd: All rights reserved.
Dec 12 16:43:40 localhost dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Dec 12 16:43:40 localhost dhcpd: Internet Systems Consortium DHCP Server 4.3.1
Dec 12 16:43:40 localhost dhcpd: Copyright 2004-2014 Internet Systems Consortium.
Dec 12 16:43:40 localhost dhcpd: All rights reserved.
Dec 12 16:43:40 localhost dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Dec 12 16:43:40 localhost dhcpd: Wrote 0 deleted host decls to leases file.
Dec 12 16:43:40 localhost dhcpd: Wrote 0 new dynamic host decls to leases file.
Dec 12 16:43:40 localhost dhcpd: Wrote 0 leases to leases file.
Dec 12 16:43:40 localhost dhcpd: 
Dec 12 16:43:40 localhost dhcpd: No subnet declaration for eth0 (no IPv4 addresses).
Dec 12 16:43:40 localhost dhcpd: ** Ignoring requests on eth0.  If this is not what
Dec 12 16:43:40 localhost dhcpd:    you want, please write a subnet declaration
Dec 12 16:43:40 localhost dhcpd:    in your dhcpd.conf file for the network segment
Dec 12 16:43:40 localhost dhcpd:    to which interface eth0 is attached. **
Dec 12 16:43:40 localhost dhcpd: 
Dec 12 16:43:40 localhost dhcpd: 
Dec 12 16:43:40 localhost dhcpd: Not configured to listen on any interfaces!
Dec 12 16:43:40 localhost dhcpd: 
Dec 12 16:43:40 localhost dhcpd: If you think you have received this message due to a bug rather
Dec 12 16:43:40 localhost dhcpd: than a configuration issue please read the section on submitting
Dec 12 16:43:40 localhost dhcpd: bugs on either our web page at www.isc.org or in the README file
Dec 12 16:43:40 localhost dhcpd: before submitting a bug.  These pages explain the proper
Dec 12 16:43:40 localhost dhcpd: process and the information we find helpful for debugging..
Dec 12 16:43:40 localhost dhcpd: 
Dec 12 16:43:40 localhost dhcpd: exiting.
Dec 12 16:43:42 localhost isc-dhcp-server[5729]: Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed!
Dec 12 16:43:42 localhost isc-dhcp-server[5729]: failed!
Dec 12 16:43:42 localhost systemd[1]: isc-dhcp-server.service: control process exited, code=exited status=1
Dec 12 16:43:42 localhost systemd[1]: Failed to start LSB: DHCP server.
Dec 12 16:43:42 localhost systemd[1]: Unit isc-dhcp-server.service entered failed state.

আমার আইপি ঠিকানাটি লুকানো উচিত?


1
আপনি কি এই দুটি লাইনে যা বলেছিলেন, অর্থাৎ সিস্টেমক্লিট চালান এবং জার্নালটি দেখেছেন? journalctl -xnআপনি পুনরায় চালুর চেষ্টা করার সময় দয়া করে উত্পন্ন থেকে আউটপুট পোস্ট করুন (এটিকে করতে হবে)apt-get install -f
অ্যান্থন

1
সুতরাং এটি dhcpdশুরু হচ্ছে না, এবং আমরা এখানে কেবলমাত্র তার বার্তার শেষ পাচ্ছি the দেখে মনে হচ্ছে এটি dhcpd.confকিছু প্রয়োজনীয় তথ্য হারিয়ে যাওয়ার অভিযোগ করছে compla সিস্টেম লগগুলিতে আপনাকে বার্তাগুলির পুরো সিরিজটি দেখতে আরও কিছুটা পিছনে যেতে হবে dhcpd। একটি traditionalতিহ্যবাহী সিস্টেমে লগগুলি থাকা উচিত /var/log/syslog, আমি জানি না যে সিস্টেমড এটিকে মিস করে।
গিলস 'অশুভ হওয়া বন্ধ করুন'

উত্তর:


5

আপনার নেটওয়ার্ক কনফিগারেশনটি dhcp.conf এ আপনার সাবনেট ঘোষণার সাথে মেলে না বলে মনে হচ্ছে। আপনার 10.10.1.0/24 সাবনেট কনফিগার করা আইপি ঠিকানা রয়েছে তা নিশ্চিত করুন। আপনি এটি ব্যবহার করে এটি পরীক্ষা করতে পারেন:

ip a

যদি আপনি এই জাতীয় কোনও ঠিকানা না দেখেন তবে এটিকে উদাহরণ হিসাবে এথ0 এ যুক্ত করার চেষ্টা করুন:

ip a a 10.10.1.200/24 dev eth0

এরপরে আবার প্যাকেজ ঠিক করার চেষ্টা করুন:

apt-get install -f

আমি যদি সঠিক হয়ে থাকি তবে এটি প্যাকেজটি ইনস্টল করে ডিএইচসিপি ডেমন শুরু করা উচিত এবং আপনি এই আইপি ঠিকানাটি / ইত্যাদি / নেটওয়ার্ক / ইন্টারফেসে চালিয়ে যেতে চাইতে পারেন


2
দ্রষ্টব্য: ip a aএর জন্য দাঁড়িয়েছেip address add
mxMLnkn

আমার রাস্প পাইতে এই ত্রুটিটি ছিল এবং পরিষেবা শুরু করতে পারে না, আইপি কোনও কমান্ড আউটপুট খুঁজে পায়নি turned আইপি অ্যাড্রেস যুক্ত করার পরে সবকিছু কাজ করেছে
মানি 265

@ Manny265 আপনার মন্তব্যটির কোনও অর্থ নেই; আপনি ডিএইচসিপি চালানোর কারণ হ'ল এটি আপনার জন্য স্বয়ংক্রিয়ভাবে একটি আইপি ঠিকানা বরাদ্দ করা উচিত।
ট্রিপলি

3

আপনার সমস্যাটি এখানে:

Dec 12 16:43:40 localhost dhcpd: No subnet declaration for eth0 (no IPv4 addresses).
Dec 12 16:43:40 localhost dhcpd: ** Ignoring requests on eth0.  If this is not what
Dec 12 16:43:40 localhost dhcpd:    you want, please write a subnet declaration
Dec 12 16:43:40 localhost dhcpd:    in your dhcpd.conf file for the network segment
Dec 12 16:43:40 localhost dhcpd:    to which interface eth0 is attached. **
Dec 12 16:43:40 localhost dhcpd: 
Dec 12 16:43:40 localhost dhcpd: 
Dec 12 16:43:40 localhost dhcpd: Not configured to listen on any interfaces!
Dec 12 16:43:40 localhost dhcpd: 
Dec 12 16:43:40 localhost dhcpd: If you think you have received this message due to a bug rather
Dec 12 16:43:40 localhost dhcpd: than a configuration issue please read the section on submitting
Dec 12 16:43:40 localhost dhcpd: bugs on either our web page at www.isc.org or in the README file
Dec 12 16:43:40 localhost dhcpd: before submitting a bug.  These pages explain the proper
Dec 12 16:43:40 localhost dhcpd: process and the information we find helpful for debugging..
Dec 12 16:43:40 localhost dhcpd: 
Dec 12 16:43:40 localhost dhcpd: exiting.

আপনার ত্রুটি বার্তাটি চালিয়ে পুনরুত্পাদন করতে সক্ষম হওয়া উচিত dhcpd -t -cf /etc/dhcp/dhcpd.conf


আমি অনুমান করছি যে আপনি ইথারনেটের অন্যান্য হোস্টের সাথে একটি ওয়্যারলেস ইন্টারনেট সংযোগ ভাগ করতে চান, যেমন নীচের টপোলজি চিত্রের মতো।

                            ↑
                            │ Uplink
                            │
               ┌────────────┴────────────┐
               │          wlan0          │
               │     192.168.1.65/24     │
               │                         │
               │        semplice         │
               │                         │
               │       10.10.1.1/24      │
               │          eth0           │
               └────────────┬────────────┘
                            │
     ┌──────────────┬───────┴────────┬──────────────┐
     │              │                │              │
   Host 1         Host 2           Host 3         Host 4
 10.10.1.21     10.10.1.22       10.10.1.23     10.10.1.24

আমি ধরে নিচ্ছি যে আপনার সার্ভারের ঠিকানাটি eth010.10.1.1 হয়। চালিয়ে যাচাই করুন ip addr show dev eth0

তারপরে আপনাকে অবশ্যই ইন্টারফেসে /etc/dhcp/dhcpd.confঠিকানাগুলি হস্তান্তর করতে কনফিগার করতে হবেeth0 । বাক্সের বাইরে, dhcpdকোনও কিছুর প্রতিক্রিয়া না জানানোর জন্য কনফিগার করা হয়েছে, কারণ অজান্তেই চালিত দুর্বৃত্ত ডিএইচসিপি সার্ভার কোনও হোস্টের কাছে ঠিকানা জিজ্ঞাসা করে কোনও নেটওয়ার্কে সর্বনাশ ডেকে আনবে।

ইন /etc/dhcp/dhcpd.conf, আপনার নীচের মত একটি স্তবক প্রয়োজন:

subnet 10.10.1.0 netmask 255.255.255.0 {
    option subnet-mask        255.255.255.0;
    option broadcast-address  10.10.1.255;
    option routers            10.10.1.1;
    pool {
        range 10.10.1.21 10.10.1.254;
    }
}

... ঘোষণা ছাড়াও যেমন authoritative, domain-name, domain-name-servers, এবং default-lease-time। (প্রয়োজনীয় হিসাবে সামঞ্জস্য করুন। আপনি নিজের নেটওয়ার্কের জন্য কী সেটিংস চান তা কেবল আপনি জানেন))

এছাড়াও, ডেবিয়ানের জন্য, আপনাকে /etc/default/isc-dhcp-serverসেট করতে সম্পাদনা করতে হবে

INTERFACES="eth0"

যাতে সার্ভার ইথারনেট বন্দরে শুনবে। (আপনি শুনতে চান না wlan0; আপনার ওয়্যারলেস অ্যাকসেস পয়েন্টটি ওয়্যারলেস ক্লায়েন্টদের ঠিকানা দেওয়ার জন্য দায়বদ্ধ হবে))


2
তার সমস্যাটি হ'ল সিস্টেমড পুরাতন থ্রি স্ক্রিপ্টের lsb init তথ্য উপেক্ষা করছে, যা পরিষ্কারভাবে "# প্রয়োজনীয়-শুরু: $ রিমোট_ফেস $ নেটওয়ার্ক $ সিসলগ" উল্লেখ করে। এটির পরিবর্তে নেটওয়ার্ক ইউনিটগুলির জন্য অপেক্ষা করার পরিবর্তে এটি dhcpd এর আগেও চালানোর জন্য সমান্তরাল হবে।
ফ্লোরিয়ান হিগল

/etc/dhcp/dhcpd.confএই সমস্যাটি সমাধান করার জন্য একটি বৈধ কনফিগারেশন ফাইল ব্যবহার করা উচিত। isc-dhcp-serverসেবা ভুল ব্যবহার ব্যর্থ হবে dhcpd.confকনফিগারেশন।
GAD3R
আমাদের সাইট ব্যবহার করে, আপনি স্বীকার করেছেন যে আপনি আমাদের কুকি নীতি এবং গোপনীয়তা নীতিটি পড়েছেন এবং বুঝতে পেরেছেন ।
Licensed under cc by-sa 3.0 with attribution required.