To enable or disable insertion of the DHCP relay agent information option (option 82) in packets destined for a DHCP server, include the relay-option-82 statement:
-
relay-option-82 {
-
-
circuit-id {
-
prefix host-name logical-system-name
routing-instance-name;
- }
- }
To control insertion of option 82 information globally, include the relay-option-82 statement and subordinate statements at the [edit forwarding-options dhcp-relay] hierarchy level. To control insertion of option 82 information for a named group of interfaces, include the relay-option-82 statement and subordinate statements at the [edit forwarding-options dhcp-relay group group-name] hierarchy level.
To restore the default behavior (option 82 information is not inserted into DHCP packets), include the relay-option-82 statement with no subordinate statements.
If you use the relay-option-82 statement to enable insertion of option 82 information in DHCP packets, you must also specify at least the circuit-id statement to include the agent-circuit-id suboption (suboption 1) of the DHCP relay agent information option.
If you specify the circuit-id statement, the format of the agent-circuit id information for Fast Ethernet (fe) or Gigabit Ethernet (ge) interfaces is one of the following, depending on your network configuration:
- (fe | ge)-fpc/pic/port
- (fe | ge)-fpc/pic/port:vlan-id
- (fe | ge)-fpc/pic/port:svlan-id-vlan-id
For example, the following is the agent-circuit-id format for a Gigabit Ethernet interface on Flexible PIC Concentrator (FPC) 4, PIC 1, port 1 with S-VLAN ID 122 and VLAN ID 500:
- ge-4/1/1:122-500
Optionally, you can also include the prefix statement to add a prefix to the base option 82 information in DHCP packets destined for a DHCP server.
-
prefix host-name logical-system-name
routing-instance-name;
The prefix is separated from the option 82 agent-circuit-id information by a colon (:), and can include any combination of the host-name, logical-system-name, and routing-instance-name options. The DHCP relay agent obtains the values for the host-name, logical-system-name, and routing-instance-name as follows:
If you include the hostname and either or both the logical system name and the routing instance name in the prefix, the hostname is followed by a forward slash (/). If you include both the logical system name and the routing instance name in the prefix, these values are separated by a semicolon (;).
The following examples show several possible formats for the agent-circuit-id information when you specify the prefix statement for Fast Ethernet (fe) or Gigabit Ethernet (ge) interfaces with S-VLANs.
-
hostname:(fe | ge)-fpc/pic/port:svlan-id-vlan-id
-
logical-system-name:(fe | ge)-fpc/pic/port:svlan-id-vlan-id
-
routing-instance-name:(fe | ge)-fpc/pic/port:svlan-id-vlan-id
-
host-name/logical-system-name:(fe | ge)-fpc/pic/port:svlan-id-vlan-id
-
logical-system-name;routing-instance-name:(fe | ge)-fpc/pic/port:svlan-id-vlan-id
-
host-name/logical-system-name;routing-instance-name:(fe | ge)-fpc/pic/port:svlan-id-vlan-id
For example, the following is the agent-circuit-id format for a Gigabit Ethernet interface on FPC 4, PIC 1, port 1 with S-VLAN ID 122 and VLAN ID 500. In this example, the prefix consists of the hostname router1, the logical system name xyzcorp, and the routing instance name west.
- router1/xyzcorp;west:ge-4/1/1:122-500
For Fast Ethernet or Gigabit Ethernet interfaces that use VLANs but not S-VLANs, only the vlan-id value appears in the agent-circuit-id format. For Fast Ethernet or Gigabit Ethernet interfaces that do not use VLANs or S-VLANs, neither the vlan-id value nor the svlan-id value appears.