[SOLVED] failed start of dhcpd

Issues related to configuring your network
chrisnor
Posts: 6
Joined: 2012/03/20 16:19:05
Contact:

[SOLVED] failed start of dhcpd

Post by chrisnor » 2012/03/21 12:51:29

Hi there!

Im getting mad on this:
Installed CentOS 6.2 netinstall (basic server configuration) in virtual box
Installed dhcp.x86_64
Created /etc/dhcpd.conf
Entrys:

[code]ddns-update-style interim;
authorative;
subnet 10.0.1.0 netmask 255.255.255.0 {
range 10.0.1.10 10.0.1.20
}[/code][Moderator edit: Added [i]code[/i] tags to preserve formatting.]

I have two NIC, DHCP should go for eth1:

IPADDR=10.0.1.1
MASK 255.255.255.0

Up and running

in /etc/sysconfig/dhcpd
i added eth1

configtest on dhcpd.conf is ok....

but

service dhcpd start [FAILED]

Someone help me... don't see my error

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

[SOLVED] failed start of dhcpd

Post by gerald_clark » 2012/03/21 13:27:53

Check /var/log/messages, or run 'dhcpd' and see what problem is reported.

chrisnor
Posts: 6
Joined: 2012/03/20 16:19:05
Contact:

Re: failed start of dhcpd

Post by chrisnor » 2012/03/21 15:22:53

messages say:

"No subnet declaration for eth1 (10.0.1.1) ..."

But i declared a subnet in /etc/dhcpd.conf oO

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: failed start of dhcpd

Post by pschaff » 2012/03/22 00:24:00

Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.

Please [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=28723&forum=54]provide more information about your system[/url] by running "./getinfo.sh network" and showing us the output file.

darkstar
Posts: 2
Joined: 2012/03/23 19:28:50
Contact:

Re: failed start of dhcpd

Post by darkstar » 2012/03/23 20:33:29

You posted

ddns-update-style interim;
authorative;
subnet 10.0.1.0 netmask 255.255.255.0 {
range 10.0.1.10 10.0.1.20
}

you have a class a network of 10.0.1.0

your netmask should be 255.0.0.0



:D

darkstar
Posts: 2
Joined: 2012/03/23 19:28:50
Contact:

Re: failed start of dhcpd

Post by darkstar » 2012/03/23 20:40:04

You posted

ddns-update-style interim;
authorative;
subnet 10.0.1.0 netmask 255.255.255.0 {
range 10.0.1.10 10.0.1.20
}

you have a class a network of 10.0.1.0

your netmask should be 255.0.0.0



:D

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: failed start of dhcpd

Post by pschaff » 2012/03/23 20:51:03

[b]darkstar[/b] - Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature, and do not dual-post.

You are correct the 10.0.0.0/8 is the [url=http://www.google.com/search?q=class+a+b+c+private+networks&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:unofficial&client=firefox-a]Class A private network[/url] but I don't believe that precludes using a /24 subnet netmask on a LAN.

chrisnor
Posts: 6
Joined: 2012/03/20 16:19:05
Contact:

Re: failed start of dhcpd

Post by chrisnor » 2012/03/24 15:48:29

output of getinfo.sh:

[code]Information for network problems.
== BEGIN uname -rmi ==
2.6.32-220.el6.x86_64 x86_64 x86_64
== END uname -rmi ==

== BEGIN rpm -qa \*-release\* ==
centos-release-6-2.el6.centos.7.x86_64
== END rpm -qa \*-release\* ==

== BEGIN cat /etc/redhat-release ==
CentOS release 6.2 (Final)
== END cat /etc/redhat-release ==

== BEGIN getenforce ==
Enforcing
== END getenforce ==

== BEGIN free -m ==
total used free shared buffers cached
Mem: 996 201 795 0 9 91
-/+ buffers/cache: 100 896
Swap: 4031 0 4031
== END free -m ==

== BEGIN lspci -nn ==
00:00.0 Host bridge [0600]: Intel Corporation 440FX - 82441FX PMC [Natoma] [8086:1237] (rev 02)
00:01.0 ISA bridge [0601]: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II] [8086:7000]
00:01.1 IDE interface [0101]: Intel Corporation 82371AB/EB/MB PIIX4 IDE [8086:7111] (rev 01)
00:02.0 VGA compatible controller [0300]: InnoTek Systemberatung GmbH VirtualBox Graphics Adapter [80ee:beef]
00:03.0 Ethernet controller [0200]: Intel Corporation 82540EM Gigabit Ethernet Controller [8086:100e] (rev 02)
00:04.0 System peripheral [0880]: InnoTek Systemberatung GmbH VirtualBox Guest Service [80ee:cafe]
00:05.0 Multimedia audio controller [0401]: Intel Corporation 82801AA AC'97 Audio Controller [8086:2415] (rev 01)
00:06.0 USB controller [0c03]: Apple Computer Inc. KeyLargo/Intrepid USB [106b:003f]
00:07.0 Bridge [0680]: Intel Corporation 82371AB/EB/MB PIIX4 ACPI [8086:7113] (rev 08)
00:08.0 Ethernet controller [0200]: Intel Corporation 82540EM Gigabit Ethernet Controller [8086:100e] (rev 02)
00:0b.0 USB controller [0c03]: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller [8086:265c]
00:0d.0 SATA controller [0106]: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] [8086:2829] (rev 02)
== END lspci -nn ==

