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

NE20E-S2 V800R010C10SPC500 Configuration Guide - IP Services 01

This is NE20E-S2 V800R010C10SPC500 Configuration Guide - IP Services
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).
Example for Configuring a DHCP Server to Assign IP Addresses to Users with the Same MAC Address in Different VLANs for Login

Example for Configuring a DHCP Server to Assign IP Addresses to Users with the Same MAC Address in Different VLANs for Login

This section provides an example for configuring a DHCP server (with no relay agent configured) to assign IP addresses to Ethernet users with the same MAC addresses in different VLANs.

Networking Requirements

IP addresses of different network segments need to be applied for VoIP and IPTV services deployed on different user planes. DHCP clients that support these services use one MAC address to apply for IP addresses of different network segments and differentiate services based on VLAN IDs. This requires the DHCP server to assign IP addresses to users with the same MAC address in different VLANs.

On the network shown in Figure 1, the DHCP server is configured to dynamically assign IP addresses to DHCP clients. When receiving a user packet in which the VLAN ID is 100, the DHCP server selects the address pool huawei1 to assign an IP address to the user based on the gateway address 10.10.10.1/24. When receiving a user packet in which the VLAN ID is 200, the DHCP server selects the address pool huawei2 to assign an IP address to the user based on the gateway address 10.10.20.1/24.

NOTE:

The DHCP server can only assign IP addresses from different address pools to users with the same MAC address in different VLANs.

Figure 4-9 Networking for configuring a DHCP server to assign IP addresses to users with the same MAC address in different VLANs for login
NOTE:

Interface1 in this example represents GE0/1/1.



Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure an IP address for the interface through which users go online.

  2. Configure gateway addresses and address segments for address pools.

  3. Configure Layer 3 sub-interfaces.

Data Preparation

To complete the configuration, you need the following data:

  • IP address of the interface through which users go online

  • Gateway addresses

  • Numbers and ranges of address segments

