Update A Layer 3 Interface DHCP Configuration For A Switch
PUT {{baseUrl}}/devices/:serial/switch/routing/interfaces/:interfaceId/dhcp
Update a layer 3 interface DHCP configuration for a switch #### Body Parameters Parameter|Type|Description :-------------: |:-------------: |:-------------: dhcpMode| string| The DHCP mode options for the switch interface ('dhcpDisabled', 'dhcpRelay' or 'dhcpServer') dhcpRelayServerIps| array| The DHCP relay server IPs to which DHCP packets would get relayed for the switch interface dhcpLeaseTime| string| The DHCP lease time config for the dhcp server running on switch interface ('30 minutes', '1 hour', '4 hours', '12 hours', '1 day' or '1 week') dnsNameserversOption| string| The DHCP name server option for the dhcp server running on the switch interface ('googlePublicDns', 'openDns' or 'custom') dnsCustomNameservers| array| The DHCP name server IPs when DHCP name server option is 'custom' bootOptionsEnabled| boolean| Enable DHCP boot options to provide PXE boot options configs for the dhcp server running on the switch interface bootNextServer| string| The PXE boot server IP for the DHCP server running on the switch interface bootFileName| string| The PXE boot server filename for the DHCP server running on the switch interface dhcpOptions| array| Array of DHCP options consisting of code, type and value for the DHCP server running on the switch interface reservedIpRanges| array| Array of DHCP reserved IP assignments for the DHCP server running on the switch interface fixedIpAssignments| array| Array of DHCP fixed IP assignments for the DHCP server running on the switch interface
Supports Action Batches
Resource | Operation |
---|---|
/devices/{serial}/switch/routing/interfaces/{interfaceId}/dhcp | update |
Request Body
{"dhcpMode"=>"<string>", "dhcpRelayServerIps"=>["<string>", "<string>"], "dhcpLeaseTime"=>"<string>", "dnsNameserversOption"=>"<string>", "dnsCustomNameservers"=>["<string>", "<string>"], "bootOptionsEnabled"=>"<boolean>", "bootNextServer"=>"<string>", "bootFileName"=>"<string>", "dhcpOptions"=>[{"code"=>"<string>", "type"=>"<string>", "value"=>"<string>"}, {"code"=>"<string>", "type"=>"<string>", "value"=>"<string>"}], "reservedIpRanges"=>[{"start"=>"<string>", "end"=>"<string>", "comment"=>"<string>"}, {"start"=>"<string>", "end"=>"<string>", "comment"=>"<string>"}], "fixedIpAssignments"=>[{"name"=>"<string>", "mac"=>"<string>", "ip"=>"<string>"}, {"name"=>"<string>", "mac"=>"<string>", "ip"=>"<string>"}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
X-Cisco-Meraki-API-Key | null | ||
Content-Type | string |
RESPONSES
status: OK
{"dhcpMode":"dhcpServer","dhcpLeaseTime":"1 day","dnsNameserversOption":"custom","dnsCustomNameservers":["8.8.8.8, 8.8.4.4"],"bootOptionsEnabled":true,"bootNextServer":"1.2.3.4","bootFileName":"home_boot_file","dhcpOptions":[{"code":"5","type":"text","value":"five"}],"reservedIpRanges":[{"start":"192.168.1.1","end":"192.168.1.10","comment":"A reserved IP range"}],"fixedIpAssignments":[{"mac":"22:33:44:55:66:77","name":"Cisco Meraki valued client","ip":"192.168.1.12"}]}