pfSense Gold Subscription

Author Topic: DHCPd with multiple ipv4 subnets outside of local interface network. (300US$)  (Read 31515 times)

0 Members and 1 Guest are viewing this topic.

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13398
  • Karma: +589/-7
    • View Profile
Re: DHCPd with multiple ipv4 subnets outside of local interface network. (300US$)
« Reply #30 on: September 27, 2013, 10:32:45 am »
That we use alot :/ So it is important for me..

I'll check it today.

Offline shade

  • Jr. Member
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: DHCPd with multiple ipv4 subnets outside of local interface network. (300US$)
« Reply #31 on: September 27, 2013, 12:16:03 pm »
That we use alot :/ So it is important for me..

I'll check it today.

Thanks :)

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13398
  • Karma: +589/-7
    • View Profile
Re: DHCPd with multiple ipv4 subnets outside of local interface network. (300US$)
« Reply #32 on: September 30, 2013, 08:19:45 am »
I've sent you modified files including dhcp leases update.

Please test and feedback.

Offline bennyc

  • Full Member
  • ***
  • Posts: 285
  • Karma: +20/-0
    • View Profile
Re: DHCPd with multiple ipv4 subnets outside of local interface network. (300US$)
« Reply #33 on: September 30, 2013, 03:25:45 pm »
as already confirmed through pm  :)

I already updated my system with your code, and can confirm it works.

Test sequence:
- add device on the network
- obtained lease from additional pool
- go to the DHCP leases page, select "+" next to the address of interest
- arrived on the "Services: DHCP: Edit static mapping" page, where you can edit/save the mapping
- entry is added in the dhcpd.conf file as follows:

Code: [Select]
host s_lan_0 {
hardware ethernet 3c:c2:43:ca:xx:xx;
fixed-address 192.168.3.1;
option host-name "Win8Phone";
}

- afterwards, this host shows as static in "Status: DHCP leases", and the "+" sign is red and inactive

Offline shade

  • Jr. Member
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Marcelloc:

I have updated my PFsense with your patch, and can confirm that it works.

Now static leases on subnet and WOL works.

Looking forward to see it in upstream - Excellent work, two thumbs up :)



WetWilly: Have you tried it ?
« Last Edit: October 01, 2013, 10:19:31 am by shade »

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13398
  • Karma: +589/-7
    • View Profile
Pull request sent. ;D

I had to change some parts for 2.2 but it's done again!

https://github.com/pfsense/pfsense/pull/816
« Last Edit: October 02, 2013, 05:56:06 pm by marcelloc »

Offline shade

  • Jr. Member
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Marcelloc:

I have now added several "sub" scopes, and alot of static leases and everything works as excepted :)

It is first time I have tried a bounty and are also a "new" pfsense user, so I have a few mabee newbie questions:

- When 2.1.1 are leases, are the patch still active ? or shall it be reapplied ? or is it even compatible ?
- Will that be the same for each release up to 2.2 when is it included upstream ?
- I have read the guidelines about payment and are a little confused  ? Can I just sent you a paypal payment, or is that against policy ?


To the other creators of this bounty, I feel the bounty is solved, how about you ?

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13398
  • Karma: +589/-7
    • View Profile
- When 2.1.1 are leases, are the patch still active ? or shall it be reapplied ? or is it even compatible ?
If there is no changes to files I've modified between 2.1 and 2.1.1 it will work fine.

- Will that be the same for each release up to 2.2 when is it included upstream ?
Since pull request is merged. It will be part of pfsense 2.2

- I have read the guidelines about payment and are a little confused  ? Can I just sent you a paypal payment, or is that against policy ?
Just send to my paypal account. marcellocoutinho@gmail.com


Offline bennyc

  • Full Member
  • ***
  • Posts: 285
  • Karma: +20/-0
    • View Profile
I agree with Shade, the bounty is completed I think. (though I'm not an autor)
If Marcelloc gets all his payments, the bounty can be moved to the "completed" section...

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13398
  • Karma: +589/-7
    • View Profile
If Marcelloc gets all his payments, the bounty can be moved to the "completed" section...

Not yet. I received only from you and shade.

Total bounty US$ 1.100 received US$ 550


Offline bennyc

  • Full Member
  • ***
  • Posts: 285
  • Karma: +20/-0
    • View Profile
Hi Marcelloc,

I know it's already been a while, but I think I encountered  a couple of things we missed.
Sub-pools work fine... but when adding a static mapping for a client in a sub-pool, it does not hand out WINS/DNS: not the default, not the ones I put there. (not so good  ::) )
It also doesn't complain if I use an ip within the pool range? (can live with that)
When removing the static mapping (but leaving it in the sub-pool), the dhcp deamon hands out both fine.

So the issue is on the static mapping creation. (writing to the dhcpd.conf to be more precise, at least I think it is)

When looking to the dhcpd.conf, it gets written correctly except for the option "domain-name-server", that part is missing even if I update it in the static mapping (it does not add it to the part "host s_lan_0":

(partial code)
Code: [Select]
host s_lan_0 {
hardware ethernet 00:50:56:ad:6f:c1;
fixed-address 192.168.9.11;
option host-name "REMOTE-7";
option routers 192.168.9.254;
}
subnet 192.168.9.0 netmask 255.255.255.0 {
pool {
option domain-name-servers 192.168.1.254;
option routers 192.168.9.254;
range 192.168.9.1 192.168.9.10;
}

Went through the code from services_dhcp.php (quickly) as I suspect the issue is there (might be wrong), but it seems my coding knowledge is still too limited, can't point it out yet  :-[

Can you still check this please?

tnx & br, Benny.

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13398
  • Karma: +589/-7
    • View Profile
Sorry for the late response.
I'm really busy these days but I'll take a look as soon as possible.

Offline shade

  • Jr. Member
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile

Not yet. I received only from you and shade.

Total bounty US$ 1.100 received US$ 550

Are BennyC and me still the only two who have paid you ?

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13398
  • Karma: +589/-7
    • View Profile
Are BennyC and me still the only two who have paid you ?

Unfortunately only you two. :(

Offline bennyc

  • Full Member
  • ***
  • Posts: 285
  • Karma: +20/-0
    • View Profile
that's not very nice   ???
pm them I would say...