Class: DHCP::AutoConfigurationOption
- Defined in:
- lib/net/dhcp/options.rb
Overview
Operating Systems are now attempting to support ad-hoc networks of two or more systems, while keeping user configuration at a minimum. To accommodate this, in the absence of a central configuration mechanism (DHCP), some OS’s are automatically choosing a link-local IP address which will allow them to communicate only with other hosts on the same link. This address will not allow the OS to communicate with anything beyond a router. However, some sites depend on the fact that a host with no DHCP response will have no IP address. This document describes a mechanism by which DHCP servers are able to tell clients that they do not have an IP address to offer, and that the client should not generate an IP address it’s own.
See rfc2563 for full details
The code for this option is 116, and its length is 1.
The default payload for this option is $DHCP_AUTOCONF_YES
Instance Attribute Summary
Attributes inherited from Option
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ AutoConfigurationOption
constructor
A new instance of AutoConfigurationOption.
- #to_s ⇒ Object
Methods inherited from Option
Constructor Details
#initialize(params = {}) ⇒ AutoConfigurationOption
Returns a new instance of AutoConfigurationOption.
547 548 549 550 551 |
# File 'lib/net/dhcp/options.rb', line 547 def initialize(params={}) params[:type] = $DHCP_AUTOCONF params[:payload] = params.fetch(:payload, [$DHCP_AUTOCONF_YES]) super(params) end |
Instance Method Details
#to_s ⇒ Object
553 554 555 |
# File 'lib/net/dhcp/options.rb', line 553 def to_s "DHCP Auto-Configuration = #{self.payload == $DHCP_AUTOCONF_YES ? 'Yes' : 'No' }" end |