Guest

Cisco IOS Software Releases 12.3 T

DHCP Enhancements for Edge-Session Management

Table Of Contents

DHCP Enhancements for Edge-Session Management

Contents

Information About DHCP Enhancements for Edge-Session Management

DHCP Servers and Relay Agents

On-Demand Address Pool Management

Design of the DHCP Enhancements for Edge-Session Management Feature

DHCP Server Co-Resident with the SG

DHCP Relay Agent Co-Resident with the SG

Benefits of the DHCP Enhancements for Edge-Session Management

How to Configure DHCP Enhancements for Edge-Session Management

Configuring the DHCP Address Pool and a Class Name

Prerequisites

Configuring a Relay Pool with a Relay Source and Destination

Restrictions

Configuring a Relay Pool for a Remote DHCP Server

Restrictions

Configuring Other Types of Relay Pools

Configuring Relay Information for an Address Pool

Configuring Multiple Relay Sources for a Relay Pool

Configuration Examples for DHCP Enhancements for Edge Session Management

DHCP Address Range and Class Name Configuration: Example

DHCP Server Co-Resident with SG Configuration: Example

DHCP Relay Agent Co-Resident with SG Configuration: Example

Multiple DHCP Pools and Different ISPs Configuration: Example

Multiple Relay Sources and Destinations Configuration: Example

SG-Supplied Class Name Configuration: Example

Additional References

Related Documents

Standards

MIBs

RFCs

Technical Assistance

Command Reference

relay destination

relay source

relay target


DHCP Enhancements for Edge-Session Management


The DHCP Enhancements for Edge-Session Management feature provides the capability of simultaneous service by multiple Internet Service Providers (ISPs) to customers using one network infrastructure. The end-user customer may change ISPs at any time.

The DHCP enhancements evolved out of the Service Gateways (SGs) requirement to receive information from the DHCP server about when client DISCOVER packets (session initiation) are received, when an address has been allocated to a client, and when a client has released a DHCP lease or the lease has expired (session termination).

History for the DHCP Enhancements for Edge-Session Management Feature

Release
Modification

12.3(14)T

This feature was introduced.


Finding Support Information for Platforms and Cisco IOS Software Images

Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.

Contents

Information About DHCP Enhancements for Edge-Session Management

How to Configure DHCP Enhancements for Edge-Session Management

Configuration Examples for DHCP Enhancements for Edge Session Management

Additional References

Command Reference

Information About DHCP Enhancements for Edge-Session Management

To configure the DHCP Enhancements for Edge-Session Management feature, you should understand the following concepts:

DHCP Servers and Relay Agents

On-Demand Address Pool Management

Design of the DHCP Enhancements for Edge-Session Management Feature

DHCP Servers and Relay Agents

DHCP provides a framework for passing configuration information dynamically to hosts on a TCP/IP network. A DHCP client is an Internet host using DHCP to obtain configuration parameters such as an IP address.

A DHCP relay agent is any host that forwards DHCP packets between clients and servers. Relay agents are used to forward requests and replies between clients and servers when they are not on the same physical subnet. Relay agent forwarding is distinct from the normal forwarding of an IP router, where IP datagrams are switched between networks somewhat transparently. By contrast, relay agents receive DHCP messages and then generate a new DHCP message to send on another interface.

For more information, refer to the "Configuring DHCP" chapter in the Cisco IOS IP Configuration Guide, Release 12.3.

On-Demand Address Pool Management

An On-Demand Address Pool (ODAP) is used to centralize the management of large pools of addresses and simplifies the configuration of large networks. ODAP provides a central management point for the allocation and assignment of IP addresses.

When a Cisco router is configured as an ODAP manager, pools of IP addresses are dynamically increased or reduced in size depending on the address utilization level. The ODAP manager is supported by centralized Remote Authentication Dial-In User Service (RADIUS) or DHCP servers and is configured to request an initial pool of addresses from either the RADIUS or DHCP server.

The ODAP manager controls IP address assignment and will allocate additional IP addresses as necessary. This method of address allocation and assignment optimizes the use of available address space and simplifies the configuration of medium and large-sized networks.

For more information, see the DHCP ODAP Server Support feature document, Cisco IOS Release 12.2(15)T.

Design of the DHCP Enhancements for Edge-Session Management Feature

With the DHCP Enhancements for Edge-Session Management feature, a DHCP server and relay agent are separate, but closely coupled. The basic design of the feature encompasses two types of configuration at the edge of an ISP network as follows:

