func (r Range) Dimensions() (net.IP, net.IP) {
	return net.ParseIP(r.From).To4(), net.ParseIP(r.To).To4()
}
Dimensions returns the IP addresses within the range
package dhcpd
import (
	"fmt"
	"io/ioutil"
	"net"
	"time"
	"github.com/erikh/go-transport"
	"github.com/erikh/ldhcpd/db"
	"github.com/krolaw/dhcp4"
	"github.com/pkg/errors"
	"gopkg.in/yaml.v3"
)
const (
	defaultDBFile        = "ldhcpd.db"
	defaultLeaseDuration = 24 * time.Hour
	defaultCAFile        = "/etc/ldhcpd/rootCA.pem"
	defaultCertFile      = "/etc/ldhcpd/server.pem"
	defaultKeyFile       = "/etc/ldhcpd/server.key"
)
type Range struct {
	From string `yaml:"from"`
	To   string `yaml:"to"`
}
func (r Range) String() string {
	return fmt.Sprintf("%v -> %v", r.From, r.To)
}
func (r Range) validate() error {
	from, to := r.Dimensions()
	if len(from) != 4 || len(to) != 4 {
		return errors.Errorf("invalid IP in range %v", r)
	}
	if dhcp4.IPLess(to, from) {
		return errors.Errorf("IPs are improperly specified in range: %v", r)
	}
	return nil
}