diff options
Diffstat (limited to 'examples/tg19/dhcp/config/fap4.conf')
-rw-r--r-- | examples/tg19/dhcp/config/fap4.conf | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/examples/tg19/dhcp/config/fap4.conf b/examples/tg19/dhcp/config/fap4.conf new file mode 100644 index 0000000..45fe194 --- /dev/null +++ b/examples/tg19/dhcp/config/fap4.conf @@ -0,0 +1,48 @@ +# FAP DHCP-configuration +# Define structure of option 43 ( Zero Touch Protocol options) +option space ztp; +option ztp.image-file-name code 0 = text; +option ztp.config-file-name code 1 = text; +option ztp.image-file-type code 2 = text; +option ztp.transfer-mode code 3 = text; +option ztp.alt-image-file-name code 4 = text; +# define option 150 - TFTP server (used for defining HTTP server for option 43) +option option-150 code 150 = { ip-address }; +# define option 60 - used for classifying ZTP clients ("vendor class identifier") +option vendor-class-identifier code 60 = text; +# only allow FAP "clients" +class "fap-vendor-class" { + # Vendor-Class Option 60, length 21: "Juniper-ex2200-48t-4g" + # Vendor-Class Option 60, length 21: "Juniper-ex3300-48p" + match if substring(option vendor-class-identifier, 0, 10) = "Juniper-ex"; + log( info, concat( "FAP: ", hostmac, " (", option host-name, ") - ", option agent.circuit-id, " - ", option vendor-class-identifier )); +} +class "fap-mac" { + # some Juniper switches won't send vendor-class-identifier + match if ( + ( binary-to-ascii(16, 8, ":", substring(hardware, 1, 3)) = "44:f4:77" ) or + ( binary-to-ascii(16, 8, ":", substring(hardware, 1, 3)) = "f0:1c:2d" ) + ); + if not exists vendor-class-identifier { + log( info, concat( "FAP: ", hostmac, " (", option host-name, ") - ", option agent.circuit-id )); + } +} +group { + # No DDNS + ddns-updates off; + ddns-hostname = none; + ddns-domainname = none; + # set short leasetime, so that it times out while the switch rebooting + default-lease-time 120; + max-lease-time 120; + # ZTP Settings + vendor-option-space ztp; + option option-150 185.110.149.4; + option tftp-server-name "185.110.149.4"; + option ztp.transfer-mode "http"; + option ztp.config-file-name = concat("api/templates/magic.conf/a=", (option agent.circuit-id)); + #option ztp.image-file-name "files/jinstall-ex-2200-14.1X53-D15.2-domestic-signed.tgz"; + # Ranges from gondul + include "/etc/dhcp/automatic_zones_fap4.conf"; + +} |