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

CloudEngine 8800, 7800, 6800, and 5800 V200R003C00

This document describes the configurations of IP Service, including IP address, ARP, DHCP, DNS, IP performance optimization, IPv6, DHCPv6, and IPv6 DNS.
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 Relay Agent

Example for Configuring a DHCP Relay Agent

Networking Requirements

As shown in Figure 3-17, an enterprise uses a DHCP server to assign IP addresses to clients in the data center. The server at 10.20.20.0/24 is used as an example to describe how to configure a DHCP relay agent.

The enterprise client is on the network segment 10.20.20.0/24, and the DHCP server is on the network segment 10.10.10.0/24. The DHCP clients can obtain IP addresses from the DHCP server through SwitchA enabled with DHCP relay.

The uplink interface of SwitchA is 10GE1/0/2, the address of VLANIF 200 is 10.10.20.1/24, and the interface address of SwitchA connected to the peer device is 10.10.20.2/24.

The public address of the DHCP server is 10.10.10.1/24 and the interface address of the DHCP server connected to the peer device is 10.10.10.2/24.

Figure 3-17 DHCP relay agent

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure DHCP relay on SwitchA to enable SwitchA to forward DHCP messages from different network segments.

Procedure

  1. Add 10GE1/0/2 on SwitchA to VLAN 200.

    <Huawei> system-view
    [~Huawei] sysname SwitchA
    [*Huawei] commit
    [~SwitchA] vlan batch 200
    [*SwitchA] interface 10ge 1/0/2
    [*SwitchA-10GE1/0/2] port link-type trunk
    [*SwitchA-10GE1/0/2] port trunk allow-pass vlan 200
    [*SwitchA-10GE1/0/2] quit
    [*SwitchA] interface vlanif 200
    [*SwitchA-Vlanif200] ip address 10.10.20.1 24
    [*SwitchA-Vlanif200] quit
    [*SwitchA] commit

  2. Configure the DHCP relay function on SwitchA.
    1. Create a DHCP server group and add DHCP servers to the group.

      # Create a DHCP server group.

      [~SwitchA] dhcp relay server group dhcpgroup1

      # Add a DHCP server to the DHCP server group.

      [*SwitchA-dhcp-relay-server-group-dhcpgroup1] server 10.10.10.1
      [*SwitchA-dhcp-relay-server-group-dhcpgroup1] quit
      [*SwitchA] commit

    2. Enable DHCP relay on the interface.

      # Create a VLAN and add 10GE1/0/1 to the VLAN.

      [~SwitchA] vlan batch 100
      [*SwitchA] interface 10ge 1/0/1
      [*SwitchA-10GE1/0/1] port default vlan 100
      [*SwitchA-10GE1/0/1] quit
      [*SwitchA] commit

      # Enable DHCP globally and DHCP relay on the interface.

      [~SwitchA] dhcp enable
      [*SwitchA] interface vlanif 100
      [*SwitchA-Vlanif100] dhcp select relay 
      [*SwitchA-Vlanif100] quit
      [*SwitchA] commit

    3. Bind an interface to the DHCP server group.

      # Assign IP addresses to interfaces.

      [~SwitchA] interface vlanif 100
      [*SwitchA-Vlanif100] ip address 10.20.20.1 24

      Bind the interface to the DHCP server group.

      [*SwitchA-Vlanif100] dhcp relay binding server group dhcpgroup1
      [*SwitchA-Vlanif100] quit
      [*SwitchA] commit

  3. Configure a default route on SwitchA.

    [~SwitchA] ip route-static 0.0.0.0 0.0.0.0 10.10.20.2
    [*SwitchA] commit
    

  4. Verify the configuration.

    # Run the display dhcp relay command on SwitchA to view the DHCP relay configuration on the interface.

    [~SwitchA] display dhcp relay interface vlanif 100
     DHCP relay agent running information of interface Vlanif100 :                  
     Server group name          : dhcpgroup1                                        
     Gateway address in use     : 10.20.20.1                                        
                  
    

Configuration Files

Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 100 200
#
dhcp enable
#
dhcp relay server group dhcpgroup1
 server 10.10.10.1 0
#
interface Vlanif100
 ip address 10.20.20.1 255.255.255.0
 dhcp select relay
 dhcp relay binding server group dhcpgroup1
#
interface Vlanif200
 ip address 10.10.20.1 255.255.255.0
#
interface 10GE1/0/1
 port default vlan 100
#
interface 10GE1/0/2
 port link-type trunk
 port trunk allow-pass vlan 200
#
ip route-static 0.0.0.0 0.0.0.0 10.10.20.2
#                                                                               
return
Translation
Download
Updated: 2019-05-08

Document ID: EDOC1100004354

Views: 68730

Downloads: 147

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