DHCP server and an SG that are co-resident (in the same device)

DHCP relay agent and an SG that are co-resident

DHCP Server Co-Resident with the SG

With this configuration, the DHCP server is in the same device as the SG and allocates addresses from locally configured address pools or acquires a subnet of addresses to allocate from some other system in the network. There are no changes to the server address allocation function to support the configuration.

This configuration enables the DHCP server to notify the SG that it has received a broadcast sent by the end-user DHCP client. The SG passes the MAC address and other information to the DHCP server. The SG also passes a class name (for example, the name of the ISP), which is used by the DHCP server to match a pool-class definition.

Lease-state notifications are always made by the DHCP server to the SG, because the information is already present.


Note The local configuration may also be performed by an ODAP that acquires subnets for the address pools from another DHCP server or a RADIUS server.


DHCP Relay Agent Co-Resident with the SG

With this configuration, the relay agent is in the same device as the SG and intercedes in DHCP sessions to appear as the DHCP server to the DHCP client. As the server, the relay agent may obtain enough information about the DHCP session to notify the SG of all events (for example, lease termination).

Appearing to be the DHCP server is performed by using the DHCP functionality that is currently in use on unnumbered interfaces. This functionality enables the relay agent to substitute its own IP address for the server.

The packet is passed by the relay agent to the DHCP server and the SG is notified of the receipt. Following the notification, an inquiry is made by the relay agent to the SG about which DHCP class name to use. Then, the packet is passed by the relay agent to the selected DGCP server.

The end-user DHCP client MAC address and other pertinent information is passed to the SG. The SG returns the DHCP class name to use when matching a DHCP pool if the SG is configured to do so. If the DHCP relay agent is not acting as a server, it relays the packet to the DHCP server.


Note An address pool may have one DHCP class defined to specify one central DHCP server to which the relay agent passes the packet, or it may have multiple DHCP classes defined to specify a different DHCP server for each client.


Benefits of the DHCP Enhancements for Edge-Session Management

The benefits of the DHCP Enhancements for Edge-Session Management feature are as follows:

Allows the full DHCP server system to be located farther inside the network, while only running a relatively simple DHCP relay agent at the edge.

Simplifies the DHCP configuration at the edge.

Allows all DHCP server administration to occur closer to the middle of the network on one centralized DHCP server, or on separate DHCP servers (one for each ISP).

Allows each ISP full control over all DHCP options and lease times.

Allows both the DHCP server and client configurations to be used on the same edge system simultaneously.

How to Configure DHCP Enhancements for Edge-Session Management

This section contains the following procedures:

Configuring the DHCP Address Pool and a Class Name (optional)

Configuring a Relay Pool with a Relay Source and Destination (required)

Configuring a Relay Pool for a Remote DHCP Server (required)

Configuring Other Types of Relay Pools (optional)

Configuring the DHCP Address Pool and a Class Name

Perform this task to configure a DHCP server that assigns addresses from an address pool for a specific class name that has been assigned by an SG that is co-resident with the DHCP server at the edge.

If a DHCP server is resident in the same device as an SG and both are at the edge, a class name and address pool should be configured. In this case, the DHCP server notifies an SG of a DISCOVER broadcast received from a client and the SG returns a class name. The returned class name designates an address range of an address pool. The DHCP server sends the MAC address and IP address of the incoming interface or the specified relay-agent address to the SG.


Note If the DHCP server has its address pools defined locally or retrieves the subnets from ISP DHCP servers or AAA servers using ODAP, additional DHCP server configuration on behalf of the SG is not required.


If dynamic allocation of the address pool is required using ODAP, the origin command is specified.

Prerequisites

The specification of the class name is required in the DHCP address-pool configuration and in the SG system itself to designate each DHCP client class name. A default class name should be configured if a user does not have one.

Each address pool should be associated with one or more DHCP classes (address-provider ISPs). When the DHCP client selects an ISP, the selection becomes the class name designated by the SG.

SUMMARY STEPS

1. enable

2. configure terminal

3. ip dhcp pool name

4. origin {dhcp | file url}

5. network network-number [mask | prefix-length]

6. class class-name

7. address range start-ip end-ip

8. Repeat Steps 3, 5, and 6.

9. exit

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2 

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3 

ip dhcp pool name

Example:

Router(config)# ip dhcp pool abc-pool

