[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

DHCP Server on CentOS 6.4

Posted on 2013-06-27
2
Medium Priority
?
668 Views
Last Modified: 2016-11-23
I am setting up an Asterisk server. It is a Dell T110II with 2 NICs. I am running CentOS 6.4. My goal is to have two seperate networks. One for the Internet-accessible LAN (eth0), and one for the private non-internet-accessible LAN for the VOIP phones.

eth0 - needs Internet access. Plugged into the existing data switch with other PCs, printers, etc.
     IP               10.79.10.1
     Subnet        255.255.0.0
     Gateway     10.79.0.1
     DNS            10.10.0.99

eth1 - no Internet access needed. Plugged into a stand-alone, seperate switch
     IP                192.168.0.1
     Subnet         255.255.255.0
     Gateway      none
     DNS             none

I have installed dhcp on the server in order for the SIP phones to pick up and address during boot. Here is the dhcpd.conf file...

     #
     # DHCP Server Configuration file.
     #   see /usr/share/doc/dhcp*/dhcpd.conf.sample
     #   see 'man 5 dhcpd.conf'
     #
     default-lease-time 259200;
     max-lease-time 518400;
     ddns-update-style none;
     authoritative;
     subnet 192.168.0.0 netmask 255.255.255.0 {
     range dynamic-bootp 192.168.1.10 192.168.1.99;
     option broadcast-address 192.168.0.255;

Here is my /etc/sysconfig/dhcpd file

     # Command line options here
     DHCPDARGS=eth1

My questions is...what am I missing? The phones are not picking up an IP address from DHCP.

Thanks
0
Comment
Question by:education-dynamics
2 Comments
 
LVL 21

Accepted Solution

by:
Daniel McAllister earned 1500 total points
ID: 39284327
My first guess is that there is something else ALSO acting as a DHCP server on the physical network your phones are tied into. This really isn't necessary... in fact, putting the phones on a separate network isn't necessary (and will just make it harder to debug when you have problems) -- ESPECIALLY since you're on a 16-bit netmask LAN!

First, consider using only 1 DHCP server on your LAN -- your Linux system! ISC DHCP is the most flexible to use of any I've found.

Next, consider using a CLASS declaration for your phones... In my case, I use ALLWORX phones, so they all have MAC addresses that start with 000ADD... thus. I use the following:

NOTE: My system allows the handsets to get to the Internet through the Allworx system -- since this is an Asterisk system, you don't need this.

ALSO NOTE: The hardware subscring starts with a 01... you need this! Trust me!

class "Phones" {
        match if (substring(hardware, 0, 4) = 01:00:0A:DD );
}

pool {
        range   dynamic-bootp 192.168.0.10 192.168.0.99;
        allow   members of              "Phones";
        option  routers                 192.168.0.1;
        option  ntp-servers           192.168.0.1;
        option  boot-server             "192.168.0.1";
        option  domain-name-servers     192.168.0.1;
}

Upon further review of your posted config, your range was wrong... it needs to be 192.168.0, not 192.168.1 ... It can't work the way you have that done because the DHCP_ACK will fail:

- BROADCAST DHCP REQUEST
- RECEIVE DHCP OFFER 192.160.1.10
- REPLY WITH DHCP ACK from 192.168.1.10 to 192.168.0.1 -- wrong network, no connection

Either way, I hope this helps...

Dan
IT4SOHO

Even so, you need
0
 

Author Comment

by:education-dynamics
ID: 39654158
I could not get DHCP to work, so I just assigned static IP addresses since there were only 14 phones.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question