Recommended Operation for Switches Running
Relay Agent and Option 82
Version 1.0
September 7, 2004

Published by

EtherNet/IP Implementor Workshops
ODVA

Recommended Functionality for Switches running Relay Agent and Option 82

Document Revision Log
Revision
0.1

11/23/2004

Sections

Remarks
First released review copy

iDate
6/8/2004

AuthorKen Coley

PUB00088R0

Recommended Functionality for Switches running Relay Agent and Option 82

1 Introduction
1.1

Scope of Document

The purpose of the document is to document the DHCP Option 82 process and provide guidance
for switch vendors to provide a design compatible with the EtherNet/IP protocol. This document
is not intended to act as a formal requirements document. Please refer to RFC 3046 for specific
Implementation issues.

1.2

1.3

Definitions
DHCP –

Dynamic Host Configuration Protocol, a mechanism for an end device torequest its IP address.

Client –Device making a DCHP request (end node)

Relay Agent –A device which takes the standard multicast DHCP request packet anddirects it to a specific DHCP server (usually via a Unicast message)

Server –Device generating the reply to a DHCP request. Generally, the serveruses the requesters MAC address to do a table look up in order to provide
an IP address.

Future Revisions of the Recommendations

This document represents “V1.0” of the Functionality Recommendations. Further revisions of thedocument are anticipated as work progresses in the Implementor’s Workshop and other ODVA
SIGs.

1.4

Overview of the DHCP process

The process for a client to obtain its IP address via DHCP address from a server is as follows:
1)
2)
3)
4)
5)

11/23/2004

Client generates a DHCP request message via UDP broadcast
Servers listen for this request message
Servers respond with a DHCP reply and a valid IP addresses
Servers may respond with a random address or one based on a MAC addresstable lookup
Servers may “lease” the address for a specific time period or hand them out with
infinite lease.

1

PUB00088R0

Recommended Functionality for Switches running Relay Agent and Option 82

2 DHCP Option 82
DHCP Option 82 provides a mechanism for generating IP addresses based on location the client
device is in the network. Information about its location can be sent along with the request to theserver. The DHCP server makes a decision on what IP should be assigned based on thisinformation. In order to implement DHCP Option 82, the network must have the following
equipment:
1) Standard DHCP client2) Switch or router implementing Relay Agent with Option 82 support
3) DHCP server with Option 82 Support
An example configuration is shown in Figure 1 below:

Client Device (could be switch or enddevice)

Switch with Relay Agent and Option 82 Support

DHCP server supporting Option 82Figure 1, Example DHCP Option 82 enabled network
The DHCP relay agent and Option 82 are defined in RFC 3046. Relay Agent Information option
is inserted by the DHCP relay agent when forwarding client-originated DHCP packets to a DHCPserver. Servers recognizing the Relay Agent Information option may use the Information toimplement IP address or other parameter assignment policies. Switch or Router (as the DHCP
relay agent) intercepting the DHCP requests, appends the circuit ID + remote ID into the option
82 fields and forwards the request message to DHCP server.

11/23/2004

2PUB00088R0

Recommended Functionality for Switches running Relay Agent and Option 82The format of Relay Agent Option 82 options:
Sub-Option

Sub Value

1. Circuit ID

Contains info identifying port locationthat request is coming in on.

2. Remote ID

Not Used, currently the MAC addressof the Relay Agent

3. GiAddr

Gateway IP Address of the Relay
Agent. Part of the normal DHCP
message.
Figure 2: DHCP Option 82 Fields

Circuit ID
The Circuit ID field generally contains information describing the port location that the DHCP
request is coming in from. It may contain additional information that helps describe which IP
address should be assigned out, such as the VLAN ID. This value must be unique for a particularswitch or router that is providing the Relay Agent function. The value must also stay the same ifmodules are installed or removed in the Switch or Router that implements the Relay Agent.
Therefore, having subfields representing the Module, Slot and Port is highly recommended.