Configures a DHCP address pool on a Cisco IOS DHCP server and enters DHCP pool configuration mode. The name argument is the name of the pool and may either be a symbolic string (such as engineering) or an integer (such as 0).

Step 4 

origin {dhcp | file url}

Example:

Router(dhcp-config)# origin dhcp

(Optional) Configures an address pool as an On-Demand Address Pool (ODAP) or static mapping pool. The argument and keywords are as follows:

dhcp—DHCP address pool.

file—External database file that contains the static bindings assigned by the DHCP server.

url—Location of the external database file.

Step 5 

network network-number [mask | prefix-length]

Example:

Router(dhcp-config)# network 10.10.0.0 255.255.0.0

Configures the subnet number and mask for a DHCP address pool on a Cisco IOS DHCP server. The arguments are as follows:

network-number—The IP address of the DHCP address pool. Use this argument if ODAP is not the IP address assignment method.

mask—(Optional) The bit combination that renders which portion of the address of the DHCP address pool refers to the network or subnet and which part refers to the host.

prefix-length—(Optional) The number of bits that comprise the address prefix. The prefix is an alternative way of specifying the network mask of the client. The prefix length must be preceded by a forward slash (/).

Step 6 

class class-name

Example:

Router(dhcp-config)# class abc-pool

Associates a class with a DHCP address pool and enters DHCP pool-class configuration mode. The class-name argument is the name of the class. It should match the DHCP address pool name.

Repeat this step to specify a default class name if required by the SG.

Step 7 

address range start-ip end-ip

Example:

Router(config-dhcp-pool-class)# address range 10.10.5.0 10.99.99.99

(Optional) Configures an IP address range from which the DHCP server would allocate the IP addresses. If an SG returned an IP address that is not configured, no action is taken.

This step enables the allocation of an address from a range for the class name specified in the previous step.

Note The address range command cannot be used with a relay pool that is configured with the relay destination command. Further, if no address range is assigned to a class name, the address is specified with the network command.

Step 8 

Repeat Steps 3, 5, and 6.

If there is an interface configured with multiple subnets and different ISPs, repeat this step to match the number of subnets. See the "Multiple DHCP Pools and Different ISPs Configuration: Example" section.

Step 9 

exit

Example:

Router(config-dhcp-pool)# exit

Exits to DHCP pool configuration mode.

Configuring a Relay Pool with a Relay Source and Destination

Perform this task to configure a relay pool when the DHCP relay and SG are resident in the same device at the edge, and all end users will obtain addresses from one pool. This task replaces the IP helper-address interface configuration.

If the SG notifies the relay agent that DHCP session notifications are required for a particular DHCP client, the relay agent will retain enough information about the DHCP session to notify the SG of all events (for example, lease termination). The relay intercedes DHCP sessions and assumes the role of the DHCP server. The IP address configuration becomes a dynamically changing value depending on the DHCP client information and the SG device policy information.

Restrictions

If a relay agent is interceding in DHCP sessions and assuming the role of the DHCP server, the use of DHCP authentication is not possible.

SUMMARY STEPS

1. enable

2. configure terminal

3. ip dhcp pool name

4. update arp

5. relay source ip-address subnet-mask

6. relay destination [vrf vrf-name | global] ip-address

7. exit

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2 

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3 

ip dhcp pool name

Example:

Router(config)# ip dhcp pool abc-pool

Configures a DHCP address pool on a Cisco IOS DHCP server and enters DHCP pool configuration mode. The name argument is the name of the pool and may either be a symbolic string (such as engineering) or an integer (such as 0). More than one name may be configured.

Step 4 

update arp

Example:

Router(dhcp-config)# update arp

(Optional) Configures secure and dynamic Address Resolution Protocol (ARP) entries in the ARP table to their corresponding DHCP bindings.

Note If the system is allocating an address from an address pool, it will add secure ARP. If the system is relaying a packet using an address pool, it will also add secure ARP.

Step 5 

relay source ip-address subnet-mask

Example:

Router(dhcp-config)# relay source 10.0.0.0 255.0.0.0

Configures the relay source. The ip-address and subnet-mask arguments are the IP address and subnet mask for the relay source.

Note This command is similar to the network command in a normal DHCP network pool, because it restricts the use of the address pool to packets arriving on the interface whose configured IP address and mask matches the relay source configuration.

Step 6 

relay destination [vrf vrf-name | global] ip-address

Example:

Router(dhcp-config)# relay destination 10.5.5.0

Configures the IPv4 address of a remote DHCP server to which DHCP client packets are sent. The arguments and keywords are as follows:

