Infoblox::DHCP::Range - DHCP Range object.
A DHCP range defines the specified range of IP addresses in a network. A DHCP range should be added for a network so the Infoblox appliance can assign IP addresses within that specified range to DHCP clients. If the client is on a network that is assigned a DHCP range, the device distributes an available IP address from that range to the DHCP client, or to a DHCP relay agent if the request came through an agent. The DHCP range should also be assigned with a device. If devices are in a grid, the particular member serving DHCP for the DHCP range must be specified. If the server is an independent device, this device must be specified as the member that serves the DHCP range.
my $dhcp_range = Infoblox::DHCP::Range->new(
end_addr => $ipv4addr, #Required network => $network, #Optional network_view => $NetworkView, #Optional / Default is system-defined default network view start_addr => $ipv4addr, #Required always_update_dns => "true" | "false", #Optional / Default is "false" bootfile => $filename | undef, #Optional / Default is undefined bootserver => $ipv4addr | $fqdn | undef, #Optional / Default is undefined comment => $string, #Optional / Default is undefined ddns_domainname => $string | undef, #Optional / Default is undefined ddns_generate_hostname => "true" | "false", #Optional / Default is undefined deny_all_clients => "true" | "false", #Optional / Default is "false" deny_bootp => "true" | "false" | undef, #Optional / Default is undefined disable => "true" | "false", #Optional / Default is "false" email_list => [ "admin\@test.com",...] | undef, #Optional / Default is undefined enable_ddns => "true" | "false", #Optional / Default is undefined enable_dhcp_thresholds => "true" | "false", #Optional / Default is "false" enable_email_warnings => "true" | "false", #Optional / Default is "false" enable_ifmap_publishing => "true" | "false", #Optional / Default is undefined enable_known_clients_option => "true" | "false", #Optional / Default is "false" enable_snmp_warnings => "true" | "false", #Optional / Default is "false" enable_unknown_clients_option => "true" | "false", #Optional / Default is "false" exclude => [$ExclusionRange1,$ExclusionRange2,...], #Optional / Default is empty extattrs => { $string => $extattr, ... }, #Optional / Default is undefined extensible_attributes => { $string => $string | $num, $string => [ $string | $num, ... ], ... } #Optional / Default is undefined failover_assoc => $string, #Optional / Default is undefined filters => [$MAC, $RelayAgent, $Option...], #Optional / Default is empty ignore_dhcp_option_list_request => "true" | "false" | undef, #Optional / Default is undefined ignore_id => 'NONE' | 'CLIENT' | 'MACADDR', #Optional / Default is 'NONE' ignore_mac_addresses => [ "mac_addr", ... ] | undef #Optional / Default is undefined known_clients_option => "Allow" | "Deny", #Optional / Default is undefined lease_scavenge_time => $number, #Optional / Default is -1 member => $Member, #Optional / Default is undefined ms_options => [$MSOption1,$MSOption2,...], #Optional / Default is empty name => $string, #Optional / Default is undefined nextserver => $ipv4addr | $fqdn | undef, #Optional / Default is undefined options => [$Option1,$Option2,...], #Optional / Default is empty logic_filters => [ $filter_name | $filter_obj, ...], #Optional / Default is undefined override_logic_filters => "true' | 'false", #Optional / Default value is "false" override_ddns_domainname => "true" | "false", #Optional / Default value is "false" override_enable_ifmap_publishing => "true" | "false", #Optional / Default value is "false" override_lease_scavenge_time => "true" | "false", #Optional / Default value is "false" override_update_dns_on_lease_renewal => "true" | "false", #Optional / Default value is "false" override_ignore_id => "true" | "false", #Optional / Default value is "false" pxe_lease_time => $num, #Optional / Default is undefined range_high_water_mark => $num, #Optional / Default is 95 range_high_water_mark_reset => $num, #Optional / Default is 95 range_low_water_mark => $num, #Optional / Default is 0 range_low_water_mark_reset => $num, #Optional / Default is 0 recycle_leases => "true" | "false", #Optional / Default is undefined server_association_type => "NONE" | "MEMBER" | "FAILOVER" | "MS_SERVER" #Optional / Default is undefined split_member => $member, #Optional / Default is undefined split_scope_exclusion_percent => $num #Optional / Default is undefined template => $string, #Optional / Default is undefined unknown_clients_option => "Allow" | "Deny", #Optional / Default is undefined update_dns_on_lease_renewal => "true" | "false", #Optional / Default value is "false" discovery_blackout_setting => $blackout, #Optional port_control_blackout_setting => $blackout, #Optional override_blackout_setting => "true" | "false", #Optional / Default value is "false" same_port_control_discovery_blackout => "true" | "false", #Optional / Default value is "false" subscribe_settings => $subscribe_settings, #Optional / Default is undefined override_subscribe_settings => 'true' | 'false', #Optional / Default is 'false' );
You cannot set both extattrs and extensible_attributes attributes at the same time.
This section describes all the methods in an Infoblox::Session module that you can apply to a DHCP range object.
Use this method to add a DHCP range object to the Infoblox appliance. See Infoblox::Session->add() for parameters and return values.
#Construct an object my $dhcp_range = Infoblox::DHCP::Range->new( end_addr => "10.0.0.10", network => "10.0.0.0/8", start_addr => "10.0.0.1", bootfile => "bootfile1.com", bootserver => "someserver.com", comment => "add range", ddns_generate_hostname => "true", deny_all_clients => "true", deny_bootp => "true", disable => "true", enable_ddns => "true", exclude => [$exclusion_range], filters => [$filter], member => $memberdhcp, network => $nview, nextserver => "3.3.3.3", options => [$option1], pxe_lease_time => "3600", recycle_leases => "true", );
# Submit for addition my $response = $session->add( $dhcp_range );
Use this method to retrieve all the matching objects from the Infoblox appliance. See Infoblox::Session->get() for parameters and return values.
'discover_now_status' will not be returned by default, use 'return_methods' to request it if needed.
Apply the following attributes to get a specific DHCP range object:
start_addr - Optional. Starting IP address of DHCP range within the network. network_view - Optional. Network view in which the DHCP range is located. By default, all network views are searched. extattrs - Optional. A hash reference containing extensible attributes. extensible_attributes - Optional. A hash reference containing extensible attributes. failover_assoc - Optional. The name of the associated failover peer. member - Optional. The member or Microsoft server serving the range. The valid value is an Infoblox::DHCP::Member, Infoblox::DHCP::MSServer, Infoblox::Grid::Member::DHCP or Infoblox::Grid::MSServer::DHCP object. server_association_type - Optional. The server association type for the range.
my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Range", start_addr => "10.0.0.1" );
my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Range", start_addr => "10.0.0.1", network_view => "default" );
my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Range", extensible_attributes => { 'Site' => 'Santa Clara' });
Use this method to modify a DHCP range object in the Infoblox appliance. See Infoblox::Session->modify() for parameters and return values.
# Use method to modify the comment. $dhcp_range->comment("this is a modified comment"); # Submit modification my $response = $session->modify( $dhcp_range );
Use this method to remove a DHCP range object from the Infoblox appliance. See Infoblox::Session->remove() for parameters and return values.
To remove a specific object, first use get()
or search()
to retrieve the specific DHCP range object, and then submit this object for removal.
# Get the objects with the same name my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Range", start_addr => "10.0.0.1", newtork_view => "default" ); # Find the desired object from the retrieved list. my $desired_dhcp_range = $retrieved_objs[0]; # Submit for removal my $response = $session->remove( $desired_dhcp_range );
Use this method to search for DHCP range objects in the Infoblox appliance. See Infoblox::Session->search() for parameters and return values.
'discover_now_status' will not be returned by default, use 'return_methods' to request it if needed.
Apply the following attributes to search for a DHCP range object:
network - Optional. Network in CIDR format (regular expression). network_view - Optional. Network view in which the DHCP range is located. By default, all network views are searched. start_addr - Optional. IPv4 address in dotted decimal notation (regular expression). end_addr - Optional. IPv4 address in dotted decimal notation (regular expression). comment - Optional. Comment in string format (regular expression). extattrs - Optional. A hash reference containing extensible attributes. extensible_attributes - Optional. A hash reference containing extensible attributes. failover_assoc - Optional. The name of the associated failover peer. member - Optional. The member or Microsoft server serving the range. The valid value is an Infoblox::DHCP::Member, Infoblox::DHCP::MSServer, Infoblox::Grid::Member::DHCP or Infoblox::Grid::MSServer::DHCP object. server_association_type - Optional. The server association type for the range.
For more information about searching extensible attributes, see Infoblox::Grid::ExtensibleAttributeDef/Searching Extensible Attributes.
# search for DHCP range object with start address having last octet as 1 my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Range", network => "10.0.0.0/.", network_view => "default", start_addr => ".*1", comment => ".*comment" );
# search for DHCP range objects defining "Santa Clara" for "Site" extensible attribute my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Range", extensible_attributes => { 'Site' => 'Santa Clara' });
This section describes all the methods that you can use to configure and retrieve the attribute values of a DHCP range.
Use this method to set or retrieve the always_update_dns flag of a DHCP range.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
This flag only applies if the range is associated with a Microsoft (r) server. If it is set to "true", the DHCP server will always update DNS, regardless of the requests from the DHCP clients. If this flag is set to false, clients will be allowed to update DNS when they request it.
Specify "true" to set the always_update_dns flag or "false" to deactivate/unset it. The default value is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get always_update_dns my $always_update_dns = $dhcp_range->always_update_dns(); #Modify always_update_dns $dhcp_range->always_update_dns("false");
Use this method to set or retrieve a bootfile name which is the name of the file the client must download.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
This option is overridden independently from Infoblox::DHCP::Range->bootserver() and Infoblox::DHCP::Range->nextserver().
The boot file name in string format with a maximum of 128 bytes. The default value is undefined.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get bootfile my $bootfile = $dhcp_range->bootfile(); #Modify bootfile $dhcp_range->bootfile("bootfile2.com"); #Un-override bootfile $dhcp_range->bootfile(undef);
Use this method to set or retrieve a bootserver name which is the name of the server where the boot file is stored.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
This option is overridden independently from Infoblox::DHCP::Range->bootfile() and Infoblox::DHCP::Range->nextserver().
The boot server IP address or name in FQDN (Fully Qualified Domain Name) format. The FQDN consists of the host name followed by the domain name (example: abc.com). A boot server name can have a maximum of 256 bytes. The default value is undefined.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get bootserver my $bootserver = $dhcp_range->bootserver(); #Modify bootserver $dhcp_range->bootserver("anotherserver.com"); #Un-override bootserver $dhcp_range->bootserver(undef);
Use this method to set or retrieve a descriptive comment.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Desired comment in string format with a maximum of 256 bytes. The default value is undefined.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get comment my $comment = $dhcp_range->comment(); #Modify comment $dhcp_range->comment("Modifying the DHCP range comment");
Use this method to set or retrieve cloud API related information for the Infoblox::DHCP::Range object.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is a Infoblox::Grid::CloudAPI::Info object.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
# Get cloud_info my $cloud_info = $dhcp_range->cloud_info(); # Modify cloud_info $dhcp_range->cloud_info($cloud_info_object);
Use this method to set or retrieve the ddns_domainname value of a DHCP Range object.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Setting this method to a defined value implicitly sets the override_ddns_domainname method to "true". Setting the parameter to undefined causes the appliance to use the grid default and automatically resets the override_ddns_domainname attribute to "false".
Note that when ddns_domainname is set to a defined value and override_dddns_domainname is set to "false", the last operation takes precedence. Thus the sequence $object->ddns_domainname("testdomain"); $object->override_ddns_domainname("false"); will set override_ddns_domainname to "false", and the sequence $object->override_ddns_domainname("false"); $object->ddns_domainname("testdomain"); will result in override_ddns_domainname="true".
The dynamic DNS domain name in string format.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get ddns_domainname my $ddns_domainname = $dhcp_range->ddns_domainname(); #Modify ddns_domainname $dhcp_range->ddns_domainname("test_domain.com");
Use this method to set or retrieve the ddns_generate_hostname flag of a DHCP range.
Enable this method to allow only the DHCP server to generate a hostname.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify "true" to set the ddns_generate_hostname flag or "false" to deactivate/unset it. The default value is undefined.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get ddns_generate_hostname my $ddns_generate_hostname = $dhcp_range->ddns_generate_hostname(); #Modify ddns_generate_hostname $dhcp_range->ddns_generate_hostname("false");
Use this method to set or retrieve the deny_all_clients flag of a DHCP range.
Enable this method to deny all lease requests for the DHCP range.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify "true" to set the deny_all_clients flag or "false" to deactivate/unset it. The default value for this field is false.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get deny_all_clients my $deny_all_clients = $dhcp_range->deny_all_clients(); #Modify deny_all_clients $dhcp_range->deny_all_clients("false");
Use this method to set or retrieve the deny_bootp flag of a DHCP range.
Enable this method to deny all BOOTP requests.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify "true" to set the deny_bootp flag or "false" to deactivate/unset it. The default value is false which indicates that this attribute inherit the upper-level setting.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get deny_bootp my $deny_bootp = $dhcp_range->deny_bootp(); #Modify deny_bootp $dhcp_range->deny_bootp("false");
Use this method to set or retrieve the disable flag of a DHCP range.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify "true" to set the disable flag or "false" to deactivate/unset it. The default value for this field is false.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get disable my $disable = $dhcp_range->disable(); #Modify disable $dhcp_range->disable("false");
Use this method to set or retrieve the discovery_basic_poll_setting value of a DHCP Range.
Include the specified parameter to set the attribute value.
The valid value is object of the Infoblox::Grid::Discovery::BasicPollSettings manpage.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get discovery_basic_poll_setting my $discovery_basic_poll_setting = $dhcp_range->discovery_basic_poll_setting(); #Modify discovery_basic_poll_setting $dhcp_range->discovery_basic_poll_setting($poll_setting);
Use this method to set or retrieve the discovery_member value of a DHCP Range.
The discovery member name in string format.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get discovery_member my $discovery_member = $dhcp_range->discovery_member(); #Modify discovery_member $dhcp_range->discovery_member("test.localdomain");
Use this method to retrieve the current discovery status. This attribute is read-only.
'discover_now_status' will not be returned by default, use 'return_methods' to request it if needed.
None.
The method returns the attribute value that can be 'COMPLETE', 'FAILED', 'NONE', 'PENDING' or 'RUNNING'.
#Get discover_now_status my $discover_now_status = $dhcp_range->discover_now_status();
Use this method to set or retrieve the discovery blackout setting.
Setting this method to a defined value implicitly sets the override_blackout_setting method to "true". If port_control_blackout_setting is undefined, setting the parameter to undefined causes the appliance to use the grid default and automatically resets the override_blackout_setting attribute to "false".
Note that when discovery_blackout_setting is set to a defined value and override_blackout_setting is set to "false", the last operation takes precedence. Thus the sequence $network->discovery_blackout_setting($blackout); $network->override_blackout_setting("false"); will set override_blackout_setting to "false", and the sequence $network->override_blackout_setting("false"); $network->discovery_blackout_setting($blackout); will result in override_blackout_setting="true".
Valid value is an Infoblox::Grid::Discovery::Properties::BlackoutSetting object.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get discovery_blackout_setting my $discovery_blackout_setting = $dhcp_range->discovery_blackout_setting(); #Modify discovery_blackout_setting $dhcp_range->discovery_blackout_setting($blackout);
Use this method to set or retrieve the enable_discovery value of a DHCP Range. This setting overrides the member level settings.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Setting this method to a defined value implicitly sets the override_enable_discovery method to "true". Setting the parameter to undefined causes the appliance to use the default from the upper level and automatically resets the override_enable_discovery attribute to "false".
Enable this flag if you want to set discovery for this object.
Specify "true" to set the enable_discovery flag or "false" to deactivate/unset it. The default value is undefined.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get enable_discovery my $enable_discovery = $dhcp_range->enable_discovery(); #Modify enable_discovery $dhcp_range->enable_discovery("false");
Use this method to set or retrieve enable_immediate_discovery value of a DHCP Range.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify "true" to set the enable_immediate_discovery flag or "false" to deactivate/unset it. The default value is undefined.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get enable_immediate_discovery my $enable_immediate_discovery = $dhcp_range->enable_immediate_discovery(); #Modify enable_immediate_discovery $dhcp_range->enable_immediate_discovery("false");
Use this method to set or retrieve the email list to which the appliance sends notifications when DHCP address usage for the grid crosses a threshold.
If you enter email addresses in the email_list, then the appliance sends DHCP threshold alarms to the email addresses.
The valid value is an array reference that contains string objects.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get email_list my @email_list = $range->email_list(); #Modify email_list $range->email_list( [ "admin\@test.com" ] );
Use this method to set or retrieve the enable_ddns flag of a DHCP range.
Enable this method to allow dynamic DNS updates.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify "true" to set the enable_ddns flag or "false" to deactivate/unset it. The default value is undefined.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get enable_ddns my $enable_ddns = $dhcp_range->enable_ddns(); #Modify enable_ddns $dhcp_range->enable_ddns("false");
Use this method to set or retrieve DHCP thresholds at the DHCP address range level. These thresholds are the high and low watermarks. If DHCP range usage goes above or below these percentage values, the Infoblox appliance generates a syslog message and sends an SNMP trap, if configured.
Enable this flag to set DHCP threshold values.
Specify "true" to set the enable_dhcp_thresholds flag or "false" to deactivate/unset it. The default value is undefined.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get enable_dhcp_thresholds my $enable_dhcp_thresholds = $range->enable_dhcp_thresholds(); #Modify enable_dhcp_thresholds $range->enable_dhcp_thresholds("false");
Use this method to set or retrieve the ifmap publishing option of a DHCP Range object. This setting overrides the member level settings.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify "true" to set ifmap publishing option or "false" to deactivate/unset it. The default value is 'false', which indicates that this attribute inherits the member level setting.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
# Get enable ifmap publishing my $enable_ifmap_publishing = $dhcp_range->enable_ifmap_publishing() # Modify enable_ifmap_publishing $dhcp_range->enable_ifmap_publishing("true"); # Un-override enable_ifmap_publishing $dhcp_range->enable_ifmap_publishing(undef);
Use this method to enable the appliance to send email notifications when DHCP address usage crosses a high or low watermark threshold.
Enable this flag if you want the appliance to send DHCP threshold warnings to the "email_list" provided when DHCP threshold is enabled.
Specify "true" to set the enable_email_warnings flag or "false" to deactivate/unset it. The default value is undefined.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get enable_email_warnings my $enable_email_warnings = $range->enable_email_warnings(); #Modify enable_email_warnings $range->enable_email_warnings("false");
Use this method to set or retrieve the enable_known_clients_option flag of a DHCP range.
You must set the enable_known_clients_option flag to true in order to use the known_clients_option attribute.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify "true" to set the enable_known_clients_option flag or "false" to deactivate/unset it. The default value is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get enable_known_clients_option my $enable_known_clients_option = $dhcp_range->enable_known_clients_option(); #Modify enable_known_clients_option $dhcp_range->enable_known_clients_option("false");
Use this method to enable the appliance to send an SNMP trap when DHCP address usage crosses a watermark threshold.
If the flag is enabled, then the appliance sends SNMP traps when DHCP address usage crosses a watermark threshold when DHCP threshold is enabled.
Specify "true" to set the enable_snmp_warnings flag or "false" to deactivate/unset it. The default value is undefined.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get enable_snmp_warnings my $enable_snmp_warnings = $range->enable_snmp_warnings(); #Modify enable_snmp_warnings $range->enable_snmp_warnings("false");
Use this method to set or retrieve the enable_unknown_clients_option flag of a DHCP range.
You must set the enable_unknown_clients_option flag to true in order to use the unknown_clients_option attribute.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify "true" to set the enable_unknown_clients_option flag or "false" to deactivate/unset it. The default value is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get enable_unknown_clients_option my $enable_unknown_clients_option = $dhcp_range->enable_unknown_clients_option(); #Modify enable_unknown_clients_option $dhcp_range->enable_unknown_clients_option("false");
Use this method to set or retrieve the end address of the DHCP range.
An end address is the last IP address in the DHCP range available for the clients.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify the end address of the DHCP range in IPv4 address format. An IPv4 address is a 32-bit number in dotted decimal notation. It consists of four 8-bit groups of decimal digits separated by decimal points (example: 192.168.1.2).
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get end_addr my $end_addr = $dhcp_range->end_addr(); #Modify end_addr $dhcp_range->end_addr("10.0.0.20");
Use this method to retrieve the list of endpoints that provide object data. This is a read-only attribute.
Omit the parameter to retrieve the attribute value.
None
The valid return value is an array of Infoblox::CiscoISE::Endpoint objects.
#Get endpoint_sources value my $endpoint_sources = $object->endpoint_sources();
Use this method to set or retrieve the exclusion range of IP addresses in the DHCP range which should not be assigned to clients.
If static addresses in the middle of an DHCP range are assigned to certain hosts, those addresses can be excluded from the DHCP range using this method.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Valid value is an array reference that contains defined Infoblox::DHCP::ExclusionRange objects. The default value is empty.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get exclude my $ref_exclude = $dhcp_range->exclude(); #Modify exclude $dhcp_range->exclude([$exl1]); #$exl1 is an Infoblox::DHCP::ExclusionRange object
Use this method to set or retrieve the extensible attributes associated with a DHCP range object.
Valid value is a hash reference containing the names of extensible attributes and their associated values ( Infoblox::Grid::Extattr objects ).
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get extattrs my $ref_extattrs = $dhcp_range->extattrs(); #Modify extattrs $dhcp_range->extattrs({ 'Site' => $extattr1, 'Administrator' => $extattr2 });
Use this method to set or retrieve the extensible attributes associated with a DHCP range object
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
For valid values for extensible attributes, see Infoblox::Grid::ExtensibleAttributeDef/Extensible Attribute Values.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get extensible attributes my $ref_extensible_attributes = $dhcp_range->extensible_attributes(); #Modify extensible attributes $dhcp_range->extensible_attributes({ 'Site' => 'Santa Clara', 'Administrator' => [ 'Peter', 'Tom' ] });
Use this method to set or retrieve the failover peer association name of the DHCP range.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
If the attribute is set, the server_association_type attribute will also be set to "FAILOVER" if the name is defined, or to "NONE" if the member is also undefined.
Specify the failover peer association name in string format. The default value is undefined.
Use an empty string ('') to remove a failover peer association from the DHCP range. Using undef is deprecated and may be changed in the future.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get failover_assoc my $failover_assoc = $dhcp_range->failover_assoc(); #Modify failover_assoc $dhcp_range->failover_assoc("peer2"); #Remove failover_assoc (using undef for removal is deprecated) $dhcp_range->failover_assoc("");
Use this method to set or retrieve the filters of the DHCP range.
Filters are used to screen the address assignments if the addresses in the DHCP range needs to be assigned to specific hosts.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Valid value is an array reference that contains defined Infoblox::DHCP::FilterRule::MAC, Infoblox::DHCP::FilterRule::NAC, Infoblox::DHCP::FilterRule::RelayAgent, Infoblox::DHCP::FilterRule::Option, Infoblox::DHCP::FilterRule::Fingerprint objects. The default value is empty.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get filters my $ref_filters = $dhcp_range->filters(); #Modify filters $dhcp_range->filters([$exl1]); #$exl1 is an Infoblox::DHCP::FilterRule::MAC, Infoblox::DHCP::FilterRule::NAC, Infoblox::DHCP::FilterRule::RelayAgent, Infoblox::DHCP::FilterRule::Option or Infoblox::DHCP::FilterRule::Fingerprint object.
Use this method to set or retrieve the ignore_id type of a DHCP range object. Indicates whether the appliance will ignore DHCP client IDs or MAC addresses. This setting overrides the upper-level settings.
Valid values are 'NONE', 'CLIENT', or 'MACADDR'. The default is 'NONE'.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
# Get attribute value $value = $dhcp_range->ignore_id(); # Modify attribute value $dhcp_range->ignore_id('CLIENT'); #Un-override ignore_id $dhcp_range->ignore_id(undef);
Use this method to set or retrieve the ignore_mac_addresses list of a DHCP range object. A list of MAC addresses the appliance will ignore. This setting overrides the upper-level settings.
If you enter MAC addresses in the ignore_mac_addresses, then the appliance will ignore them. If you enter empty array, then the appliance will ignore any MAC address.
The valid value is an array reference that contains string objects.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
# Get attribute value $value = $dhcp_range->ignore_mac_addresses(); # Modify attribute value $dhcp_range->ignore_mac_addresses(["11::11::11::11::11::11"]);
Use this method to retrieve the is_split_scope flag of the DHCP range. This flag is "true" when the range is part of a split scope.
None
The method returns the attribute value.
#Get is_split_scope my $is_split_scope = $dhcp_range->is_split_scope();
Use this method to set or retrieve the known_clients_option option of a DHCP range.
Set this option to "Allow" or "Deny" to allow or prevent the allocation of an IP address from this pool to any client that has a host declaration.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify "Allow" or "Deny" to set the known_clients_option flag value. The default value is undefined.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get known_clients_option my $known_clients_option = $dhcp_range->known_clients_option(); #Modify known_clients_option $dhcp_range->known_clients_option("Deny");
Use this method to set or retrieve the lease_scavenge_time value of a DHCP Range object.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Setting this method to a defined value implicitly sets the override_lease_scavenge_time method to "true". Setting the parameter to undefined causes the appliance to use the default from the upper level and automatically resets the override_lease_scavenge_time attribute to "false".
Note that when lease_scavenge_time is set to a defined value and override_lease_scavenge_time is set to "false", the last operation takes precedence. Thus the sequence $object->lease_scavenge_time(604800); $object->override_lease_scavenge_time("false"); will set override_lease_scavenge_time to "false", and the sequence $object->override_lease_scavenge_time("false"); $object->lease_scavenge_time(604800); will result in override_lease_scavenge_time="true".
An integer that specifies the period of time, in seconds, that free and backup leases remain in the database before they are automatically deleted. To disable lease scavenging, set the parameter to -1. The minimum positive value must be greater than 86400 seconds (1 day). The default value of this parameter is -1, which means that lease scavenging is disabled.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get lease_scavenge_time my $lease_scavenge = $dhcp_range->lease_scavenge_time(); #Modify lease_scavenge_time $dhcp_range->lease_scavenge_time(30 * 24 * 60 * 60);
Use this method to set or retrieve a descriptive name for the range.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The desired name in string format with a maximum of 256 bytes. The default value is undefined.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get name my $name = $dhcp_range->name(); #Modify name $dhcp_range->name("external");
Use this method to get the next available IP address(es)
in the DHCP range object that was retrieved. Note that to use this method, the object MUST be retrieved via a get or search call, or created with an add call.
The method accepts the following optional parameters:
requested_num - The number of IP addresses requested. It must be a value between 1 and 20, inclusive. excluded - A reference to an array of addresses to be excluded from the results.
This method returns the next available IP address(es)
in the range. If requested_num is not specified, a string with the next available address will be returned; otherwise, the method will return a reference to an array of addresses.
Within a DHCP Range object, the next available IP address(es)
are the first addresses in this range that match all of the following rules:
* Are not part of the passed 'excluded' parameter (if specified). * There is no fixed address or host address record matching this IP address * There is no unmanaged record matching this IP address * The IP address is not contained in any excluded range of this DHCP range * There is no active lease matching this IP address (Deleted leases in the recycle bin are not considered.)
# Retrieve a particular range my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Range", start_addr => "10.0.0.20" );
$dhcp_range = $retrieved_objs[0];
# Print the next available IP address in the range print $dhcp_range->next_available_ip() . "\n";
# This will retrieve the next 10 available addresses and print the first one. my $addressesref = $dhcp_range->next_available_ip(requested_num => 10); print @$addressesref[0] . "\n";
# This will retrieve the next 10 available addresses and exclude a couple. my $addressesref = $dhcp_range->next_available_ip(requested_num => 10, excluded => ["10.0.0.21", "10.0.0.22"]);
Use this method to set or retrieve the ignore_dhcp_option_list_request flag of a DHCP shared network object. If this flag is set to false all the defined DHCP options will be returned to the client. This setting overrides the upper-level settings.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify "true" to set the ignore_dhcp_option_list_request flag or "false" to deactivate/unset it. The default value is undefined which indicates that this attribute inherit the upper-level setting..
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
# Get ignore_dhcp_option_list_request my $ignore_dhcp_option_list_request = $dhcp_range->ignore_dhcp_option_list_request(); # Un-override ignore_dhcp_option_list_request $dhcp_range->ignore_dhcp_option_list_request(undef); # Modify ignore_dhcp_option_list_request $dhcp_range->ignore_dhcp_option_list_request("true");
Use this method to set or retrieve the member or Microsoft server that serves the DHCP range.
The member or Microsoft server that serves DHCP for this IP address range.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
If the attribute is set, the server_association_type attribute will also be set to "MEMBER" if setting member to an Infoblox::DHCP::Member object, to "MS_SERVER" if setting member to an Infoblox::DHCP::MSServer object, or to "NONE" if failover_assoc is also empty.
The valid value is a defined Infoblox::DHCP::Member or Infoblox::DHCP::MSServer object. The default value is empty.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get member my $ref_member = $dhcp_range->member(); #Modify member $dhcp_range->member($member1); #$member is an Infoblox::DHCP::Member object
Use this method to retrieve Microsoft Active Directory users related information. This is a read-only attribute.
None
The valid return value is an Infoblox::Grid::MSServer::AdUser::Data object.
#Get ms_ad_user_data my $ms_ad_user_data = $dhcp_range->ms_ad_user_data();
Use this method to set or retrieve the Microsoft server custom DHCP options that are associated with this DHCP range.
Note: You can set only options that are included in both the Microsoft server and NIOS predefined option definitions. Options that are not common to both are read only and cannot be modified.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is an array reference that contains defined Infoblox::DHCP::MSOption objects. The default value is empty.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get options my $ref_options = $dhcp_range->ms_options(); #Modify options $dhcp_range->ms_options([$option12]); #$option12 is an Infoblox::DHCP::MSOption object
Use this method to set or retrieve the DHCP network of the address range.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify the address and netmask of network in CIDR format (example: 10.0.0.0/8).
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get network my $network = $dhcp_range->network();
Use this method to set or retrieve the network view of the DHCP range.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The default value is the "default" network view, which means the DHCP range is in the default network view.
Valid value is a defined Infoblox::DHCP::View object. The default network view value is the system-defined default network view object.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get network view my $nview = $dhcp_range->network_view(); #Modify network view, with an Infoblox::DHCP::View object $dhcp_range->network_view($nview);
Use this method to set or retrieve the nextserver IP address which is the boot file server where the boot file is stored.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
This option is overridden independently from Infoblox::DHCP::Range->bootfile() and Infoblox::DHCP::Range->bootserver().
The next server IP address or name in FQDN (Fully Qualified Domain Name) format. The FQDN consists of the host name followed by the domain name (example: abc.com). A next server name can have a maximum of 256 bytes. The default value is undefined.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get nextserver my $nextserver = $dhcp_range->nextserver(); #Modify nextserver $dhcp_range->nextserver("4.4.4.4"); #Un-override nextserver $dhcp_range->nextserver(undef);
Use this method to set or retrieve the options of the DHCP range.
DHCP options describe network configuration settings and various services available on the network. Setting the DHCP options for the DHCP range overrides the options set at the network level.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Valid value is an array reference that contains defined Infoblox::DHCP::Option objects. The default value is empty.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get options my $ref_options = $dhcp_range->options(); #Modify options $dhcp_range->options([$option12]); #$option12 is an Infoblox::DHCP::Option object
Use this method to set or retrieve all the logic (ordered) filters associated with the DHCP Range.
Filters are used to screen address assignments in a DHCP Range if the addresses are to be assigned to specific hosts.
Setting this method to a defined value implicitly sets the override_logic_filters method to "true". Setting the parameter to undefined causes the appliance to use the grid default and automatically resets the override_logic_filters attribute to "false".
Note that when logic_filters is set to a defined value and override_dlogic_filters is set to "false", the last operation takes precedence. Thus the sequence $object->logic_filters($filters); $object->override_logic_filters("false"); will set override_logic_filters to "false", and the sequence $object->override_logic_filters("false"); $object->logic_filters($filters); will result in override_logic_filters="true".
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is an array reference that contains either the Infoblox::DHCP::Filter::MAC, Infoblox::DHCP::Filter::NAC, Infoblox::DHCP::Filter::Option objects or the names of the corresponding filters. The filters in the list must satisfy the following conditions:
The default value of the parameter is undefined.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get logic_filters my $ref_logic_filters = $dhcp_range->logic_filters(); #Modify logic_filters $dhcp_range->logic_filters(["filter_1","filter_2",$exl1]); #$exl1 is an Infoblox::DHCP::Filter::MAC, Infoblox::DHCP::Filter::NAC or Infoblox::DHCP::Filter::Option object.
The override_ddns_domainname attribute controls whether the ddns_domainname value in the DHCP range is used, instead of the grid default.
The override_ddns_domainname attribute can be specified explicitly. It is also set implicitly when ddns_domainname is set to a defined value.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Set the parameter to "true" to override the grid-level setting for ddns_domainname. Set the parameter to "false" to inherit the grid-level setting for ddns_domainname.
The default value of this parameter is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Getting override_ddns_domainname my $override_ddns_domainname=$dhcp_range->override_ddns_domainname( ); #Modifying override_ddns_domainname $dhcp_range->override_ddns_domainname("true");
The override_enable_ifmap_publishing controls whether the enable_ifmap_publishing in the DHCP Range is used, instead of the grid default.
The override_enable_ifmap_publishing can be specified explicitly. It is also set implicitly when enable_ifmap_publishing is set to a defined value.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Set the parameter to "true" to override the grid-level setting for enable_ifmap_publishing. Set the parameter to "false" to inherit the grid-level setting for enable_ifmap_publishing.
The default value of this parameter is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Getting override_enable_ifmap_publishing my $override_enable_ifmap_publishing=$dhcp_range->override_enable_ifmap_publishing( ); #Modifying override_enable_ifmap_publishing $dhcp_range->override_enable_ifmap_publishing("true");
The override_blackout_setting attribute controls whether the discovery_blackout_setting and port_control_blackout_setting values in the object are used, instead of the grid default.
The override_blackout_setting attribute can be specified explicitly. It is also set implicitly when discovery_blackout_setting or port_control_blackout_setting is set to a defined value.
Specify "true" to set the override_blackout_setting flag or "false" to deactivate/unset it. The default value is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
# Get attribute value my $value = $dhcp_range->override_blackout_setting(); # Modify attribute value $dhcp_range->override_blackout_setting('true');
The override_ignore_id controls whether the ignore_id in the DHCP Range is used, instead of the upper-level default.
The override_ignore_id can be specified explicitly. It is also set implicitly when ignore_id is set to a defined value.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Set the parameter to "true" to override the upper-level setting for ignore_id and ignore_mac_addresses. Set the parameter to "false" to inherit the upper-level setting for ignore_id and ignore_mac_addresses.
The default value of this parameter is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get attrubute value my $value=$dhcp_range->override_ignore_id(); #Modifying attribute value $dhcp_range->override_ignore_id('true');
The override_lease_scavenge_time attribute controls whether the lease_scavenge_time value in the DHCP range is used, instead of the upper-level default.
The override_lease_scavenge_time attribute can be specified explicitly. It is also set implicitly when lease_scavenge_time is set to a defined value.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Set the parameter to "true" to override the upper-level setting for lease_scavenge_time. Set the parameter to "false" to inherit the setting for lease_scavenge_time from the upper level.
The default value of this parameter is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Getting override_lease_scavenge_time my $override_lease_scavenge_time=$dhcp_range->override_lease_scavenge_time( ); #Modifying override_lease_scavenge_time $dhcp_range->override_lease_scavenge_time("true");
The override_logic_filters attribute controls whether the logic_filters value in the DHCP Range is used, instead of the Grid default.
The override_logic_filters attribute can be specified explicitly. It is also set implicitly when logic_filters is set to a defined value.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Set the parameter to "true" to override the Grid-level setting for logic_filters. Set the parameter to "false" to inherit the Grid-level setting for logic_filters.
The default value of this parameter is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Getting override_logic_filters my $override_logic_filters=$dhcp_range->override_logic_filters( ); #Modifying override_logic_filters $dhcp_range->override_logic_filters("true");
The override_subscribe_settings attribute controls whether the subscribe_settings method values of the member are used, instead of the Grid default.
The override_subscribe_settings attribute can be specified explicitly. It is also set implicitly when subscribe_settings is set to a defined value.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Set the parameter to "true" to override the Grid-level setting for subscribe_settings. Set the parameter to "false" to inherit the Grid-level setting for subscribe_settings.
The default value of this parameter is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get override_subscribe_settings value my $override_subscribe_settings = $object->override_subscribe_settings( ); #Modify override_subscribe_settings value $object->override_subscribe_settings("true");
The override_update_dns_on_lease_renewal attribute controls whether the update_dns_on_lease_renewal value in the DHCP range is used, instead of the grid default.
The override_update_dns_on_lease_renewal attribute can be specified explicitly. It is also set implicitly when update_dns_on_lease_renewal is set to a defined value.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Set the parameter to "true" to override the grid-level setting for update_dns_on_lease_renewal. Set the parameter to "false" to inherit the grid-level setting for update_dns_on_lease_renewal.
The default value of this parameter is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Getting override_update_dns_on_lease_renewal my $override_update_dns_on_lease_renewal=$dhcp_range->override_update_dns_on_lease_renewal( ); #Modifying override_update_dns_on_lease_renewal $dhcp_range->override_update_dns_on_lease_renewal("true");
Use this method to set or retrieve the port control blackout setting.
Setting this method to a defined value implicitly sets the override_blackout_setting method to "true". If discovery_blackout_setting is undefined, setting the parameter to undefined causes the appliance to use the grid default and automatically resets the override_blackout_setting attribute to "false".
Note that when port_control_blackout_setting is set to a defined value and override_blackout_setting is set to "false", the last operation takes precedence. Thus the sequence $network->port_control_blackout_setting($blackout); $network->override_blackout_setting("false"); will set override_blackout_setting to "false", and the sequence $network->override_blackout_setting("false"); $network->port_control_blackout_setting($blackout); will result in override_blackout_setting="true".
Valid value is an Infoblox::Grid::Discovery::Properties::BlackoutSetting object.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get port_control_blackout_setting my $port_control_blackout_setting = $dhcp_range->port_control_blackout_setting(); #Modify port_control_blackout_setting $dhcp_range->port_control_blackout_setting($blackout);
Use this method to set or retrieve PXE Lease Time value of the DHCP range.
The Preboot Execution Environment Lease Time value is used by some hosts to boot remotely from a server.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
A 32-bit integer (range from 0 to 4294967295) represents the duration in seconds that the record is cached. Zero indicates that the record should not be cached. The default value is undefined.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get pxe_lease_time my $pxe_lease_time = $dhcp_range->pxe_lease_time(); #Modify pxe_lease_time $dhcp_range->pxe_lease_time("7200");
Use this method to set or retrieve the range_high_water_mark value. If the percentage of allocated addresses exceeds this value, an SNMP trap is sent, unless this is a range served by a Microsoft server.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
A number that specifies the percentage of allocated addresses. The range is from 1 to 100. The high watermark value must be greater than the low watermark value. The default value is 95.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get range_high_water_mark my $range_high_water_mark = $range->range_high_water_mark(); #Modify range_high_water_mark $range->range_high_water_mark(80);
Use this method to set or retrieve the range_high_water_mark_reset value. If the percentage of allocated addresses drops below this value, a corresponding SNMP trap is reset.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
A number that specifies the percentage of allocated addresses. The range is from 1 to 100. The high watermark reset value must be lower than the high watermark value. The default value is 85.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get range_high_water_mark_reset my $range_high_water_mark_reset = $range->range_high_water_mark_reset(); #Modify range_high_water_mark_reset $range->range_high_water_mark_reset(70);
Use this method to set or retrieve the range_low_water_mark value. If the percentage of allocated addresses drops below this watermark, an SNMP trap is sent, unless this is a range served by a Microsoft server.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
A number that specifies the percentage of allocated addresses. The range is from 1 to 100. The low watermark value must be lower than the high watermark value. The default low watermark number is 0.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get range_low_water_mark my $range_low_water_mark = $range->range_low_water_mark(); #Modify range_low_water_mark $range->range_low_water_mark(10);
Use this method to set or retrieve the range_low_water_mark_reset value. If the percentage of allocated addresses exceeds this value, a corresponding SNMP trap is reset.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
A number that specifies the percentage of allocated addresses. The range is from 1 to 100. The low watermark reset value must be higher than the low watermark value. The default low watermark reset number is 0.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get range_low_water_mark_reset my $range_low_water_mark_reset = $range->range_low_water_mark_reset(); #Modify range_low_water_mark_reset $range->range_low_water_mark_reset(10);
Use this method to set the flag that indicates whether DHCP service should be restarted on a member that is serving DHCP for the changed object referenced in a cloud API request.
Specify true to restart the DHCP service.
None
# Modify $network->restart_if_needed('true');
Use this method to set or retrieve the recycle_leases flag of the DHCP range.
If the flag is enabled, the leases are kept in recycle bin until one week after expiration. When the flag is disabled, the leases are irrecoverably deleted.
Specify "true" to set the recycle_leases flag or "false" to deactivate/unset it. The default value is undefined.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get recycle_leases my $recycle_leases = $dhcp_range->recycle_leases(); #Modify recycle_leases $dhcp_range->recycle_leases("false");
Use this method to set or retrieve the flag that enables using the same discovery blackout for port control blackout.
Specify 'true' to use same discovery blackout for port control blackout or 'false' to disable it. The default value is 'false'.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
# Get attribute value my $value = $dhcp_range->same_port_control_discovery_blackout(); # Modify attribute value $dhcp_range->same_port_control_discovery_blackout('true');
Use this method to set or retrieve the DHCP range server association type.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The server_association_type attribute can be specified explicitly. It is also set implicitly when member or failover_assoc are set.
Valid values are "NONE", "FAILOVER", "MS_SERVER" and "MEMBER".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get server_association_type my $server_association_type = $dhcp_range->server_association_type(); #Modify server_association_type $dhcp_range->server_association_type("MEMBER");
Use this method to set the address or FQDN of the Microsoft server that is serving the split scope. Note that this method applies only when the range is first added.
Include the specified parameter to set the attribute value.
The valid value is a defined Infoblox::DHCP::MSServer object. The default value is empty.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
#Set split_member prior to the range insertion $dhcp_range->split_member($member); #$member is an Infoblox::DHCP::Member object
Use this method to set the percentage for the split scope exclusion. For example, if this is set to 40, then 60% of the range will be assigned to the Microsoft server specified in split_member. Note this method has an effect only when the range is first added.
Include the specified parameter to set the attribute value.
An unsigned integer between 1 and 99. The default is undefined.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
#Set split_scope_exclusion_percent prior to the range insertion $dhcp_range->split_scope_exclusion_percent(35);
Use this method to set or retrieve the start address of the DHCP range.
A start address is the first IP address in the DHCP range available for the clients.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify the start address of the DHCP range in IPv4 address format. An IPv4 address is a 32-bit number in dotted decimal notation. It consists of four 8-bit groups of decimal digits separated by decimal points (example: 192.168.1.2).
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get start_addr my $start_addr = $dhcp_range->start_addr(); #Modify start_addr $dhcp_range->start_addr("10.0.0.2");
Use this method to set or retrieve the Cisco ISE subscribe settings.
Setting this method to a defined value implicitly sets the override_subscribe_settings method to "true". Setting the parameter to undefined causes the appliance to use the Cisco ISE endpoint default and automatically resets the override_subscribe_settings method to "false".
Note that when subscribe_settings is set to a defined value and override_subscribe_settings is set to "false", the last operation takes precedence. Thus the sequence $object->subscribe_settings($value); $object->override_subscribe_settings("false"); will set override_subscribe_settings to "false", and the sequence $object->override_subscribe_settings("false"); $object->subscribe_settings($value); will result in override_subscribe_settings="true".
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is an Infoblox::CiscoISE::SubscribeSetting object.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get subscribe_settings value my $subscribe_settings = $object->subscribe_settings(); #Modify subscribe_settings value $object->subscribe_settings($settings);
Use this method to set or retrieve the DHCP range template name for a DHCP Range object.
Template is the name of a DHCP range template which will be used to create the DHCP range.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid name in sting format.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
The template parameter can be used to only add a new DHCP range and cannot be used during object modify or returned during object get.
If you did not specify a parameter, the method returns the attribute value.
#Get template my $template = $dhcp_range->template(); #Modify template $dhcp_range->template("Template_Name");
Use this method to set or retrieve the unknown_clients_option option of a DHCP range.
Set this option to "Allow" or "Deny" to allow or prevent the allocation of an IP address from this pool to any client that has no host declaration.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify "Allow" or "Deny" to set the unknown_clients_option flag value. The default value is undefined.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get unknown_clients_option my $unknown_clients_option = $dhcp_range->unknown_clients_option(); #Modify unknown_clients_option $dhcp_range->unknown_clients_option("Deny");
The update_dns_on_lease_renewal attribute controls whether the DHCP server updates DNS when a DHCP lease is renewed.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Setting this method to a defined value implicitly sets the override_update_dns_on_lease_renewal method to "true". Setting the parameter to undefined causes the appliance to use the grid default and automatically resets the override_update_dns_on_lease_renewal attribute to "false".
Note that when update_dns_on_lease_renewal is set to a defined value and override_update_dns_on_lease_renewal is set to "false", the last operation takes precedence. Thus the sequence $object->update_dns_on_lease_renewal("true"); $object->override_update_dns_on_lease_renewal("false"); will set override_update_dns_on_lease_renewal to "false", and the sequence $object->override_update_dns_on_lease_renewal("false"); $object->update_dns_on_lease_renewal("true"); will result in override_update_dns_on_lease_renewal="true".
Specify "true" to set the update_dns_on_lease_renewal flag or "false" to deactivate/unset it.
The default value of this parameter is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get update_dns_on_lease_renewal my $update_dns_on_lease_renewal=$dhcp_range->update_dns_on_lease_renewal( ); #Modify update_dns_on_lease_renewal $dhcp_range->update_dns_on_lease_renewal("true");
The following sample code demonstrates the different functions that can be applied to a DHCP range object, such as add, search, modify, and remove. This sample also includes error handling for the operations.
#Preparation prior to a DHCP Range object insertion
#PROGRAM STARTS: Include all the modules that will be used use strict; use Infoblox;
#Create a session to the Infoblox appliance my $session = Infoblox::Session->new( master => "192.168.1.2", #appliance host ip username => "admin", #appliance user login password => "infoblox" #appliance password ); unless ($session) { die("Construct session failed: ", Infoblox::status_code() . ":" . Infoblox::status_detail()); } print "Session created successfully\n";
#Create a DHCP Member object my $memberdhcp = Infoblox::DHCP::Member->new( name => "infoblox.localdomain", ipv4addr => "192.168.1.2" ); unless($memberdhcp) { die("Construct member failed: ", Infoblox::status_code() . ":" . Infoblox::status_detail()); } print "DHCP Member object created successfully\n";
#Create the Network object with the member my $network = Infoblox::DHCP::Network->new( network => "10.0.0.0/8", comment => "add network", members => [ $memberdhcp ] ); unless($network) { die("Construct Network object failed: ", Infoblox::status_code() . ":" . Infoblox::status_detail()); } print "Network object created successfully\n";
#Add the Network object into the Infoblox appliance through a session $session->add($network) or die("Add Network object failed: ", $session->status_code() . ":" . $session->status_detail()); print "Network object added to Infoblox appliance successfully\n";
#Create the Mac Filter object my $mac_filter = Infoblox::DHCP::Filter::MAC->new( "name" => "filter1", "comment" => "5 minutes" );
unless($mac_filter) { die("Construct Mac Filter object failed: ", Infoblox::status_code() . ":" . Infoblox::status_detail()); } print "Mac Filter object created successfully\n";
#Add the Mac Filter object into the Infoblox appliance through a session $session->add($mac_filter) or die("Add Mac Filter object failed: ", $session->status_code() . ":" . $session->status_detail()); print "Mac Filter object added to Infoblox appliance successfully\n";
#Construct Custom Option object my $option1 = Infoblox::DHCP::Option->new( type => "1", value => "255.0.0.0", );
#Construct DHCP Mac Filter rule object my $filter = Infoblox::DHCP::FilterRule::MAC->new( filter_name => "filter1", permission => "grant" );
#Construct exclusion range object my $exclusion_range = Infoblox::DHCP::ExclusionRange->new( start_address => "10.0.0.5", end_address => "10.0.0.7", comment => "Excluded range" );
#Create a DHCP Range object
my $dhcp_range = Infoblox::DHCP::Range->new( end_addr => "10.0.0.10", network => "10.0.0.0/8", start_addr => "10.0.0.1", bootfile => "bootfile1.com", bootserver => "someserver.com", comment => "add range", ddns_generate_hostname => "true", deny_all_clients => "true", deny_bootp => "true", disable => "true", enable_ddns => "true", exclude => [$exclusion_range], filters => [$filter], member => $memberdhcp, nextserver => "3.3.3.3", options => [$option1], pxe_lease_time => "3600", recycle_leases => "true", ); unless($dhcp_range) { die("Construct DHCP Range object failed: ", Infoblox::status_code() . ":" . Infoblox::status_detail()); } print "DHCP Range object created successfully\n";
#Add the DHCP Range object into the Infoblox appliance through a session $session->add($dhcp_range) or die("Add DHCP Range object failed: ", $session->status_code() . ":" . $session->status_detail()); print "DHCP Range object added to the network successfully\n";
#Create a DHCP Range object using a template
my $dhcp_range_template = Infoblox::DHCP::RangeTemplate->new( name => "custom_range_template", offset => "10", number_of_addresses => "10", ); unless($dhcp_range_template) { die("Construct DHCP Range template object failed: ", Infoblox::status_code() . ":" . Infoblox::status_detail()); } print "DHCP Range template object created successfully\n";
#Add the DHCP Range template object into the Infoblox appliance through a session $session->add($dhcp_range_template) or die("Add DHCP Range template object failed: ", $session->status_code() . ":" . $session->status_detail()); print "DHCP Range template object added to the network successfully\n";
my $dhcp_range = Infoblox::DHCP::Range->new( start_addr => "10.0.0.11", end_addr => "10.0.0.15", network => "10.0.0.0/8", template => "custom_range_template" ); unless($dhcp_range) { die("Construct DHCP Range object failed: ", Infoblox::status_code() . ":" . Infoblox::status_detail()); } print "DHCP Range object created successfully\n";
#Add the DHCP Range object into the Infoblox appliance through a session $session->add($dhcp_range) or die("Add DHCP Range object failed: ", $session->status_code() . ":" . $session->status_detail()); print "DHCP Range object added to the network successfully\n";
#Get and modify a DHCP Range
#Get a DHCP Range through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Range", start_addr => "10.0.0.1", ); my $object = $retrieved_objs[0]; unless ($object) { die("Get DHCP Range failed: ", $session->status_code() . ":" . $session->status_detail()); } print "Get DHCP Range object found at least 1 matching entry\n";
#Modify one of the attributes of the specified DHCP Range $object->comment ("modified comment");
#Un-override bootfile $object->bootfile(undef);
#Un-override bootserver $object->bootserver(undef);
#Un-override nextserver $object->nextserver(undef);
#Apply the changes $session->modify($object) or die("Modify DHCP Range failed: ", $session->status_code() . ":" . $session->status_detail()); print "DHCP Range object modified successfully \n";
#Search a DHCP Range
# search for DHCP range object with start address having last octet as 1 my @retrieved_objs = $session->search( object => "Infoblox::DHCP::Range", network => "10.0.0.0/.", start_addr => ".*1", comment => ".*comment" );
my $object = $retrieved_objs[0]; unless ($object) { die("Search DHCP range failed: ", $session->status_code() . ":" . $session->status_detail()); } print "Search DHCP range object found at least 1 matching entry\n";
#Remove a DHCP Range
#Get a DHCP Range through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Range", start_addr => "10.0.0.1", end_addr => "10.0.0.10", );
my $object = $retrieved_objs[0]; unless ($object) { die("Get DHCP Range failed: ", $session->status_code() . ":" . $session->status_detail()); } print "Get DHCP Range object found at least 1 matching entry\n";
#submit the object for removal $session->remove($object) or die("Remove DHCP Range failed: ", $session->status_code() . ":" . $session->status_detail()); print "DHCP Range object removed successfully \n";
#submit the Range Template object for removal $session->remove($dhcp_range_template) or die("Remove DHCP Range Tempate failed: ", $session->status_code() . ":" . $session->status_detail()); print "DHCP Range Templateobject removed successfully \n";
####PROGRAM ENDS####
Infoblox Inc. http://www.infoblox.com/
Infoblox::Session, Infoblox::Session->add(), Infoblox::Session->get(), Infoblox::Session->modify(), Infoblox::Session->remove(), Infoblox::Session->search(),Infoblox::DHCP::ViewInfoblox::DHCP::ExclusionRange, Infoblox::DHCP::FilterRule::MAC, Infoblox::DHCP::FilterRule::NAC, Infoblox::DHCP::FilterRule::RelayAgent, Infoblox::DHCP::FilterRule::Option, Infoblox::DHCP::Member, Infoblox::DHCP::Option, the Infoblox::DHCP::RangeTemplate manpage, Infoblox::Grid::MSServer::AdUser::Data
Copyright (c) 2017 Infoblox Inc.