Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Configuring DHCP and DHCPv6 Relay Agent Group-Level Selective Traffic Processing

This example shows how to configure named interface group-based support for DHCPv6 relay agent selective processing, which uses DHCP option strings to identify, filter, and process client traffic.

This example describes DHCPv6 relay agent configuration—you can configure the related procedure for DHCP relay agent groups at the [edit forwarding-options dhcp-relay] hierarchy level. DHCPv6 selective processing supports DHCPv6 options 15 and 16. DHCP selective processing supports option 60 (MX Series routers only) and option 77.

Requirements

This example uses the following hardware and software components:

  • MX Series 3D Universal Edge Routers or PTX Series Packet Transport Switches
  • Junos OS Release 12.3 or later.

Before you configure DHCPv6 relay agent selective processing support, be sure you:

Overview

In this example, you configure group-level DHCPv6 relay agent named interface support for selective processing of client packets based on DHCPv6 option strings. To configure selective processing, you perform the following procedures:

  1. Identify the client traffic—Specify the DHCPv6 option that DHCPv6 relay agent uses to identify the client traffic you want to process. The DHCPv6 option you specify matches the option in the client traffic.
  2. Configure the default action—Specify the default processing action, which DHCPv6 relay uses for identified client traffic that does not satisfy any configured match criteria.
  3. Create match filters and associate an action with each filter—Specify match criteria that filters the client traffic. The criteria can be an exact match or a partial match with the DHCPv6 option string in the client traffic. Associate a processing action with each match criteria.

Configuration

To configure group-level DHCPv6 relay agent selective processing based on DHCPv6 option information, perform these tasks:

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them in a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the command into the CLI at the [edit] hierarchy level. The quick configuration assumes that the named interface group and the DHCP server groups have been previously configured.

set forwarding-options dhcp-relay dhcpv6 group groupv6-east-27set forwarding-options dhcp-relay dhcpv6 relay-option option-number 15set forwarding-options dhcp-relay dhcpv6 relay-option equals ascii triple-gold relay-server-group relayserver-triple-8set forwarding-options dhcp-relay dhcpv6 relay-option equals ascii triple-silver relay-server-group relayserver-triple-23set forwarding-options dhcp-relay dhcpv6 relay-option starts-with ascii single relay-server-group relayserver-1-aaset forwarding-options dhcp-relay dhcpv6 relay-option default-action drop

Configuring a DHCPv6 Relay Agent Named Interface Group To Selectively Process Client Traffic Based on DHCPv6 Option Strings

Step-by-Step Procedure

This procedure assumes that you have previously created the named interface group and the DHCPv6 server groups. To configure DHCPv6 relay group-level selective processing:

  1. Specify that you want to configure DHCPv6 relay agent support.
    [edit forwarding-options]user@host# edit dhcp-relay dhcpv6
  2. Specify that you want to configure group-level DHCPv6 relay agent support.
    [edit forwarding-options dhcp-relay dhcpv6]user@host# edit group groupv6-east-27
  3. Specify the DHCPv6 option number that DHCPv6 relay agent uses to identify incoming client traffic.
    [edit forwarding-options dhcp-relay dhcpv6 group groupv6-east-27]user@host# set relay-option option-number 15
  4. Configure the default action, which DHCPv6 relay agent uses when the incoming client traffic does not satisfy any configured match criteria.
    [edit forwarding-options dhcp-relay dhcpv6 group groupv6-east-27]user@host# set relay-option default-action relay-server-group relayserver-def-4
  5. Configure an exact match condition and associated action that DHCPv6 relay uses to process the identified client traffic.
    [edit forwarding-options dhcp-relay dhcpv6 group groupv6-east-27]user@host# set relay-option equals ascii triple-gold relay-server-group relayserver-triple-8
  6. Configure a second exact match condition and associated action that DHCPv6 relay uses to process client traffic.
    [edit forwarding-options dhcp-relay dhcpv6 group groupv6-east-27]user@host# set relay-option equals ascii triple-silver relay-server-group relayserver-triple-23
  7. Configure a partial match criteria and associated action that DHCPv6 relay uses to process client traffic.
    [edit forwarding-options dhcp-relay dhcpv6 group groupv6-east-27]user@host# set relay-option starts-with ascii single relay-server-group relayserver-1-aa

Results

From configuration mode, confirm the results of your configuration by issuing the show statement at the [edit forwarding-options dhcp] hierarchy level. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

dhcpv6 {group test-1 {relay-option {option-number 15;equals {ascii triple-gold {relay-server-group relayserver-triple-8;}ascii triple-silver {relay-server-group relayserver-triple-23;}}default-action {relay-server-group relayserver-def-4;}starts-with {ascii single {relay-server-group relayserver-1-aa;}}}interface ge-1/0/0.0 upto ge-1/1/0.0;}server-group {relayserver-1-aa;relayserver-triple-8;relayserver-triple-23;relayserver-def-4;}}

If you are done configuring the device, enter commit from configuration mode.

Verification

To verify the status of DHCPv6 relay agent selective traffic processing, perform this task:

Verifying the Status of DHCPv6 Relay Agent Selective Traffic Processing

Purpose

Verify the DHCPv6 relay agent selective traffic processing status.

Action

Display statistics for DHCPv6 relay agent.

user@host> show dhcpv6 relay statistics
DHCPv6 Packets dropped:
    Total                       0

Messages received:
    DHCPV6_DECLINE              0
    DHCPV6_SOLICIT              10
    DHCPV6_INFORMATION_REQUEST  0
    DHCPV6_RELEASE              0
    DHCPV6_REQUEST              10
    DHCPV6_CONFIRM              0
    DHCPV6_RENEW                0
    DHCPV6_REBIND               0
    DHCPV6_RELAY_REPL           0

Messages sent:
    DHCPV6_ADVERTISE            0
    DHCPV6_REPLY                0
    DHCPV6_RECONFIGURE          0
    DHCPV6_RELAY_FORW           0

Packets forwarded:
    Total                       4
    FWD REQUEST                 2
    FWD REPLY                   2

Meaning

The Packets forwarded field in the show dhcpv6 relay statistics command output displays the number of client packets that have been forwarded as a result of the selective traffic processing configuration. In this example, the output indicates the total number of packets that DHCPv6 relay agent has forwarded, as well as a breakdown for the number of FWD REQUEST and FWD REPLY packets forwarded.

Published: 2013-02-11