eth0, मेरे आंतरिक इंटरफ़ेस का स्थैतिक पता है 10.0.0.1। मेरे पास एक इंटरफ़ेस भी है p4p1, जो मेरे बाहरी इंटरफ़ेस के रूप में कार्य करता है। यदि यह मायने रखता है, तो मेरा बाहरी इंटरफ़ेस भौतिक रूप से जुड़ा नहीं है और iptablesबंद है / फिर भी लिखा जा रहा है।
/etc/sysconfig/dhcpd:
DHCPDARGS=eth0
से सबनेट क्लॉज /etc/dhcpd.conf:
subnet 10.0.0.0 netmask 255.255.255.0 {
option routers 10.0.0.1;
option domain-name-servers 10.0.0.1;
option ntp-servers 10.0.0.1;
default-lease-time 86400; # 1 day
max-lease-time 604800; # 7 days
use-host-decl-names on;
ddns-updates on;
use-host-decl-names on;
allow unknown-clients;
ignore client-updates;
option domain-name "localdomain";
ddns-domainname "localdomain";
next-server 10.0.0.1;
filename "pxelinux.0";
group # known hosts
{
host host1.localdomain {hardware ethernet [REDACTED]; fixed-address host1.localdomain;}
host host2.localdomain {hardware ethernet [REDACTED]; fixed-address host2.localdomain;}
{
pool
{
one-lease-per-client true;
ping-check true;
range 10.0.0.51 10.0.0.60;
}
}
तो, मुझे अभी भी लॉन्च में "नो सबनेट घोषणा" त्रुटि संदेश क्यों मिल रहा है?
No subnet declaration for eth0 (10.0.0.1).
** Ignoring requests on eth0. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface eth0 is attached. **
अद्यतन 4/1 1900 h
आज रात के प्रयोगों से पहले:
[root@father ~]# ip addr show dev eth0
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 90:e2:ba:2d:92:4d brd ff:ff:ff:ff:ff:ff
inet 10.0.0.1/24 brd 10.0.0.255 scope global eth0
inet6 fe80::92e2:baff:fe2d:924d/64 scope link
valid_lft forever preferred_lft forever
मैंने अपने आंतरिक नेटवर्क IP पते को व्यवहार में कोई बदलाव नहीं 192.168.100.0/24करने के /etc/dhcpd.confलिए मिलान परिवर्तनों के साथ बदल दिया।
[root@father ~]# ip addr show dev eth0
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 90:e2:ba:2d:92:4d brd ff:ff:ff:ff:ff:ff
inet 192.168.100.1/24 brd 192.168.100.255 scope global eth0
inet6 fe80::92e2:baff:fe2d:924d/64 scope link
valid_lft forever preferred_lft forever
[root@father ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.100.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 p4p1
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 p4p1
169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 eth0
ओह, हे! वहां कोई प्रवेश द्वार नहीं! यही कारण है कि एक के साथ ठीक करने में आसान है GATEWAY=192.168.0.1में ifcfg-eth0और ifcfg-p4p1फ़ाइलें। service network restartतथा...
[root@father ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.100.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 p4p1
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 p4p1
169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 p4p1
इसलिए, मेरे पास एक प्रवेश द्वार है, लेकिन service dhcpd startउसी त्रुटि के साथ विफल रहता है।
अन्य नोट:
p4p1शारीरिक रूप से जुड़ा नहीं है।service dhcpd configtestकहता हैSyntax: OK। तो, यह लगभग निश्चित रूप से एक गलत ब्रेस का मामला नहीं है।
systemd: आप में से प्रतिलिपि बना सकते हैं/lib/systemd/system/dhcpd.serviceकरने के लिए/etc/systemd/system/और में इंटरफेस निर्दिष्ट Exec पंक्ति:ExecStart=/usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid eth0