vrf—(Optional) Virtual routing and forwarding (VRF). The vrf-name argument is the name of the VRF associated with the relay destination IP address.

global—(Optional) Global IP address. Use the this keyword when the relay agent is in the global address space and the relay source is in a VRF.

ip-address—IP address of the relay destination.

Note If the vrf keyword is not specified, the destination address is assumed to be in the same address space as the DHCP pool. If the vrf keyword is specified, the same VRF is assumed to apply here. However, if the destination IP address is actually in the global address space, the global keyword should be specified.

Step 7 

exit

Example:

Router(dhcp-config)# exit

Exits to global configuration mode.

Configuring a Relay Pool for a Remote DHCP Server

Perform this task to use an SG-supplied class name when selecting the remote DHCP server in a configured relay pool which is used to specify how DHCP client packets should be relayed. Multiple configurations of relay targets may appear in a pool-class definition in which case all addresses are used for relay purposes.

Restrictions

The relay source command cannot be used with the network command or origin command since those commands implicitly designate the incoming interface and are used to define a different type of pool. It associates the relay only with an interface in the same way that the ip helper-address command does by its presence as an interface configuration command.

SUMMARY STEPS

1. enable

2. configure terminal

3. ip dhcp pool name

4. relay source ip-address subnet-mask

5. relay destination [vrf vrf-name | global] ip-address

6. class class-name

7. relay target [vrf vrf-name | global] ip-address

8. exit

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2 

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3 

ip dhcp pool name

Example:

Router(config)# ip dhcp pool abc-pool

Configures a DHCP address pool on a Cisco IOS DHCP server and enters DHCP pool configuration mode. The name argument is the name of the pool and may either be a symbolic string (such as engineering) or an integer (such as 0). You may specify more than one DHCP address pool.

Step 4 

relay source ip-address subnet-mask

Example:

Router(dhcp-config)# relay source 10.0.0.0 255.0.0.0

Configures the relay source. The ip-address and subnet-mask arguments are the IP address and subnet mask for the relay source.

Note This command is similar to the network command in a normal DHCP network pool, because it restricts the use of the address pool to packets arriving on the interface whose configured IP address and mask matches the relay source configuration.

Step 5 

relay destination [vrf vrf-name | global] ip-address

Example:

Router(dhcp-config)# relay destination 10.5.5.0

Configures the IPv4 address of a remote DHCP server to which DHCP client packets are sent. The arguments and keywords are as follows:

vrf—(Optional) Virtual routing and forwarding (VRF). The vrf-name argument is the name of the VRF associated with the relay destination IP address.

global—(Optional) Global IP address. Use the this keyword when the relay agent is in the global address space and the relay source is in a VRF.

ip-address—IP address of the relay destination.

Note If the vrf keyword is not specified, the destination address is assumed to be in the same address space as the DHCP pool. If the vrf keyword is specified, the same VRF is assumed to apply here. However, if the destination IP address is actually in the global address space, the global keyword should be specified.

Step 6 

class class-name

Example:

Router(dhcp-config)# class abc-pool

Associates a class with a DHCP address pool and enters DHCP pool-class configuration mode. The class-name argument is the name of the class. You may configure more than one class name.

Step 7 

relay target [vrf vrf-name | global] ip-address

Example:

Router(config-dhcp-pool-class)# relay target 10.0.0.0

Configures the relay target IP address. The arguments and keywords are as follows:

vrf—(Optional) Virtual routing and forwarding (VRF). The vrf-name argument is the name of VRF associated with the relay target IP address and more than one target may be specified.

global—(Optional) Global IP address space.

ip-address—IP address of the relay target. More than one target IP address may be specified.

Note This command specifies the destination for the relay function in the same way as the ip helper-address command does.

Step 8 

exit

Example:

Router(config-dhcp-pool-class)# exit

Exits to DHCP pool configuration mode.

Configuring Other Types of Relay Pools

This section contains the following procedures:

Configuring Relay Information for an Address Pool (required)

Configuring Multiple Relay Sources for a Relay Pool (required)

Configuring Multiple Relay Sources for a Relay Pool (required)

Configuring Relay Information for an Address Pool

Perform this task to configure relay information for an address pool. In this configuration, the SG sends one class name that results in the DISCOVER packet being relayed to a server at the IP address configured using the relay target command. If the SG sends a class name that is not configured as being associated with the address pool, then no action is taken.

