Supported Platforms
Example: Configuring DHCP Snooping Support for DHCP Relay Agent
This example shows how to configure DHCP snooping support for DHCP relay agent.
Requirements
- Configure DHCP relay agent. See Extended DHCP Relay Agent Overview.
Overview
In this example, you configure DHCP snooping support for DHCP relay agent by completing the following operations:
- Override the default DHCP snooping configuration and enable DHCP snooping support for the interfaces in group frankfurt.
- Configure DHCP relay agent to forward snooped packets to only configured interfaces.
![]() | Note: By default, DHCP snooping is enabled globally in Junos OS Release 10.0 and earlier and disabled globally in Junos OS Release 10.1 and later. |
Configuration
Step-by-Step Procedure
To configure DHCP relay support for DHCP snooping:
- Specify that you want to configure DHCP relay agent. [edit]user@host# edit forwarding-options dhcp-relay
- Specify the named group of interfaces on which DHCP snooping
is supported. [edit forwarding-options dhcp-relay]user@host# edit group frankfurt
- Specify the interfaces that you want to include in the
group. DHCP relay agent considers these as the configured interfaces
when determining whether to forward or drop traffic.[edit forwarding-options dhcp-relay group frankfurt]user@host# set interface fe-1/0/1.3 upto fe-1/0/1.9
- Specify that you want to override the default configuration
for the group. [edit forwarding-options dhcp-relay group frankfurt]user@host# edit overrides
- Enable DHCP snooping support for the group.[edit forwarding-options dhcp-relay group frankfurt overrides]user@host# set allow-snooped-clients
- Return to the [edit forwarding-options dhcp-relay] hierarchy level to configure the forwarding action and specify that
DHCP relay agent forward snooped packets on only configured interfaces:[edit forwarding-options dhcp-relay group frankfurt overrides]user@host# up 2
- Enable DHCP snooped packet forwarding for DHCP relay agent.[edit forwarding-options dhcp-relay]user@host# edit forward-snooped-clients
- Specify that snooped packets are forwarded on only configured
interfaces (the interfaces in group frankfurt).[edit forwarding-options dhcp-relay forward-snooped-clients]user@host# set configured-interfaces
Results
From configuration mode, confirm your configuration by entering the show forwarding-options command. If the output does not display the intended configuration, repeat the instructions in this example to correct it. The following output also shows a range of configured interfaces in group frankfurt.
If you are done configuring the device, enter commit from configuration mode.