func AddInternalDHCP(netname string, d driver.DHCP) error {
	return addDHCP("--netname", netname, d)
}
AddInternalDHCP adds a DHCP server to an internal network.
package virtualbox
import (
	"bufio"
	"net"
	"strings"
	"github.com/boot2docker/boot2docker-cli/driver"
)
func addDHCP(kind, name string, d driver.DHCP) error {
	command := "modify"
	dhcps, err := DHCPs()
	if err != nil {
		return err
	}
	if _, ok := dhcps[name]; !ok {
		command = "add"
	}
	args := []string{"dhcpserver", command,
		kind, name,
		"--ip", d.IPv4.IP.String(),
		"--netmask", net.IP(d.IPv4.Mask).String(),
		"--lowerip", d.LowerIP.String(),
		"--upperip", d.UpperIP.String(),
	}
	if d.Enabled {
		args = append(args, "--enable")
	} else {
		args = append(args, "--disable")
	}
	return vbm(args...)
}