Restrictions

Specifying the address range command and relay target command in a pool-class definition is not possible, because this would allocate an address and relay for the same packet.

SUMMARY STEPS

1. enable

2. configure terminal

3. ip dhcp pool name

4. network network-number [mask | prefix-length]

5. class class-name

6. relay target [vrf vrf-name | global] ip-address

7. exit

8. Repeat Steps 5 through 7 for each DHCP class you need to configure.

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2 

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3 

ip dhcp pool name

Example:

Router(config)# ip dhcp pool abc-pool

Configures a DHCP address pool on a Cisco IOS DHCP server and enters DHCP pool configuration mode. The name argument is the name of the pool and may either be a symbolic string (such as engineering) or an integer (such as 0).

Step 4 

network network-number [mask | prefix-length]

Example:

Router(dhcp-config)# network 10.0.0.0 255.0.0.0

Configures the subnet number and mask for a DHCP address pool on a Cisco IOS DHCP server. The arguments are as follows:

network-number—The IP address of the DHCP address pool.

mask—(Optional) The bit combination that renders which portion of the address of the DHCP address pool refers to the network or subnet and which part refers to the host.

prefix-length—(Optional) The number of bits that comprise the address prefix. The prefix is an alternative way of specifying the network mask of the client. The prefix length must be preceded by a forward slash (/).

Step 5 

class class-name

Example:

Router(dhcp-config)# class abc-pool

Associates a class with a DHCP address pool and enters DHCP pool-class configuration mode. The class-name argument is the name of the class. More than one class name may be configured.

Note If no relay target or address range is configured for a DHCP pool class name, the DHCP pool configuration is used as the class by default.

Step 6 

relay target [vrf vrf-name | global] ip-address

Example:

Router(config-dhcp-pool-class)# relay target 10.0.0.0

Configures the relay target IP address. The arguments and keywords for the relay target command are as follows:

vrf—(Optional) Virtual routing and forwarding (VRF). The vrf-name argument is the name of VRF associated with the relay target IP address and more than one target may be specified.

global—(Optional) Global IP address space.

ip-address—IP address of the relay target. More than one target IP address may be specified.

Note If the vrf keyword is not specified, the target address is assumed to be in the same address space as the DHCP pool. If the vrf keyword is specified, the same VRF is assumed to apply here. However, if the target IP address is actually in the global address space, the global keyword should be specified.

Step 7 

exit

Example:

Router(DHCP-pool-class)# exit

Exits to DHCP pool configuration mode.

Step 8 

Repeat Steps 5 through 7 for each DHCP class you need to configure.

Configuring Multiple Relay Sources for a Relay Pool

Perform this task to configure multiple relay sources for a relay pool. The configuration is similar to configuring a IP helper address on multiple interfaces. Pools are matched to the IP addresses on an incoming interface in the order in which the interfaces display when the show running-config command is used. Once a relay is found or an address allocation is found, the search stops.

SUMMARY STEPS

1. enable

2. configure terminal

3. interface type number

4. ip address ip-address mask [secondary]

5. exit

6. ip dhcp pool name

7. relay source ip-address subnet-mask

8. relay destination [vrf vrf-name | global] ip-address

9. Repeat Steps 6 and 7 for each configured DHCP pool.

10. exit

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2 

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3 

interface type number

Example:

Router(config)# interface ethernet1

Configures an interface and enters interface configuration mode. The arguments are as follows:

type—Type of interface.

number—Port, connector, or interface card number. On Cisco 4700 series routers, specifies the network interface module (NIM) or network processor module (NPM) number. The numbers are assigned at the factory at the time of installation or when added to a system, and may be displayed with the show interfaces command.

Note Refer to the Cisco IOS Interface and Component Command Reference, Release 12.3T, for more information.

Step 4 

ip address ip-address mask [secondary]

Example:

Router(config-if)# ip address 10.0.0.0 255.0.0.0

Sets a primary or secondary IP address for an interface.

Step 5 

exit

Example:

Router(config-if)# exit

Exits to global configuration mode.

Step 6 

ip dhcp pool name

Example:

Router(config)# ip dhcp pool abc-pool1

Configures a DHCP address pool on a DHCP server and enters DHCP pool configuration mode. The name argument is the name of the pool and may either be a symbolic string (such as engineering) or an integer (such as 0). More than one pool may be assigned.

Step 7 

relay source ip-address subnet-mask

Example:

Router(dhcp-config)# relay source 10.0.0.0 255.0.0.0

