Related Documentation
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:
- Configure DHCPv6 relay agent.
- Configure named DHCPv6 relay agent interface groups to which you want to apply a common DHCP configuration.
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:
- Enabling DHCPv6 Snooping Support for a Named Group of Interfaces
- Enabling DHCPv6 Snooping Support for a Specific Interface in a Named Group
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.
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:
- Specify that you want to configure DHCPv6 relay agent.[edit]user@host# edit forwarding-options dhcp-relay dhcpv6
- 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
- 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
- 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.
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:
- 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
- Specify the named group containing the interface.[edit forwarding-options dhcp-relay dhcpv6]user@host# edit group sunnyvale
- 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
- 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
- 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.
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.