Technical Documentation

Example: Using Option 60 Strings to Forward DHCP Client Traffic

This example extended DHCP relay agent configuration shows how to use the option 60 vendor-specific information in DHCP client packets to forward client traffic to specific DHCP servers. A more detailed explanation follows the example.

[edit forwarding-options]dhcp-relay {server-group {sp-1 {;}sp-2 {;}sp-3 {;}sp-4 {;}}active-server-group sp-1;relay-option-60 {vendor-option {equals {ascii motorola {relay-server-group sp-2;}}starts-with {hexadecimal ff {relay-server-group sp-3;}}default-relay-server-group sp-4;}}group all {interface fe-0/0/2.0;}}

This example defines the following actions for DHCP client packets containing option 60 information:

  • All packets that contain an exact match with the ASCII string “motorola” are relayed to server group sp-2.
  • All packets that start with the hexadecimal string “ff” are relayed to server group sp-3.
  • All packets that do not either exactly match the ASCII string “motorola” or start with the hexadecimal string “ff” are relayed to the default relay server group, sp-4.

DHCP client packets that do not contain option 60 information are relayed to the currently configured active server group, sp-1.

Server groups sp-1, sp-2, sp-3, and sp-4 in this example are configured with the server-group statement at the [edit forwarding-options dhcp-relay] hierarchy level.

Published: 2010-04-15