Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All
     

    Related Documentation

     

    Setting Up DHCP Option 82 on the Switch with No Relay Agent Between Clients and DHCP Server (CLI Procedure)

    Note: This task uses Junos OS for EX Series switches with support for the Enhanced Layer 2 Software (ELS) configuration style. If your switch runs software that does not support ELS, see Setting Up DHCP Option 82 on the Switch with No Relay Agent Between Clients and DHCP Server (CLI Procedure). For ELS details, see Getting Started with Enhanced Layer 2 Software.

    You can use DHCP option 82, also known as the DHCP relay agent information option, to help protect the switch against attacks such as spoofing (forging) of IP addresses and MAC addresses, and DHCP IP address starvation. Option 82 provides information about the network location of a DHCP client, and the DHCP server uses this information to implement IP addresses or other parameters for the client.

    You can configure the DHCP option 82 feature in two topologies:

    • The switch, DHCP clients, and DHCP server are all on the same VLAN. The switch forwards the clients' requests to the server and forwards the server's responses to the clients. This topic describes this configuration.
    • The switch functions as a relay agent when the DHCP clients or the DHCP server is connected to the switch through a Layer 3 interface. On the switch, these interfaces are configured as integrated routing and bridging (IRB) interfaces. The switch relays the clients' requests to the server and then forwards the server's responses to the clients. This configuration is described in Setting Up DHCP Option 82 with the Switch as a Relay Agent Between Clients and DHCP Server (CLI Procedure).

    Before you configure DHCP option 82 on the switch, perform these tasks:

    • Connect and configure the DHCP server.

      Note: Your DHCP server must be configured to accept DHCP option 82. If the server is not configured for DHCP option 82, the server does not use the DHCP option 82 information in the requests sent to it when it formulates its reply messages.

    • Configure a VLAN on the switch and associate the interfaces on which the clients and the server connect to the switch with that VLAN. See Configuring VLANs for EX Series Switches (CLI Procedure)

    To configure DHCP option 82:

    1. Specify DHCP option 82 for the VLAN that you configured.
      [edit vlans vlan-name forwarding-options dhcp-security]
      user@switch# set option-82

      Note: If you want to enable DHCP option 82 on all VLANs, you must configure it separately for each specific VLAN.

      The remaining steps are optional.

    2. Configure the prefix for the circuit ID suboption to include the switch’s hostname or the routing instance name for the VLAN:
      [edit vlans vlan-name forwarding-options dhcp-security option-82]
      user@switch# set circuit-id prefix (host-name | routing-instance-name)

    3. Specify that the circuit ID suboption value contains the interface description rather than the interface name (the default):
      [edit vlans vlan-name forwarding-options dhcp-security option-82]
      user@switch# set circuit-id use-interface-description

    4. Specify that the circuit ID suboption value contains the VLAN ID rather than the VLAN name (the default):
      [edit vlans vlan-name forwarding-options dhcp-security option-82]
      user@switch# set circuit-id use-vlan-id

    5. Specify that the remote ID suboption is included in the DHCP option 82 information:
      [edit vlans vlan-name forwarding-options dhcp-security option-82]
      user@switch# set remote-id

      Note: If you do not specify a keyword after remote-id, the default value for the remote-id suboption is the interface name.

    6. Specify that the remote ID suboption is the hostname of the switch:
      [edit vlans vlan-name forwarding-options dhcp-security option-82]
      user@switch# set remote-id host-name

    7. Specify that the remote ID suboption value contains the interface description:
      [edit vlans vlan-name forwarding-options dhcp-security option-82]
      user@switch# set remote-id use-interface-description

    8. Specify that the remote ID suboption value contains a character string:
      [edit vlans vlan-name forwarding-options dhcp-security option-82]
      user@switch# set remote-id use-string mystring

    9. Configure a vendor ID suboption:
      • To use the default value (the default value is Juniper), do not type a character string after the vendor-id option keyword:
        [edit vlans vlan-name forwarding-options dhcp-security option-82]
        user@switch# set vendor-id

      • To configure that the vendor ID suboption value contains a character string value that you specify rather than Juniper (the default):
        [edit vlans vlan-name forwarding-options dhcp-security option-82]
        user@switch# set vendor-id use-string mystring

     

    Related Documentation

     

    Published: 2014-05-27