Remote ID
The Remote ID field is intended to carry information describing the device at the remote end ofthe link. However, in Ethernet systems, this is typically the MAC address of the Relay Agent.
This is not particularly useful since the MAC address would change if the Relay Agent was everyreplaced. Building a DHCP server database using the MAC address of the Relay Agent would
require that the table be rebuilt every time one of the Relay Agents was replaced. Some vendors
have modified this field to use the IP address of the Relay Agent or some other string describing
the Relay Agent. This field must be unique to the entire network.

GiAddr
The GiAddr (or Gateway Address) field is part of the normal DHCP message. It contains the IPaddress of the Relay Agent. Since IP addresses must be unique, this field is unique for the entire
network.
By combining the GiAddr and the Circuit ID, a network wide unique string can be created. Thisstring can be used for table lookup in the DHCP server. We called this string a pseudo MAC
address, since most DHCP servers do a MAC to IP mapping in their databases.

11/23/2004

3

PUB00088R0

Recommended Functionality for Switches running Relay Agent and Option 82

Relay Agent’s Inbound Operations
The following steps should be performed by the DHCP Relay Agent inbound:
1)
2)
3)
4)
5)
6)

Intercept all multicast based DHCPDISCOVER or DHCPREQUEST messages
Prevent multicast flooding to local access ports
Determine if the Relay Agent and Option 82 fields are already filled in
Skip the next still if they are
Fill in CID, RID, and the appropriate Relay Agent fields such as GiAddr
Send the message to the DHCP server via Unicast message

DHCP Server Actions
The following actions should be performed by the DHCP server when receiving aDHCPDISCOVER or DHCPREQUEST message with Option 82 set:
1)
2)
3)
4)
5)

Store all message fields temporarily
Create the pseudo MAC address by concatenating the CID field onto the GiAddr
field.
Perform a Table look up using this pseudo MAC address
Place the IP address in the DHCPREPLY message and restore correct fields
Unicast the DHCPREPLY message back to the Relay Agent

Relay Agent’s Outbound Operations
The following steps should be performed by the DHCP Relay Agent outbound in response to a
DHCPREPLY message:1)
2)

Remove the Option 82 fields
Direct the Unicast DHCPREPLY message to the appropriate requesting host.
DHCP ServerIf Option 82 aware, useappended information

Clients Broadcast
for DHCP Requests

213Relay agent fills in Option 82
Remote ID + Circuit ID
Fill in GiAddr and Unicast to
DHCP server

DHCP

DHCP

4DHCP

Based on appended information,
return IP Address, and policies

5

Strip-off option 82, implement policy
and forward IP address assignment

11/23/2004

4

PUB00088R0

Recommended Functionality for Switches running Relay Agent and Option 82

Switch replacement using DHCP Option 82 implementations in a redundantenvironment.
In the below diagram, Switch C is faulty and needs to be replaced. The network supports
DHCP Option 82.

If Switch A suffers a fault as well, this means that there must be redundant entries for Switch C in
the DHCP Server that show the redundant path going from Switch C a to Switch B. This is tomake sure that IP addresses are distributed correctly. Switch C will transmit its DHCP request on
the particular uplink that is in forwarding state via STP. However, based on topology changes,that uplink can either be port 6 or port 7. Therefore an entry in the DHCP server table must bepresent for Switch A port 7 and Switch B port 6. Both of these entries will contain the same IPaddress for Switch C.

Current Switches supporting DHCP Option 82••Cisco Switches– 2950, 2955, 2970, 3550, 3560, 3750, 4500, 6500
Hirschmann Switches– Mice2K/Mice3K, RS2xx/xx, RS2-16M, MACH3000

Current DHCP Servers supporting DHCP Option 82••••••

Cisco Network Registrar (CNR)
Infoblox
Lucent QIP
Microsoft 2003 Server (Still under test)
Weird Solutions
ISC Linux DHCP Server

For more information on DHCP, see DHCP A guide to Dynamic TCP/IP Network
Configuration by Berry Kercheval, Prentice Hall Publishing.

11/23/2004

5PUB00088R0