Author Topic: DHCP Server not working?  (Read 9535 times)

rondomzorg

  • Zen Apprentice
  • *
  • Posts: 31
  • Karma: +1/-0
    • View Profile
DHCP Server not working?
« on: June 10, 2011, 03:48:28 pm »
Ok guys, it's been hours and i've still haven't found a way i can get the dhcp server working.

This is my situatation

Speedtouch Router (172.16.0.254) <--> Zentyal (172.16.0.1) <-- i configured this as a static IP.
DNS 127.0.0.1 / 172.16.0.254
Gateway 172.16.0.254

DHCP settings are as followed:
Default gateway : Zentyal (i tried 172.16.0.254)
Primary Nameserver : local Zentyal DNS.

Windows Computer (Which should use the DHCP server) is connected to the router at (172.16.0.254).

What am i doing wrong?? It can't reach the DHCP server somehow.
« Last Edit: June 15, 2011, 09:59:48 am by rondomzorg »

Marcus

  • Forum Moderator
  • Zen Samurai
  • *****
  • Posts: 395
  • Karma: +12/-0
    • View Profile
    • Professional IT Service
Re: DHCP Server not working?
« Reply #1 on: June 10, 2011, 04:13:16 pm »
Hello rondomzorg,

It must be something like this:
modem <-> (ETH0: Public IP) Zentyal (ETH1: local IP) <-> LAN

