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.
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.
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...
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.
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.
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.
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.
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.
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.
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...