---
title: "DHCP Fixed Address"
canonical: "https://docs.infoblox.com/space/niosmodulesansible/45973640/DHCP%20Fixed%20Address"
format: markdown
---
<span style="color: #000000">Use the </span>`nios_fixed_address`<span style="color: #000000"> module to configure, update, or remove a DHCP fixed IP address object from a NIOS Grid. A fixed address is a specific IP address that a DHCP server always assigns when a lease request comes from a particular MAC address of the client. The module supports configuring IPv4 and IPv6 addresses.</span>

<span style="color: #000000">The following table describes the parameters you can define in the </span>`nios_fixed_address`<span style="color: #000000"> module:</span>

| <span style="color: #000000">**Parameter**</span> | <span style="color: #000000">**Required/Optional**</span> | <span style="color: #000000">**Description**</span> |
| --- | --- | --- |
| `name` | <span style="color: #000000">Required</span> | <span style="color: #000000">Specifies the host name with which the DHCP fixed IP address is stored for a particular MAC address.</span> |
| `ip_addr` | <span style="color: #000000">Required</span> | <span style="color: #000000">Specifies the IPv6 or IPv4 address of the fixed address.</span> |
| `mac` | <span style="color: #000000">Required</span> | <span style="color: #000000">Required for specifying an IPv4 address.</span>  
<span style="color: #000000">It specifies the MAC address of the IPv4 interface.</span> |
| `duid` | <span style="color: #000000">Required</span> | <span style="color: #000000">Required for specifying an IPv6 address.</span>  
<span style="color: #000000">It specifies the DUID address of the IPv6 interface.</span> |
| `network` | <span style="color: #000000">Optional</span> | <span style="color: #000000">Specifies the network range in which the specified IP address exists.</span> |
| `network_view` | <span style="color: #000000">Optional</span> | <span style="color: #000000">Specifies the name of the network view to associate with this object instance.</span>  
<span style="color: #000000">When a value is not specified, the default network view from NIOS is used.</span> |
| `options` | <span style="color: #000000">Optional</span> | <span style="color: #000000">Defines the set of DHCP options to be included as part of</span>  
<span style="color: #000000">the configured network instance.</span>  
<span style="color: #000000">This argument accepts a list of values (subparameters). When configuring the subparameters, you must define </span>`name`<span style="color: #000000">, </span>`num`<span style="color: #000000">, or both.</span><br>- `name`<span style="color: #000000">: The name of the DHCP option to configure.</span>
- `num`<span style="color: #000000">: The number of the DHCP option to configure.</span>
- `value`<span style="color: #000000"> (required): The value of the DHCP option specified by the </span>`name`<span style="color: #000000"> subparameter.</span>
- `use_option`<span style="color: #000000">: Only applies to a subset of options (see the NIOS API documentation). The default value is </span>`yes`<span style="color: #000000">.</span>
- `vendor_class`<span style="color: #000000">: The name of the space with which this DHCP option is associated.</span> |
| `extattrs` | <span style="color: #000000">Optional</span> | <span style="color: #000000">Specifies extensible attributes for the DHCP fixed address object.</span> |
| `state` | <span style="color: #000000">Optional</span> | <span style="color: #000000">Specifies the state of the DHCP fixed address instance in NIOS.</span>  
<span style="color: #000000">Set one of the following values:</span><br>- `present`<span style="color: #000000"> (default): Configures the object.</span>
- `absent`<span style="color: #000000">: Removes the object.</span> |
| `comment` | <span style="color: #000000">Optional</span> | <span style="color: #000000">Describes the DHCP fixed IP address object.</span> |
| `provider` | <span style="color: #000000">Required</span> | <span style="color: #000000">Defines the details of the connection:</span><br>- `host`<span style="color: #000000">: DNS host name or IP address to connect to the remote instance of NIOS.</span>
- `username`<span style="color: #000000">: User name to use for authenticating the connection to the remote instance.</span>
- `password`<span style="color: #000000">: Password to use for authenticating the connection to the remote instance.</span><br><span style="color: #000000">For information on additional fields you can define, see </span>the list of subparameters in the list of subparameters in the *[NIOS Modules for Ansible Collections](https://infoblox-docs.atlassian.net/wiki/spaces/niosmodulesansible/pages/44525470)*. |
| `connection` | <span style="color: #000000">Required</span> | <span style="color: #000000">The </span>`nios_fixed_address`<span style="color: #000000"> module must be run locally.</span> |

## <span style="color: #000000">Examples</span>

`name: Configure an ipv4 dhcp fixed address`  
`infoblox.nios_modules.nios_fixed_address:`  
`  name: ipv4_fixed`  
`  ipaddr: 192.168.10.1`  
`  mac: 08:6d:41:e8:fd:e8`  
`  network: 192.168.10.0/24`  
`  network_view: default`  
`  comment: this is a test comment`  
`  state: present`  
`  provider:`  
`    host: <nios_hostname_or_hostip>`  
`    username: <nios_username>`  
`    password: <nios_password>`  
`connection: local`

  


`name: Configure an ipv6 dhcp fixed address`  
`infoblox.nios_modules.nios_fixed_address:`  
`  name: ipv6_fixed`  
`  ipaddr: fe80::1/10`  
`  mac: 08:6d:41:e8:fd:e8`  
`  network: fe80::/64`  
`  network_view: default`  
`  comment: this is a test comment`  
`  state: absent`  
`  provider:`  
`    host: host: <nios_hostname_or_hostip>`  
`    username: <nios_username>`  
`    password: <nios_password>`  
`connection: local`

  


`name: Set dhcp options for an ipv4 fixed address`  
`infoblox.nios_modules.nios_fixed_address:`  
`  name: ipv4_fixed`  
`  ipaddr: 192.168.10.1`  
`  mac: 08:6d:41:e8:fd:e8`  
`  network: 192.168.10.0/24`  
`  network_view: default`  
`  comment: this is a test comment`  
`  options:`  
`   - name: domain-name`  
`     value: ansible.com`  
`  state: present`  
`  provider:`  
`    host: host: <nios_hostname_or_hostip>`  
`    username: <nios_username>`  
`    password: <nios_password>`  
`connection: local`