Configures the relay source. The ip-address and subnet-mask arguments are the IP address and subnet mask for the relay source.

Note This command is similar to the network command in a normal DHCP network pool, because it restricts the use of the address pool to packets arriving on the interface whose configured IP address and mask matches the relay source configuration.

Step 8 

relay destination [vrf vrf-name | global] ip-address

Example:

Router(dhcp-config)# relay destination 10.5.5.0

Configures the IPv4 address of a remote DHCP server to which DHCP client packets are sent. The arguments and keywords are as follows:

vrf—(Optional) Virtual routing and forwarding (VRF). The vrf-name argument is the name of the VRF associated with the relay destination IP address.

global—(Optional) Global IP address. Use the this keyword when the relay agent is in the global address space and the relay source is in a VRF.

ip-address—IP address of the relay destination.

Note If the vrf keyword is not specified, the destination address is assumed to be in the same address space as the DHCP pool. If the vrf keyword is specified, the same VRF is assumed to apply here. However, if the destination IP address is actually in the global address space, the global keyword should be specified.

Step 9 

Repeat Steps 6 and 7 for each configured DHCP pool.

Step 10 

exit

Example:

Router(dhcp-config)# exit

Exits to global configuration mode.

Configuration Examples for DHCP Enhancements for Edge Session Management

This section provides the following configuration examples:

DHCP Address Range and Class Name Configuration: Example

DHCP Server Co-Resident with SG Configuration: Example

DHCP Relay Agent Co-Resident with SG Configuration: Example

Multiple DHCP Pools and Different ISPs Configuration: Example

SG-Supplied Class Name Configuration: Example

DHCP Address Range and Class Name Configuration: Example

The following example shows how to configure an address range for a particular network and class name for a DHCP pool.

ip dhcp pool abc-pool
 network 10.10.0.0 255.255.0.0
 class abc-pool
  address range 10.10.5.0 10.10.5.99

DHCP Server Co-Resident with SG Configuration: Example

In the following example, the ISPs are ABC and DEF companies. The ABC company has its addresses assigned from an address pool that is dynamically allocated using ODAP. The DEF company has its customer addresses assigned from the address pool 10.100.0.0/16. Customers not associated with any ISP will have an address allocated from the address pool 10.1.0.0/16 and the lease time is set to 10 minutes.

!Interface configuration

interface ethernet1
 ip address 10.20.0.1. 255.255.0.0
 ip address 10.1.0.1 255.255.0.0 secondary
 ip address 10.100.0.1 255.255.0.0 secondary

!Address pool for ABC customers

ip dhcp pool abc-pool
 network 20.1.0.0 255.255.0.0
 class abc
!
!Address pool for DEF customers
ip dhcp pool def-pool
 network 10.100.0.0 255.255.0.0
 class def
!Address pool for customers without an ISP
ip dhcp pool temp
 network 10.1.0.0 255.255.0.0
 lease 0 0 10
 class default

DHCP Relay Agent Co-Resident with SG Configuration: Example

In the following example, there are two ISPs: abcpool and defpool. The abcpool ISP and its customers are allowed to have addresses in the ranges 10.1.0.0/16 and 30.1.0.0/16 and are relayed to the DHCP server at 10.55.10.1. The defpool ISP and its customers are allowed to have addresses in the ranges 20.1.0.0/16 and 40.4.0.0/16 and are relayed to the DHCP server at 12.10.2.1.

!Address ranges:

interface ethernet1
 ip address 10.1.0.0 255.255.0.0
 ip address 10.2.0.0 255.255.0.0 secondary

interface ethernet2
 ip address 10.3.0.0 255.255.0.0
 ip address 10.4.0.0 255.255.0.0 secondary

!Address pools for abcpool1 and abcpool2:

ip dhcp pool abcpool1
 relay source 10.1.0.0 255.255.0.0
 class abcpool
  relay target 10.5.10.1

!Address pool for abcpool2:

ip dhcp pool abcpool2
 relay source 10.1.0.0 255.255.0.0
 class abcpool
  relay target 10.55.10.1

!Address pools for defpool1 and defpool2:

ip dhcp pool defpool1
 relay source 10.1.0.0 255.255.0.0
 class defpool
  relay target 10.10.2.1

ip dhcp pool defpool2
 relay source 10.4.0.0 255.255.0.0
 class defpool
  relay target 10.10.2.1

Multiple DHCP Pools and Different ISPs Configuration: Example

