No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Configuration Guide - IP Service

S1720, S2700, S5700, and S6720 V200R012(C00 and C20)

This document describes the configurations of IP Service, including IP address, ARP, DHCP, DHCP policy VLAN, DNS, mDNS gateway, mDNS relay, UDP Helper, IP performance optimization, IPv6, DHCPv6, IPv6 DNS, IPv6 over IPv4 tunnel, and IPv4 over IPv6 tunnel.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuring the DHCP Policy VLAN

Configuring the DHCP Policy VLAN

Context

You can configure three types of DHCP policy VLAN on the device at the same time. They are listed in descending order based on priorities as follows: MAC address-based, interface-based, and generic DHCP policy VLANs. The three types of DHCP policy VLAN apply to the following scenarios respectively:

  • When a small number of hosts with known MAC addresses access the network, configure the DHCP policy VLAN based on MAC addresses.
  • When a small number of hosts access the network by connecting to the switch, configure the DHCP policy VLAN based on switch interfaces.
  • When a large number of hosts access the network, configure the generic DHCP policy VLAN. The ordinary DHCP policy VLAN is used only when the newly added host does not match the rules of the other two types of DHCP policy VLAN.

You can also configure an 802.1p priority for DHCP packets in a DHCP policy VLAN, so that traffic of DHCP packets can be scheduled through QoS.

Pre-Configuration Tasks

Before configuring the DHCP policy VLAN, complete the following task:

  • Configuring link layer protocol parameters for interfaces to ensure that the link layer protocol status on the interfaces is Up

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run dhcp enable

    Global DHCP is enabled.

    By default, DHCP is disabled.

  3. Configure the attributes of the interface connecting the device to the user host.

    NOTE:
    For DHCP policy VLANs, you are advised to configure the interface connecting the device to the user host as a hybrid interface and enable VLAN frames to pass through the interface in untagged mode. For the interface-based DHCP policy VLAN, you must configure the interface as a hybrid interface.
    1. Run the interface interface-type interface-number command to enter the view of the interface connected to the newly added host.

    2. Run the port link-type hybrid command to set the link type of the interface to hybrid.

      By default, the link type of an interface on the S1720GF, S1720GFR, S1720GW, S1720GW-E, S1720GWR, S1720GWR-E, S1720X, S1720X-E, S2720EI, S2750EI, S5700LI, S5700S-LI, S5710-X-LI, S5720I-SI, S5720LI, S5720S-LI, S5720S-SI, S5720SI, S5730S-EI, S5730SI, S6720LI, S6720S-LI, S6720S-SI, and S6720SI is negotiation-auto, and the link type of an interface on other models is negotiation-desirable.

    3. Run the port hybrid untagged vlan { { vlan-id1 [ to vlan-id2 ] }&<1-10> | all } command to configure the VLANs for the interface. The frames of these VLANs pass through the interface in untagged mode and reach the user host.

      By default, a hybrid interface is added to VLAN1 in untagged mode.

    4. Run the quit command to return to the system view.

  4. Run vlan vlan-id

    The view of the VLAN to which the DHCP server belongs is displayed.

  5. Configure the DHCP policy VLAN in one or all of the following methods:

    • Run dhcp policy-vlan mac-address mac-address1 [ to mac-address2 ] [ priority priority ]

      The DHCP policy VLAN is configured based on MAC addresses.

      By default, no DHCP policy VLAN is configured on the switch based on MAC addresses.

    • Run dhcp policy-vlan port interface-type interface-number1 [ to interface-number2 ] &<1-10> [ priority priority ]

      The DHCP policy VLAN is configured based on switch interfaces.

      By default, no DHCP policy VLAN is configured based on switch interfaces.

    • Run dhcp policy-vlan generic [ priority priority ]

      The generic DHCP policy VLAN is configured.

      By default, no generic DHCP policy VLAN is configured on the switch.

    NOTE:
    • If the DHCP policy VLAN based on the same MAC address is configured in multiple VLAN views, only the last configuration takes effect.
    • If the DHCP policy VLAN based on the same interface is configured in multiple VLAN views, only the last configuration takes effect.
    • If the ordinary DHCP policy VLAN is configured in multiple VLAN views, only the last configuration takes effect.

Verifying the Configuration

Run the display current-configuration | include dhcp policy-vlan command to view the configuration of the DHCP policy VLAN.

Translation
Download
Updated: 2018-12-24

Document ID: EDOC1100038342

Views: 89436

Downloads: 285

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next