Author Topic: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0, 4.2, 5.0)  (Read 4899 times)

julio

  • Guest
open a terminal window and "copy & paste" the following commands (updated: 08.02.2017):

zentyal 4.0/zentyal-dhcp 4.0.1:
Code: [Select]
cd /tmp
wget 'https://docs.google.com/uc?export=download&id=0B4_d-7xL0AS_dnkycXlSR2dkN1U' -O DHCP_4.0.1.pm.diff
sudo cp /usr/share/perl5/EBox/DHCP.pm /usr/share/perl5/EBox/DHCP.pm.orig
sudo patch /usr/share/perl5/EBox/DHCP.pm DHCP_4.0.1.pm.diff
sudo service zentyal webadmin restart

zentyal 4.2/zentyal-dhcp 4.2:
Code: [Select]
cd /tmp
wget 'https://docs.google.com/uc?export=download&id=0B4_d-7xL0AS_bDV0V25VaVNZaXc' -O DHCP_4.2.pm.diff
sudo cp /usr/share/perl5/EBox/DHCP.pm /usr/share/perl5/EBox/DHCP.pm.orig
sudo patch /usr/share/perl5/EBox/DHCP.pm DHCP_4.2.pm.diff
sudo service zentyal webadmin restart

zentyal 5.0/zentyal-dhcp 5.0:
Code: [Select]
cd /tmp
wget 'https://docs.google.com/uc?export=download&id=0B4_d-7xL0AS_Ql9uUkpReENSSXM' -O DHCP_5.0.pm.diff
sudo cp /usr/share/perl5/EBox/DHCP.pm /usr/share/perl5/EBox/DHCP.pm.orig
sudo patch /usr/share/perl5/EBox/DHCP.pm DHCP_5.0.pm.diff
sudo systemctl restart zentyal.webadmin-nginx.service zentyal.webadmin-uwsgi.service

revert back to original:
Code: [Select]
sudo apt-get install --reinstall zentyal-dhcp
« Last Edit: February 08, 2017, 02:54:59 pm by julio »

kamerom

  • Zen Apprentice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Hi,

First, I saw some of your posts and I like to say, great job!!!

Next, if you can help me I would appreciate: How can I use DHCP with Virtual Interfaces in Zentyal 4.1?!

Apparently it needs to change the file zentyal/main/dhcp/src/EBox/Model/Interfaces.pm to show virtual interfaces.

Some idea?!

Edit: The problem already has mentioned here - https://tracker.zentyal.org/issues/657

Tks!
« Last Edit: August 27, 2015, 04:38:03 pm by kamerom »

julio

  • Guest
only to show virtual interfaces not enough,
because the settings file write functions also dropped!
Restore all missing functions is hard work...

kamerom

  • Zen Apprentice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
This is bad!
Unfortunately I need this functionality.

Edit: Any tip on how to manually add a subnet to dhcpd.conf? I tried to add on /stubs/subnet.mas but no success.

Anyway, thank you.
« Last Edit: August 27, 2015, 11:55:12 pm by kamerom »

jbahillo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1444
  • Karma: +77/-2
    • View Profile
Hello Julio:

I would suggest you to submit this to github repo ;)

Dersch

  • Zen Monk
  • **
  • Posts: 87
  • Karma: +1/-0
    • View Profile
Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0 and zentyal 4.1)
« Reply #5 on: September 22, 2015, 03:16:50 pm »
Thanks Julio! It's working like a charm! :)

Dersch

  • Zen Monk
  • **
  • Posts: 87
  • Karma: +1/-0
    • View Profile
Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0 and zentyal 4.1)
« Reply #6 on: October 30, 2015, 10:44:08 pm »
Also available for 4.2?

julio

  • Guest
Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0 and zentyal 4.1)
« Reply #7 on: November 04, 2015, 10:16:15 am »
Also available for 4.2?

please try a new instructions...

tamuin

  • Zen Apprentice
  • *
  • Posts: 19
  • Karma: +1/-1
    • View Profile
Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0, 4.1, 4.2)
« Reply #8 on: September 27, 2016, 05:58:31 pm »
I did this mod when I had 4.0 running.  I recently upgraded to 4.2 and now I can only see the fixed addresses, the dynamically assigned addresses don't show up anymore.

I have tried reverting back to the original, but that did not fix the problem.

I am guessing that I should have reverted back to the original before I upgraded.

Any ideas/suggestions?

 

julio

  • Guest
Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0, 4.1, 4.2)
« Reply #9 on: September 27, 2016, 06:10:39 pm »
please try with reinstall the dhcp module:
Code: [Select]
sudo rm -f /usr/share/perl5/EBox/DHCP.pm.orig
sudo apt-get install --reinstall -y zentyal-dhcp

after reinstall try the howto instructions one more time.
« Last Edit: September 27, 2016, 06:15:37 pm by julio »

tamuin

  • Zen Apprentice
  • *
  • Posts: 19
  • Karma: +1/-1
    • View Profile
Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0, 4.1, 4.2)
« Reply #10 on: September 27, 2016, 08:04:50 pm »
Thanks for the prompt reply.

It turns out I had a entry in my dhcpd.leases file that was set to never expire, I manually deleted and restarted dhcp and the problem resolved itself.

z3mrh

  • Zen Apprentice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0, 4.1, 4.2)
« Reply #11 on: December 27, 2016, 03:25:41 am »
Julio,
    Do you have the magic worked out to do the same trick in 5.0?
    I just downloaded and installed 5.0 and would really like to change the display back to show static leases.

thanks.

julio

  • Guest
Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0, 4.1, 4.2)
« Reply #12 on: December 27, 2016, 01:07:46 pm »
Julio,
    Do you have the magic worked out to do the same trick in 5.0?
    I just downloaded and installed 5.0 and would really like to change the display back to show static leases.

thanks.

adapted to 5.0 version, please test it...
« Last Edit: December 27, 2016, 04:42:42 pm by julio »

Labomba

  • Zen Monk
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0, 4.1, 4.2)
« Reply #13 on: February 07, 2017, 10:43:07 am »
Julio,
    Do you have the magic worked out to do the same trick in 5.0?
    I just downloaded and installed 5.0 and would really like to change the display back to show static leases.

thanks.

adapted to 5.0 version, please test it...

Thnx Julio,
First of all I appreciate your work and feedback!
I tested the fixed ip sollution in zentyal 5 and they are displayed so that's fine.
Only problem is that the feedback says the computer is not active but in reality it was?
Greetzzz
« Last Edit: February 07, 2017, 10:48:42 am by Labomba »

julio

  • Guest
Re: HowTo: add Fixed IPs to DHCP leases Widget (zentyal 4.0, 4.1, 4.2)
« Reply #14 on: February 08, 2017, 02:51:44 pm »
Julio,
    Do you have the magic worked out to do the same trick in 5.0?
    I just downloaded and installed 5.0 and would really like to change the display back to show static leases.

thanks.

adapted to 5.0 version, please test it...

Thnx Julio,
First of all I appreciate your work and feedback!
I tested the fixed ip sollution in zentyal 5 and they are displayed so that's fine.
Only problem is that the feedback says the computer is not active but in reality it was?
Greetzzz

modified, please test it...
pls revert back to original first!!
« Last Edit: February 08, 2017, 02:53:41 pm by julio »