pfSense Gold Subscription

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

0 Members and 1 Guest are viewing this topic.

Offline WetWilly

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: DHCPd with multiple ipv4 subnets outside of local interface network. (300US$)
« Reply #15 on: September 18, 2013, 09:36:42 am »
Shade, nice to hear.

Marcello. Looking forward to test your update!

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13398
  • Karma: +589/-7
    • View Profile
Re: DHCPd with multiple ipv4 subnets outside of local interface network. (300US$)
« Reply #16 on: September 19, 2013, 10:35:57 pm »
I think I got it  ;D

Check screenshots and result config

Code: [Select]
option domain-name "localdomain";
option ldap-server code 95 = text;
option domain-search-list code 119 = text;

default-lease-time 7200;
max-lease-time 86400;
log-facility local7;
one-lease-per-client true;
deny duplicates;
ping-check true;
authoritative;
subnet 192.168.5.0 netmask 255.255.255.0 {
        pool {
                option domain-name-servers 8.8.8.8;
                range 192.168.5.10 192.168.5.25;
        }

        option routers 192.168.5.1;
        option domain-name-servers 8.8.8.8;

}
subnet 192.168.6.0 netmask 255.255.255.0 {
        pool {
                option domain-name-servers 8.8.8.8;
                deny unknown-clients;
                option routers 192.168.6.1;
                range 192.168.6.35 192.168.6.140;
        }


}subnet 192.168.7.0 netmask 255.255.255.128 {
        pool {
                option routers 192.168.7.1;
                range 192.168.7.10 192.168.7.90;
        }


}

I'll send you modified files.

I've did minimum changes to current code to get easier to debugn and push to 2.2.

This code does not affect basic dhcp setup, gui or config

Offline shimabuku

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: DHCPd with multiple ipv4 subnets outside of local interface network. (300US$)
« Reply #17 on: September 20, 2013, 09:21:10 pm »
I would like to also chip in $100  :)

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13398
  • Karma: +589/-7
    • View Profile
Re: DHCPd with multiple ipv4 subnets outside of local interface network. (300US$)
« Reply #18 on: September 20, 2013, 09:25:34 pm »
I would like to also chip in $100  :)

Great!  ;D I'll send you this first version of the patch.


Offline bennyc

  • Full Member
  • ***
  • Posts: 285
  • Karma: +20/-0
    • View Profile
Re: DHCPd with multiple ipv4 subnets outside of local interface network. (300US$)
« Reply #19 on: September 23, 2013, 04:33:47 am »
This is something great & added value overall.
If really hope this makes it to the next releases (as accepted feature), and i'll also add in anther $50 to support dev a bit...

Offline shade

  • Jr. Member
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: DHCPd with multiple ipv4 subnets outside of local interface network. (300US$)
« Reply #20 on: September 23, 2013, 11:28:37 am »
I think I got it  ;D

Great, I have downloaded the files and will test the update in the next couple of days...

Offline ermal

  • Hero Member
  • *****
  • Posts: 3832
  • Karma: +85/-5
    • View Profile
Re: DHCPd with multiple ipv4 subnets outside of local interface network. (300US$)
« Reply #21 on: September 24, 2013, 05:35:16 am »
You would probably have that development done from pfSense devs through support channel with the amount of 1600$.
For this feature it would not require more than that.

Offline bennyc

  • Full Member
  • ***
  • Posts: 285
  • Karma: +20/-0
    • View Profile
Re: DHCPd with multiple ipv4 subnets outside of local interface network. (300US$)
« Reply #22 on: September 26, 2013, 06:05:11 am »
I can hereby confirm the feature is working as requested in the bounty.
Tested the mod in following environment: x1250e running 2.1 & a couple of dhcp scopes configured outside of interface's subnet, c3560x doing L3 routing & ip-helper configured on some vlans pointing to pfsense.

- all config (pfsense anyway) can be done in gui
- dhcpd replies to correct (ip-helper) gateway, hands out IP in correct scope
- dhcp leases are visible, sorted on IP ascending, in same page (room for improvement here, if more scopes are used the list can get long/crowded)
- dhcp log page displays relevant information from all scopes (same here; leaves room for improvement)

example from dhcp log:
Sep 26 12:48:41   dhcpd: DHCPACK on 192.168.3.1 to 3x:cx:4x:cx:dx:8x (Win8Phone) via 192.168.3.254
Sep 26 12:48:41   dhcpd: DHCPREQUEST for 192.168.3.1 (192.168.1.254) from 3x:cx:4x:cx:dx:8x (Win8Phone) via 192.168.3.254


