CSS Routing and Bridging Configuration Guide (Software Version 8.20)
Configuring DHCP Relay Agent

Table Of Contents

Configuring the DHCP Relay Agent

DHCP Relay Agent Configuration Quick Start

Adding a DHCP Destination on a Circuit

Enabling and Disabling DHCP on the Circuit

Defining the Hops Field Value for Forwarding DHCP Messages

Displaying the DHCP Relay Configuration


Configuring the DHCP Relay Agent


The Dynamic Host Configuration Protocol (DHCP) servers provide configuration parameters to DHCP clients. When DHCP clients and associated servers do not reside on the same IP network or subnet, a DHCP relay agent can transfer DHCP messages between them. To configure a DHCP relay agent on a CSS, define DHCP server destinations on a circuit and enable the DHCP relay agent on the circuit.

You must first assign an IP address on the circuit to be able to configure the DHCP relay agent for the circuit. Use the ip address command in the specific circuit mode to assign the IP address and a subnet mask. For example:

(config-circuit[VLAN2])# ip address 178.3.6.53/8

This chapter contains the following major sections:

DHCP Relay Agent Configuration Quick Start

Enabling and Disabling DHCP on the Circuit

Defining the Hops Field Value for Forwarding DHCP Messages

Displaying the DHCP Relay Configuration

DHCP Relay Agent Configuration Quick Start

Table 8-1 provides a quick overview of the steps required to configure the DHCP relay agent for the circuit. Each step includes the CLI command required to complete the task. For a complete description of each feature and all the options associated with the CLI command, see the sections following Table 8-1.

Table 8-1 DHCP Relay Agent Configuration Quick Start 

Task and Command Example

1. Specify the DHCP relay destination IP address in dotted-decimal notation.

(config-circuit[VLAN2])# dhcp relay-to 192.168.22.25

2. Enable the DHCP relay agent on the CSS circuit.

(config-circuit[VLAN2])# dhcp-relay-agent

3. Set the maximum allowable number in the hops field of the BOOTP header.

(config)# dhcp-agent max-hops 10

4. (Optional) Verify the DHCP configuration.

(config)# # show dhcp-relay-agent global

The following running-configuration example shows the results of entering the commands in Table 8-1.

!*************************** GLOBAL ***************************
dhcp-agent max-hops 10 
!************************** CIRCUIT **************************
circuit VLAN2
  dhcp relay-to 192.168.22.25 
  dhcp-relay-agent 

Adding a DHCP Destination on a Circuit

A CSS circuit acts as the DHCP relay agent. For each circuit on the CSS, you can configure a maximum of five DHCP destinations. The initial DHCP broadcast request is sent to all of the configured destinations.

Do not configure a relay destination on a circuit when the relay destination is directly connected to or reachable from one of the ports on the same circuit. In this case, the DHCP packets reach the relay destination through normal broadcast and a relay agent is not required.

Use the dhcp relay-to command to specify the DHCP relay destination address. This command is available in circuit configuration mode. Enter an IP address in dotted-decimal notation.

For example, to add a destination address of 192.168.22.25 to a DHCP server, enter:

(config-circuit[VLAN2])# dhcp relay-to 192.168.22.25

To remove the relay destination address, enter:

(config-circuit[VLAN2])# no dhcp relay-to 192.168.22.25

Enabling and Disabling DHCP on the Circuit

After you enable the DHCP relay agent on the CSS circuit, the CSS transfers DHCP messages between DHCP clients and servers. Use the dhcp-relay-agent command to enable the agent on the circuit. This command is available in circuit configuration mode.

For example:

(config-circuit[VLAN2])# dhcp-relay-agent

To disable the DHCP relay agent on the circuit, enter:

(config-circuit[VLAN2])# no dhcp-relay-agent

Defining the Hops Field Value for Forwarding DHCP Messages

The CSS forwards or discards a DHCP message based on the hops field value in the BOOTP header. When messages have values in the hops fields that exceed the maximum value set on the CSS, the CSS discards the message. Use the dhcp-agent max-hops global configuration command to set the maximum allowable number in the hops field. By default, the maximum allowable number is 4. You can set a number from 1 to 15.

For example, to set the maximum allowable value of 10, enter:

(config)# dhcp-agent max-hops 10

To reset the maximum allowable number in the hops field to the default of 4, enter:

(config)# no dhcp-agent max-hops

Displaying the DHCP Relay Configuration

Use the show dhcp-relay-agent global command to display the DHCP configuration information on the CSS. This command is available in all modes. For example:

# show dhcp-relay-agent global

Table 8-2 describes the fields in the show dhcp-relay-agent global command output.

Table 8-2 Field Descriptions for the show dhcp-relay-agent global
Command 

Field
Description

Max Hops

The maximum allowable number in the hops field of the BOOTP header. The CSS does not forward packets with headers that contain a larger number.

Number of circuits configured for DHCP

The number of CSS circuits configured for DHCP.

Circuit

The circuit configured for DHCP.

IfAddress

The interface address for the circuit.

DHCP State

The DHCP relay agent state on the circuit (Enabled or Disabled).

Relay destination

The DHCP relay destination address for the server. Each circuit can have five destination addresses.