DHCP Server Configuration

You can configure the DHCP server in a routing instance by using the following commands. The following sections provide information about both DHCPv4 server and DHCPv6 server configurations.

Configuring DHCPv4 Server

supervisor@switch: cfg> set access dhcp-server
  dhcp-server           Global DHCP server configuration

supervisor@switch: cfg> set access dhcp-server server-example
  <cr>
  address               DHCP server address
  routing-instance      Instance name from which DHCP server is reachable
  source-address        Source address used for DHCP packets

The following example shows a DHCPv4 configuration.

supervisor@switch: cfg> show config access dhcp-server
{
  "rtbrick-config:dhcp-server": [
    {
      "server-name": "dhcp-server1",
      "address": "172.16.0.10",
      "source-address": "172.16.0.2",
      "routing-instance": "default"
    }
  ]
}

Configuring DHCPv6 Server

supervisor@switch: cfg> set access dhcpv6-server dhcpv6-example
  <cr>
  address               DHCP server address
  routing-instance      Instance name from which DHCP server is reachable
  source-address        Source address used for DHCP packets

The following example shows a DHCPv6 configuration.

supervisor@switch: cfg> show config access dhcpv6-server
{
  "rtbrick-config:dhcpv6-server": [
    {
      "server-name": "dhcpv6-server1",
      "address": "172:16::2",
      "source-address": "172:16::10",
      "routing-instance": "default"
    }
  ]
}