Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Enabling DHCP Snooping Support for DHCPv6 Relay Agent

Snooping support for DHCPv6 relay agent is disabled on the router by default. This example shows how to override the default DHCPv6 relay agent snooping configuration to explicitly enable DHCPv6 snooping for a named group of interfaces and for a specific interface within a different named group.

Note: You can also enable DHCPv6 snooping support globally by using the allow-snooped-clients statement at the [edit forwarding-options dhcp-relay dhcpv6 overrides] hierarchy level.

Requirements

This example uses the following hardware and software components:

  • MX Series 3D Universal Edge Routers
  • Junos OS Release 12.1

Before you begin:

Overview

In this example, you override the default DHCPv6 relay agent snooping configuration to explicitly enable DHCP snooping for both of the following:

  • All of the interfaces in the group named boston
  • Interface ge-3/2/1.1 in the group named sunnyvale

Configuration

To override the default DHCPv6 relay agent snooping configuration to explicitly enable DHCPv6 snooping for a named group of interfaces and for a specific interface within a named group, 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 commands into the CLI at the [edit] hierarchy level.

set forwarding-options dhcp-relay dhcpv6 group boston overrides allow-snooped-clientsset forwarding-options dhcp-relay dhcpv6 group sunnyvale interface ge-3/2/1.1 overrides allow-snooped-clients

Enabling DHCPv6 Snooping Support for a Named Group of Interfaces

Step-by-Step Procedure

To enable DHCPv6 snooping support for a named group of interfaces:

  1. Specify that you want to configure DHCPv6 relay agent.
    [edit]user@host# edit forwarding-options dhcp-relay dhcpv6
  2. Specify the named group of interfaces for which you want to enable DHCPv6 snooping.
    [edit forwarding-options dhcp-relay dhcpv6]user@host# edit group boston
  3. Specify that you want to override the default DHCPv6 configuration for the interfaces in that group.
    [edit forwarding-options dhcp-relay dhcpv6 group boston]user@host# edit overrides
  4. Enable DHCPv6 snooping support for all interfaces in group boston.
    [edit forwarding-options dhcp-relay dhcpv6 group boston overrides]user@host# set allow-snooped-clients

Results

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

[edit forwarding-options dhcp-relay] user@host# show
dhcpv6 {group boston {overrides {allow-snooped-clients;}}}

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

Enabling DHCPv6 Snooping Support for a Specific Interface in a Named Group

Step-by-Step Procedure

To enable DHCPv6 snooping support for a specific interface within a named group of interfaces:

  1. Return to the [edit forwarding-options dhcp-relay dhcpv6] hierarchy level to specify that you want to configure DHCPv6 relay agent.
    [edit forwarding-options dhcp-relay dhcpv6 group boston overrides]user@host# up 2
  2. Specify the named group containing the interface.
    [edit forwarding-options dhcp-relay dhcpv6]user@host# edit group sunnyvale
  3. Specify the interface in group sunnyvale for which you want to enable DHCPv6 snooping.
    [edit forwarding-options dhcp-relay dhcpv6 group sunnyvale]user@host# edit interface ge-3/2/1.1
  4. Specify that you want to override the default DHCPv6 configuration for interface ge-3/2/1.1 in group sunnyvale.
    [edit forwarding-options dhcp-relay dhcpv6 group sunnyvale interface ge-3/2/1.1]user@host# edit overrides
  5. Enable DHCPv6 snooping support for interface ge-3/2/1.1 in group sunnyvale.
    [edit forwarding-options dhcp-relay dhcpv6 group sunnyvale interface ge-3/2/1.1 overrides]user@host# set allow-snooped-clients

Results

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

[edit forwarding-options dhcp-relay]user@host# show
dhcpv6 {group boston {overrides {allow-snooped-clients;}}group sunnyvale {interface ge-3/2/1.1 {overrides {allow-snooped-clients;}}}}

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

Verification

To verify the DHCPv6 configuration in a multi-relay topology, perform this task:

Verifying the Address Bindings for DHCPv6 Relay Agent Clients

Purpose

Verify the DHCPv6 address bindings in the Dynamic Host Configuration Protocol (DHCP) client table.

Action

Display detailed information about address bindings for DHCPv6 relay agent clients.

user@host > show dhcpv6 relay binding detail
Session Id:  13
     Client IPv6 Prefix:                    3000:0:0:8001::5/128
     Client DUID:                           LL0x1-00:00:65:03:01:02
     State:                                 BOUND(DHCPV6_RELAY_STATE_BOUND)
     Lease Expires:                         2011-11-21 06:14:50 PST
     Lease Expires in:                      293 seconds
     Lease Start:                           2011-11-21 06:09:50 PST
     Incoming Client Interface:             ge-3/2/1.1
     Server Address:                        unknown
     Next Hop Server Facing Relay:          4000::2
     Server Interface:                      none
     Client Id Length:                      10
     Client Id:                             /0x00030001/0x00006503/0x0102

Meaning

The Server Address field in the show dhcpv6 relay binding detail command output typically displays the IP address of the DHCPv6 server. In this example, the value unknown in the Server Address field indicates that this is a multi-relay topology in which the DHCPv6 relay agent is not directly adjacent to the DHCPv6 server, and does not detect the IP address of the server.

In that case, the output instead includes the Next Hop Server Facing Relay field, which displays the next-hop address in the direction of the DHCPv6 server.

Published: 2013-02-11