Commands For Dhcp Option 82

7.4 Commands for DHCP Option 82

7.4.1 debug ip dhcp relay packet

Command: debug ip dhcp relay packet
Function: This command is used to display data packets processing information in the DHCP Relay Agent including the option 82 ?add? and ?peel? action
Parameters: None.
Command mode: Admin Mode
Default: None.
User guide: Use this command to display data packet processing server procedures and the corresponding option 82 information. This includes identified option 82 information of the request message and the option 82 information returned by the reply message.
Example: Display the data packet processing information in the DHCP Relay Agent.

active500EM(config)#debug ip dhcp relay packet

 

7.4.2 ip dhcp relay information option

Command: ip dhcp relay information option
no ip dhcp relay information option
Function: Set this command to enable the option 82 function of the switch Relay Agent. The no command disables the option 82 function of the switch Relay Agent.
Parameters: None.
Command mode: Global Configuration Mode
Default: The system disables the option 82 function.
Usage guide: Only the DHCP Relay Agents configured with this command can add option 82 to the DHCP request message for server processing. Before enabling this function, users should make sure that the DHCP service is enabled and that the Relay Agent will transmit the UDP broadcast messages with destination port of 67.
Example: Enable the option 82 function of the Relay Agent.

active500EM(config)#service dhcp
active500EM(config)#ip forward-protocol udp bootps
active500EM(config)#ip dhcp relay information option

 

7.4.3 ip dhcp relay information option delimiter

Command: ip dhcp relay information option delimiter [colon | dot | slash | space] no ip dhcp relay information option delimiter
Function: Set the delimiter of each parameter for the opton 82 sub-option in Global Mode. The no command restores the delimiter as slash.
Parameters: None.
Command mode: Global Mode
Default: Slash (?/?).
Usage guide: Divide the parameters with the configured delimiters after they are defined. The parameters are used to create the option 82 sub-option (remot-de, circuit-id) in Global Mode.
Example: Set the parameter delimiters as dot (?.?) for the option 82 sub-option.

active500EM(config)#ip dhcp relay information option delimiter dot

 

7.4.4 ip dhcp relay information option remote-id

Command: ip dhcp relay information option remote-id {standard | <remote-id>}
no ip dhcp relay information option remote-id
Function: Set the sub-option 2 (remote ID option) content of option 82 added by the DHCP request packets (received by the interface). The no command sets the additive sub-option 2 (remote ID option) format of option 82 to standard.
Parameters:

  • standard: the default VLAN MAC format.
  • <remote-id>: the remote-id content of option 82 specified by the user. The length cannot exceed 64 characters.

Command mode: Global Mode
Default: Use standard format to set the option 82 remote-id.
Usage guide: The added option 82 information needs to be associated with the third-party DHCP server. It is used to specify the user remote-id content when the standard remote-id format cannot satisfy the server?s request.
Example: Set the DHCP sub-option remote-id option82 to street-1-1.

active500EM(config)#ip dhcp relay information option remote-id street-1-1

 

7.4.5 ip dhcp relay information option remote-id format

Command: ip dhcp relay information option remote-id format {default | vs-hp}
Function: Set the format for the Relay Agent option 82 remote-id.
Parameters:

  • default: remote-id is the VLAN MAC address in hexadecimal format.
  • vs-hp: remote-id is compatible with the remote-id format of the manufacturer HP(Hewlett-Packard).

Command mode: Global mode
Default: Default.
Usage guide: The default remote-id format is defined below:

  • MAC: VLAN MAC address.

The compatible remote-id format with HP is defined below:

  • IP: Layer 3 interface primary IP address where DHCP packets are from.

Example: Set Relay Agent option 82 remote-id as the compatible format with HP.

active500EM(config)#ip dhcp relay information option remote-id format vs-hp

 

7.4.6 ip dhcp relay information option self-defined remote-id

Command: ip dhcp relay information option self-defined remote-id {hostname | mac | string <WORD>}
no ip dhcp relay information option self-defined remote-id
Function: Set creation method for option 82. Users can define the parameters of remote-id sub-option.
Parameters:

  • <WORD>: the defined character string of remote-id. The valid maximum length is 64.

