Advertisement

Quick Links

DHCP Quick Start Configuration Guide
Copyright © 2022 New H3C Technologies Co., Ltd. All rights reserved.
No part of this manual may be reproduced or transmitted in any form or by any means without prior written consent of New
H3C Technologies Co., Ltd.
Except for the trademarks of New H3C Technologies Co., Ltd., any trademarks that may be mentioned in this document are
the property of their respective owners.
The information in this document is subject to change without notice.

Advertisement

Table of Contents
loading

Summary of Contents for H3C DHCP

  • Page 1 No part of this manual may be reproduced or transmitted in any form or by any means without prior written consent of New H3C Technologies Co., Ltd. Except for the trademarks of New H3C Technologies Co., Ltd., any trademarks that may be mentioned in this document are the property of their respective owners.
  • Page 2: Table Of Contents

    Network configuration ········································································································································ 1 Procedure··························································································································································· 1 Verifying the configuration·································································································································· 3 Configuration files ·············································································································································· 3 Related documentation ······································································································································ 4 Configuring DHCP relay agent ······································································· 5 Introduction ························································································································································ 5 Network configuration ········································································································································ 5 Procedure··························································································································································· 5 Verifying the configuration·································································································································· 7 Configuration files ·············································································································································· 7 Related documentation ······································································································································...
  • Page 3: Configuring Dynamic Ipv4 Address Assignment

    As shown in Figure 1, the core switch has three VLANs. Host A, Host B, and Host C are in VLAN 5, VLAN 6, and VLAN 7, respectively. Configure the core switch as a DHCP server to meet the following requirements: •...
  • Page 4 [Switch-Vlan-interface7] quit # (Optional.) Exclude specific IP addresses (such as DNS server IP addresses) from dynamic IP address assignment. [Switch] dhcp server forbidden-ip 192.168.5.100 [Switch] dhcp server forbidden-ip 192.168.6.100 [Switch] dhcp server forbidden-ip 192.168.7.100 # Create IP address pool 5 to assign IP addresses to the clients on subnet 192.168.5.0/24.
  • Page 5: Verifying The Configuration

    192.168.7.3 3030-3030-2e30-3030- Jan 9 10:45:11 2021 Auto(C) 662e-3030-3033-2d45- 7568-6572-1e The output shows that the DHCP server can assign IP addresses and other network settings to the clients on subnets 192.168.5.0/24, 192.168.6.0/24, and 192.168.7.0/24 correctly. Configuration files • Switch: dhcp enable dhcp server forbidden-ip 192.168.5.100...
  • Page 6: Related Documentation

    6 interface GigabitEthernet1/0/7 port link-mode bridge port access vlan 7 Related documentation • DHCP configuration in the Layer 3 IP services configuration guide for the device. • DHCP commands in the Layer 3 IP services command reference for the device.
  • Page 7: Configuring Dhcp Relay Agent

    The DHCP clients run on subnets 192.168.5.0/24 and 192.168.6.0/24, and the DHCP server IP address is 192.168.7.100/24. • Switch A acts as the DHCP relay agent for clients, so these clients can obtain IP addresses in subnets 192.168.5.0/24 and 192.168.6.0/24, and other network settings from the DHCP server. Figure 2 Network diagram...
  • Page 8 [SwitchA-Vlan-interface6] dhcp relay server-address 192.168.7.100 Configure DHCP server. Details are not shown. # Assign IP address 192.168.7.100/24 to the NIC of the DHCP server. # Configure IP address 192.168.7.1 as the gateway for the DHCP server. # Make sure the DHCP server can ping 192.168.5.1 and 192.168.6.1.
  • Page 9: Verifying The Configuration

    Switch A: dhcp enable vlan 5 to 7 interface Vlan-interface5 ip address 192.168.5.1 255.255.255.0 dhcp select relay dhcp relay server-address 192.168.7.100 interface Vlan-interface6 ip address 192.168.6.1 255.255.255.0 dhcp select relay dhcp relay server-address 192.168.7.100 interface Vlan-interface7 ip address 192.168.7.1 255.255.255.0...
  • Page 10: Related Documentation

    Ten-GigabitEthernet1/0/2 port link-mode bridge port access vlan 7 Related documentation • DHCP configuration in the Layer 3 IP services configuration guide for the device. • DHCP commands in the Layer 3 IP services command reference for the device.
  • Page 11: Configuring Dhcp Snooping

    DHCP client through GigabitEthernet 1/0/2. Configure the network to meet the following requirements: • Only the port connected to the authorized DHCP server can forward the responses from the DHCP server. • The DHCP snooping device records clients' IP-to-MAC bindings by reading DHCP-ACK messages received from the trusted port and the DHCPREQUEST messages.
  • Page 12: Verifying The Configuration

    Verifying the configuration # Verify that the DHCP client can obtain an IP address and other configuration parameters only from the authorized DHCP server. (Details not shown.) # Use the display dhcp snooping binding command to check the DHCP snooping entry recorded for the client.
  • Page 13: Configuring Dynamic Ipv6 Address Assignment

    Configuring dynamic IPv6 address assignment Introduction The following example describes the basic procedure to configure an interface as a DHCPv6 server for dynamic IPv6 address assignment. Network configuration As shown in Figure 4, Switch A and Switch B are gateway devices for internal hosts. Configure the network to meet the following requirements: •...
  • Page 14 [SwitchA-Vlan-interface1] undo ipv6 nd ra halt # Apply an IPv6 address pool to VLAN-interface 1. [SwitchA-Vlan-interface1] ipv6 dhcp server apply pool 1 allow-hint rapid-commit # Set the M flag to 1 in RA advertisements to be sent on VLAN-interface 1. Hosts that receive the RA advertisements will obtain IPv6 addresses through DHCPv6.
  • Page 15: Verifying The Configuration

    Configure IPv6 on Host B, and then enable Host B to use DHCPv6 for IPv6 address acquisition. Verifying the configuration # View the IPv6 addresses assigned by the DHCPv6 server on Switch A. [SwitchA] display ipv6 dhcp server ip-in-use Pool: 1 IPv6 address...
  • Page 16: Configuration Files

    2 ipv6 dhcp pool 1 network 2001::/64 dns-server 1::1 interface Vlan-interface1 ipv6 dhcp select server ipv6 dhcp server apply pool 1 allow-hint rapid-commit ipv6 address 2001::1/64 ipv6 nd autoconfig managed-address-flag undo ipv6 nd ra halt interface Vlan-interface2 ipv6 address 3001::1/64...
  • Page 17: Related Documentation

    1 allow-hint rapid-commit ipv6 address 4001::1/64 ipv6 nd autoconfig managed-address-flag ipv6 nd autoconfig other-flag undo ipv6 nd ra halt interface GigabitEthernet1/0/1 port link-mode bridge port access vlan 2 interface GigabitEthernet1/0/2 port link-mode bridge port access vlan 3...

Table of Contents