Page 466 / 998 Scroll up to view Page 461 - 465
Dynamic Host Configuration Protocol
DHCP client
iMG/RG Software Reference Manual (System Administration)
5-6
5.1.3.2 Support for AutoIP
The DHCP client supports also IP address auto-configuration, to be referred to as
AutoIP
in this manual. This
includes support for RFC2563, which allows network administrators to configure DHCP servers to deny this
auto-configuration capability to clients.
In summary,
AutoIP
will be engaged after a DHCP client fails to contact a DHCP server and cannot obtain a
lease. A pseudo-random algorithm invents an IP address on the 169.254 subnet. Collisions are avoided by issu-
ing ARP requests for the suggested IP address, abandoning the address if it is already active on the network.
Additionally, the suggested address will be abandoned if any other host on the network issues an ARP probe
(i.e. the host issuing the ARP has source address 0.0.0.0) for that IP address.
Having auto-configured an IP address, the DHCP client will periodically check that it still cannot contact a
DHCP server. If the client finds it can now obtain a legitimate lease from a DHCP server, this lease will super-
sede any auto-configured IP address.
To turn on the
AutoIP
feature use DHCPCLIENT SET INTERFACECONFIG AUTOIP ENABLED command
To prevent the DHCP client from using
AutoIP
, USE DHCPCLIENT SET INTERFACECONFIG AUTOIP DISA-
BLED command.
5.1.3.3 Additional DHCP client modes
There are two additional DHCP client modes for more fine control of how configuration parameters are
accepted and propagated. The first mode allows you to choose how DNS servers are to be used; the second
mode allows you to use parameters received on a DHCP client interface to automatically set up a DHCP
server on another interface in the system.
5.1.3.4 Propagating DNS server information
You can tell the DHCP client what to do with received DNS server addresses. The pertinent attributes are
giveDnsToRelay
and
giveDnsToClient
. As is evident from the parameter names, the effect of these settings is
to cause the DHCP process to pass to the DNS relay and client processes the DNS server address(es) it has
learnt, which they are then able to use for DNS queries.
By default, DNS server addresses are only given to the DNS relay, if present.
For example, to set this up via the CLI, the following command sequence can be used:
dhcpclient add interfaceconfig client1 ip0
dhcpclient interfaceconfig 1 add requested option domain-name-servers
dhcpclient set interfaceconfig client1 givednstorelay enabled
dhcpclient set interfaceconfig client1 givednstoclient enabled
5.1.3.5 Automatically setting up a DHCP server
It is possible to tell the DHCP client to use parameters it has obtained to automatically set up a DHCP server.
Page 467 / 998
DHCP client
Dynamic Host Configuration Protocol
5-7
iMG/RG Software Reference Manual (System Administration)
If you choose this mode, you must tell DHCP client how large an IP address lease pool you would like the new
server to have, and which IP interface you want the new DHCP server to bind to.
If you do not supply any interface information, the DHCP client will try to place the DHCP server on the first
LAN interface it finds (the DHCP client will regard an IP interface as being a LAN interface)
The new DHCP server’s address pool will start one IP address after the IP address of the interface upon which
the DHCP server has been set up. That is, if the DHCP client is configured to set up the DHCP server on an IP
interface named
uplink
, with address 192.168.219.2, the address range will commence from address
192.168.219.3.
At present, the new DHCP server will give out any DNS server addresses received by the DHCP client. It will
then advertise its own host IP address as being the default gateway.
To set this up via the CLI, the following command sequence can be used:
dhcpclient add interfaceconfig client1 ip0
dhcpclient interfaceconfig 1 add requested option domain-name-servers
dhcpclient set interfaceconfig client dhcpserverpoolsize 30
dhcpclient set interfaceconfig client1 dhcpserverinterface uplink
5.1.3.6 Example
This paragraph provides a guide to setting up a DHCP client using commands available in the CLI.
Let's assume that the system has been configured with an interface named eth0. The first step is to enable the
DHCP flag on this interface:
ip set interface eth0 dhcp enabled
DHCP client configuration is optional. You do not need to perform these steps unless you have special require-
ments, such as specifying whether the use of AutoIP is allowed, specific requirements for which options are to
be negotiated from a DHCP server, or specific requirements about what to do with option values when they are
received.
dhcpclient add interfaceconfig mycfg ip0
dhcpclient set interfaceconfig mycfg requestedleasetime 3600
dhcpclient set interfaceconfig mycfg clientid 00:20:2b:01:02:03
dhcpclient set interfaceconfig mycfg autoip enabled
dhcpclient set interfaceconfig mycfg givednstorelay enabled
dhcpclient interfaceconfig mycfg add requested option domain-name-
servers
dhcpclient interfaceconfig mycfg add required option routers
dhcpclient interfaceconfig mycfg add sent option host-name ’"galapa-
gos"’
These commands create a new DHCP client interface configuration related to the IP interface you defined ear-
lier. Let us consider, line by line, what the above configuration does:
Page 468 / 998
Dynamic Host Configuration Protocol
DHCP Relay
iMG/RG Software Reference Manual (System Administration)
5-8
A lease time of one hour is requested.
A client identifier of 00:20:2b:01:02:03 is specified.
In the event of a DHCP server being unavailable, the DHCP client will automatically assign an address using
AutoIP
.
Any DNS server addresses received from a server will be passed to the DNS relay. (There is also an analo-
gous option to pass the addresses to the DNS client).
For this to occur, the DHCP client must request DNS server addresses from a server (maps onto the
request
directive).
The DHCP client will insist that a default gateway parameter is present in any lease offer (maps onto the
require
directive).
Finally, the DHCP client will send out
galapagos
as the value of the host name option – this can be used by
some ISPs as part of a simple authentication process (maps onto the
send
directive).
The final step is to tell the Residential Gateway to update the DHCP client software with the new IP interface
and configuration that has been defined. To do this, issue the following command:
dhcpclient update
Note:
NO configuration changes that you have made on the DHCP client will take effect until you enter the
DHCPCLIENT UPDATE command.
5.1.4
DHCP Relay
A DHCP relay uses the facilities of the IP stack to transmit and receive DHCP packets.
From a DHCP client’s point of view, the relay acts as a de-facto DHCP server, and this operation is transparent.
This is useful where a network administrator only wishes to have one DHCP server across several physical and
logical sub-networks.
The relay works by forwarding all broadcasted client requests to one or more known DHCP servers.
Server replies are then either broadcast or unicast back to the client via the DHCP relay.
Note:
Note DHCP Server and DHCP relay cannot coexist simultaneously
5.1.5
DHCP Server command reference
This section describes the commands available on gateway to enable, configure and manage DHCP Server mod-
ule.
5.1.5.1 DHCP server CLI commands
The table below lists the
DHCP server
commands provided by the CLI:
Page 469 / 998
DHCP Server command reference
Dynamic Host Configuration Protocol
5-9
iMG/RG Software Reference Manual (System Administration)
TABLE 5-1
DHCP server CLI commands
Commands
Fiber
A
Fiber
B
Fiber
C
Fiber
D
Fiber
E
Modular
ADSL
A
ADSL
B
ADSL
C
DHCPSERVER ADD USERS CLASS
X
X
X
X
X
X
X
X
X
DHCPSERVER ADD VENDOR CLASS
X
X
X
X
X
X
X
X
X
DHCPSERVER CLEAR CLASSES
X
X
X
X
X
X
X
X
X
DHCPSERVER DELETE CLASS
X
X
X
X
X
X
X
X
X
DHCPSERVER LIST CLASSES
X
X
X
X
X
X
X
X
X
DHCPSERVER SET USERS CLASS
X
X
X
X
X
X
X
X
X
DHCPSERVER SET VENDOR CLASS
X
X
X
X
X
X
X
X
X
DHCPSERVER SHOW CLASS
X
X
X
X
X
X
X
X
X
DHCPSERVER CLASS ADD OPTION
X
X
X
X
X
X
X
X
X
DHCPSERVER CLASS CLEAR OPTION
X
X
X
X
X
X
X
X
X
DHCPSERVER CLASS DELETE OPTION
X
X
X
X
X
X
X
X
X
DHCPSERVER CLASS LIST OPTION
X
X
X
X
X
X
X
X
X
DHCPSERVER ADD EXCLUDE
X
X
X
X
X
X
X
X
X
DHCPSERVER CLEAR EXCLUDES
X
X
X
X
X
X
X
X
X
DHCPSERVER DELETE EXCLUDE
X
X
X
X
X
X
X
X
X
DHCPSERVER LIST EXCLUDES
X
X
X
X
X
X
X
X
X
DHCPSERVER ADD INTERFACE
X
X
X
X
X
X
X
X
X
DHCPSERVER CLEAR INTERFACES
X
X
X
X
X
X
X
X
X
DHCPSERVER DELETE INTERFACE
X
X
X
X
X
X
X
X
X
DHCPSERVER LIST INTERFACES
X
X
X
X
X
X
X
X
X
DHCPSERVER ADD FIXEDHOST
X
X
X
X
X
X
X
X
X
DHCPSERVER CLEAR FIXEDHOSTS
X
X
X
X
X
X
X
X
X
DHCPSERVER DELETE FIXEDHOST
X
X
X
X
X
X
X
X
X
DHCPSERVER LIST FIXEDHOSTS
X
X
X
X
X
X
X
X
X
Page 470 / 998
Dynamic Host Configuration Protocol
DHCP Server command reference
iMG/RG Software Reference Manual (System Administration)
5-10
DHCPSERVER SET FIXEDHOST IPADDRESS
X
X
X
X
X
X
X
X
X
DHCPSERVER SET FIXEDHOST DEFAULTLEASETIME
X
X
X
X
X
X
X
X
X
DHCPSERVER SET FIXEDHOST MACADDRESS
X
X
X
X
X
X
X
X
X
DHCPSERVER SET FIXEDHOST MAXLEASETIME
X
X
X
X
X
X
X
X
X
DHCPSERVER ADD SHAREDNETWORK
X
X
X
X
X
X
X
X
X
DHCPSERVER CLEAR SHAREDNETWORKS
X
X
X
X
X
X
X
X
X
DHCPSERVER DELETE SHAREDNETWORK
X
X
X
X
X
X
X
X
X
DHCPSERVER LIST SHAREDNETWORKS
X
X
X
X
X
X
X
X
X
DHCPSERVER SHAREDNETOWOR ADD SHAREDSUBNET
X
X
X
X
X
X
X
X
X
DHCPSERVER SHAREDNEWORK CLEAR SHAREDSUBNETS
X
X
X
X
X
X
X
X
X
DHCPSERVER SHAREDNETWORKS LIST SHAREDSUBNET
X
X
X
X
X
X
X
X
X
DHCPSERVER ADD SUBNET
X
X
X
X
X
X
X
X
X
DHCPSERVER CLEAR SUBNETS
X
X
X
X
X
X
X
X
X
DHCPSERVER DELETE SUBNET
X
X
X
X
X
X
X
X
X
DHCPSERVER LIST SUBNETS
X
X
X
X
X
X
X
X
X
DHCPSERVER SHOW SUBNET
X
X
X
X
X
X
X
X
X
DHCPSERVER SET SUBNET ASSIGNAUTODOMAIN
X
X
X
X
X
X
X
X
X
DHCPSERVER SET SUBNET DEFAULTLEASETIME
X
X
X
X
X
X
X
X
X
DHCPSERVER SET SUBNET HOSTISDEFAULTGATEWAY
X
X
X
X
X
X
X
X
X
DHCPSERVER SET SUBNET HOSTISDNSSERVER
X
X
X
X
X
X
X
X
X
DHCPSERVER SET SUBNET MAXLEASETIME
X
X
X
X
X
X
X
X
X
DHCPSERVER SET SUBNET SUBNET
X
X
X
X
X
X
X
X
X
DHCPSERVER SUBNET ADD IPRANGE
X
X
X
X
X
X
X
X
X
DHCPSERVER SUBNET ADD OPTION
X
X
X
X
X
X
X
X
X
DHCPSERVER SUBNET ADD POOL
X
X
X
X
X
X
X
X
X
Commands
Fiber
A
Fiber
B
Fiber
C
Fiber
D
Fiber
E
Modular
ADSL
A
ADSL
B
ADSL
C

Rate

4 / 5 based on 3 votes.

Popular Allied-Telesis Models

Bookmark Our Site

Press Ctrl + D to add this site to your favorites!

Share
Top