LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-02-2010, 02:40 AM   #1
banexx
LQ Newbie
 
Registered: Aug 2005
Distribution: Ubuntu
Posts: 10

Rep: Reputation: 0
DHCP server on CentOS 5.5 not working


Hi

I'm no expert on DHCP so i come to you for help.

My problem is that i have a CentOS 5.5 server on which i want to install a DHCP server. I have two NICs where eth0 has access to the internet and where eth1 should act as an DHCP server.

I have installed dhcpd and this is how my dhcpd.conf file looks like.

Code:
ddns-update-style ad-hoc;
ignore client-updates;

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

subnet 10.0.0.0 netmask 255.255.255.0 {
  range 10.0.0.2 10.0.0.25;
  option domain-name-servers 10.0.0.100;
  option routers 10.0.0.100;
  option broadcast-address 10.0.0.255;
  default-lease-time 600;
  max-lease-time 7200;
}
ifconfig looks like this

Code:
eth0      Link encap:Ethernet  HWaddr 00:1B:21:4A:F5:72
          inet addr:10.0.15.107  Bcast:10.0.15.255  Mask:255.255.255.0
          inet6 addr: fe80::21b:21ff:fe4a:f572/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4251 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4097 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:355808 (347.4 KiB)  TX bytes:516984 (504.8 KiB)

eth1      Link encap:Ethernet  HWaddr 00:04:76:F5:94:9D
          inet addr:10.0.0.100  Bcast:10.0.0.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  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:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:225 Base address:0xcc00

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:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 b)  TX bytes:560 (560.0 b)
When i start dhcpd on eth1 i get no error messages but when i connect any devices to eth1 they don't get any IP. I cant find anything in any logs about devices trying to get an IP address.

I dont have any firewall rules in iptables.

Anyone have a hint about whats wrong?
 
Old 12-02-2010, 05:47 AM   #2
kaushalpatel1982
Member
 
Registered: Aug 2007
Location: INDIA
Distribution: CentOS, RHEL, Fedora, Debian, Ubuntu, LinuxMint, Kali Linux, Raspbian
Posts: 166

Rep: Reputation: 10
FYI, Your configuration run successfully on my centos 5.5.

I dont know what command you are using to start the DHCP server. Can you please provide output of the following :

1. do "service dhcpd restart" what is the output of the command ?
2. after running this command few lines going to add in /var/log/messages for DHCP server actions. Provide the logs.
 
Old 12-02-2010, 06:10 AM   #3
david1941
Member
 
Registered: May 2005
Location: St. Louis, MO
Distribution: CentOS7
Posts: 267

Rep: Reputation: 58
Check out the authoritative statement in man dhcpd.conf.
 
Old 12-02-2010, 07:07 AM   #4
banexx
LQ Newbie
 
Registered: Aug 2005
Distribution: Ubuntu
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by kaushalpatel1982 View Post
I dont know what command you are using to start the DHCP server.
Im using /usr/sbin/dhcpd eth1

Quote:
Originally Posted by kaushalpatel1982 View Post
1. do "service dhcpd restart" what is the output of the command ?
2. after running this command few lines going to add in /var/log/messages for DHCP server actions. Provide the logs.
1. The output from "service dhcpd restart"
Code:
Shutting down dhcpd:                                       [  OK  ]
Starting dhcpd:                                            [  OK  ]
2. From the log
Code:
Dec  2 13:58:42 xx dhcpd: Internet Systems Consortium DHCP Server V3.0.5-RedHat
Dec  2 13:58:42 xx dhcpd: Copyright 2004-2006 Internet Systems Consortium.
Dec  2 13:58:42 xx dhcpd: All rights reserved.
Dec  2 13:58:42 xx dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Dec  2 13:58:42 xx dhcpd: Wrote 0 leases to leases file.
Dec  2 13:58:42 xx dhcpd: Listening on LPF/eth1/00:04:76:f5:94:9d/10.0.0/24
Dec  2 13:58:42 xx dhcpd: Sending on   LPF/eth1/00:04:76:f5:94:9d/10.0.0/24
Dec  2 13:58:42 xx dhcpd: Sending on   Socket/fallback/fallback-net
I think that my NIC is the problem. I have tested the DHCP server on the other NIC and it just works.
 
Old 12-02-2010, 07:09 AM   #5
kaushalpatel1982
Member
 
Registered: Aug 2007
Location: INDIA
Distribution: CentOS, RHEL, Fedora, Debian, Ubuntu, LinuxMint, Kali Linux, Raspbian
Posts: 166

Rep: Reputation: 10
as you said you may have problem with you eth1 else Your service is running successfully.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS VMware Server 2X and DHCP metallica1973 Linux - Virtualization and Cloud 8 04-30-2010 06:34 PM
how to configure dhcp server on centos linux Ravigowda Linux - Networking 2 02-09-2010 04:51 AM
Dynamic DHCP and DNS Server Bind Chroot on CentOS 5.3 or Ubuntu nyu2009 Linux - Server 2 10-19-2009 01:03 AM
[CentOS] Squid, iptables, dhcp server ? prixone Linux - Newbie 0 01-18-2008 12:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration