Dynamic Host Configuration Protocol (DHCP)
Dynamic Host Configuration Protocol (DHCP)
Introduction
This chapter describes the Dynamic Host Configuration Protocol (DHCP)
support provided by the switch, and how to configure the switch to act as a
DHCP or BOOTP server. DHCP is defined in RFC 2131.
The switch supports DHCP and its predecessor, BOOTP, but they are disabled
by default.
3. Assign an IP address range to the policy. This range must be in the same
subnet as the IP address that you assigned to the interface. Use the
command:
create dhcp range=name ip=ipadd number=number policy=name
[gateway=ipadd] [probe={arp|icmp}]
4. Assign any other desired configuration settings to the policy by using the
command:
add dhcp policy=name [other-options]
The server uses that policy on that interface. Repeat this process with as
many interfaces and policies as required.
5. Enable the DHCP server by using the command:
enable dhcp
IP settings are assigned to hosts for specific times (the lease time). You can use
DHCP to allocate any of the following types of addresses:
■ A dynamic IP address, which is available to the host for a limited amount
of time (specified as the lease time) and is then reclaimed by the server. The
server can then allocate it to another device on request. This allows you to
share a limited number of IP addresses among devices and is useful when
devices do not need to access the Internet at all times.
To configure this, give the policy a lease time less than infinity when you
create it, using the command:
create dhcp policy=name leasetime=lease-time
■ A permanent IP address, which is made available to the client on request
and never reclaimed. This is referred to as “Automatic” allocation.
To configure this, give the policy a lease time of infinity when you create it,
using the command:
create dhcp policy=name leasetime=infinity
■ A manual or static IP address, which is allocated to a particular client. The
client is identified by its MAC address. This lets you use DHCP to manage
most of your network automatically, while having unchanging IP
addresses on key devices such as servers.
To configure this, add a static entry to the IP address range, using the
command:
add dhcp range=name address=macadd ip=ipadd
RFC 1542, Clarifications and Extensions for the Bootstrap Protocol, defines
extensions to the BOOTP protocol, including the behaviour of a BOOTP Relay
Agent.
The hops field in a BOOTP message is used to record the number of hops
(routers) the message has been through. If the value of the hops field exceeds a
predefined threshold (normally 16), the message is discarded by the relay
agent. The threshold may be set to a value from 1 to 16.
To enable the BOOTP Relay Agent, use the enable bootp relay command on
page 23-25.
The agent must currently be disabled. To disable the agent, use the disable
bootp relay command on page 23-23.
To define a relay destination, use the add bootp relay command on page 23-8.
More than one relay destination may be defined, with successive commands.
Request messages are relayed to all defined relay destinations so messages
may be duplicated.
The destination must exactly match a destination previously defined with the
add bootp relay command on page 23-8.
To purge the BOOTP configuration (including the relay destination list), use
the purge bootp relay command on page 23-26. The BOOTP module is
disabled, all configuration data (including non-volatile storage) is purged, and
then BOOTP is re-enabled with default settings.
When the ‘hops’ field in a BOOTP message exceeds a predefined threshold the
BOOTP message is discarded. The default of the threshold is 4. To set the
threshold to any value from 1 to 16, use the set bootp maxhops command on
page 23-27.
To display the current configuration of the BOOTP Relay Agent, use the show
bootp relay command on page 23-36.
Option 82 is inserted by the DHCP relay agent into the DHCP options field
when forwarding client-originated BOOTP/DHCP packets to a DHCP server.
DHCP servers that are configured to recognise Option 82 may use the
information to implement IP addresses, or other parameter assignment
policies, based on the network location of the client device.
For more information, see “DHCP Client” on page 22-14 of Chapter 22,
Internet Protocol (IP).
DHC Files
Information about the state of the DHCP server is stored in NVS memory in a
binary file with the extension dhc. This information includes which IP
addresses are allocated and the remaining lease time for the addresses. If the
switch is restarted, the DHC file ensures that the server retains this information
for the clients it is currently serving.
Configuration Example
The following example shows how to configure a switch to act as a DHCP
server in a small site. The site has a limited range of IP addresses and users use
IP for short periods of time. The dynamic DHCP mechanism is the most
appropriate for this situation. The switch on the LAN is configured to provide
DHCP services to the PCs on the local LAN.
2. Create a policy.
Use the following commands to create a policy that sets the base
configuration information required by the client hosts:
create dhcp policy=base lease=7200
add dhcp policy=base subnet=255.255.255.0
add dhcp policy=base router=192.168.1.1
add dhcp policy=base dnsserver=192.168.1.254,
192.168.1.253
3. Create a range.
5. Configure a printer.
Troubleshooting
Problem The switch is enabled as a DHCP server but has not assigned an IP address to a
host.
Command Reference
This section describes the commands available to configure and manage the
Dynamic Host Configuration Protocol (DHCP) on the switch.
The shortest valid command is denoted by capital letters in the Syntax section.
See “Conventions” on page lxii of About this Software Reference in the front of
this manual for details of the conventions used to describe command syntax.
See Appendix A, Messages for a complete list of messages and their meanings.
Description This command adds a BOOTP relay destination. The relay parameter specifies
the IP address of a BOOTP server in dotted decimal notation. Up to 50 relay
destinations can be defined, using successive commands. BOOTP request
messages are relayed to all defined relay destinations, so messages may be
duplicated.
where:
■ name is a character string 1 to 15 characters long. It may contain any
printable character.
■ seconds is a time, time offset or timeout value in seconds.
■ bootfilesize is the length in 512-octet blocks of the default boot image for the
client.
■ ipadd is an IP address in dotted decimal notation.
■ string is a character string 1 to 99 characters long. It may contain any
printable character.
■ longstring is a character string 1 to 254 characters long. It may contain any
printable character.
■ ttl is a number from 1 and 255.
■ server-name is a character string 1 to 63 characters long. It may contain any
printable character.
■ utc-offset is a time offset in seconds from Coordinated Universal Time
(UTC).
Description This command adds an option to an existing DHCP policy. The policy
parameter specifies the name of the policy where the option is to be added.
The arptimeout parameter specifies the timeout in seconds for ARP cache
entries.
The cookieserver parameter specifies a list of RFC 865 cookie servers available
to the client. Cookie servers are specified by IP address. A maximum of up to
32 IP addresses can be specified in a comma separated list. Servers should be
listed in order of preference.
The dnsserver parameter specifies a list of Domain Name System (RFC 1035)
name servers available to the client. Domain Name System name servers are
specified by IP address. A maximum of up to 32 IP addresses can be specified
in a comma separated list. Servers should be listed in order of preference.
The domainname parameter specifies the domain name that the client should
use when resolving host names via the Domain Name System.
The etherencap parameter specifies whether the client should use Ethernet
Version 2 (RFC 894) or IEEE Standard 802.3 (RFC 1042) encapsulation for
Ethernet interfaces (vlan). A value of off indicates that the client should use
RFC 894 encapsulation. A value of on means that the client should use
RFC 1042 encapsulation.
The file parameter specifies the boot file name for the client.
The hostname parameter specifies the name of the client. The name may or
may not be qualified with the local domain name. See RFC 1035 for character
set restrictions.
The ipforwarding parameter specifies whether the client should configure its
IP layer for packet forwarding. A value of disable disables IP forwarding, and
a value of enable enables IP forwarding.
The ipmtu parameter specifies the size, in bytes, of the largest IP packet the
client should be prepared to reassemble from packets that were fragmented at
the physical layer. The client discards IP packets that are larger than this value.
The iptimeout parameter specifies the timeout (in seconds) to use when aging
Path MTU values discovered by the mechanism defined in RFC 1191
The ipttl parameter specifies the default time-to-live that the client should use
on outgoing datagrams. The TTL is specified as an octet with a value between 1
and 255.
The logserver parameter specifies a list of MIT-LCS UDP log servers available
to the client. Log servers are specified by IP address. A maximum of up to 32 IP
addresses can be specified in a comma separated list. Servers should be listed
in order of preference.
The lprserver parameter specifies a list of RFC 1179 line printer servers
available to the client. Line printer servers are specified by IP address. A
maximum of up to 32 IP addresses can be specified in a comma separated list.
Servers should be listed in order of preference.
The meritdumpfile parameter specifies the path name of a file where the
client’s core image should be dumped in the event the client crashes. The path
name is formatted as a character string consisting of characters from the NVT
ASCII character set.
The nbnodetype parameter specifies the NetBIOS node type that allows
NetBIOS over TCP/IP clients to be configured as described in RFC 1001/1002.
The nbscope parameter specifies the NetBIOS over TCP/IP scope parameter
for the client as specified in RFC 1001/1002.
The nisdomain parameter specifies the name of the client’s NIS domain. The
domain is formatted as a character string consisting of characters from the NVT
ASCII character set.
The rootpath parameter specifies the path name that contains the client’s root
disk. The path name is formatted as a character string consisting of characters
from the NVT ASCII character set.
The router parameter specifies a list of IP addresses for routers on the client’s
subnet. Routers are specified by IP address. A maximum of up to 32 IP
addresses can be specified in a comma separated list. Routers should be listed
in order of preference.
The routersolicit parameter specifies the address where the client should
transmit router solicitation requests.
The server parameter specifies the address of the server to use in the next step
of the client’s bootstrap process. As the switch is not capable of providing an
operating system executable this option allows the IP address of an
appropriate TFTP server to be set.
The servername parameter specifies the name of the server host. This is passed
to the client.
The sourcerouting parameter specifies whether the client should configure its
IP layer to allow forwarding of datagrams with non-local source routes. A
value of disable disallows forwarding of such datagrams, and a value of
enable allows forwarding.
The staticroute parameter specifies a list of static routes that the client should
install in its routing cache. If multiple routes to the same destination are
specified, they are listed in descending order of priority. The routes consist of a
list of IP address pairs. The first address is the destination address, and the
second address is the router for the destination. A maximum of up to 32 IP
addresses can be specified in a comma separated list. The default route (0.0.0.0)
is an illegal destination for a static route.
The sublocal parameter specifies whether the client may assume that all
subnets of the IP network where the client is connected use the same MTU as
the subnet of that network where the client is directly connected. A value of on
indicates that all subnets share the same MTU. A value of off means that the
client should assume that some subnets of the directly connected network may
have smaller MTUs.
The swapserver parameter specifies the IP address of the client’s swap server.
The t1time parameter specifies the time interval, in seconds, from address
assignment until the client transitions to the renewing state.
The t2time parameter specifies the time interval, in seconds, from address
assignment until the client transitions to the rebinding state.
The tcpgarbage parameter specifies whether the client should send TCP
keepalive messages with a octet of garbage for compatibility with older
implementations. A value of off indicates that a garbage octet should not be
sent. A value of on indicates that a garbage octet should be sent.
The tcpkeepalive parameter specifies the interval (in seconds) that the client
TCP should wait before sending a keepalive message on a TCP connection. A
value of zero indicates that the client should not generate keepalive messages
on connections unless specifically requested by an application.
The tcpttl parameter specifies the default time-to-live value that the client
should use when sending TCP segments.
The timeoffset parameter specifies the offset of the client’s subnet in seconds
from Coordinated Universal Time (UTC).
The timeserver parameter specifies a list of RFC 868 time servers available to
the client. Time servers are specified by IP address. A maximum of up to 32 IP
addresses can be specified in a comma separated list. Servers should be listed
in order of preference.
The trailerencap parameter specifies whether the client should negotiate the
use of trailers (RFC 893) when using the ARP protocol. A value of off indicates
that the client should not attempt to use trailers. A value of on means that the
client should attempt to use trailers.
Examples To create a policy called “base” with subnet mask, router and DNS server
options, use the command:
add dhcp poli=base subn=255.255.255.0 rou=202.36.163.21
dnss=192.168.100.50,192.168.100.33
where:
■ name is a character string 1 to 15 characters long. It may contain any
printable character.
■ ipadd is an IP address in dotted decimal notation.
■ macadd is a hardware address of the form xx-xx-xx-xx-xx-xx, where xx is a
2-digit hexadecimal number with leading zeros if necessary.
Description This command adds a static entry to an existing DHCP range. The range
parameter specifies the name of an existing DHCP range.
The ip parameter specifies the IP address of the host to add to the range. The
address parameter defines the MAC address for the static host entry. The
policy parameter specifies the name of a policy to give the host entry.
Examples To add a static entry to the range “remote” for the device with MAC address
00-00-0c-00-28-73, use the command:
add dhcp ran=remote ip=192.168.1.31 a=00-00-0c-00-28-73
where:
■ name is a character string 1 to 15 characters long. It may contain any
printable character.
■ lease-time is a time in seconds from 1 to 4294967295.
Description This command creates a DHCP policy. Policies define the configuration
information that are given to the requesting IP host. The policy parameter
specifies the name of the policy to create. This name is used in other commands
to identify the policy.
The leasetime parameter specifies the time period for which the IP address is
leased to the requesting IP client. For BOOTP requests, leasetime must be set to
infinity. If dynamic IP address allocation is not required, then set leasetime to
infinity.
Switches that comply with RFC 1541 but not with RFC 2131 may not be able to
accept a lease time of less than 3600 seconds (1 hour).
The inherit parameter specifies the name of an existing policy whose settings
are inherited by the new policy. This parameter allows the building of
hierarchical policies and reduces the number of commands to create similar
policies.
Examples To create a DHCP policy called “base” with a default lease time of two hours,
use the command:
cre dhcp poli=base lease=7200
where:
■ name is a character string 1 to 15 characters long. It may contain any
printable character.
■ ipadd is an IP address in dotted decimal notation.
■ number is a number from 1 to 255.
Description This command creates a DHCP range. The server tries to fulfil BOOTP or
DHCP requests from hosts with IP addresses in the defined ranges. The range
parameter specifies the name of the range to create.
The policy parameter specifies the name of a default policy to give the range.
Individual host entries in the range can later be set to other defined policies.
If the range you specify includes network or broadcast addresses, these are not
added to the pool of available addresses.
The number parameter defines how many host entries from the start IP
address are to be included in the range.
The probe parameter specifies how the DHCP server checks whether an IP
address is being used by other hosts. If arp is specified, the server sends ARP
requests to determine if an address is in use. If icmp is specified, the server
sends ICMP Echo Requests (pings). arp cannot be specified if the gateway
parameter is specified or if the network uses Proxy ARP. The default is icmp.
Examples To create a range called “office”, which uses the policy “base”, with 32 IP
addresses starting at 192.168.1.16, use the command:
cre dhcp ran=office poli=base ip=192.168.1.16 num=32
Description This command deletes a BOOTP relay destination. The RELAY parameter
specifies the IP address of a BOOTP server in dotted decimal notation.
Description This command deletes an existing option from a DHCP policy. The policy
parameter specifies the name of the policy from which the option is to be
deleted.
The arptimeout parameter specifies the timeout in seconds for ARP cache
entries.
The cookieserver parameter specifies a list of RFC 865 cookie servers available
to the client. Servers should be listed in order of preference.
The dnsserver parameter specifies a list of Domain Name System (RFC 1035)
name servers available to the client. Servers should be listed in order of
preference.
The domainname parameter specifies the domain name that the client should
use when resolving hostnames via the Domain Name System.
The etherencap parameter specifies whether the client should use Ethernet
Version 2 (RFC 894) or IEEE Standard 802.3 (RFC 1042) encapsulation for
Ethernet interfaces (vlan). A value of off indicates that the client should use
RFC 894 encapsulation. A value of on means that the client should use
RFC 1042 encapsulation.
The file parameter specifies the boot file name for the client.
The hostname parameter specifies the name of the client. The name may or
may not be qualified with the local domain name. See RFC 1035 for character
set restrictions.
The intmtu parameter specifies the MTU to use on this interface. The MTU is
specified as a 16-bit unsigned integer. The minimum legal value for the MTU is
68.
The ipforwarding parameter specifies whether the client should configure its
IP layer for packet forwarding. A value of disable disables IP forwarding, and
a value of enable enables IP forwarding.
The ipmtu parameter specifies the maximum size datagram that the client
should be prepared to reassemble. The minimum value legal value is 576.
The iptimeout parameter specifies the timeout (in seconds) to use when aging
Path MTU values discovered by the mechanism defined in RFC 1191
The ipttl parameter specifies the default time-to-live that the client should use
on outgoing datagrams. The TTL is specified as an octet with a value between 1
and 255.
The logserver parameter specifies a list of MIT-LCS UDP log servers available
to the client. Servers should be listed in order of preference.
The lprserver parameter specifies a list of RFC 1179 line printer servers
available to the client. Servers should be listed in order of preference.
The meritdumpfile parameter specifies the path name of a file where the
client’s core image should be dumped if the client crashes. The path name is
formatted as a character string consisting of characters from the NVT ASCII
character set.
The nbnodetype parameter specifies the NetBIOS node type that allows
NetBIOS over TCP/IP clients to be configured as described in RFC 1001/1002.
The nbscope parameter specifies the NetBIOS over TCP/IP scope parameter
for the client as specified in RFC 1001/1002.
The nisdomain parameter specifies the name of the client’s NIS domain. The
domain is formatted as a character string consisting of characters from the NVT
ASCII character set.
The rootpath parameter specifies the path name that contains the client’s root
disk. The path name is formatted as a character string consisting of characters
from the NVT ASCII character set.
The router parameter specifies a list of IP addresses for routers on the client’s
subnet. Routers should be listed in order of preference.
The routersolicit parameter specifies the address where the client should
transmit router solicitation requests.
The server parameter specifies the address of the server to use in the next step
of the client’s bootstrap process. As the switch is not capable of providing an
operating system executable this option allows the IP address of an
appropriate TFTP server to be set.
The servername parameter specifies the name of the server host. This is passed
to the client.
The sourcerouting parameter specifies whether the client should configure its
IP layer to allow forwarding of datagrams with non-local source routes. A
value of disable disallows forwarding of such datagrams, and a value of
enable allows forwarding.
The staticroute parameter specifies a list of static routes that the client should
install in its routing cache. If multiple routes to the same destination are
specified, they are listed in descending order of priority. The routes consist of a
list of IP address pairs. The first address is the destination address, and the
second address is the router for the destination. The default route (0.0.0.0) is an
illegal destination for a static route.
The sublocal parameter specifies whether the client may assume that all
subnets of the IP network where the client is connected use the same MTU as
the subnet of that network where the client is directly connected. A value of on
indicates that all subnets share the same MTU. A value of off means that the
client should assume that some subnets of the directly connected network may
have smaller MTUs.
The swapserver parameter specifies the IP address of the client’s swap server.
The t1time parameter specifies the time interval, in seconds, from address
assignment until the client transitions to the renewing state.
The t2time parameter specifies the time interval, in seconds, from address
assignment until the client transitions to the rebinding state.
The tcpgarbage parameter specifies whether the client should send TCP
keepalive messages with a octet of garbage for compatibility with older
implementations. A value of off indicates that a garbage octet should not be
sent. A value of on indicates that a garbage octet should be sent.
The tcpkeepalive parameter specifies the interval (in seconds) that the client
TCP should wait before sending a keepalive message on a TCP connection. A
value of zero indicates that the client should not generate keepalive messages
on connections unless specifically requested by an application.
The tcpttl parameter specifies the default time-to-live value that the client
should use when sending TCP segments.
The timeoffset parameter specifies the offset of the client’s subnet in seconds
from Coordinated Universal Time (UTC).
The timeserver parameter specifies a list of RFC 868 time servers available to
the client. Servers should be listed in order of preference.
The trailerencap parameter specifies whether the client should negotiate the
use of trailers (RFC 893) when using the ARP protocol. A value of off indicates
that the client should not attempt to use trailers. A value of on means that the
client should attempt to use trailers.
Examples To remove the LPRSERVER option from the policy “base”, use the command:
del dhcp poli=base lprs
where:
■ name is a character string 1 to 15 characters long. It may contain any
printable character.
■ ipadd is an IP address in dotted decimal notation.
Description This command deletes an existing static host entry from a DHCP range. The IP
host entry reverts to the default settings for the range.
The range parameter specifies the name of the range. The ip address parameter
specifies the host entry to return to the default range settings.
Examples To delete the static entry 192.168.1.31 from the range “remote”, use the
command:
del dhcp ran=remote ip=192.168.1.31
Description This command destroys an existing policy. The policy parameter specifies the
name of the policy to destroy. If the policy is currently being used by any host
entry, then an error message is displayed and the command fails.
Description This command destroys an existing DHCP range. The range parameter
specifies the name of the range to destroy.
Description This command disables the BOOTP Relay Agent. The BOOTP Relay Agent
relays BOOTREQUEST messages originating from any of the switch’s
interfaces to a user-defined destination, and relays BOOTREPLY messages
addressed to BOOTP clients on networks directly connected to the switch.
BOOTREPLY messages addressed to clients on networks not directly
connected to the switch are ignored by the relay agent and treated as ordinary
IP packets for forwarding. The BOOTP Relay Agent is disabled by default.
Description This command disables the insertion of DHCP Option 82 into the DHCP
options field when forwarding client-originated BOOTP/DHCP packets to a
DHCP server.
disable dhcp
Description This command disables the DHCP module. All BOOTP or DHCP requests
received while the module is disabled are ignored.
Description This command enables the BOOTP Relay Agent. The BOOTP Relay Agent
relays BOOTREQUEST messages originating from any of the switch’s
interfaces to a user-defined destination, and relays BOOTREPLY messages
addressed to BOOTP clients on networks directly connected to the switch.
BOOTREPLY messages addressed to clients on networks not directly
connected to the switch are ignored by the relay agent and treated as ordinary
IP packets for forwarding. The BOOTP Relay Agent is disabled by default.
Description This command enables the DHCP relay agent to insert DHCP Option 82 into
the DHCP options field when forwarding client-originated BOOTP/DHCP
packets to a DHCP server.
enable dhcp
Description This command enables the DHCP module. All BOOTP or DHCP requests
received while the module is disabled are ignored.
Description This command purges the BOOTP relay configuration. The BOOTP module is
disabled and all configuration data is purged.
Description This command sets the hop count threshold for discarding BOOTP messages.
When the hops field in a BOOTP message exceeds the threshold, the BOOTP
message is discarded. The hop count in a BOOTP message is incremented each
time a switch forwards the message. The default is 4.
Description This command defines the checking and re-forwarding settings used by DHCP
Option 82. When Option 82 is enabled, the DHCP relay agent inserts Option 82
information into the DHCP options field when forwarding client-originated
BOOTP/DHCP packets to a DHCP server. Option 82 must be enabled with the
enable bootprelay option 82 command for the settings you specify to take
effect.
Use the check parameter to specify whether the Option 82 information that is
returned from the DHCP server is to be checked or not. When checking is
enabled, server DHCP packets that contain valid Option 82 information are
forwarded to the client, and packets that do not contain valid Option 82
information are dropped. If yes is specified, checking is enabled. The values
yes, on, and true are equivalent. If no is specified, Option 82 information
returned from the DHCP server is not checked. The values no, off, and false
are equivalent. The default is yes.
Use the policy parameter to specify the re-forwarding policy of client DHCP
packets that contain Option 82 information. If drop is specified, client DHCP
packets that contain Option 82 information are dropped. If keep is specified,
the packet keeps its existing Option 82 information. If replace is specified, the
existing Option 82 information is replaced with that of the local device. The
default is replace.
Example To set the re-forwarding policy to drop client DHCP packets with Option 82
information, use the command:
set boot rela opt poli=drop
where:
■ port-list is a port number, a range of port numbers (specified as n-m), or a
comma-separated list of port numbers and/or ranges. Port numbers start
at 1 and end at m, where m is the highest numbered Ethernet switch port,
including uplink ports.
■ subscriber-id is a character string from 0 to 50 characters long. Valid
characters are any alphanumeric characters. If string contains spaces, it
must be in double quotes. Wildcards are not allowed.
Description This command defines the DHCP Relay Agent port settings for DHCP Option
82. When Option 82 is enabled, the Relay Agent inserts Option 82 information
into the DHCP options field when forwarding client-originated BOOTP/
DHCP packets to a DHCP server. Option 82 must be enabled with the enable
bootprelay option 82 command for the port settings you specify to take effect.
Use the port parameter to specify the port to use for this command. If all is
specified, this command is applied to all ports on the device.
Use the subscriberid parameter to specify the subscriber-ID for the port
defined with port. If specified, the subscriber-ID sub-option is included in the
Option 82 field of client DHCP packets received on the specified port. The
default is no subscriber-ID.
Use the trusted parameter to specify how the switch handles client DHCP
packets that contain Option 82 information, but which have the giaddr field set
to 0. If you specify yes, the defined port is considered to be a trusted source of
Option 82 information, and packets with Option 82 information and a giaddr
of 0 are forwarded according to normal BOOTP Relay operation. The values
yes, on, and true are equivalent. If you specify no, packets are dropped that
contain DHCP Option 82 information and with the giaddr field set to 0. The
values no, off, and false are equivalent. The default is no.
set dhcp
Description This command sets the DHCP extended identification option. An extended
client ID is used when connecting multiple switch interfaces to the same DHCP
server.
This command affects new DHCP clients only. If extended DHCP identification
is needed, then dhcp extendid must be on before DHCP clients are created.
DHCP clients with this option set to on are incompatible with static DHCP
server entries because they do not match the extended ID. To set DHCP clients
see the add ip interface command on page 22-74 of Chapter 22, Internet
Protocol (IP).
The extendid parameter specifies whether DHCP clients use an extended client
ID when communicating with a DHCP server. If off is specified, the client ID
value is the hardware address of the client interface. If on is specified, the client
ID value is extended to include an internal interface identifier, uniquely
distinguishing different interfaces on a device. The default is off.
Examples To enable the use of extended client ID values when connecting a multiple
switch interfaces to the same DHCP server, use the command:
set dhcp ext=on
where:
■ name is a character string 1 to 15 characters long. It may contain any
printable character.
■ seconds is a time, time offset, or timeout value in seconds.
■ bootfilesize is the length in 512-octet blocks of the default boot image for the
client.
■ ipadd is an IP address in dotted decimal notation.
■ string is a character string 1 to 99 characters long. It may contain any
printable character.
■ lease-time is a time in seconds from 1 to 4294967295.
■ longstring is a character string 1 to 254 characters long. It may contain any
printable character.
■ ttl is a number from 1 and 255.
■ server-name is a character string 1 to 63 characters long. It may contain any
printable character.
■ utc-offset is a time offset in seconds from Coordinated Universal Time
(UTC).
Description This command modifies an existing option in a DHCP policy. The policy
parameter specifies the name of the policy containing the option to be
modified.
The arptimeout parameter specifies the timeout in seconds for ARP cache
entries.
The cookieserver parameter specifies a list of RFC 865 cookie servers available
to the client. Cookie servers are specified by IP address. A maximum of up to
32 IP addresses can be specified in a comma separated list. Servers should be
listed in order of preference.
The dnsserver parameter specifies a list of Domain Name System (RFC 1035)
name servers available to the client. Domain Name System name servers are
specified by IP address. A maximum of up to 32 IP addresses can be specified
in a comma separated list. Servers should be listed in order of preference.
The domainname parameter specifies the domain name that the client should
use when resolving hostnames via the Domain Name System.
The etherencap parameter specifies whether the client should use Ethernet
Version 2 (RFC 894) or IEEE Standard 802.3 (RFC 1042) encapsulation for
Ethernet interfaces (vlan). A value of off indicates that the client should use
RFC 894 encapsulation. A value of on means that the client should use
RFC 1042 encapsulation.
The file parameter specifies the boot file name for the client.
The hostname parameter specifies the name of the client. The name may or
may not be qualified with the local domain name. See RFC 1035 for character
set restrictions.
The ipforwarding parameter specifies whether the client should configure its
IP layer for packet forwarding. A value of disable disables IP forwarding, and
a value of enable enables IP forwarding.
The ipmtu parameter specifies the size, in bytes, of the largest IP packet the
client should be prepared to reassemble from packets that were fragmented at
the physical layer. The client discards IP packets that are larger than this value.
The iptimeout parameter specifies the timeout (in seconds) to use when aging
Path MTU values discovered by the mechanism defined in RFC 1191
The ipttl parameter specifies the default time-to-live that the client should use
on outgoing datagrams. The TTL is specified as an octet with a value between 1
and 255.
The leasetime parameter specifies the time period for which the IP address is
leased to the requesting IP client. For BOOTP requests, leasetime must be set to
infinity. If dynamic IP address allocation is not required, then set leasetime to
infinity.
Switches that comply with RFC 1541 but not with RFC 2131 may not be able to
accept a lease time of less than 3600 seconds (1 hour).
The logserver parameter specifies a list of MIT-LCS UDP log servers available
to the client. Log servers are specified by IP address. A maximum of up to 32 IP
addresses can be specified in a comma separated list. Servers should be listed
in order of preference.
The lprserver parameter specifies a list of RFC 1179 line printer servers
available to the client. Line printer servers are specified by IP address. A
maximum of up to 32 IP addresses can be specified in a comma separated list.
Servers should be listed in order of preference.
The meritdumpfile parameter specifies the path name of a file where the
client’s core image should be dumped in the event the client crashes. The path
name is formatted as a character string consisting of characters from the NVT
ASCII character set.
The nbnodetype parameter specifies the NetBIOS node type that allows
NetBIOS over TCP/IP clients to be configured as described in RFC 1001/1002.
The nbscope parameter specifies the NetBIOS over TCP/IP scope parameter
for the client as specified in RFC 1001/1002.
The nisdomain parameter specifies the name of the client’s NIS domain. The
domain is formatted as a character string consisting of characters from the NVT
ASCII character set.
The rootpath parameter specifies the path name that contains the client’s root
disk. The path name is formatted as a character string consisting of characters
from the NVT ASCII character set.
The router parameter specifies a list of IP addresses for routers on the client’s
subnet. Routers are specified by IP address. A maximum of up to 32 IP
addresses can be specified in a comma separated list. Routers should be listed
in order of preference.
The routersolicit parameter specifies the address where the client should
transmit router solicitation requests.
The server parameter specifies the address of the server to use in the next step
of the client’s bootstrap process. As the switch is not capable of providing an
operating system executable, this option allows the IP address of an
appropriate TFTP server to be set.
The servername parameter specifies the name of the server host. This is passed
to the client.
The sourcerouting parameter specifies whether the client should configure its
IP layer to allow forwarding of datagrams with non-local source routes. A
value of disable disallows forwarding of such datagrams, and a value of
enable allows forwarding.
The staticroute parameter specifies a list of static routes that the client should
install in its routing cache. If multiple routes to the same destination are
specified, they are listed in descending order of priority. The routes consist of a
list of IP address pairs. The first address is the destination address, and the
second address is the router for the destination. A maximum of up to 32 IP
addresses can be specified in a comma separated list. The default route (0.0.0.0)
is an illegal destination for a static route.
The sublocal parameter specifies whether the client may assume that all
subnets of the IP network where the client is connected use the same MTU as
the subnet of that network where the client is directly connected. A value of on
indicates that all subnets share the same MTU. A value of off means that the
client should assume that some subnets of the directly connected network may
have smaller MTUs.
The swapserver parameter specifies the IP address of the client’s swap server.
The t1time parameter specifies the time interval, in seconds, from address
assignment until the client transitions to the renewing state.
The t2time parameter specifies the time interval, in seconds, from address
assignment until the client transitions to the rebinding state.
The tcpgarbage parameter specifies whether the client should send TCP
keepalive messages with a octet of garbage for compatibility with older
implementations. A value of off indicates that a garbage octet should not be
sent. A value of on indicates that a garbage octet should be sent.
The tcpkeepalive parameter specifies the interval (in seconds) that the client
TCP should wait before sending a keepalive message on a TCP connection. A
value of zero indicates that the client should not generate keepalive messages
on connections unless specifically requested by an application.
The tcpttl parameter specifies the default time-to-live value that the client
should use when sending TCP segments.
The timeoffset parameter specifies the offset of the client’s subnet in seconds
from Coordinated Universal Time (UTC).
The timeserver parameter specifies a list of RFC 868 time servers available to
the client. Time servers are specified by IP address. A maximum of up to 32 IP
addresses can be specified in a comma separated list. Servers should be listed
in order of preference.
The trailerencap parameter specifies whether the client should negotiate the
use of trailers (RFC 893) when using the ARP protocol. A value of off indicates
that the client should not attempt to use trailers. A value of on means that the
client should attempt to use trailers.
Examples To change the DN server for policy “base”, use the command:
set dhcp poli=base dnss=192.168.100.51
Description This command modifies the server’s method for probing IP addresses in the
specified range.
The probe parameter specifies how the DHCP server checks whether an IP
address is being used by other hosts. If arp is specified, the server sends ARP
requests to determine if an address is in use. If icmp is specified, the server
sends ICMP Echo Requests (pings). The default is icmp.
Note that arp cannot be specified if the range includes a gateway (by specifying
the gateway parameter when it was created), or if the network uses Proxy ARP.
Examples To set the range "office" to use ARP packets to probe IP addresses, use the
command:
set dhcp ran=office pro=arp
Description This command displays the current configuration of the BOOTP Relay Agent
(Figure 23-1, Table 23-1).
Figure 23-1: Example output from the show bootp relay command
Status : ENABLED
Maximum Hops : 4
BOOTP Counter
---------------
InPackets OutPackets InRejects InRequests InReplies
0000000000 0000000000 0000000000 0000000000 0000000000
Parameter Meaning
Status Whether the BOOTP Relay Agent is enabled.
Maximum Hops Maximum value allowed for the hops field in a BOOTP
message before the message is discarded.
Insertion Status The status of DHCP Option 82 insertion, either Enabled or
Disabled.
Check Whether DHCP Option 82 information returned from the
DHCP server is being checked, either Yes or No.
Reforwarding policy The re-forwarding policy of client DHCP packets, either
Replace, Keep, or Drop.
Debugging The status of DHCP Option 82 debugging, either Enabled or
Disabled.
BOOTP Relay Destinations List of IP addresses where BOOTREQUEST messages are
forwarded.
InPackets Total number of BOOTP packets received.
OutPackets Total number of BOOTP packets transmitted.
InRejects Number of incoming BOOTP packets rejected because of an
error in the packet.
InRequests Number of BOOTP requests received.
InReplies Number of BOOTP replies received.
Description This command displays port-related information about the BOOTP Relay port
settings.
Use the port parameter to specify the port to display BOOTP Relay information
for. If all is specified, information about all ports on the device is displayed.
Figure 1: Example output from the show bootp relay port command
Port .................... 2
Trusted ....................Yes
Subscriber-ID .............. -------------------------------
---------
Parameter Meaning
Port The number of the switch port
Trusted Whether the port is trusted, either Yes or No.
Subscriber-ID The subscriber-ID assigned to the port.
show dhcp
Description This command displays the state of the DHCP module (Figure 23-2,
Table 23-2).
DHCP Server
DHCP Client
Parameter Meaning
State Whether the status of the DHCP server is enabled or disabled.
BOOTP Status Whether the status of BOOTP serving is enabled or disabled.
Extended Client ID Whether extended client IDs are transmitted by this device;
either Enabled or Disabled.
BOOTP Status Whether the status of BOOTP serving is enabled or disabled.
Policies A list of the policies that have been defined.
Ranges A list of the ranges that have been defined.
In Messages Total number of DHCP or BOOTP messages received by the
switch.
Out Messages Total number of DHCP or BOOTP messages transmitted by the
switch.
In DHCP Messages Number of DHCP messages received by the switch.
Out DHCP Messages Number of DHCP messages transmitted by the switch.
Parameter Meaning
In BOOTP Messages Number of BOOTP messages received by the switch.
Out BOOTP Messages Number of BOOTP messages transmitted by the switch.
Interface Interface(s) on which this client is active.
Client Identifier Identifying token used in DHCP messages for this client.
State Current state of the DHCP client; either Renewing, Rebinding,
Selecting, Requesting, Bound, or Init.
Server DHCP server this client is connected to.
Assigned Domain Domain name provided for this client by the DHCP server.
Assigned IP IP address assigned to this client by the DHCP server.
Assigned Mask IP address mask matching the address assigned to this client.
Assigned Gateway Network gateway IP address provided by the DHCP server.
Assigned DNS Domain Name Server IP address provided by the DHCP server.
Examples To display the current configuration of the DHCP server, use the command:
sh dhcp
Description This command displays information about the currently defined range client
entries (Figure 23-3, Table 23-3 on page 23-41). If the range parameter is
specified, then the clients in the specified range are displayed. If an IP address
is specified on the client parameter, then information for that IP address is
displayed.
Figure 23-3: Example output from the show dhcp client command
Parameter Meaning
IP Address IP address from the range of available IP addresses.
ClientId Hardware address of the client, if any, that has been assigned the IP
address.
State State of the IP address:
Unused - not currently in use and is available for assignment
Inuse - currently assigned to a client
Reclaim - currently being reclaimed
Type Type of allocation mechanism applied to the IP address:
Static - manual allocation
Auto - automatic allocation
Dyn - dynamic allocation
Expiry Expiry date for dynamically allocated IP addresses.
Examples To display information about the clients in a range named “remote”, use the
command:
sh dhcp clie ran=remote
Description This command displays information about the currently defined policies
(Figure 23-4, Table 23-4). If a policy name is specified, then information about
the specified policy is displayed.
Figure 23-4: Example output from the show dhcp policy command
DHCP Policies
Name: pol1
Base Policy: none
01 subnetmask .... 255.255.255.0
03 router ........ 202.36.163.21
06 dnsserver ..... 192.168.100.50 192.168.100.33
51 leasetime ..... 3600
Name: prnt
Base Policy: pol1
01 subnetmask .... (pol1) 255.255.255.0
03 router ........ (pol1) 202.36.163.21
06 dnsserver ..... (pol1) 192.168.100.50 192.168.100.33
51 leasetime ..... (prnt) infinity
Parameter Meaning
Name Name of the policy.
Base Policy Base policy inherited by this policy.
options... A list of options configured for the policy. Each entry includes the DHCP
option identifier, the parameter keyword, and the current value(s) of
the option.
Examples To display information about the policy “base”, use the command:
sh dhcp poli=base
This command also displays counters for DHCP and BOOTP. BOOTP is used
to transport DHCP messages. If the switch is acting as a DHCP server for
clients on subnets that are not directly connected to one of the switch’s
interfaces, the DHCP messages are relayed through intermediate routers acting
as BOOTP relay agents.
Figure 23-5: Example output from the show dhcp range command
DHCP Ranges
Name: remote
Policy ..................... pol1
Probe Type ................. ICMP
Start Address .............. 192.168.100.92
End Address ................ 192.168.100.124
Reclaim Status ............. Deferred
Next reclaim in ............ 5 seconds
Used Address(es) ........... 192.168.100.92 192.168.100.94 192.168.100.95
192.168.100.96
Free Address(es) ........... 192.168.100.93 192.168.100.97 192.168.100.98
192.168.100.99 192.168.100.100 192.168.100.101
192.168.100.102
Reclaiming Address(es) ..... 192.168.100.103 192.168.100.104 192.168.100.105
192.168.100.106 192.168.100.107 192.168.100.108
192.168.100.109 192.168.100.110 192.168.100.111
192.168.100.112 192.168.100.113 192.168.100.114
192.168.100.115 192.168.100.116 192.168.100.117
192.168.100.118 192.168.100.119 192.168.100.120
192.168.100.121 192.168.100.122 192.168.100.123
In DHCP Messages ........... 0
In Discover Messages ....... 0
In Request Messages ........ 0
In Decline Messages ........ 0
In Release Messages ........ 0
Out DHCP Messages .......... 0
Out Offer Messages ......... 0
Out Ack Messages ........... 0
Out Nak Messages ........... 0
In BOOTP Messages .......... 0
Out BOOTP Messages ......... 0
Parameter Meaning
Name Name of the range.
Policy Policy that is applied to entries in the range.
Probe Type Whether the DHCP server’s method for probing IP addresses is
ICMP or ARP.
Start Address First IP address in the range.
End Address Last IP address in the range.
Reclaim Status Whether IP addresses are currently being reclaimed for clients:
In progress Yes
Stopped No
Deferred No available route to the IP address being reclaimed
Next reclaim in For ranges with deferred status, the time until the next reclaim is
attempted.
Used Address(es) List of IP addresses currently assigned to clients.
Free Address(es) List of IP addresses currently available for assignment.
Reclaiming Address(es) List of IP addresses currently being reclaimed from clients.
In DHCP Messages Total number of DHCP messages the server received for this range.
In Discover Messages Number of DHCP Discover messages the server received for this
range. A client broadcasts these messages to initiate a DHCP
session.
In Request Messages Number of DHCP Request messages the server received for this
range. A client uses this message to request parameters from a
server that has offered them, to check that a previously allocated
address is still correct (for example, after the client has rebooted)
and to extend its lease of an address.
In Decline Messages Number of DHCP Decline messages the server received for this
range. When a client is offered an address, it may use ARP to check
the address. The client sends a Decline message if it discovers that
the IP address the server has offered it is already being used by
another device.
In Release Messages Number of DHCP Release messages the server received for this
range. A client sends this message to relinquish an address when
it no longer requires it. This makes the address available to another
client.
Out DHCP Messages Total number of DHCP messages the server transmitted for this
range.
Out Offer Messages Number of DHCP Offer messages the server sent for this range.
The server sends this message in response to a client Discover
message to offer configuration parameters to the client.
Out Ack Messages Number of DHCP Acknowledgment messages the server sent for
this range. The server sends this message in response to a client
Request message, to supply the client with configuration
parameters.
Out Nak Messages Number of DHCP Negative Acknowledgment messages the server
sent for this range. The server sends this message in response to a
client Request message to tell the client that the IP address the
client believes it has is wrong, the IP address the server offered is
no longer available, or the client’s lease has expired.
Table 23-5: Parameters in output of the show dhcp range command (Continued)
Parameter Meaning
In BOOTP Messages Number of BOOTP messages the server received for this range.
Out BOOTP Messages Number of BOOTP messages the server transmitted for this range.
Total probe replies The total number of probe replies received for IP addresses in this
range. The server probes an IP address to determine if another host
is using the address. The probe is either an ARP request or an ICMP
Echo Request (ping). A probe reply indicates a conflict between the
IP address that the client is currently using and the server's current
client database.
Probe reply no details The number of probe replies received where the server was unable
to determine the client ID details of the responder. This results in
the DHCP client entry appearing as 'inuse', but with no ClientId.
Probed entry static The number of probe replies received when reclaiming static client
entries after start-up.
Probed client new The number of probe replies received from clients that are not
already in the server's client database. This can indicate either that
a statically configured client is setup within the DHCP range, or the
DHCP file was deleted or out of date when the server was
restarted. This can also occur if a client is moved from a dynamic
lease to a static lease.
Client has multiple IPs The number of times a client has replied to probes for more than
one IP address. This can happen if the server is using ARP probes
and a device in the network is configured for Proxy ARP.
Examples To display information about a range named “remote”, use the command:
sh dhcp rang=remote