== BEGIN lsusb ==
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
== END lsusb ==

== BEGIN rpm -qa kmod\* kmdl\* ==
== END rpm -qa kmod\* kmdl\* ==

== BEGIN ifconfig -a ==
eth0 Link encap:Ethernet HWaddr 08:00:27:6A:10:9C
inet addr:192.168.1.4 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe6a:109c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:330 errors:0 dropped:0 overruns:0 frame:0
TX packets:271 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:36501 (35.6 KiB) TX bytes:40476 (39.5 KiB)

eth1 Link encap:Ethernet HWaddr 08:00:27:DE:E3:00
inet addr:10.0.1.1 Bcast:10.0.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fede:e300/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:830 (830.0 b)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

== END ifconfig -a ==

== BEGIN brctl show ==
bridge name bridge id STP enabled interfaces
== END brctl show ==

== BEGIN route -n ==
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 eth1
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
== END route -n ==

== BEGIN cat /etc/resolv.conf ==
; generated by /sbin/dhclient-script
search localdomain server
nameserver 192.168.1.1
== END cat /etc/resolv.conf ==

== BEGIN grep net /etc/nsswitch.conf ==
#networks: nisplus [NOTFOUND=return] files
#netmasks: nisplus [NOTFOUND=return] files
netmasks: files
networks: files
netgroup: nisplus
== END grep net /etc/nsswitch.conf ==

== BEGIN chkconfig --list | grep -Ei 'network|wpa' ==
matahari-network 0:off 1:off 2:off 3:off 4:off 5:off 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
== END chkconfig --list | grep -Ei 'network|wpa' ==

[/code]

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: failed start of dhcpd

Post by pschaff » 2012/03/24 16:07:10

I can't spot the problem. Perhaps the [url=http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html-single/Deployment_Guide/#ch-DHCP_Servers]upstream docs[/url] will help.

I can see that you are trying to use two different [url=http://en.wikipedia.org/wiki/Private_network]non-routing private IP address[/url] and are likely to have [url=http://www.google.com/search?q=double+NAT&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:unofficial&client=firefox-a]double NAT[/url] issues. There is presumably a router in front of eth0. If you want the CentOS box to be router/DHCP server then you may want to get rid of it. Otherwise, explain your objective in trying to set up a separate NAT subnet with DHCP.

Edit: Just reviewed the first post and noticed that you are doing this in a virtual machine. Are you using Bridged networking for both interfaces?

chrisnor
Posts: 6
Joined: 2012/03/20 16:19:05
Contact:

Re: failed start of dhcpd

Post by chrisnor » 2012/03/24 17:22:12

Ok here are some more informations:

I want to test PXE.

I set up a VirtualBox Guest with CentOS running on a Win7 Host system.

eth0 is the bridged interface to easy have ssh via putty from win to centos and internet connection for centos.

eth1 should be my "internal" network where i want to connect my pxe hosts to. (set to "internal network" in vbox)

After configurating the pxe(centos) server i want to add more vbox guests where i want to install via pxe.

For PXE to work i read that i need to have a running dhcp and tftp server...

and the dhcp server failed.... =(

Locked