So
ETH0 should be your external interface and having the public IP (provided by your ISP - set it to external interface)
ETH1 should be your LAN gateway and set to internal interface with a static IP (let's say 192.168.10.1)

Make sure to configure an IP range for your internal interface (ETH1).  -> It should be 192.168.10.0/24 (based on the previous exemple)

** DHCP server won't start if you messed up the configuration...

Best,

Marcus
« Last Edit: June 10, 2011, 04:23:01 pm by Marcus »

rondomzorg

  • Zen Apprentice
  • *
  • Posts: 31
  • Karma: +1/-0
    • View Profile
Re: DHCP Server not working?
« Reply #2 on: June 10, 2011, 04:37:01 pm »
Thank you Marcus for your quick reply. I have an ADSL modem, so i can't connect it directly to the zentyal server (this is because of the RJ12 plug). What i can do is that i put an ethernet cable in the LAN1 and connect it to my zentyal server but then it will have an internal IP.. but i guess that doesn't matter since you assign it to an external port.

And as i understand it correctly the eth2 will be marked as internal and that provides access to the DHCP server.

So you would get the following setup:
MODEM (ETH1) <-- external -->  ZENTYAL
ZENTYAL (ETH2) <-- internal --> SWITCH --> CLIENTS

I will try this.
Thanx!

rondomzorg

  • Zen Apprentice
  • *
  • Posts: 31
  • Karma: +1/-0
    • View Profile
Re: DHCP Server not working?
« Reply #3 on: June 11, 2011, 11:17:20 am »
Would anyone care to share a working configuration (with screenshots)
Thanx in advance!

Sam Graf

  • Guest
Re: DHCP Server not working?
« Reply #4 on: June 11, 2011, 02:47:55 pm »
I'm not sure any screen shot I could supply will prove more helpful that the ones supplied by the documentation:

http://doc.zentyal.org/en/dhcp.html

It might be better if you could post screen shots so we can look for configuration problems.

The typical key to making this work is setting up a DHCP lease range on the internal interface, as Marcus mentioned. Zentyal doesn't automatically allocate any address ranges for DHCP use and will not start the DHCP server until that step is completed. If you've already done that, then we'll need to dig deeper.

Josep

  • Zen Samurai
  • ****
  • Posts: 255
  • Karma: +6/-0
    • View Profile
Re: DHCP Server not working?
« Reply #5 on: June 11, 2011, 02:56:53 pm »
I don't really see what is the problem. You happen to have an ADSL modem-router, and you want to set up a LAN with a Zentyal server. Since you want the server to be the DHCP server, you will need to disable the DHCP server in the modem, which is probably conflicting with what you are trying to achieve.
After that, you have 2 options:
  • Connect the modem to the external line (it will receive the public WAN address) and one of its ports (an internal local network from the modem's point of view) to the server. That server's NIC will become its external connection.Connect another server's NIC (it will be the internal connection) to a switch/hub where everything else will connect. You may disable any firewall in the modem router.
  • Have all of your clients and server connect to the modem-router. In this case, you will only use one NIC and it will be classified as internal. You should make sure that the modem router has firewall capabilities and it is well defined.

rondomzorg

  • Zen Apprentice
  • *
  • Posts: 31
  • Karma: +1/-0
    • View Profile
Re: DHCP Server not working?
« Reply #6 on: June 14, 2011, 02:54:50 pm »
Hello,

Well of course it's murphy's law but i added the 2nd ethernet card to the server and now can't get an IP anymore?
Even when i re-install zentyal it can't build a connection.

I tried to connect it with my laptop ADSL <--> LAPTOP <-- works fine, so it isn't the cable or configuration on the modem.
Does anyone know what is wrong here?

Thanx

Marcus

  • Forum Moderator
  • Zen Samurai
  • *****
  • Posts: 395
  • Karma: +12/-0
    • View Profile
    • Professional IT Service
Re: DHCP Server not working?
« Reply #7 on: June 14, 2011, 03:04:36 pm »
Hello rondomzorg,

Could you post both NIC configuration screenshots ?
Zentyal >> Core >> Network >> Interface

Also, post your DHCP configuration screenshot
Zentyal >> Infrastructure >> DHCP

That would be a good starting point -

Best,

Marcus
« Last Edit: June 14, 2011, 03:06:27 pm by Marcus »

rondomzorg

  • Zen Apprentice
  • *
  • Posts: 31
  • Karma: +1/-0
    • View Profile
Re: DHCP Server not working?
« Reply #8 on: June 14, 2011, 03:12:05 pm »
Sure will post some screens when system is reinstalled.
I'm installing it with the following settings:

MODEM

Modem adress (GW) : 192.168.0.254
DHCP = ON  : RANGE = 192.168.0.200 - 192.168.0.253
NS = 192.168.0.254

Zentyal

eth0
  • External

Static IP 192.168.0.1
Netmask 255.255.255.0
GW / DNS 192.168.0.254

eth1 (internal)
Static IP : 172.16.0.1

Don't really know yet what to do with the gateway and such..

In about 30 min i will have some screenshots ready.

Edit" ...Hmm this isn't really working. I'll get back to you guys on this issue later with some screenshots maybe it's just a buggy nic.
« Last Edit: June 14, 2011, 04:03:29 pm by rondomzorg »

rondomzorg

  • Zen Apprentice
  • *
  • Posts: 31
  • Karma: +1/-0
    • View Profile
Re: DHCP Server not working?
« Reply #9 on: June 14, 2011, 04:47:26 pm »
I'm so sorry guys. I renewed everything and apparntly i got the nics mixed up.
Working now! :D

Sam Graf

  • Guest
Re: DHCP Server not working?
« Reply #10 on: June 14, 2011, 04:49:32 pm »
 8)

rondomzorg

  • Zen Apprentice
  • *
  • Posts: 31
  • Karma: +1/-0
    • View Profile
Re: [SOLVED] DHCP Server not working?
« Reply #11 on: June 15, 2011, 09:59:29 am »
Hehe it's not completely solved yet because the clients do not appear in the DHCP lease list and the searchdomain isn't passed trough to the clients. Anyone know why. Will post some screenshots later.

sixstone

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1417
  • Karma: +26/-0
    • View Profile
    • Sixstone's blog
Re: DHCP Server not working?
« Reply #12 on: June 15, 2011, 06:54:03 pm »
Hi there,

Only clients from the range are shown in the DHCP leases list. The fixed addresses are not shown there. The searchdomain is set in DHCP interface as general setting. If the clients are not setting this, then it is probably because the clients are ignoring it.

Best,
My secret is my silence...

rondomzorg

  • Zen Apprentice
  • *
  • Posts: 31
  • Karma: +1/-0
    • View Profile
Re: DHCP Server not working?
« Reply #13 on: June 18, 2011, 09:13:36 am »
Okay i've taken the server home, so the configuration changed a little bit.
DCHP is not working now. I've put in the IP address myself, didn't get it from DHCP so i still can reach zentyal


Network

Interface (eth0) = internal. Don't ask me why it's 0 :p

So i made my internal NIC 192.168.3.1

Interface (eth1) = external. DHCP is still running on my ADSL modem, but i can't shut it down ISP disabled that option (don't know if it matters).



DNS


DNS pointing to local zentyal domain (127.0.0.1) & ADSL modem (192.168.2.254)



Gateway


Gateway is pointing to the ADSL modem (192.168.2.254)



DHCP


I filled in the search domain and a range.



DNS

Used some random domains




So there you have it folks. If anyone could be able to figure the problem it would be great :)

rondomzorg

  • Zen Apprentice
  • *
  • Posts: 31
  • Karma: +1/-0
    • View Profile
Re: DHCP Server not working?
« Reply #14 on: June 19, 2011, 07:33:42 pm »
Anyone?