Supported Platforms
Related Documentation
- MX, PTX Series
- Extended DHCP Relay Agent Overview
- Example: Configuring DHCP and DHCPv6 Relay Agent Group-Level Selective Traffic Processing
- MX Series
- DHCP Options and Selective Traffic Processing Overview
- Using DHCP Option Information to Selectively Process DHCP Client Traffic
- Displaying a Count of DHCP Packets That Are Dropped or Forwarded During Selective Processing That Is Based on DHCP Option Strings
Example: Configuring DHCP Relay Agent Selective Traffic Processing Based on DHCP Option Strings
This example shows how to configure DHCP relay agent to use DHCP option strings to selectively identify, filter, and process client traffic.
Requirements
This example uses the following hardware and software components:
- MX Series 3D Universal Edge Routers
- Junos OS Release 12.3 or later.
Before you configure DHCP relay agent selective processing support, be sure you:
- Configure DHCP relay agent.
- (Optional) Configure a named DHCP local server group if you want to forward client traffic to a server group.
Overview
In this example, you configure DHCP relay agent to use DHCP option strings in client packets to selectively identify, filter, and process client traffic. To configure selective processing, you perform the following procedures:
- Identify the client traffic—Specify the DHCP option that DHCP relay agent uses to identify the client traffic you want to process. The option you specify matches the option in the client traffic.
- Configure a default action—Specify the default processing action, which DHCP relay uses for identified client traffic that does not satisfy any configured match criteria.
- Create match filters and associate an action with each filter—Specify match criteria that filter the client traffic. The criteria can be an exact match or a partial match with the option string in the client traffic. Associate a processing action with each match criterion.
Configuration
To configure DHCP relay agent selective processing based on DHCP option information, perform these tasks:
- Configuring DHCP Relay Agent To Selectively Process Client Traffic Based on DHCP Option Strings
- Results
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.
Configuring DHCP Relay Agent To Selectively Process Client Traffic Based on DHCP Option Strings
Step-by-Step Procedure
To configure DHCP relay selective processing:
- Specify that you want to configure DHCP relay agent support.[edit forwarding-options]user@host# edit dhcp-relay
- Specify the DHCP option that DHCP relay agent uses to
identify incoming client traffic.[edit forwarding-options dhcp-relay]user@host# set relay-option option-number 60
- Configure a default action, which DHCP relay agent uses
when the incoming client traffic does not satisfy any configured match
criteria. [edit forwarding-options dhcp-relay]user@host# set relay-option default-action drop
- Configure an exact match condition and associated action
that DHCP relay uses to process the identified client traffic.[edit forwarding-options dhcp-relay]user@host# set relay-option equals ascii video-gold forward-only
- Configure a second exact match condition and associated
action that DHCP relay uses to process client traffic.[edit forwarding-options dhcp-relay]user@host# set relay-option equals ascii video-bronze local-server-group servergroup-15
- Configure a partial match criteria and associated action
that DHCP relay uses to process client traffic. [edit forwarding-options dhcp-relay]user@host# set relay-option starts-with hexadecimal fffff local-server-group servergroup-east
Results
From configuration mode, confirm the results of your configuration by issuing the show statement at the [edit forwarding-options] 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 device, enter commit from configuration mode.
Verification
To verify the status of DHCP relay agent selective traffic processing, perform this task:
Verifying the Status of DHCP Relay Agent Selective Traffic Processing
Purpose
Verify the DHCP relay agent selective traffic processing status.
Action
Display statistics for DHCP relay agent.
user@host> show dhcp relay statistics
Packets dropped: Total 30 Bad hardware address 1 Bad opcode 1 Bad options 3 Invalid server address 5 No available addresses 1 No interface match 2 No routing instance match 9 No valid local address 4 Packet too short 2 Read error 1 Send error 1 Option 60 1 Option 82 2 Messages received: BOOTREQUEST 116 DHCPDECLINE 0 DHCPDISCOVER 11 DHCPINFORM 0 DHCPRELEASE 0 DHCPREQUEST 105 Messages sent: BOOTREPLY 0 DHCPOFFER 2 DHCPACK 1 DHCPNAK 0 DHCPFORCERENEW 0 Packets forwarded: Total 4 BOOTREQUEST 2 BOOTREPLY 2
Meaning
The Packets forwarded field in the show dhcp 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 DHCP relay agent has forwarded, as well as a breakdown for the number of BOOTREQUEST and BOOTREPLY packets forwarded.
Related Documentation
- MX, PTX Series
- Extended DHCP Relay Agent Overview
- Example: Configuring DHCP and DHCPv6 Relay Agent Group-Level Selective Traffic Processing
- MX Series
- DHCP Options and Selective Traffic Processing Overview
- Using DHCP Option Information to Selectively Process DHCP Client Traffic
- Displaying a Count of DHCP Packets That Are Dropped or Forwarded During Selective Processing That Is Based on DHCP Option Strings
Published: 2013-02-11
Supported Platforms
Related Documentation
- MX, PTX Series
- Extended DHCP Relay Agent Overview
- Example: Configuring DHCP and DHCPv6 Relay Agent Group-Level Selective Traffic Processing
- MX Series
- DHCP Options and Selective Traffic Processing Overview
- Using DHCP Option Information to Selectively Process DHCP Client Traffic
- Displaying a Count of DHCP Packets That Are Dropped or Forwarded During Selective Processing That Is Based on DHCP Option Strings