Procedure

  1. Configure an IP address for the interface through which users go online.

    <HUAWEI> system-view
    [~HUAWEI] sysname DHCP Server
    [*HUAWEI] commit
    [~DHCP Server] interface gigabitethernet 0/1/1
    [~DHCP Server-GigabitEthernet0/1/1] ip address 10.1.1.1 255.255.255.0
    [*DHCP Server-GigabitEthernet0/1/1] commit
    [~DHCP Server-GigabitEthernet0/1/1] quit

  2. Configure gateway addresses and address segments for address pools.

    # Configure an address pool huawei1.

    [~DHCP Server] dhcp enable
    [*DHCP Server] ip pool huawei1 server
    [*DHCP Server-ip-pool-huawei1] gateway 10.10.10.1 255.255.255.0
    [*DHCP Server-ip-pool-huawei1] section 0 10.10.10.20 10.10.10.30
    [*DHCP Server-ip-pool-huawei1] commit
    [~DHCP Server-ip-pool-huawei1] quit

    # Configure an address pool huawei2.

    [~DHCP Server] ip pool huawei2 server
    [*DHCP Server-ip-pool-huawei2] gateway 10.10.20.1 255.255.255.0
    [*DHCP Server-ip-pool-huawei2] section 0 10.10.20.20 10.10.20.30
    [*DHCP Server-ip-pool-huawei2] commit
    [~DHCP Server-ip-pool-huawei2] quit

  3. Configure a Layer 3 sub-interface (taking the Dot1q termination sub-interface as an example).

    [~DHCP Server] interface gigabitethernet 0/1/1.1
    [*DHCP Server-GigabitEthernet0/1/1.1] ip address 10.10.10.1 255.255.255.0
    [*DHCP Server-GigabitEthernet0/1/1.1] encapsulation dot1q-termination
    [*DHCP Server-GigabitEthernet0/1/1.1] dot1q termination vid 100
    [*DHCP Server-GigabitEthernet0/1/1.1] commit
    [~DHCP Server-GigabitEthernet0/1/1.1] quit
    [~DHCP Server] interface gigabitethernet 0/1/1.2
    [*DHCP Server-GigabitEthernet0/1/1.2] ip address 10.10.20.1 255.255.255.0
    [*DHCP Server-GigabitEthernet0/1/1.2] encapsulation dot1q-termination
    [*DHCP Server-GigabitEthernet0/1/1.2] dot1q termination vid 200
    [*DHCP Server-GigabitEthernet0/1/1.2] commit
    [~DHCP Server-GigabitEthernet0/1/1.2] quit

  4. Verify the configuration.

    # Run the display ip pool command on the DHCP server to check the configurations of IP address pools.

    [~DHCP Server] display ip pool name huawei1
      Pool-Name      : huawei1
      Pool-No        : 2
      Pool-constant-index: -
      Lease          : 3 Days 0 Hours 0 Minutes
      NetBios Type   : N-Node
      Auto recycle   : 30
      Option 3       : Enable
      DNS-Suffix     : -
      Dom-Search-List0: -
      Dom-Search-List1: -
      Dom-Search-List2: -
      Dom-Search-List3: -
      Option-Code 125 : enterprise-code : 2011, string: -
      Position       : Server          Status           : Unlocked        
      RUI-Flag       : -
      Attribute      : Private         
      Gateway        : 10.10.10.1      Mask             : 255.255.255.0   
      Vpn instance   : --              Unnumbered gateway: -               
      Profile-Name   : -               Server-Name     : -               
      Total Idle     : 11              Have Dhcp IP     : 1
      Timeouts       : 0
      Timeout Count  : 0               Sub Option Count : 0               
      Option Count   : 0               Force-reply Count: 0               
      Codes: CFLCT(conflicted)
      ---------------------------------------------------------------------------------------
      ID           start             end total  used  idle CFLCT disable reserved static-bind
      ---------------------------------------------------------------------------------------
       0     10.10.10.20     10.10.10.30    11     0    11     0       0        0           0
      ---------------------------------------------------------------------------------------
    [~DHCP Server] display ip pool name huawei2
      Pool-Name      : huawei2
      Pool-No        : 3
      Pool-constant-index: -
      Lease          : 3 Days 0 Hours 0 Minutes
      NetBios Type   : N-Node
      Auto recycle   : 30
      Option 3       : Enable
      DNS-Suffix     : -
      Dom-Search-List0: -
      Dom-Search-List1: -
      Dom-Search-List2: -
      Dom-Search-List3: -
      Option-Code 125 : enterprise-code : 2011, string: -
      Position       : Server          Status           : Unlocked        
      RUI-Flag       : -
      Attribute      : Private         
      Gateway        : 10.10.20.1      Mask             : 255.255.255.0   
      Vpn instance   : --              Unnumbered gateway: -               
      Profile-Name   : -               Server-Name     : -               
      Total Idle     : 11              Have Dhcp IP     : 1
      Timeouts       : 0
      Timeout Count  : 0               Sub Option Count : 0               
      Option Count   : 0               Force-reply Count: 0               
      Codes: CFLCT(conflicted)
      ---------------------------------------------------------------------------------------
      ID           start             end total  used  idle CFLCT disable reserved static-bind
      ---------------------------------------------------------------------------------------
       0     10.10.20.20     10.10.20.30    11     0    11     0       0        0           0
      ---------------------------------------------------------------------------------------

Configuration Files

DHCP server configuration file

#
sysname DHCP Server
#
dhcp enable
#
ip pool huawei1 server
 gateway 10.10.10.1 255.255.255.0
 section 0 10.10.10.20 10.10.10.30
#
ip pool huawei2 server
 gateway 10.10.20.1 255.255.255.0
 section 0 10.10.20.20 10.10.20.30
#
interface GigabitEthernet0/1/1
 ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet0/1/1.1
 ip address 10.10.10.1 255.255.255.0
 encapsulation dot1q-termination
 dot1q termination vid 100
#
interface GigabitEthernet0/1/1.2
 ip address 10.10.20.1 255.255.255.0
 encapsulation dot1q-termination
 dot1q termination vid 200
#
return
Translation
Download
Updated: 2019-01-02

Document ID: EDOC1100055376

Views: 17511

Downloads: 35

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