< Home

Inserting the Option 18 or Option 37 Field in a DHCPv6 Message

Context

The function of inserting the Option 18 or Option 37 field in a DHCPv6 message is similar to that of inserting the Option 82 field in a DHCPv4 message. The Option 18 field contains the interface ID of a client and the Option 37 field contains the MAC address of a client. A device inserts the Option 18 or Option 37 field to a DHCPv6 Request message to notify the DHCP server of the DHCPv6 client location. This allows the DHCP server to assign an IP address and other configurations to the DHCPv6 client, facilitating DHCP client security.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface interface-type interface-number

    The interface view is displayed.

  3. Run dhcpv6 { option18 | option37 } { insert | rebuild } enable

    The device is enabled to insert the Option 18 or Option 37 field to a DHCPv6 Request message.

    By default, the device is disabled from inserting the Option 18 or Option 37 field in a DHCPv6 message.

    If you run the dhcpv6 { option18 | option37 } enable command in the VLAN view, the command takes effect for all the DHCPv6 messages received from the specified VLAN. If you run the dhcpv6 { option18 | option37 } enable command in the interface view, the command takes effect for all the DHCPv6 messages received on the specified interface.

  4. Run quit

    Return to the system view.

  5. (Optional) You can configure the format of Option 18 field inserted in DHCPv6 messages in the system view, VLAN view, or interface view.

    • In the system view:
      1. Run dhcpv6 option18 [ vlan vlan-id ] [ ce-vlan ce-vlan-id ] format user-defined text

        The format of Option 18 field inserted in DHCPv6 messages is configured.

        By default, the format of Option 18 field inserted in DHCPv6 messages is not configured.

    • In the VLAN view:
      1. Run vlan vlan-id

        The VLAN view is displayed.

      2. Run dhcpv6 option18 format user-defined text

        The format of Option 18 field inserted in DHCPv6 messages is configured.

        By default, the format of Option 18 field inserted in DHCPv6 messages is not configured.

    • In the interface view:
      1. Run interface interface-type interface-number

        The interface view is displayed.

      2. Run dhcpv6 option18 [ vlan vlan-id ] [ ce-vlan ce-vlan-id ] format user-defined text

        The format of Option 18 field inserted in DHCPv6 messages is configured.

        By default, the format of Option 18 field inserted in DHCPv6 messages is not configured.

    If you run the dhcpv6 option18 format command in the system view, the command takes effect for the Option 18 field in all DHCPv6 messages. If you run the dhcpv6 option18 format command in the VLAN view, the command takes effect for the Option 18 field in all DHCPv6 messages received from the specified VLAN. If you run the dhcpv6 option18 format command in the interface view, the command takes effect for the Option 18 field in all DHCPv6 messages received on the specified interface.

  6. (Optional) Configure the format of Option 37 field inserted in DHCPv6 messages in the system view, VLAN view, or interface view.

    • In the system view:
      1. Run dhcpv6 option37 [ vlan vlan-id ] [ ce-vlan ce-vlan-id ] format user-defined text

        The format of Option 37 field inserted in DHCPv6 messages is configured.

        By default, the format of Option 37 field inserted in DHCPv6 messages is not configured.

    • In the VLAN view:
      1. Run vlan vlan-id

        The VLAN view is displayed.

      2. Run dhcpv6 option37 format user-defined text

        The format of Option 37 field inserted in DHCPv6 messages is configured.

        By default, the format of Option 37 field inserted in DHCPv6 messages is not configured.

    • In the interface view:
      1. Run interface interface-type interface-number

        The interface view is displayed.

      2. Run dhcpv6 option37 [ vlan vlan-id ] [ ce-vlan ce-vlan-id ] format user-defined text

        The format of Option 37 field inserted in DHCPv6 messages is configured.

        By default, the format of Option 37 field inserted in DHCPv6 messages is not configured.

    If you run the dhcpv6 option37 format command in the system view, the command takes effect for the Option 37 field in all DHCPv6 messages. If you run the dhcpv6 option37 format command in the VLAN view, the command takes effect for the Option 37 field in all DHCPv6 messages received from the specified VLAN. If you run the dhcpv6 option37 format command in the interface view, the command takes effect for the Option 37 field in all DHCPv6 messages received on the specified interface.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >