Author Topic: [SOLVED]DHCP Leases  (Read 4287 times)

lorenzo

  • Zen Apprentice
  • *
  • Posts: 21
  • Karma: +0/-1
    • View Profile
[SOLVED]DHCP Leases
« on: April 23, 2011, 05:13:56 pm »
Hello,

I'm using Zentyal server like gateway+office, that's the situation:

router Telecom (192.168.1.1) <---> Zentyal eth0 (192.168.1.100) external
router Tiscali (192.168.0.1) <---> Zentyal eth1 (192.168.0.100) external
switch Asus <------> Zentyal eth2 (192.168.2.100) internal

I'm using 2 ADSL in load balancing, and my LAN's addresses are 192.168.2.0/24.

All worked correctly since today I've configured on eth2 the DHCP module, to assing in auto ips 192.168.2.1-50 to a group of PC postations.

First problem: when I connect some PC's to the Switch, i try to obtain the IP by DHCP from zentyal, but it cannot obtain this and pc get an ip like 169.164.....

The only cause that can I thought is that each router's (tiscali and alice) have a proper DHCP service, that I can't stop (blocked router from providers), so when a new pc try to discover a dhcp , it has some problems from those 3 dhcp service....

Second problem: after some times I've activated DHCP, eth2 (the interface who manage internal network) of my Zentyal server logged in DHCP and results in the list of leases, losing his originally and static IP 192.168.2.100, and he got 192.168.2.1!

Look:
DHCP leases
IP address    MAC address    Host name
192.168.2.1    00:1c:c4:5f:6e:36    doss-srv  

How can is possible that the server is using his DHCP ??

I hope someone should help me to understand,

Thanks a lot,
Lorenzo
« Last Edit: April 25, 2011, 11:00:15 pm by lorenzo »

Escorpiom

  • Zen Hero
  • *****
  • Posts: 897
  • Karma: +25/-1
    • View Profile
Re: DHCP Leases
« Reply #1 on: April 23, 2011, 08:45:19 pm »
If I understand correctly, you set the internal interface in Zentyal with a static IP but sometimes this changes automatically to DHCP and gets assigned an IP?

Is the Asus switch a managed (smart) one? Perhaps an IP conflict on your network?

Cheers.
Marcus' Rule:
Blanks & capitals = avoid it and you'll avoid problems...

lorenzo

  • Zen Apprentice
  • *
  • Posts: 21
  • Karma: +0/-1
    • View Profile
Re: DHCP Leases
« Reply #2 on: April 23, 2011, 10:23:57 pm »
Yes, i set a static IP on internal interface eth2 (192.168.2.100) but after I have configured DHCP module on eth2, sometimes it changes automatically to 192.168.2.10 (the first ip that I've set in the avaible Ranges).

Im using a smart switch, and actually that are only router+router+zentyal+1 windows station, so I dont think is a problem of IP conflict...all they have static ip....

I need to understand a thing, if I set static ip on the internal interface who will manage dhcp for other postations (in this case eth2), is normal that the ip of this interface changes and appair in the DHCP Leases ?

If I set an ip to Static in Network->Interfaces, why it change ? 

that's my dhcp config:
DHCP ranges
Interface IP address:    192.168.2.100
Subnet:    192.168.2.0/24
Available range:    192.168.2.1 - 192.168.2.254

I have added this range for my postations: 192.168.2.10-30

So it see the correct interface ip address, but in the lease i see:
DHCP leases
IP address    MAC address    Host name
192.168.2.10    00:1c:c4:5f:6e:36    doss-srv

doss-srv is my zentyal server

Thanks for helping,
Lorenzo
« Last Edit: April 24, 2011, 03:23:54 am by lorenzo »

Escorpiom

  • Zen Hero
  • *****
  • Posts: 897
  • Karma: +25/-1
    • View Profile
Re: DHCP Leases
« Reply #3 on: April 24, 2011, 06:41:16 am »
That's weird. I can think of no other than some issue with your Zentyal config files.

You can choose the interface that will be used to assign IP's, but surely the interface itself need to be configured with a static IP.
You cannot configure the DHCP server to hand out IP's on a non-static interface.
Once set as static, it should not change back to DHCP. If it does, something is wrong.
At this point I do not know what could be problem, but perhaps others have seen this and can help out.

Sorry that I can't help you out at this moment.
Marcus' Rule:
Blanks & capitals = avoid it and you'll avoid problems...

lorenzo

  • Zen Apprentice
  • *
  • Posts: 21
  • Karma: +0/-1
    • View Profile
Re: DHCP Leases
« Reply #4 on: April 24, 2011, 10:49:16 am »
Thank you Escorpion, I hope someone will find the problem :)

I have tried to set a fixed address for the server, creating a network object and adding it to dhcp:
Name    IP address    MAC address    Action
doss-srv    192.168.2.100/32    00:1c:c4:5f:6e:36

i have checked the network->interface->eth2 and it is set on Static and 192.168.1.100 but that's the leases situation :

DHCP leases
IP address    MAC address    Host name
192.168.2.10    00:1c:c4:5f:6e:36    doss-srv

I cant understand why eth2 is leased in it's own dhcp..

The ip of the interface who manage dhcp must be in the Range that i've added?
« Last Edit: April 24, 2011, 11:09:04 am by lorenzo »

Escorpiom

  • Zen Hero
  • *****
  • Posts: 897
  • Karma: +25/-1
    • View Profile
Re: DHCP Leases
« Reply #5 on: April 24, 2011, 03:51:05 pm »
Thank you Escorpion, I hope someone will find the problem :)

I have tried to set a fixed address for the server, creating a network object and adding it to dhcp:
Name    IP address    MAC address    Action
doss-srv    192.168.2.100/32    00:1c:c4:5f:6e:36

i have checked the network->interface->eth2 and it is set on Static and 192.168.1.100 but that's the leases situation :

DHCP leases
IP address    MAC address    Host name
192.168.2.10    00:1c:c4:5f:6e:36    doss-srv

I cant understand why eth2 is leased in it's own dhcp..

The ip of the interface who manage dhcp must be in the Range that i've added?

No and no (that's two times no)  :)
Do not use network objects for the Zentyal internal interface. Network objects only apply to stuff outside Zentyal.
When you set DHCP for some interface, for example 192.168.2.100, the available range will be from 192.168.2.1 until 192.168.2.254.
It's obvious that the static IP address for eth2 falls in this range, however this IP is not being served to clients because it's the interface address.

So if that address (previously set as static for eth2) shows up in the lease, that means something got borked.

Cheers.
Marcus' Rule:
Blanks & capitals = avoid it and you'll avoid problems...

lorenzo

  • Zen Apprentice
  • *
  • Posts: 21
  • Karma: +0/-1
    • View Profile
Re: DHCP Leases
« Reply #6 on: April 24, 2011, 05:40:23 pm »
Thank you Escorpion for your interesting!

I've added a Range from 192.168.2.10 to 192.168.2.30, and my zentyal take every time the first ip of this range !!

Plese someone should tell me how can I solve this situation? :D

Thanks,
Lorenzo

lorenzo

  • Zen Apprentice
  • *
  • Posts: 21
  • Karma: +0/-1
    • View Profile
Re: DHCP Leases
« Reply #7 on: April 25, 2011, 10:59:57 pm »
I have reinstalled the usersandgroup module , and now it works fine!