Command mode: Global Mode
Default: Using standard method.
Usage guide: After configuring this command, if users do not configure the remote-id on the interface, the remote-id sub-option for option82 will be created according to the defined parameter. For the MAC address, the format such as 00-02-d1-2e-3a-0d should be used if the packets are in ASCII format. Hex format occupies 6 bytes. Each option will fill the packets according to the configured order of the commands and divide them with the delimiter (the delimiter is IP DHCP relay information option delimiter configuration).
Example: Set the remote-id sub-option character string as ?hostname? and ?abc? respectively for option82.

active500EM(config)#ip dhcp relay information option self-defined remote-id hostname string abc

 

7.4.7 ip dhcp relay information option self-defined remote-id format

Command: ip dhcp relay information option self-defined remote-id format [ascii | hex] Function: Set the remote-id format for relay option 82.
Parameters: None.
Command mode: Global Mode
Default: ASCII.
Usage guide: Use IP DHCP relay information option type self-defined remote-id to create the remote-id format.
Example: Set the remote-id as hex for relay option82.

active500EM(config)#ip dhcp relay information option self-defined remote-id format hex

 

7.4.8 ip dhcp relay information option self-defined subscriber-id

Command: ip dhcp relay information option self-defined subscriber-id {vlan | port | id (switch-id (mac | hostname)| remote-mac)| string <WORD> }
no ip dhcp relay information option self-defined subscriber-id
Function: Set creation method for option82. Users can define the parameters of the circuit-id sub-option.
Parameters:

  • <WORD>: defined circuit-id character string. The maximum length is 64.

Command mode: Global Mode
Default: Standard method.
Usage guide: After configuring this command, if users do not configure circuit-id on the interface, the circuit-id sub-option for option82 will be created according to the self-defined method. If the self-defined format is ascii, the filled format of VLAN (?VLAN2?), the port format (?Ethernet1/0/1?), and the format of MAC and remote-MAC (?00-02-d1-2e-3a-0d?) are used. If the self-defined format is hex, the filled format of VLAN occupies 2 bytes and the port format occupies 4 bytes. A byte means slot (for a chassis switch, it means slot ID; for a box switch, it is 1). A byte means Module (the default is 0), two bytes means port ID beginning from 1, MAC and remote-MAC occupy 6 bytes. Each option will fill the packets according to the configured order of the commands and they will be divided with the delimiter (delimiter is IP DHCP relay information option delimiter configuration).
Example: Set circuit-id sub-option self-defined method as the port and MAC for option 82.

active500EM(config)#ip dhcp relay information option self-defined subscriber-id port id switch-id mac

 

7.4.9 ip dhcp relay information option self-defined subscriber-id format

Command: ip dhcp relay information option self-defined subscriber-id format [ascii | hex] Function: Set the circuit-id self-defined format for relay option 82.
Parameters: None.
Command mode: Global Mode
Default: ASCII.
Usage guide: For the self-defined format, use IP DHCP relay information option type self-defined subscriber-id to create the circuit-id format.
Example: Set the circuit-id self-defined format as hex for relay option 82.

active500EM(config)#ip dhcp relay information option self-defined subscriber-id format hex

 

7.4.10 ip dhcp relay information option subscriber-id

Command: ip dhcp relay information option subscriber-id {standard | <circuit-id>}
no ip dhcp relay information option subscriber-id
Function: This command is used to set the format of option 82 sub-option1 (Circuit ID option) added to the DHCP request messages from the interface. The no command sets the added option82 sub-option1 (Circuit ID option) format to a standard format.
Parameters:

  • standard: the standard VLAN name and physical port name format. For example, ?Vlan2+Ethernet1/0/12?.
  • <circuit-id>: the circuit-id contents of option82 specified by the users. The string is no longer than 64 characters.