The following example shows how to configure one interface and multiple DHCP pools that have different ISPs by using the network command.

interface ethernet1
 ip address 10.0.0.1 255.0.0.0
 ip address 10.1.0.1 255.0.0.0
!
ip dhcp pool x
 network 10.0.0.0 255.0.0.0
 class ISP1
!
ip dhcp pool y
 network 10.1.0.0 255.0.0.0
 class ISP2

Multiple Relay Sources and Destinations Configuration: Example

In the following example, multiple relay sources and destinations may be configured for a relay pool. This is similar the ip helper-address configuration on multiple interfaces. Pools are matched to the (possibly multiple) IP addresses on an incoming interface in the order in which they appear when using the show running-config command to display information about that interface. Once either a relay is found or an address allocation is found, the search stops. For example, given the following configuration:

interface ethernet1
 ip address 10.0.0.1 255.0.0.0
 ip address 10.0.0.5 255.0.0.0 secondary

ip dhcp pool x
 relay source 10.0.0.0 255.0.0.0
 relay destination 10.0.0.1

ip dhcp pool y
 relay source 10.0.0.0 255.0.0.0
 relay destination 10.0.0.1

In the following example, the DHCP client packet would be relayed to 10.0.0.1, if the SG specified ISP1 as the class name, and would be relayed to 10.0.0.5, if the SG specified ISP2 as the class name.

interface ethernet1
 ip address 10.0.0.1 255.0.0.0
 ip address 10.0.0.5 255.0.0.0 secondary

ip dhcp pool x
 relay source 10.0.0.0 255.0.0.0
 relay destination 10.2.0.0 255.0.0.0
 class ISP1
  relay target 10.0.0.1
 class ISP2
  relay target 10.0.0.5

SG-Supplied Class Name Configuration: Example

In the following example, an SG-supplied class name is to be used in selecting the remote DHCP server to which packets should be relayed.

ip dhcp pool abc-pool-1
 relay source 10.1.0.0 255.255.0.0
 relay destination 10.1.0.0
 class classname1
  relay target 10.20.10.1
 class classname2
  relay target 10.0.10.1
 class classname3

In the example above, an SG-supplied class name, called classname1, would relay the DHCP DISCOVER packet to the server at the relay target IP address 10.20.10.1, while SG classname2 would relay the DHCP DISCOVER packet to the server at the relay target IP address 10.0.10.1. This configuration relays the packet to destination IP address 10.0.0.1, because the pool matches the first configured address on the interface. If the SG returns a classname3, then the default pool is the default address specified as the relay destination. If the SG returns any class name other than classname1, classname2, or classname3, then no relay action is taken.

Additional References

The following sections provide references related to DHCP Enhancements for Edge-Session Management.

Related Documents

Related Topic
Document Title

IP addressing and services configuration tasks

Cisco IOS IP Configuration Guide, Release 12.3

IP addressing and services commands: complete command syntax, command mode, command history, defaults, usage guidelines, and examples

Cisco IOS IP Command Reference, Volume 1 of 4: Addressing and Services, Release 12.3T

DHCP configuration tasks

"Configuring DHCP" chapter in the Cisco IOS IP Configuration Guide, Release 12.3

DHCP Option 82 overview

DHCP Option 82 Support for Routed Bridge Encapsulation, Release 12.2(2)T


Standards

Standards
Title

No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.


MIBs

MIBs
MIBs Link

No new or modified MIBs are supported by this feature, and support for existing MIBs has not been modified by this feature.

To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:

http://www.cisco.com/go/mibs


RFCs

RFCs
Title

No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature.


Technical Assistance

Description
Link

Technical Assistance Center (TAC) home page, containing 30,000 pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users may log in from this page to access even more content.

http://www.cisco.com/public/support/tac/home.shtml


Command Reference

This section documents new commands only.

relay destination

relay source

relay target

relay destination

To configure an IP address for a relay destination to which packets are forwarded by a DHCP relay agent functioning as a DHCP server, use the relay destination command in DHCP-pool configuration mode. To disable the IP address, use the no form of this command.

relay destination [vrf vrf-name | global] ip-address

no relay destination [vrf vrf-name | global] ip-address

Syntax Description

vrf

(Optional) Configured virtual routing and forwarding (VRF) that is associated with the relay destination address. The vrf-name argument specifies the name of the VRF table.

