DHCP Server Configuration
You can configure the DHCP server for IP address allocation using the following command and options.
Configuring DHCPv4 Server
The following commands and options are used to configure a 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 server configuration. It indicates the DHCP server name as 'dhcp-server1', which is the identifier for the DHCP server. The DHCP server’s IP address is specified as '172.16.0.10', and the source IP address is specified as '172.16.0.2', which is used by the DHCP server when sending out packets. The routing instance name is set as 'default', which indicates that the DHCP server is accessible through the default instance.
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
The following commands and options are used to configure a 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. It shows the DHCPv6 server name is specified as ‘dhcpv6-server1’ which is the identifier for the DHCPv6 server. The IP address is specified as '172:16::2'. The source IP address is specified as '172:16::10', which is used by the DHCPv6 server when sending out packets. The routing instance name is set as 'default'. It indicates the DHCPv6 server is accessible through the default instance.
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" } ] }