.. _dhcp: ############# DHCP / DHCPv6 ############# VyOS uses ISC DHCPd for both IPv4 and IPv6 address assignment. .. _dhcp-server: DHCP Server =========== The network topology is declared by shared-network-name and the subnet declarations. The DHCP service can serve multiple shared networks, with each shared network having 1 or more subnets. Each subnet must be present on an interface. A range can be declared inside a subnet to define a pool of dynamic addresses. Multiple ranges can be defined and can contain holes. Static mappings can be set to assign "static" addresses to clients based on their MAC address. Configuration ------------- .. cfgcmd:: set service dhcp-server shared-network-name authoritative This says that this device is the only DHCP server for this network. If other devices are trying to offer DHCP leases, this machine will send 'DHCPNAK' to any device trying to request an IP address that is not valid for this network. .. cfgcmd:: set service dhcp-server shared-network-name subnet default-router
This is a configuration parameter for the ``, saying that as part of the response, tell the client that the default gateway can be reached at `
`. .. cfgcmd:: set service dhcp-server shared-network-name subnet dns-server
This is a configuration parameter for the subnet, saying that as part of the response, tell the client that the DNS server can be found at `
`. Multiple DNS servers can be defined. .. cfgcmd:: set service dhcp-server shared-network-name subnet lease