Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm fairly new to networking of this so I have a lot of questions... any help is appreciated.

I'm setting up a DHCP server and I've run into a few problems... Here is my current setup:

Router IP: 192.168.0.1
Router is handling DHCP
I have to SSH to my server (virtual machine on VMware ESXi) at 192.168.0.117 where DHCP (dhcp3-server) is set up.

following this tutorial I've set everything up as mentioned, also tried other tutorials, here are my questions:

(1) Why am I getting the error: (when trying to do service dhcp3-server restart)

Not configured to listen on any interfaces! Wrote 0 leases to leases file.

No subnet declaration for eth0 (192.168.0.117).

** Ignoring requests on eth0. If this is not what you want, please write another subnet declaration in your dhcpd.conf file for the network segment to which interface eth0 is attached. **

On this error, this person says you have to set a static IP, is that something that was covered in the first article I linked? If not, how do I do this?

(2) How do I make the switch from my router's DHCP to my local server's DHCP? I can't mess around with my router too much because if I can't SSH to the DHCP server then I can't continue to set it up...

(3) In the dhcpd.conf file it says to set option routers 192.168.1.254; does this mean I have to change the IP of the router to 192.168.1.254 from 192.168.0.1? If so, how am I supposed to continue with the setup if I can't connect to my server...

(4) What should go in the option domain-name-servers section?

(5) What's the difference between using 192.168.1.XXX and 192.168.0.XXX, which should I be using?

share|improve this question
    
What version of Ubuntu are you using? –  Daniel Ball Jul 6 '11 at 17:52

2 Answers 2

up vote 0 down vote accepted

1 - Have you got more than one interface in your machine, if so i think you have to tell dhcp somewhere what subnets to serve on what interfaces

2 - If everything is on the same subnet, and your DHCP is running ok on the server it will just take over the job when you turn off the service on the router. If you are serving other subnets other than where the DHCP server has a presence then you will need to update your helper address config in your routers.

3 - You dont really need to change the address of the router, just change your config to match its ip now. Its good practice to put your network kit at the end of your ip range though.

I would suggest you go and do a bit of reading up on TCP/IP, i think if you do a lot of this will become clearer to you

share|improve this answer
    
I have eth0 and eth1. Only eth0 is connected and in the /etc/default/dhcp3-server document it's specified INTERFACE="eth0" although DHCP is supposed to default to eth0 anyways. –  user29600 Jul 6 '11 at 17:04
    
Uh... error for number 1 went away... not sure how. Pointed at the router's IP for the router option and at the router's IP for the DNS option. –  user29600 Jul 6 '11 at 17:10
    
Huh, it worked. Just had to put in the proper addresses for everything, guess I shouldn't just have followed what they put in there and tried to adjust my equipment to it. –  user29600 Jul 6 '11 at 17:20
    
is the DHCP server considered part of the network kit? (Should it's IP be 192.168.0.255, same as what it's broadcasting on?) –  user29600 Jul 6 '11 at 18:10

1 - Change your computer's IP address from using DHCP to a static address. The DHCP server needs to have an address that it can broadcast for hosts to contact for a lease.
How to do it depends on your version. For 11.04 desktop, use this page. Alternatively you could change your /etc/network/interfaces.

# The primary network interface
auto eth0
    iface eth0 inet static
    address 192.168.0.100
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    gateway 192.168.0.1

That should be what you need for your network but I made some assumptions. Set it how you need it to be. Then do sudo /etc/init.d/networking restart

2 - That depends on your router. The short answer is that you need to turn off the DHCP server on your router and set it to acquire its address from a DHCP server on your network.

3 - No. The number is an example ... if your router is 192.168.1.254, use that.

4 - A domain name server is what associates names(i.e. serverfault.com) to IPs (64.34.119.12). I prefer google's DNS for public addresses, It's quick and reliable. There is also whatever DNS your ISP provides.

option domain-name-servers 8.8.8.8, 8.8.4.4

5 - The difference between 192.168.1.0 and 192.168.0.0 depends on the subnet. Normally those would be under 255.255.255.0, which would put them on two separate networks. Broadcasts from one wouldn't reach the other. If your subnet was 255.255.0.0, they would be on the same network and broadcasts in one would reach the other. You should look up TCP/IP, subnets, and routing on wikipedia, it's far more than I could go over in an answer here.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.