Need Help making a dhcp that only give out ip to certain members

I am trying to mimic this dhcpd.conf file from my server but I am yet successful on vyos: I am curious if this is even possible or not.

class “R Access Point” {
match if option vendor-class-identifier = “R CPE”;
option vendor-class-identifier “RCPE”;
default-lease-time 604800; # 7Day lease for AP’s
vendor-option-space RK;
option RK.zd-address “x.x.x.x , x.x.x.x”;
option RK.scg-address “x.x.x.x , x.x.x.x”;
}
class “R Access Point 2” {
match if option vendor-class-identifier = “Rs”;
option vendor-class-identifier “Rs”;
default-lease-time 604800; # 7Day lease for AP’s
vendor-option-space RK;
option RS.zd-address “x.x.x.x , x.x.x.x”;
option RK.scg-address “x.x.x.x , x.x.x.x”;
}

Local subnet

subnet x.x.x.x netmask x.x.x.x {
pool {
allow members of “R Access Point”;
allow members of “R Access Point2”;
range x.x.x.x x.x.x.x;
option subnet-mask x.x.x.x;
option routers x.x.x.x;
option domain-name-servers x.x.x.x , x.x.x.x;
option domain-name “r.net”;
}
}

This was my stab at it but that didn’t work well for the shared-network-name

set service dhcp-server global-parameters ‘class "R Access Point" { match if option vendor-class-identifier = "R CPE"; option vendor-class-identifier "R CPE"; default-lease-time 604800; vendor-option-space RK; option RK.zd-address "x.x.x.x,x.x.x.x"; option RK.scg-address "x.x.x.x,x.x.x.x"; }’
set service dhcp-server global-parameters ‘class "R Access Point2" { match if option vendor-class-identifier = "Ruckus"; option vendor-class-identifier "Rs"; default-lease-time 604800; vendor-option-space RK; option RK.zd-address "x.x.x.x,x.x.x.x"; option RK.scg-address "x.x.x.x,x.x.x.x"; }’
set service dhcp-server shared-network-name Local authoritative

set service dhcp-server shared-network-name local subnet x.x.x.x/xx subnet-parameters ‘pool { allow member of "Ruckus AP2"; allow member of "Ruckus AP"; range x.x.x.x x.x.x.x;; option domain-name-servers x.x.x.x;; option routers x.x.x.x;; option domain-name "local.net"; }’

It wouldn’t enable dhcp without the below but this will give out to all clients and I am just trying to restrict anything that is not a member of the class:

set service dhcp-server shared-network-name local subnet x.x.x.x/xx default-router ‘x.x.x.x’
set service dhcp-server shared-network-name local subnet x.x.x.x/xx dns-server ‘x.x.x.x’
set service dhcp-server shared-network-name local subnet x.x.x.x/xx domain-name ‘local.net
set service dhcp-server shared-network-name local subnet x.x.x.x/xx lease ‘86400’
set service dhcp-server shared-network-name local subnet x.x.x.x/xx range 0 start ‘x.x.x.x’
set service dhcp-server shared-network-name local subnet x.x.x.x/xx range 0 stop ‘x.x.x.x’

I figured it out:
It was typos on my part - we can close this out if needed :slight_smile:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.