From cef63b78edeb90784419de66ffc0f78daa14b9b9 Mon Sep 17 00:00:00 2001 From: Michael Rasmussen Date: Tue, 22 Jul 2014 02:05:16 +0200 Subject: [PATCH] Fix BNF. Add example --- dhcpd.cfg | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/dhcpd.cfg b/dhcpd.cfg index 389436d..90641b3 100644 --- a/dhcpd.cfg +++ b/dhcpd.cfg @@ -1,15 +1,40 @@ -# DHCP range ::= "network" IPN "{" options "}" NEWLINE -# IPN := ipv4_net | ipv6_net +# DHCP range ::= "subnet" IPN "{" options "}" NEWLINE +# IPN := ipv4_net " " ipv4_mask | ipv6_net " " ipv6_mask # options ::= option ";" | suboption | options # option ::= token " " value -# token ::= "range" | "ttl" | "rttl" | "router" | "dns servers" | "ntp servers" | "broadcast" | "netmask" +# token ::= "range" | "ttl" | "rttl" | "router" | "dns-servers" | "ntp-servers" | "broadcast" | "domain-name" # value ::= us-ascii -# suboption ::= token "{" soptions "}" NEWLINE +# suboption ::= "{" soptions "}" NEWLINE # soptions ::= soption ";" | soptions # soption ::= allow | static # allow ::= "allow" " " allow-list -# allow-list ::= MAC | MAC "," allow-list +# allow-list ::= MAC ";"| MAC "," allow-list # static ::= "static" " " static-list -# static-list ::= MAC " " IP | MAC " " IP "," static-list +# static-list ::= MAC " " IP ";" | MAC " " IP "," static-list + +subnet 192.168.9.0 netmask 255.255.255.0 { + range 192.168.9.2 192.168.9.100; + ttl 7200; + rttl 3600; + router 192.168.9.254; + dns-servers 192.168.2.201; + ntp-servers 192.168.9.254; + broadcast 192.168.9.255; + domain-name "foo.bar"; + { + allow 001cc0c33317,001cc0c33318,001cc0c33319,001cc0c33320; + static 001cc0c33317 192.168.9.100,001cc0c33318 192.168.9.200; + } +} +subnet 192.168.8.0 netmask 255.255.255.0 { + range 192.168.8.2 192.168.8.100; + ttl 7200; + rttl 3600; + router 192.168.8.254; + dns-servers 192.168.2.201; + ntp-servers 192.168.8.254; + broadcast 192.168.8.255; + domain-name "foo.bar"; +} -- 2.39.2