Command mode: Interface Configuration Mode
Default: Standard format.
User Guide: The option 82 information added for the switch should cooperate with the third party DHCP server. If the standard circuit-id format of the switch cannot satisfy the server?s request, this method will provide users to specify the circuit-id contents according to the server status.
Example: Set the DHCP sub-option circuit-id option 82 as test-id, the name of the subscriber-id.

active500EM(config-if-vlan1)#ip dhcp relay information option subscriber-id test-id

 

7.4.11 ip dhcp relay information option subscriber-id format

Command: ip dhcp relay information option subscriber-id format {hex | acsii | vs-hp}
Function: Set the Relay Agent option 82 subscriber-id format.
Parameters:

  • hex: the subscriber-id is the VLAN and the port information is in hexadecimal format.
  • acsii: means that the subscriber-id is the VLAN and the port information is in ASCII format.
  • vs-hp: means that the subscriber-id is compatible with the HP format (Hewlett Packard).

Command mode: Global Mode
Default: ASCII.
User Guide: VLAN and port information in ASCII format (such as ?Vlan1+Ethernet1/0/11?) VLAN and port information in hexadecimal format is defined as below:

  • The VLAN field fills in VLAN ID. For a chassis switch, Slot means slot number. For a box switch, Slot is 1. Default Module is 0. Port means port number which begin with 1.

The compatible subscriber-id format with HP as defined below:

  • Port means port number which begins with 1.

Example: Set the Relay Agent option 82 subscriber-id format as hexadecimal format.

active500EM(config)#ip dhcp relay information option subscriber-id format hex

 

7.4.12 ip dhcp relay information policy

Command: ip dhcp relay information policy {drop | keep | replace}
no ip dhcp relay information policy
Function: This command is used to set the retransmitting policy of the system for the received DHCP request message which contains option 82. The no command sets the retransmitting policy of the option 82 DCHP message as ?replace?.
Parameters:

  • drop: means that if the message has option 82, then the system will drop it without processing.
  • keep: means that the system will keep the original option 82 segment in the message, and forward it to the server to process.
  • replace: means that the system will replace the option 82 segment in the existing message with its own option 82 segment and forward the message to the server to process.

Command mode: Interface Configuration Mode
Default: The system uses replace mode to replace the option 82 segment in the existing message with its own option 82 segment.
User Guide: The DHCP client messages might go through several DHCP Relay Agents when passing to the DHCP server. The latter Relay Agents on the path should set policies to decide how to process the option 82 added by Relay Agents before them. The option 82 selection retransmitting policies should take the configuration policy of the DHCP server into account.
Example: Set the DHCP message retransmitting policy option 82 as keep.

active500EM(Config-if-Vlan1)#ip dhcp relay information policy keep

 

7.4.13 ip dhcp server relay information enable

Command: ip dhcp server relay information enable
no ip dhcp server relay information enable
Function: This command is used to enable the switch DHCP server to identify option 82. The no command makes the server ignore option 82.
Parameters: None.
Command mode: Global Configuration Mode
Default Setting: Disabled.
User guide: If the users want the switch DHCP server to identify option 82 and return option 82 information in the reply message, this command needs to be set. Otherwise, the switch DHCP server will ignore option 82.
Example: Set the DHCP server to support option 82

active500EM(Config-if-Vlan1)#ip dhcp server relay information enable

 

7.4.14 show ip dhcp relay information option

Command: show ip dhcp relay information option
Function: This command will display the DHCP option 82 state in the system. This includes the option82 enabling switch, the interface retransmitting policy, the circuit ID mode, and the switch DHCP server option 82 enabling switch.
Parameters: None.
Command mode: Admin and Global Configuration Mode
Default: None.
User Guide: Use this command to check the Relay Agent option 82 state.
Example: Display the DHCP option 82 state in the system.

active500EM#show ip dhcp relay information option
ip dhcp server relay information option(i.e. option 82) is disabled
ip dhcp relay information option(i.e. option 82) is enabled
Vlan2:
        ip dhcp relay information policy keep
        ip dhcp relay information option subscriber-id standard
Vlan3:
        ip dhcp relay information policy replace
        ip dhcp relay information option subscriber-id test-id

 
Return to Controller Wired CLI Table of Contents