Note If the vrf keyword is not specified, the destination address is assumed to be in the same address space as the DHCP pool. If the vrf keyword is specified, the same VRF is assumed to apply here. However, if the destination IP address is actually in the global address space, the global keyword should be specified.

global

(Optional) IP address selected from the global address space. If the pool does not have any VRF configuration, then the relay destination address defaults to the global address space.

ip-address

IPv4 address of the remote DHCP server to which the DHCP client packets are relayed.


Defaults

No destination IP address to which packets are forwarded is configured.

Command Modes

DHCP-pool configuration

Command History

Release
Modification

12.3(14)T

This command was introduced.


Usage Guidelines

The relay destination command serves the same function as the relay target command, except that the relay target command specifies the DHCP server to which packets should be forwarded only for the class under which it is configured, and the relay destination command specifies the DHCP server to which packets should be forwarded for the pool itself. The relay target command overrides the relay destination command in cases in which the configured class name has been specified by the SG.

Examples

In the following example, multiple relay sources and destinations may be configured for a relay pool. This is similar the ip helper-address configuration on multiple interfaces. Pools are matched to the (possibly multiple) IP addresses on an incoming interface in the order in which they appear when using the show running-config command to display information about that interface. Once either a relay is found or an address allocation is found, the search stops. For example, given the following configuration:

interface ethernet1
 ip address 21.0.0.1 255.0.0.0
 ip address 22.0.0.5 255.0.0.0 secondary

ip dhcp pool x
 relay source 21.0.0.0 255.0.0.0
 relay destination 10.0.0.1

ip dhcp pool y
 relay source 22.0.0.0 255.0.0.0
 relay destination 20.0.0.1

In the following example, the DHCP client packet would be relayed to 10.0.0.1, if the SG specified ISP1 as the class name, and would be relayed to 20.0.0.1, if the SG specified ISP2 as the class name.

interface ethernet1
 ip address 21.0.0.1 255.0.0.0
 ip address 22.0.0.5 255.0.0.0 secondary

ip dhcp pool x
 relay source 21.0.0.0 255.0.0.0
 relay source 22.0.0.0 255.0.0.0
  case ISP1
 relay target 10.0.0.1
  case ISP2
 relay target 20.0.0.1

Related Commands

Command
Description

relay source

Configures an IP address for a relay source from which packets are forwarded by a DHCP server.

relay target

Configures an IP address for a relay target to which packets are forward by a DHCP server.


relay source

To configure an IP address for a relay source from which packets are forwarded by a DHCP server, use the relay source command in DHCP-pool configuration mode. To disable the IP address, use the no form of this command.

relay source ip-address subnet-mask

no relay source ip-address subnet-mask

Syntax Description

ip-address

IPv4 address of DHCP server from which the DHCP client packets are relayed.

subnet-mask

Subnet mask that matches the subnet of the incoming interface of the DHCP client packet.


Defaults

No IP address from which IP packets are forwarded is configured.

Command Modes

DHCP-pool configuration

Command History

Release
Modification

12.3(14)T

This command was introduced.


Examples

The following example shows how to configure a source IP address from which DHCP client packets are relayed:

ip dhcp pool abc1
 relay source 10.0.0.0 255.255.0.0
 relay destination 10.5.1.1

Related Commands

Command
Description

relay destination

Configures an IP address for a relay destination to which packets are forwarded by a DHCP server.

relay target

Configures an IP address for a relay target to which packets are forward by a DHCP server.


relay target

To configure an IP address for a relay target to which packets are forwarded by a DHCP server, use the relay target command in DHCP pool-class configuration mode. To disable the IP address, use the no form of this command.

relay target [vrf vrf-name | global] ip-address

no relay target [vrf vrf-name | global] ip-address

Syntax Description

vrf

(Optional) Configured virtual routing and forwarding (VRF) that is associated with the relay destination address. The vrf-name argument specifies the name of the VRF table.

Note If the vrf keyword is not specified, the target address is assumed to be in the same address space as the DHCP pool. If the vrf keyword is specified, the same VRF is assumed to apply here. However, if the target IP address is actually in the global address space, the global keyword should be specified.

global

(Optional) IP address selected from the global address space. If the pool does not have any VRF configuration, then the relay destination address defaults to the global address space.

ip-address

IPv4 address of the remote DHCP server to which the DHCP client packets are relayed.


Defaults

No target IP address is configured.

Command Modes

DHCP pool-class configuration

Command History

Release
Modification

12.3(14)T

This command was introduced.


Usage Guidelines

The re