(yes my log is in reverse order  ;D)

Great work Marcelloc!

Offline shade

  • Jr. Member
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: DHCPd with multiple ipv4 subnets outside of local interface network. (300US$)
« Reply #23 on: September 27, 2013, 06:22:49 am »
Marcelloc:

We have tested the mod on a OPNsense Quad appliance box, running 2.1 with 2 scopes configured outsite the lan interface's subnet, a5406ZL handling the L3 routing & ip-helper pointing.

It took some time since we have alot of static dhcp entries that we need transfered to PFsense, and our finding is so far.

- dhcpd hands out the correct IP scopes, to the right vlans.
- config in sub scope (that used by os) are working.
- dhcp leases are shown, but buttons/links are not working*

* If you try to send a wake-on-lan by cliking the MAC it selects a wrong interface a says:

  The following input errors were detected: A valid interface must be specified.

I can just correct the interface to LAN and press send then it works.

If we try to make a static by clicking the "add button", it just return to the start page of the dhcpd, that is not possible.


- logging of sub scopes works.

Sep 27 13:23:21   dhcpd: DHCPACK on 10.1.5.70 to 00:23:14:94:6e:bc (EUCBTPR-Pc) via em0
Sep 27 13:23:21   dhcpd: DHCPREQUEST for 10.1.5.70 from 00:23:14:94:6e:bc (EUCBTPR-Pc) via em0

(ours in also in reverse)

Offline shade

  • Jr. Member
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: DHCPd with multiple ipv4 subnets outside of local interface network. (300US$)
« Reply #24 on: September 27, 2013, 06:25:33 am »
You would probably have that development done from pfSense devs through support channel with the amount of 1600$.
For this feature it would not require more than that.

Please explain, won't it be possible for us to get the patch from marcelloc included upstream ? or....

Offline xbipin

  • Hero Member
  • *****
  • Posts: 1631
  • Karma: +6/-0
    • View Profile
Re: DHCPd with multiple ipv4 subnets outside of local interface network. (300US$)
« Reply #25 on: September 27, 2013, 06:52:30 am »
You would probably have that development done from pfSense devs through support channel with the amount of 1600$.
For this feature it would not require more than that.

Please explain, won't it be possible for us to get the patch from marcelloc included upstream ? or....

+1

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 13398
  • Karma: +589/-7
    • View Profile
Re: DHCPd with multiple ipv4 subnets outside of local interface network. (300US$)
« Reply #26 on: September 27, 2013, 07:47:19 am »
I will push it to 2.2 code since I have a positive feed from you. Core team will check the code and if it's ok, it can be merged.


Offline bennyc

  • Full Member
  • ***
  • Posts: 285
  • Karma: +20/-0
    • View Profile
Re: DHCPd with multiple ipv4 subnets outside of local interface network. (300US$)
« Reply #27 on: September 27, 2013, 09:31:47 am »
Quote
* If you try to send a wake-on-lan by cliking the MAC it selects a wrong interface a says:

Don't know about the button, but the "Wake on lan" as a feature inside those scopes but outside your interface subnet will not work I think. That also uses broadcast, and thus remains within your vlan.... or you need to do some additional configuration on your router by forwarding the broadcasts...

The buttons (like add static mapping) does a redirect to the main dhcp page, but the mapping is not present as you say (did not test that, don't use static mappings).

Offline shade

  • Jr. Member
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: DHCPd with multiple ipv4 subnets outside of local interface network. (300US$)
« Reply #28 on: September 27, 2013, 09:49:55 am »
I will push it to 2.2 code since I have a positive feed from you. Core team will check the code and if it's ok, it can be merged.

Sound great  :D

Offline shade

  • Jr. Member
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: DHCPd with multiple ipv4 subnets outside of local interface network. (300US$)
« Reply #29 on: September 27, 2013, 09:57:19 am »
The buttons (like add static mapping) does a redirect to the main dhcp page, but the mapping is not present as you say (did not test that, don't use static mappings).

That we use alot :/ So it is important for me..


Don't know about the button, but the "Wake on lan" as a feature inside those scopes but outside your interface subnet will not work I think. That also uses broadcast, and thus remains within your vlan.... or you need to do some additional configuration on your router by forwarding the broadcasts...

You can configure that in your core so WOL packets can get from one vlan to another...